Interface ChainAntimatroidAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Chains to
Antimatroid mappings. A Chain may appear in multiple
Antimatroid objects and removing the last reference to a Chain is
the equivalent of deleting it. Each Antimatroid may have its own
authorizations governing who is allowed to operate on it.
Adding a reference of a Chain to another Antimatroid
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignChainToAntimatroid(Id chainId, Id antimatroidId) Adds an existingChainto aAntimatroid.booleanTests if this user can alter chain/antimatroid mappings.booleancanAssignChainsToAntimatroid(Id antimatroidId) Tests if this user can alter chain/antimatroid mappings.getAssignableAntimatroidIds(Id antimatroidId) Gets a list of antimatroids including and under the given antimatroid node in which any chain can be assigned.getAssignableAntimatroidIdsForChain(Id antimatroidId, Id chainId) Gets a list of antimatroids including and under the given antimatroid node in which a specific chain can be assigned.voidreassignChainToAntimatroid(Id chainId, Id fromAntimatroidId, Id toAntimatroidId) Moves aChainfrom oneAntimatroidto another.voidunassignChainFromAntimatroid(Id chainId, Id antimatroidId) Removes aChainfrom aAntimatroid.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
-
canAssignChains
boolean canAssignChains()Tests if this user can alter chain/antimatroid 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 chain is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignChainsToAntimatroid
Tests if this user can alter chain/antimatroid 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:
antimatroidId- theIdof theAntimatroid- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-antimatroidIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableAntimatroidIds
Gets a list of antimatroids including and under the given antimatroid node in which any chain can be assigned.- Parameters:
antimatroidId- theIdof theAntimatroid- Returns:
- list of assignable antimatroid
Ids - Throws:
NullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableAntimatroidIdsForChain
IdList getAssignableAntimatroidIdsForChain(Id antimatroidId, Id chainId) throws OperationFailedException Gets a list of antimatroids including and under the given antimatroid node in which a specific chain can be assigned.- Parameters:
antimatroidId- theIdof theAntimatroidchainId- theIdof theChain- Returns:
- list of assignable antimatroid
Ids - Throws:
NullArgumentException-antimatroidIdorchainIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignChainToAntimatroid
void assignChainToAntimatroid(Id chainId, Id antimatroidId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingChainto aAntimatroid.- Parameters:
chainId- theIdof theChainantimatroidId- theIdof theAntimatroid- Throws:
AlreadyExistsException-chainIdis already assigned toantimatroidIdNotFoundException-chainIdorantimatroidIdnot foundNullArgumentException-chainIdorantimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignChainFromAntimatroid
void unassignChainFromAntimatroid(Id chainId, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aChainfrom aAntimatroid.- Parameters:
chainId- theIdof theChainantimatroidId- theIdof theAntimatroid- Throws:
NotFoundException-chainIdorantimatroidIdnot found orchainIdnot assigned toantimatroidIdNullArgumentException-chainIdorantimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignChainToAntimatroid
void reassignChainToAntimatroid(Id chainId, Id fromAntimatroidId, Id toAntimatroidId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aChainfrom oneAntimatroidto another. Mappings to otherAntimatroidsare unaffected.- Parameters:
chainId- theIdof theChainfromAntimatroidId- theIdof the currentAntimatroidtoAntimatroidId- theIdof the destinationAntimatroid- Throws:
AlreadyExistsException-chainIdalready assigned totoAntimatroidIdNotFoundException-chainId, fromAntimatroidId, ortoAntimatroidIdnot found orchainIdnot mapped tofromAntimatroidIdNullArgumentException-chainId, fromAntimatroidId, ortoAntimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-