|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CollaborationStep
CollaborationStep represents an instance of a workflow step in a collaboration area. It lets a user access and manipulate collaboration objects, and set deadlines within the step.
Field Summary | |
---|---|
static java.lang.String |
copyright
|
Method Summary | |
---|---|
CollaborationArea |
getCollaborationArea()
Returns the collaboration area for this collaboration step. |
java.lang.String |
getCollaborationObjectsDetailAsXML(java.util.List<CollaborationItem> items,
java.util.List<AttributeDefinition> attrPaths)
Returns an XML representation of workflow step entries for the given Collaboration step. |
java.lang.String |
getCollaborationObjectsDetailAsXML(java.util.List<CollaborationItem> items,
java.util.List<AttributeDefinition> attrPaths,
java.lang.String dateFormat)
Returns an XML representation of workflow step entries for the given Collaboration step, with specified date formatting. |
PIMCollection<CollaborationObject> |
getContents()
Returns all the collaboration objects in this collaboration step. |
PIMCollection<CollaborationObject> |
getContents(Selection selection)
Returns the collaboration objects in this collaboration step that are related to the given selection. |
PIMCollection<CollaborationObject> |
getContentsByAttributeValue(AttributeDefinition attributeDefinition,
java.lang.Object attributeValue)
Returns all the collaboration objects in this step whose attribute at the specified attribute definition contains the specified attribute value. |
PIMCollection<CollaborationObject> |
getContentsByAttributeValue(java.lang.String attributeDefinitionPath,
java.lang.Object attributeValue)
Returns all the collaboration objects in this step whose attribute at the specified path contains the specified attribute value. |
java.lang.String |
getName()
Returns the name of this collaboration step. |
int |
getNumberOfObjects()
Returns the number of collaboration objects in this collaboration step. |
java.util.Collection<CollaborationObject> |
getReservedObjects()
Returns all collaboration objects in this collaboration step that are reserved. |
java.util.Collection<CollaborationObject> |
getReservedObjects(Performer performer)
Returns all collaboration objects in this collaboration step that are reserved by the specified performer |
java.util.Collection<CollaborationObject> |
getReservedObjectsForCurrentUser()
Returns all collaboration objects in this collaboration step that are reserved by the current user. |
java.util.Date |
getTimeout(CollaborationObject object)
Returns the moment in time at which the specified collaboration object will timeout for this step. |
User |
getUserWhoReserved(CollaborationObject reservedObject)
Returns the user to whom the specified collaboration object is reserved. |
WorkflowStep |
getWorkflowStep()
Returns the workflow step for this collaboration step. |
boolean |
release(CollaborationObject reservedObject)
Releases the lock on a collaboration object reserved in this step. |
boolean |
release(CollaborationObject reservedObject,
java.lang.String comment)
Releases the lock on a collaboration object reserved in this step, with a comment. |
boolean |
release(java.util.Collection<CollaborationObject> reservedObjects)
Releases the lock on every collaboration object in the specified collection reserved in this step. |
boolean |
release(java.util.Collection<CollaborationObject> reservedObjects,
java.lang.String comment)
Releases the lock on every collaboration object in the specified collection reserved in this step, with a comment. |
void |
removeTimeout(CollaborationObject object)
Removes any existing timeout for the given collaboration object. |
boolean |
reserve(CollaborationObject object)
Acquires a lock to reserve a collaboration object in this step. |
boolean |
reserve(CollaborationObject object,
java.lang.String comment)
Acquires a lock to reserve a collaboration object in this step, with a comment. |
boolean |
reserve(CollaborationObject object,
java.lang.String comment,
User user)
Acquires a lock to reserve a collaboration object in this step, with a comment for a particular user. |
boolean |
reserve(java.util.Collection<CollaborationObject> objects)
Acquires a lock on every collaboration object in the specified collection to reserve them all in this step. |
boolean |
reserve(java.util.Collection<CollaborationObject> objects,
java.lang.String comment)
Acquires a lock on every collaboration object in the specified collection to reserve them all in this step, with a comment. |
void |
setTimeout(CollaborationObject object,
java.util.Date timeout)
Sets the moment in time at which the specified collaboration object will timeout for this step. |
void |
setTimeout(CollaborationObject object,
int duration)
Sets the time period until the specified collaboration object will timeout for this step. |
Field Detail |
---|
static final java.lang.String copyright
Method Detail |
---|
java.lang.String getName()
PIMInternalException
- if an internal error occurs.CollaborationArea getCollaborationArea()
WorkflowStep getWorkflowStep()
int getNumberOfObjects()
Note that since this method retrieves the count directly from the database, the returned count will differ from the result of getContents().size() if there have been any additions or deletions since the call to getContents.
PIMInternalException
- if an internal error occurs.PIMCollection<CollaborationObject> getContents()
PIMInternalException
- if an internal error occurs.Note that this is a lazily
instantiated collection.
PIMCollection<CollaborationObject> getContents(Selection selection)
If the selection contains items from a catalog (the most common case), the returned collaboration objects are those whose source item is contained in the selection. If the selection contains collaboration objects, the returned collaboration objects are those that are also in the collaboration step.
selection
- the selection to use. This parameter must not be null, and
must refer to a valid selection.
java.lang.IllegalArgumentException
- if a parameter is null or refers to an invalid object.
PIMInternalException
- if an internal error occurs.
java.lang.UnsupportedOperationException
- if the type of the selection is not Static or Dynamic.Note that this is a lazily
instantiated collection.
PIMCollection<CollaborationObject> getContentsByAttributeValue(java.lang.String attributeDefinitionPath, java.lang.Object attributeValue)
Note: this is supported only if this collaboration step is associated with an item collaboration area.
attributeDefinitionPath
- the path for the attribute. This parameter must not be null.attributeValue
- the value for the attribute. This parameter must not be null,
and must refer to an object of appropriate type to represent
an attribute value.
java.lang.IllegalArgumentException
- if either parameter is null, or if attributeValue
does not refer to an object of appropriate type.
PIMInternalException
- if an internal error occurs, or if this collaboration step is
not associated with an item collaboration area.Note that this is a lazily
instantiated collection.
PIMCollection<CollaborationObject> getContentsByAttributeValue(AttributeDefinition attributeDefinition, java.lang.Object attributeValue)
Note: this is supported only if this collaboration step is associated with an item collaboration area.
attributeDefinition
- the attribute definition for the attribute to check. This
parameter must not be null.attributeValue
- the value for the attribute. This parameter must not be null,
and must refer to an object of appropriate type to represent
an attribute value.
PIMInternalException
- if an internal error occurs, or if this collaboration step is
not associated with an item collaboration area.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if either parameter is null, or if attributeValue
does not refer to an object of appropriate type.Note that this is a lazily
instantiated collection.
java.util.Collection<CollaborationObject> getReservedObjects()
PIMInternalException
- if an internal error occurs.java.util.Collection<CollaborationObject> getReservedObjectsForCurrentUser()
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future usejava.util.Collection<CollaborationObject> getReservedObjects(Performer performer)
performer
- the performer (user or role).
PIMInternalException
- if an internal error occurs.
java.lang.IllegalArgumentException
- if the parameter is null.User getUserWhoReserved(CollaborationObject reservedObject)
reservedObject
- the collaboration object reserved in this step. This parameter
must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if the parameter is null.
java.lang.UnsupportedOperationException
- if the object is not in fact reserved (to anyone).java.util.Date getTimeout(CollaborationObject object)
object
- the collaboration object whose timeout value is requested.
This parameter must not be null.
PIMInternalException
- if an internal error occurs.
java.lang.IllegalArgumentException
- if the parameter is null.void setTimeout(CollaborationObject object, java.util.Date timeout)
object
- the collaboration object for which to set the timeout. This
parameter must not be null.timeout
- date at which the specified collaboration object will timeout
for this step. The precision of the value is taken to be
seconds. This parameter must not be null, and it must specify
a time in the future.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- if the current user does not have the authorization to set
the timeout.
java.lang.IllegalArgumentException
- if either parameter is null.
java.lang.UnsupportedOperationException
- if the timeout is a date in the past.void setTimeout(CollaborationObject object, int duration)
object
- the collaboration object for which to set the timeout. This
parameter must not be null.duration
- the duration period of the timeout duration, in seconds. This
parameter must be > 0.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- if the current user does not have the authorization to set
the timeout.
java.lang.IllegalArgumentException
- if the first parameter is null.
java.lang.UnsupportedOperationException
- if the timeout is a date not in the future (that is, duration <=
0).void removeTimeout(CollaborationObject object)
It is safe to invoke this method even if no timeout is defined for the collaboration object.
object
- the collaboration object for which to remove the timeout. This
parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if the parameter is null.boolean release(CollaborationObject reservedObject)
This method does not return until the operation is complete.
reservedObject
- the collaboration object reserved in this step. This parameter
must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if the parameter is null.
java.lang.UnsupportedOperationException
- if the object is not reserved.boolean release(java.util.Collection<CollaborationObject> reservedObjects)
This method does not return until the operation is complete.
This is an atomic operation - either all the locks are released, or none are.
reservedObjects
- the collection of collaboration objects reserved in this step.
This parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if the parameter is null.
java.lang.UnsupportedOperationException
- if any object is not reserved.boolean reserve(CollaborationObject object)
This method does not return until the operation is complete.
object
- the collaboration object for which to acquire the lock in this
step. This parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if the parameter is null.
java.lang.UnsupportedOperationException
- if the object is already reserved.boolean reserve(java.util.Collection<CollaborationObject> objects)
This method does not return until the operation is complete.
This is an atomic operation - either all the locks are acquired, or none are.
objects
- the collection of collaboration objects to be reserved in this
step. This parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if the parameter is null.
java.lang.UnsupportedOperationException
- if any object is already reserved.boolean release(CollaborationObject reservedObject, java.lang.String comment)
This method does not return until the operation is complete.
reservedObject
- the collaboration object reserved in this step. This parameter
must not be null.comment
- the comment. This parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if the first parameter is null.
java.lang.UnsupportedOperationException
- if the object is not reserved.boolean release(java.util.Collection<CollaborationObject> reservedObjects, java.lang.String comment)
This method does not return until the operation is complete.
This is an atomic operation - either all the locks are released, or none are.
reservedObjects
- the collection of collaboration objects reserved in this step.
This parameter must not be null.comment
- the comment. This parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if either parameter is null.
java.lang.UnsupportedOperationException
- if any object is not reserved.boolean reserve(CollaborationObject object, java.lang.String comment)
This method does not return until the operation is complete.
object
- the collaboration object for which to acquire the lock in this
step. This parameter must not be null.comment
- the comment. This parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if either parameter is null.
java.lang.UnsupportedOperationException
- if the object is already reserved.boolean reserve(CollaborationObject object, java.lang.String comment, User user)
This method does not return until the operation is complete.
object
- the collaboration object for which to acquire the lock in this
step. This parameter must not be null.comment
- the comment. This parameter must not be null.user
- the user for whom the lock is acquired.
This parameter must not be null.
PIMInternalException
- if an internal error occurs.
if user is not a performer.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if any of the parameters is null.
java.lang.UnsupportedOperationException
- if the object is already reserved.boolean reserve(java.util.Collection<CollaborationObject> objects, java.lang.String comment)
This method does not return until the operation is complete.
This is an atomic operation - either all the locks are acquired, or none are.
objects
- the collection of collaboration objects for which to acquire a
lock in this step. This parameter must not be null.comment
- the comment. This parameter must not be null.
PIMInternalException
- if an internal error occurs.
PIMAuthorizationException
- Reserved for future use
java.lang.IllegalArgumentException
- if either parameter is null.
java.lang.UnsupportedOperationException
- if the object is already reserved.java.lang.String getCollaborationObjectsDetailAsXML(java.util.List<CollaborationItem> items, java.util.List<AttributeDefinition> attrPaths)
The attribute information of attributes present in attrPaths is included in the XML.
items
- list of collaboration items.attrPaths
- list of attribute definitions.
PIMInternalException
- if an internal error occurs.
java.lang.IllegalStateException
- if the object is not in a stable persisted state.
java.lang.IllegalArgumentException
- if any argument is null.
java.lang.UnsupportedOperationException
- if this method is invoked on a step that belongs to a
CategoryCollaborationArea.java.lang.String getCollaborationObjectsDetailAsXML(java.util.List<CollaborationItem> items, java.util.List<AttributeDefinition> attrPaths, java.lang.String dateFormat)
The attribute information of attributes present in attrPaths is included in the XML. The dateFormat argument is used to control formating of the date values.
items
- list of collaboration items.attrPaths
- list of attribute definitions.dateFormat
- the date format as required by java.text.SimpleDateFormat.
PIMInternalException
- if an internal error occurs.
java.lang.IllegalStateException
- if the object is not in a stable persisted state.
java.lang.IllegalArgumentException
- if items or attrPaths is null or if
dateFormat is null or empty.
java.lang.UnsupportedOperationException
- if this method is invoked on a step that belongs to a
CategoryCollaborationArea.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |