public interface WorkOfficeAssignmentSession extends OsidSession
This session provides methods to re-assign Works to
Office mappings. A Work may appear in
multiple Office objects and removing the last reference to
a Work is the equivalent of deleting it. Each Office
may have its own authorizations governing who is allowed to
operate on it.
Adding a reference of a Work to another Office
is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignWorkToOffice(Id workId,
Id officeId)
Adds an existing
Work to a Office. |
boolean |
canAssignWorks()
Tests if this user can alter work/office mappings.
|
boolean |
canAssignWorksToOffice(Id officeId)
Tests if this user can alter work/office mappings.
|
IdList |
getAssignableOfficeIds(Id officeId)
Gets a list of offices including and under the given office node in
which any work can be assigned.
|
IdList |
getAssignableOfficeIdsForWork(Id officeId,
Id workId)
Gets a list of offices including and under the given office node in
which a specific work can be assigned.
|
void |
unassignWorkFromOffice(Id workId,
Id officeId)
Removes a
Work from a Office. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignWorks()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignWorksToOffice(Id officeId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.officeId - the Id of the Office false if workflow is not authorized,
true otherwiseNullArgumentException - officeId is
null mandatory - This method must be implemented. IdList getAssignableOfficeIds(Id officeId) throws OperationFailedException
officeId - the Id of the Office Ids NullArgumentException - officeId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableOfficeIdsForWork(Id officeId, Id workId) throws OperationFailedException
officeId - the Id of the Office workId - the Id of the Work Ids NullArgumentException - officeId or
workId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignWorkToOffice(Id workId, Id officeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Work to a Office. workId - the Id of the Work officeId - the Id of the Office AlreadyExistsException - workId is
already assigned to officeId NotFoundException - workId or
officeId not foundNullArgumentException - workId or
officeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignWorkFromOffice(Id workId, Id officeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Work from a Office. workId - the Id of the Work officeId - the Id of the Office NotFoundException - workId or
officeId not found or workId not
assigned to officeId NullArgumentException - workId or
officeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.