|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IContainer
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(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. |
String |
getName()
Gets the name of the container. |
IContainer |
getSubcontainer(String sName)
Gets a container with the specified name that is held inside this container. |
IContainer |
getSubcontainer(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(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(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 |
---|
static final int KEYID_CONTAINER_CLASS
int
ID for the CONTAINER_CLASS
key.
static final int KEYID_NAME
int
ID for the NAME
key.
static final int KEYID_SUBCONTAINER_COUNT
int
ID for the SUBCONTAINER_COUNT
key.
static final int KEYID_HAS_SUBCONTAINERS
int
ID for the HAS_SUBCONTAINERS
key.
static final int KEYID_HOLDS_ITEMS
int
ID for the HOLDS_ITEMS
key.
static final int KEYID_HOLDS_SUBCONTAINERS
int
ID for the HOLDS_SUBCONTAINERS
key.
static final Key CONTAINER_CLASS
static final Key NAME
static final Key SUBCONTAINER_COUNT
static final Key HAS_SUBCONTAINERS
static final Key HOLDS_ITEMS
static final Key HOLDS_SUBCONTAINERS
static final Key[] MINIMUM_CONTAINER_KEYS
static final ContainerClass CLASS
Method Detail |
---|
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
IItem add(ItemClass type, boolean bCommit) throws CollaborationException
ItemClass
es 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
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
IContainer addSubcontainer(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
boolean hasSubcontainer(String sName) throws CollaborationException
sName
- the name
true
if this container has a subcontainer with
the specified name
UnsupportedOperationException
- if the
getSubcontainer(String)
operation is not
supported on this container
CollaborationException
IContainer getSubcontainer(String sName) throws CollaborationException
sName
- the name
null
if no subcontainer with the
specified name exists)
UnsupportedOperationException
- if the operation is not
supported on this container
CollaborationException
IContainer getSubcontainer(String sName, FetchProfile fetchProfile) throws CollaborationException
sName
- the namefetchProfile
- the FetchProfile to use
null
if no subcontainer with the
specified name exists)
UnsupportedOperationException
- if the operation is not
supported on this container
CollaborationException
IContainer[] getSubcontainers() throws CollaborationException
null
)
UnsupportedOperationException
- if the operation is not
supported on this container
CollaborationException
IContainer[] getSubcontainers(QueryProfile queryProfile) throws CollaborationException
queryProfile
- the query profile to use when getting items
null
)
UnsupportedOperationException
- if the operation is not
supported on this container
CollaborationException
String getName()
int getItemCount() throws CollaborationException
CollaborationException
- if unable to perform the operationint getItemCount(Restriction restriction) throws CollaborationException
restriction
- the restriction for the item count
(null
for no restriction)
CollaborationException
- if unable to perform the operationIItem[] getItems() throws CollaborationException
null
)
CollaborationException
IItem[] getItems(QueryProfile queryProfile) throws CollaborationException
QueryProfile
.
queryProfile
- the query profile to use when getting items
null
)
CollaborationException
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 calledIItemList 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
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)ContainerClass getContainerClass()
null
)CONTAINER_CLASS
void moveTo(IContainer container) throws CollaborationException
moveTo
in interface IItem
container
- the destination container
CollaborationException
- if there was a problem moving
this item to a container.void copyTo(IContainer container) throws CollaborationException
copyTo
in interface IItem
container
- the destination container
CollaborationException
- if there was a problem copying
this item to a container.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 relationshipboolean 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)
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)
void setName(String sName) throws CollaborationException
sName
- the name (not null
)
CollaborationException
- if there was an error setting the name
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |