com.compoze.collab
Interface IRootContainer

All Superinterfaces
IContainer, IItem, Serializable
All Known Subinterfaces:
IAddressBook, ICmForumRootContainer

public interface IRootContainer
extends IContainer

This class implements a root container, which can be used to fetch any item or container in the hierarchy.


Field Summary
static RootContainerClass CLASS
          The default type of root container for collaboration services.
static Key[] MINIMUM_ROOT_CONTAINER_KEYS
          The minimum required keys when fetching a root container.
 
Fields inherited from interface com.compoze.collab.IContainer
CONTAINER_CLASS, HAS_SUBCONTAINERS, HOLDS_ITEMS, HOLDS_SUBCONTAINERS, KEYID_CONTAINER_CLASS, KEYID_HAS_SUBCONTAINERS, KEYID_HOLDS_ITEMS, KEYID_HOLDS_SUBCONTAINERS, KEYID_NAME, KEYID_SUBCONTAINER_COUNT, MINIMUM_CONTAINER_KEYS, NAME, SUBCONTAINER_COUNT
 
Fields inherited from interface com.compoze.collab.IItem
ID, ITEM_CLASS, KEYID_ID, KEYID_ITEM_CLASS, KEYID_PARENT_ID, MINIMUM_ITEM_KEYS, PARENT_ID
 
Method Summary
 void deleteItems(String[] sIDs)
          Deletes one or more items anywhere in this root container.
 IContainer getContainerByID(String sID)
          Gets a container from the root container by its ID.
 IContainer getContainerByID(String sID, FetchProfile profile)
          Gets a container from the root container by its ID.
 IItem getItemByID(String sID)
          Gets an item from the root container by its ID.
 IItem getItemByID(String sID, FetchProfile profile)
          Gets an item from the root container by its ID.
 IItem[] getItemsByID(String[] sIDs, FetchProfile profile)
          Gets an array of items from the root container by their IDs.
 void moveItems(String[] sIDs, IContainer target)
          Moves one or more items anywhere in this root container to a target container.
 
Methods inherited from interface com.compoze.collab.IContainer
add, add, add, addSubcontainer, copyTo, getContainerClass, getItemCount, getItemCount, getItems, getItems, getItems, getItems, getItems, getName, getSubcontainer, getSubcontainer, getSubcontainers, getSubcontainers, hasSubcontainer, holdsItems, holdsSubcontainers, isUnder, moveTo, setName
 
Methods inherited from interface com.compoze.collab.IItem
commit, containsKey, containsKey, copyProperties, delete, fetchProperties, getAttribute, getEnum, getID, getInputStream, getItemClass, getOutputStream, getParent, getParent, getParentID, getProperties, getProperties, getProperties, getProperty, getProperty, getProperty, getReader, getRootContainer, getSession, getWriter, isMissing, removeAttribute, removeProperty, setAttribute, setProperties, setProperty, setProperty, setProperty
 

Field Detail

MINIMUM_ROOT_CONTAINER_KEYS

static final Key[] MINIMUM_ROOT_CONTAINER_KEYS
The minimum required keys when fetching a root container.


CLASS

static final RootContainerClass CLASS
The default type of root container for collaboration services.

Method Detail

getContainerByID

IContainer getContainerByID(String sID)
                            throws CollaborationException
Gets a container from the root container by its ID.

Parameters
sID - the container ID
Returns
the container or null if no container with the specified ID was found
Throws
CollaborationException - if there was a problem with the provider when retrieving the container

getContainerByID

IContainer getContainerByID(String sID,
                            FetchProfile profile)
                            throws CollaborationException
Gets a container from the root container by its ID.

Parameters
sID - the container ID
profile - the profile to use that defines the keys
Returns
the container or null if no container with the specified ID was found
Throws
CollaborationException - if there was a problem with the provider when retrieving the container

getItemByID

IItem getItemByID(String sID)
                  throws CollaborationException
Gets an item from the root container by its ID.

Parameters
sID - the item ID
Returns
the item (or null if no item with the specified ID was found)
Throws
CollaborationException - if there was a problem with the provider when retrieving the item

getItemByID

IItem getItemByID(String sID,
                  FetchProfile profile)
                  throws CollaborationException
Gets an item from the root container by its ID.

Parameters
sID - the item ID
profile - the profile to use that defines the keys
Returns
the item (not null).
Throws
CollaborationException - if there was a problem with the provider when retrieving the item (possible nested exceptions include: ItemNotFoundException).

getItemsByID

IItem[] getItemsByID(String[] sIDs,
                     FetchProfile profile)
                     throws CollaborationException
Gets an array of items from the root container by their IDs. Some providers may not be able to provide this functionality and will need sIDs.length number of calls to retrieve each item individually by their ID.

Parameters
sIDs - the IDs of the items to retrieve (may not be null)
profile - the profile to use to fetch the items
Returns
the items requested, ordered as in sIDs. If an item was unable to be retrieved, an IMissingItem instance will be created in place of that item.
Throws
CollaborationException - if there was a problem with the provider when retrieving the items

deleteItems

void deleteItems(String[] sIDs)
                 throws CollaborationException
Deletes one or more items anywhere in this root container.

Parameters
sIDs - the IDs of the items to delete (may not be null).
Throws
CollaborationException - if there was a problem with the provider or with deleting any of the items.

moveItems

void moveItems(String[] sIDs,
               IContainer target)
               throws CollaborationException
Moves one or more items anywhere in this root container to a target container.

Parameters
sIDs - the IDs of the items to delete (may not be null).
target - the container the items will be moved to.
Throws
ContainerCycleException - if any of the items being moved is an ancestor of target
ContainerAlreadyExistsException - if an item being moved is a container and a container with the same name already exists in the target
CollaborationException - if there was a problem with the provider or with moving any of the items.


Copyright © 2006 BEA Systems, Inc. All Rights Reserved