|
Compoze Software, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An extension of IItem that implements a container that holds
other items. Containers have a hierarchical relationship to one another.
The IItem.getParent() call for a container returns the parent
container that holds this container. Containers can sometimes not hold
either items or subcontainers. If this is the case, either the
HOLDS_SUBCONTAINERS or HOLDS_ITEMS properties (or both)
will be false
| Field Summary | |
static ContainerClass |
CLASS
The default type of container for collaboration services. |
static Key |
CONTAINER_CLASS
Key that represents a container type. |
static Key |
HAS_SUBCONTAINERS
Key that represents whether the container has subcontainers. |
static Key |
HOLDS_ITEMS
Key that represents whether the container can hold items. |
static Key |
HOLDS_SUBCONTAINERS
Key that represents whether the container can hold subcontainers. |
static int |
KEYID_CONTAINER_CLASS
The int ID for the CONTAINER_CLASS key. |
static int |
KEYID_HAS_SUBCONTAINERS
The int ID for the HAS_SUBCONTAINERS key. |
static int |
KEYID_HOLDS_ITEMS
The int ID for the HOLDS_ITEMS key. |
static int |
KEYID_HOLDS_SUBCONTAINERS
The int ID for the HOLDS_SUBCONTAINERS key. |
static int |
KEYID_NAME
The int ID for the NAME key. |
static int |
KEYID_SUBCONTAINER_COUNT
The int ID for the SUBCONTAINER_COUNT key. |
static Key[] |
MINIMUM_CONTAINER_KEYS
The minimum required keys when fetching a container. |
static Key |
NAME
Key that represents the name of a container. |
static Key |
SUBCONTAINER_COUNT
Key that represents the number of subcontainers on this container. |
| 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 | |
IItem |
add()
Adds an item to a container. |
IItem |
add(boolean bCommit)
Adds an item to a container that is of the default item class for the container. |
IItem |
add(ItemClass type,
boolean bCommit)
Adds an item of the specified type. |
IContainer |
addSubcontainer(java.lang.String sName)
Adds a subcontainer with the given name to this container. |
void |
copyTo(IContainer container)
Copies the container to another container. |
ContainerClass |
getContainerClass()
Gets the container class for this container. |
int |
getItemCount()
Gets the number of items in this container. |
int |
getItemCount(Restriction restriction)
Gets the number of items in this container. |
IItem[] |
getItems()
Gets all of the items in the container. |
void |
getItems(IProgress progress,
boolean bCreateThread,
QueryProfile queryProfile)
Gets all of the items in the container matching the specified QueryProfile. |
void |
getItems(IProgress progress,
boolean bCreateThread,
QueryProfile queryProfile,
int iPageSize,
int iPage)
Gets items in the container given a number of items per 'page' and a page number, with progress reporting. |
IItem[] |
getItems(QueryProfile queryProfile)
Gets all of the items in the container matching the specified QueryProfile. |
IItemList |
getItems(QueryProfile queryProfile,
int iPageSize,
int iPage)
Gets items in the container given a number of items per 'page' and a page number. |
java.lang.String |
getName()
Gets the name of the container. |
IContainer |
getSubcontainer(java.lang.String sName)
Gets a container with the specified name that is held inside this container. |
IContainer |
getSubcontainer(java.lang.String sName,
FetchProfile fetchProfile)
Gets a container with the specified name that is held inside this container. |
IContainer[] |
getSubcontainers()
Gets the subcontainers in this container. |
IContainer[] |
getSubcontainers(QueryProfile queryProfile)
Gets the subcontainers in this container. |
boolean |
hasSubcontainer(java.lang.String sName)
Determines if this container has a subcontainer with the specified name. |
boolean |
holdsItems()
Determines whether this container is capable of holding items. |
boolean |
holdsSubcontainers()
Determines whether this container is capable of holding subcontainers. |
boolean |
isUnder(IContainer container)
Gets whether a container is in the hierarchy of another container. |
void |
moveTo(IContainer container)
Moves the container to another container. |
void |
setName(java.lang.String sName)
Sets the name of the container. |
| 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 |
public static final int KEYID_CONTAINER_CLASS
int ID for the CONTAINER_CLASS key.
public static final int KEYID_NAME
int ID for the NAME key.
public static final int KEYID_SUBCONTAINER_COUNT
int ID for the SUBCONTAINER_COUNT key.
public static final int KEYID_HAS_SUBCONTAINERS
int ID for the HAS_SUBCONTAINERS key.
public static final int KEYID_HOLDS_ITEMS
int ID for the HOLDS_ITEMS key.
public static final int KEYID_HOLDS_SUBCONTAINERS
int ID for the HOLDS_SUBCONTAINERS key.
public static final Key CONTAINER_CLASS
public static final Key NAME
public static final Key SUBCONTAINER_COUNT
public static final Key HAS_SUBCONTAINERS
public static final Key HOLDS_ITEMS
public static final Key HOLDS_SUBCONTAINERS
public static final Key[] MINIMUM_CONTAINER_KEYS
public static final ContainerClass CLASS
| Method Detail |
public IItem add()
throws CollaborationException
null and not saved in the store
until the IItem.commit() method is called)
OperationUnsupportedException - if the operation is not
supported on this container (the value of HOLDS_ITEMS
is false)
CollaborationException
public IItem add(ItemClass type,
boolean bCommit)
throws CollaborationException
ItemClasses to
pass in may be obtained from the interfaces of the item class itself,
for example, IItem.ITEM_CLASS.
type - the type of item to add (not null)bCommit - saves the type into the store
null)
OperationUnsupportedException - if the operation is not
supported on this container (the value of HOLDS_ITEMS
is false)
CollaborationException
public IItem add(boolean bCommit)
throws CollaborationException
bCommit - saves the type into the store
null)
OperationUnsupportedException - if the operation is not
supported on this container (the value of HOLDS_ITEMS
is false)
CollaborationException
public IContainer addSubcontainer(java.lang.String sName)
throws CollaborationException
IContainer.CLASS.
sName - the container name (not null)
IItem.commit() method is called)
OperationUnsupportedException - if the operation is not
supported on this container (the value of HOLDS_SUBCONTAINERS
is false)
CollaborationException
public boolean hasSubcontainer(java.lang.String sName)
throws CollaborationException
sName - the name
true if this container has a subcontainer with
the specified name
java.lang.UnsupportedOperationException - if the
getSubcontainer(String) operation is not
supported on this container
CollaborationException
public IContainer getSubcontainer(java.lang.String sName)
throws CollaborationException
sName - the name
null if no subcontainer with the
specified name exists)
java.lang.UnsupportedOperationException - if the operation is not
supported on this container
CollaborationException
public IContainer getSubcontainer(java.lang.String sName,
FetchProfile fetchProfile)
throws CollaborationException
sName - the namefetchProfile - the FetchProfile to use
null if no subcontainer with the
specified name exists)
java.lang.UnsupportedOperationException - if the operation is not
supported on this container
CollaborationException
public IContainer[] getSubcontainers()
throws CollaborationException
null)
java.lang.UnsupportedOperationException - if the operation is not
supported on this container
CollaborationException
public IContainer[] getSubcontainers(QueryProfile queryProfile)
throws CollaborationException
queryProfile - the query profile to use when getting items
null)
java.lang.UnsupportedOperationException - if the operation is not
supported on this container
CollaborationExceptionpublic java.lang.String getName()
public int getItemCount()
throws CollaborationException
CollaborationException - if unable to perform the operation
public int getItemCount(Restriction restriction)
throws CollaborationException
restriction - the restriction for the item count
(null for no restriction)
CollaborationException - if unable to perform the operation
public IItem[] getItems()
throws CollaborationException
null)
CollaborationException
public IItem[] getItems(QueryProfile queryProfile)
throws CollaborationException
QueryProfile.
queryProfile - the query profile to use when getting items
null)
CollaborationException
public void getItems(IProgress progress,
boolean bCreateThread,
QueryProfile queryProfile)
QueryProfile. If bCreateThread is
true, this method will return immediately and a separate
thread will be spawned to do the work and report the progress.
The argument to progress.setResults will be an
IItem[].
progress - an IProgress instance to receive
progress reports and the resultsbCreateThread - if true, create a new thread to do
the workqueryProfile - the query profile to use when getting items;
do not re-use until
IProgress.setResults(Object) has been called
public IItemList getItems(QueryProfile queryProfile,
int iPageSize,
int iPage)
throws CollaborationException
QueryProfile.
queryProfile - the query profile to use when getting itemsiPageSize - the count of items that makes a 'page' (<=0 for all)iPage - the page number to fetch (must be >=1)
CollaborationException
public void getItems(IProgress progress,
boolean bCreateThread,
QueryProfile queryProfile,
int iPageSize,
int iPage)
QueryProfile. If bCreateThread is
true, this method will return immediately and a separate
thread will be spawned to do the work and report the progress.
The argument to progress.setResults will be an
IItemList.
progress - an IProgress instance to receive
progress reports and the resultsbCreateThread - if true, create a new thread to do
the workqueryProfile - the query profile to use when getting items;
do not re-use until
IProgress.setResults(Object) has been callediPageSize - the count of items that makes a 'page' (<=0 for all)iPage - the page number to fetch (must be >=1)public ContainerClass getContainerClass()
null)CONTAINER_CLASS
public void moveTo(IContainer container)
throws CollaborationException
moveTo in interface IItemcontainer - the destination container
CollaborationException - if there was a problem moving
this item to a container.
public void copyTo(IContainer container)
throws CollaborationException
copyTo in interface IItemcontainer - the destination container
CollaborationException - if there was a problem copying
this item to a container.
public boolean isUnder(IContainer container)
throws CollaborationException
container - the container to check
true if the current container is a child
of the specified one
CollaborationException - if there was an error checking the relationship
public boolean holdsSubcontainers()
throws CollaborationException
addSubcontainer(String) will fail with an exception.
true if this container is capable of holding
subcontainers, false if not
CollaborationException - if there was an error retrieving
the property (should not happen)HOLDS_SUBCONTAINERS,
addSubcontainer(String)
public boolean holdsItems()
throws CollaborationException
add(), add(boolean) and
add(ItemClass, boolean) will fail with an exception.
true if this container is capable of holding
items, false if not
CollaborationException - if there was an error retrieving
the property (should not happen)HOLDS_ITEMS,
add(),
add(boolean),
add(ItemClass, boolean)
public void setName(java.lang.String sName)
throws CollaborationException
sName - the name (not null)
CollaborationException - if there was an error setting the name
|
Compoze Software, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||