public interface ContainerList extends ContentElement
ContainerList class represents an ordered map of
Containers. It extends the ContentElement by
methods that allow access and modification of the list.| Modifier and Type | Method and Description |
|---|---|
ContainerIterator |
containerIterator()
Returns a
ContainerIterator over all containers. |
Container |
createContainer()
Creates a new container at the end of the list.
|
Container |
createContainer(java.lang.String label,
java.lang.String above)
Creates a new
Container and places is above the one specified
with the above argument. |
Container |
createContainer(java.lang.String labelhint,
java.lang.String above,
boolean exact)
Creates a new
Container and places is above the one specified
with the above argument. |
Container |
getContainer(int index)
Returns the
Container of this list which has the speficied
index. |
Container |
getContainer(java.lang.String label)
Returns the
Container with the given label. |
Container |
getContainer(java.lang.String label,
boolean create)
Returns the
Container with the given label. |
boolean |
hasContainer(java.lang.String label)
Determines if this containerlist contains the
Container with
the specified label. |
boolean |
isReadOnly()
Returns if this container list is defined as read only.
|
void |
moveContainer(java.lang.String label,
java.lang.String above)
Moves a
Container to a new location. |
void |
removeContainer(java.lang.String label)
Removes the
Container specified by label from
this containerlist. |
int |
size()
Returns the number of containers in the list
|
accept, clear, copyTo, getDeepElement, getDeepElement, getElement, getLabel, getModificationTime, getQualident, getUUID, hasElement, isEmpty, parentContainer getContainer(java.lang.String label) throws ContentBusException
Container with the given label.label - the label of the desired containerContentBusException - if an error occurrsNoSuchContentElementException - if the container does not existContainer getContainer(int index) throws ContentBusException
Container of this list which has the speficied
index.index - the index of the container to retrieveContentBusException - if an error occurrsNoSuchContentElementException - if the container does not existContainer getContainer(java.lang.String label, boolean create) throws ContentBusException
Container with the given label. if the container
does not exist and the create parameter is true,
a new container is created at the end of the containerlist. Please note,
that the page this ContainerList belongs to, must already
be in a transaction.label - The label of the desired containercreate - if true, a new container is created,
if the specified one does not exist.null if its not foundContentBusException - if an error occurresjava.lang.IllegalStateException - if a container should be created, but the
page it not in a transaction yet.boolean hasContainer(java.lang.String label)
Container with
the specified label.label - the label of a containertrue if the container exists;
false otherwise;Container createContainer() throws ContentBusException
ContentBusException - if an error occurresjava.lang.IllegalStateException - if the page is not in a transactionContainer createContainer(java.lang.String label, java.lang.String above) throws ContentBusException
Container and places is above the one specified
with the above argument. The label argument is
taken as the label of the new container. The page that this container
list belongs to, must already be in a transaction. If the label contains
non valid label characters, a IllegalArgumentException is thrown. If the
container with the given label does already exist, this container will
be replaced. If this container list is defined read only, this method has
no effect.label - the lable of the new container.above - the label of the container above which the new contaienr
will be inserted. if this parameter is null
or if the referenced container does not exist, the new
one is added at the end.ContentBusException - if an error occurres.java.lang.IllegalStateException - if the page is not in a transactionjava.lang.IllegalArgumentException - if the label contains illegal label charactersContainer createContainer(java.lang.String labelhint, java.lang.String above, boolean exact) throws ContentBusException
Container and places is above the one specified
with the above argument. The labelhint argument
is taken as hint for the label of the new container. The page that this
container list belongs to, must already be in a transaction. If this
container list is defined read only, this method has no effect.labelhint - a hint for the labelabove - the label of the container above which the new contaienr
will be inserted. if this parameter is null
or if the referenced container does not exist, the new
one is added at the end.exact - if true, the labelhint is taken as exact
string. if it contains any illegal label chars, this
method will throw an IllegalArgumentException.ContentBusException - if an error occurres.java.lang.IllegalStateException - if the page is not in a transactionjava.lang.IllegalArgumentException - if the labelhint contains illegal characters.void moveContainer(java.lang.String label,
java.lang.String above)
throws ContentBusException
Container to a new location. The page that this
container list belongs to, must already be in a transaction. If this
container list is defined read only, this method has no effect.label - label of container to moveabove - label of container to place above. if this parameter is
null or an empty string, the container is
moved at the end of the listContentBusException - if an error occurrsNoSuchContentElementException - if either the source or above
container does not exist.java.lang.IllegalStateException - if the page is not in a transactionvoid removeContainer(java.lang.String label)
throws ContentBusException
Container specified by label from
this containerlist. The page that this container list belongs to, must
already be in a transaction. If this container list is defined read only,
this method has no effect.label - the label of the container to removeContentBusException - if an error occurrsNoSuchContentElementException - if the container does not exist.java.lang.IllegalStateException - if the page is not in a transactionContainerIterator containerIterator() throws ContentBusException
ContainerIterator over all containers.ContainerIterator.ContentBusExceptionint size()
throws ContentBusException
ContentBusExceptionboolean isReadOnly()
true if this container list is defined as read only;
false otherwise.