Interface ProcessOfficeAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Process to
Office mappings. A Process may appear in multiple Offices
and removing the last reference to a Process 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 Process to another Office is
not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignProcessToOffice(Id processId, Id officeId) Adds an existingProcessto anOffice.booleanTests if this user can alter process/office mappings.booleancanAssignProcessesToOffice(Id officeId) Tests if this user can alter process/office mappings.getAssignableOfficeIds(Id officeId) Gets a list of offices including and under the given office node in which any process can be assigned.getAssignableOfficeIdsForProcess(Id officeId, Id processId) Gets a list of offices including and under the given office node in which a specific process can be assigned.voidreassignProcessToOffice(Id processId, Id fromOfficeId, Id toOfficeId) Moves aProcessfrom oneOfficeto another.voidunassignProcessFromOffice(Id processId, Id officeId) Removes aProcessfrom anOffice.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignProcesses
boolean canAssignProcesses()Tests if this user can alter process/office mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignProcessesToOffice
Tests if this user can alter process/office mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
officeId- theIdof theOffice- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-officeIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableOfficeIds
Gets a list of offices including and under the given office node in which any process can be assigned.- Parameters:
officeId- theIdof theOffice- Returns:
- list of assignable office
Ids - Throws:
NullArgumentException-officeIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableOfficeIdsForProcess
Gets a list of offices including and under the given office node in which a specific process can be assigned.- Parameters:
officeId- theIdof theOfficeprocessId- theIdof theProcess- Returns:
- list of assignable office
Ids - Throws:
NullArgumentException-officeIdorprocessIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignProcessToOffice
void assignProcessToOffice(Id processId, Id officeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingProcessto anOffice.- Parameters:
processId- theIdof theProcessofficeId- theIdof theOffice- Throws:
AlreadyExistsException-processIdis already assigned toofficeIdNotFoundException-processIdorofficeIdnot foundNullArgumentException-processIdorofficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignProcessFromOffice
void unassignProcessFromOffice(Id processId, Id officeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aProcessfrom anOffice.- Parameters:
processId- theIdof theProcessofficeId- theIdof theOffice- Throws:
NotFoundException-processIdorofficeIdnot found orprocessIdis not assigned toofficeIdNullArgumentException-processIdorofficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignProcessToOffice
void reassignProcessToOffice(Id processId, Id fromOfficeId, Id toOfficeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aProcessfrom oneOfficeto another. Mappings to otherOfficesare unaffected.- Parameters:
processId- theIdof theProcessfromOfficeId- theIdof the currentOfficetoOfficeId- theIdof the destinationOffice- Throws:
AlreadyExistsException-processId, already assigned totoOfficeIdNotFoundException-processId, fromOfficeId, ortoOfficeIdnot found orprocessIdnot mapped tofromOfficeIdNullArgumentException-processId, fromOfficeId, ortoOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-