Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wli.worklist.api.taskplan
Interface NamedObjectContainer<T extends NamedObject>

All Superinterfaces:
  EventSource, Serializable

All Known Subinterfaces:
  ActionContainer<T>, ConstructorContainer, Step

    public interface NamedObjectContainer<T extends NamedObject>

extends EventSource, Serializable

Represents a container of named objects. This container allows clients to remove and retrieve objects by name, as well as allowing them to add back (by value) any object previously removed from the container. This latter capabilility is used to support undo of a remove operation.

Nested Class Summary

Nested classes/interfaces inherited from interface com.bea.wli.worklist.api.taskplan.EventSource
`EventSource.Event`

Method Summary
`T` | `addChild(String name)` Create and add a new child object.
`void` | `addChild(T child)` Add a child object to this collection.
`void` | `clear()` Remove all children in this container.
`T` | `getChild(String name)` Get a child object given the child object's name.
`String[]` | `getChildNames()` Get an array containing the names of all children contained in this container.
`Collection<T>` | `getChildObjects()` Get an array containing the children contained in this container.
`boolean` | `hasChild(String name)` Return true if a child object with the given name exists in this container.
`T` | `removeChild(String name)` Remove a child by name and return the child object for a possible future call to addBackRemovedChild().
`void` | `renameChild(String oldName, String newName)` Change the name of the child with oldName to newName.

Methods inherited from interface com.bea.wli.worklist.api.taskplan.EventSource
`addPropertyChangeListener, addPropertyChangeListener, clearDirty, dispose, getParent, isComplete, isDirty, isInitializing, isStarted, markDirty, removePropertyChangeListener, removePropertyChangeListener, startProducing`

Method Detail

### hasChild

    boolean hasChild(String name)

  Return true if a child object with the given name exists in this container.

### getChild

    T getChild(String name)
                                   throws UnknownObjectException

  Get a child object given the child object's name.

  Throws:
    `UnknownObjectException` - If no child with the given name exists in this container.

### getChildNames

    String[] getChildNames()

  Get an array containing the names of all children contained in this container.

### getChildObjects

    Collection<T> getChildObjects()

  Get an array containing the children contained in this container.

### renameChild

    void renameChild(String oldName,
                     String newName)
                     throws UnknownObjectException

  Change the name of the child with oldName to newName.

  Parameters:
    `oldName` - The current name of the child.
    `newName` - The new name for the child.
  Throws:
    `UnknownObjectException` - If no child with the given oldName exists in this container.

### removeChild

    T removeChild(String name)
                                      throws UnknownObjectException

  Remove a child by name and return the child object for a possible future call to addBackRemovedChild().

  Parameters:
    `name` - The name of the child to remove
  Returns:
    The child object that was removed. This object can be retained if you intend (possibly) to call the addBackRemovedChild() method later on (to undo this removal).
  Throws:
    `UnknownObjectException` - If no child with the given name exists in this container. #addBackRemovedChild(NamedObject)

### clear

    void clear()

  Remove all children in this container.

### addChild

    void addChild(T child)
                  throws DuplicateObjectException,
                         UnknownObjectException

  Add a child object to this collection. This child might have been created in this container and then subsequently removed, or created in another container and then cloned to prepare it for addition into this container. The child passed to this method must not be added to any other container.

  Parameters:
    `child` - The object, removed with a prior call to removeChild, or cloned from an object in another container, that is to be added to the container.
  Throws:
    `DuplicateObjectException` - If a child with the given name already exists in this container.
    `UnknownObjectException` - If the child being readded was not one that was removed from this container with a call to removeChild.
  See Also:
    `removeChild(java.lang.String)`

### addChild

    T addChild(String name)
                                   throws DuplicateObjectException

  Create and add a new child object.

  Parameters:
    `name` - The name of the child that will be created and added to this collection.
  Throws:
    `DuplicateObjectException` - If a child with the given name already exists in this container.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD