|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The root inteface for the content component container hierarchy. A
ContentComponentContainer represents a container for
ContentComponent objects.
The ContentComponent objects. Components
cannot be added or removed from a ContentComponentContainer
through the API. The API only allows an update of a ContentComponent
object that already exists in this ContentComponentContainer.
Passing a null argument to a method of this class will result in a
NullPointerException, unless stated otherwise.
| Field Summary | |
static java.lang.String |
COPYRIGHT
Copyright statement |
| Method Summary | |
void |
addComponent(java.lang.String p_name,
ContentComponent p_component)
Adds the ContentComponent with the name specified by the
argument to this ContentComponentContainer. |
ContentComponentIterator |
componentIterator()
Returns an iterator of all ContentComponent objects
in this ContentComponentContainer. |
ContentComponent |
createComponent(java.lang.String p_name,
DocumentType p_componentType)
Creates a new ContentComponent of the specified type with
the name specified by the argument and associates it with this
ContentComponentContainer. |
ContentComponent |
getComponent(java.lang.String p_name)
Retrieves a ContentComponent with a name specified by the
argument from this ContentComponentContainer. |
ContentComponent |
getComponentByReference(java.lang.String p_name)
Retrieves a ContentComponent with a name specified by the
argument from this ContentComponentContainer. |
java.lang.String[] |
getComponentNames()
Returns a list of component names for all ContentComponent's in
this ContentComponentContainer. |
boolean |
hasComponent(java.lang.String p_name)
Returns true if and only if the argument is not null and a ContentComponent with a name specified by the argument exists in
this ContentComponentContainer. |
void |
removeComponent(java.lang.String p_name)
Removes the ContentComponent with the name specified by the
argument in this ContentComponentContainer. |
void |
setComponent(java.lang.String p_name,
ContentComponent p_component)
Sets the ContentComponent with the name specified by the
argument in this ContentComponentContainer. |
| Methods inherited from interface com.ibm.workplace.wcm.api.Editable |
addAuthors, addDeleteAccessMembers, addEditAccessMembers, addLiveAccessMembers, addOwners, addReadAccessMembers, isChanged, removeAuthors, removeDeleteAccessMembers, removeEditAccessMembers, removeLiveAccessMembers, removeOwners, removeReadAccessMembers, setDescription, setName |
| Methods inherited from interface com.ibm.workplace.wcm.api.Document |
getAuthors, getDeleteAccessMembers, getDescription, getEditAccessMembers, getId, getLiveAccessMembers, getModifiedDate, getName, getOwners, getReadAccessMembers, hasDeleteAccess, hasDeleteAccess, hasEditAccess, hasEditAccess, hasLiveAccess, hasLiveAccess, hasReadAccess, hasReadAccess |
| Field Detail |
public static final java.lang.String COPYRIGHT
| Method Detail |
public ContentComponentIterator componentIterator()
ContentComponent objects
in this ContentComponentContainer.
Note: This method will return null entries for unsupported
content components
Note: The iterator this method returns contains a copy of each
ContentComponent rather than a reference to each
ContentComponent
public boolean hasComponent(java.lang.String p_name)
ContentComponent with a name specified by the argument exists in
this ContentComponentContainer.
Note: This method is case sensitive.
p_name - the name of the ContentComponent
ContentComponent with a name matching the argument exists in
this ContentComponentContainer; false otherwise.
public ContentComponent getComponent(java.lang.String p_name)
throws ComponentNotFoundException
ContentComponent with a name specified by the
argument from this ContentComponentContainer.
The hasComponent() method should be called first to ensure
that a ContentComponent with the specified name exists,
otherwise an exception may be thrown.
Note: This method is case sensitive.
Note: If the requested ContentComponent is to be used during rendering
only (or simply inspected) and will never be modified, then the getComponentByReference
method can be used instead to speed up performance
p_name - the name of the ContentComponent to retrieve
ContentComponent
ComponentNotFoundException - if a ContentComponent with the
specified name cannot be found
public ContentComponent getComponentByReference(java.lang.String p_name)
throws ComponentNotFoundException
ContentComponent with a name specified by the
argument from this ContentComponentContainer.
The hasComponent() method should be called first to ensure
that a ContentComponent with the specified name exists,
otherwise an exception may be thrown.
Note: This method is case sensitive.
Warning: Unlike the getComponent() method, this method doesn't
clone the internal ContentComponent and therefore should only be used during
rendering. If you need to change the ContentComponent OR copy it to
another Document then use the getComponent() method instead
p_name - the name of the ContentComponent to retrieve
ContentComponent as specified by the name
ComponentNotFoundException - if a ContentComponent with the
specified name cannot be found
public void setComponent(java.lang.String p_name,
ContentComponent p_component)
throws ComponentNotFoundException,
IllegalTypeChangeException
ContentComponent with the name specified by the
argument in this ContentComponentContainer.
Note: The name and type of ContentComponent passed in as
arguments to this method must exactly match the name and type of an existing
ContentComponent in this ContentComponentContainer.
This method only allows an update of an existing component.
p_name - name of component to be updatedp_component - updated copy of component
ComponentNotFoundException - if no ContentComponent with
the given name exists in this ContentComponentContainer
IllegalTypeChangeException - if the ContentComponent passed
in as an argument is a different type than the existing component with the
given name
public void addComponent(java.lang.String p_name,
ContentComponent p_component)
throws DuplicateComponentException
ContentComponent with the name specified by the
argument to this ContentComponentContainer.
Note: The name of ContentComponent passed in as an
argument to this method must not match the name of an existing
ContentComponent in this ContentComponentContainer.
This method does not allow the update of an existing component.
Note: The supplied ContentComponent must be either a new
ContentComponent or a clone of an existing ContentComponent,
components returned from the getComponentByReference() method must not be used as
arguments to this method
p_name - name of component to be addedp_component - component to be added
DuplicateComponentException - if a ContentComponent with
the given name exists in this ContentComponentContainer
public ContentComponent createComponent(java.lang.String p_name,
DocumentType p_componentType)
throws DuplicateComponentException,
IllegalDocumentTypeException,
DocumentCreationException
ContentComponent of the specified type with
the name specified by the argument and associates it with this
ContentComponentContainer.
Note: The association of the new ContentComponent and any changes
to the ContentComponent will not be saved until this ContentComponentContainer
is saved
Note: The name of ContentComponent passed in as an
argument to this method must not match the name of an existing
ContentComponent in this ContentComponentContainer.
This method does not allow the update of an existing component.
Note: The type of ContentComponent passed in as an
argument to this method must be one of the following items:
p_name - name of component to be addedp_componentType - type of component to be added
ContentComponent that was created
DuplicateComponentException - if a ContentComponent with
the given name exists in this ContentComponentContainer
IllegalDocumentTypeException - if the specified component type is not one
of those mentioned above
DocumentCreationException - if the specified component type could not be created
public void removeComponent(java.lang.String p_name)
throws ComponentNotFoundException
ContentComponent with the name specified by the
argument in this ContentComponentContainer.
Note: The name of ContentComponent passed in as an
argument to this method must exactly match the name of an existing
ContentComponent in this ContentComponentContainer.
Note: This method is case sensitive.
p_name - name of component to be updated
ComponentNotFoundException - if no ContentComponent with
the given name exists in this ContentComponentContainerpublic java.lang.String[] getComponentNames()
ContentComponent's in
this ContentComponentContainer.
Note: The component name list will also include the names of unsupported content components
String array of all component names
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||