| |
|
| java.lang.Object org.millstone.base.data.util.IndexedContainer org.millstone.base.data.util.HierarchicalContainer
HierarchicalContainer | public class HierarchicalContainer extends IndexedContainer implements Container.Hierarchical(Code) | | A specialized Container whose contents can be accessed like it was a
tree-like structure.
author: IT Mill Ltd. version: 3.1.1 since: 3.0 |
areChildrenAllowed | public boolean areChildrenAllowed(Object itemId)(Code) | | |
setChildrenAllowed | public boolean setChildrenAllowed(Object itemId, boolean childrenAllowed)(Code) | | Sets the given Item's capability to have children. If the Item
identified with itemId already has children and
areChildrenAllowed is false this method fails and
false is returned; the children must be first explicitly
removed with
HierarchicalContainer.setParent(Object itemId,Object newParentId) or
org.millstone.base.data.Container.removeItem(Object itemId) .
Parameters: itemId - ID of the Item in the container whose childcapability is to be set Parameters: childrenAllowed - boolean value specifying if the Itemcan have children or not true if the operation succeeded,false if not |
setParent | public boolean setParent(Object itemId, Object newParentId)(Code) | | Sets the parent of an Item. The new parent item must exist and be
able to have children.
(canHaveChildren(newParentId) == true ). It is also
possible to detach a node from the hierarchy (and thus make it root)
by setting the parent null .
Parameters: itemId - ID of the item to be set as the child of the Itemidentified with newParentId Parameters: newParentId - ID of the Item that's to be the new parentof the Item identified with itemId true if the operation succeeded,false if not |
|
|
|