Interface StateAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign State to reference
Ids . A State may be associated with multiple reference
ids . A reference id may map to only one State .
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignReferenceToState(Id referenceId, Id stateId) Adds a referenceIdto aState.booleanTests if this user can alter state/id mappings.getNextStateIds(Id referenceId, Id processId) Gets the valid states that can be assigned to the referenceidin the given process.getNextStates(Id referenceId, Id processId) Gets the valid states that can be assigned to a referenceIdin the given process.voidunassignReferenceFromState(Id referenceId, Id stateId) Removes a referenceIdfrom aState.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
-
canAssignStates
boolean canAssignStates()Tests if this user can alter state/id 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 lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getNextStateIds
IdList getNextStateIds(Id referenceId, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the valid states that can be assigned to the referenceidin the given process.- Parameters:
referenceId- a referenceIdprocessId-Idof theProcess- Returns:
- the
Idsof the next valid states - Throws:
NotFoundException-referenceIdorprocessIdis not foundNullArgumentException-referenceIdorprocessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getNextStates
StateList getNextStates(Id referenceId, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the valid states that can be assigned to a referenceIdin the given process.- Parameters:
referenceId- a referenceIdprocessId-Idof theProcess- Returns:
- the next valid states
- Throws:
NotFoundException-referenceIdorprocessIdis not foundNullArgumentException-referenceIdorprocessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
assignReferenceToState
void assignReferenceToState(Id referenceId, Id stateId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a referenceIdto aState.- Parameters:
referenceId- a referenceIdstateId- theIdof theState- Throws:
AlreadyExistsException- thisIdis already assigned to the stateNotFoundException-stateIdnot foundNullArgumentException-idorstateIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignReferenceFromState
void unassignReferenceFromState(Id referenceId, Id stateId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a referenceIdfrom aState.- Parameters:
referenceId- a referenceIdstateId- theIdof theState- Throws:
NotFoundException-stateIdnot foundNullArgumentException-referenceIdorstateIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-