public interface PositionRealmAssignmentSession extends OsidSession
This session provides methods to re-assign Positions to
Bilings. A Position may map to multiple
Realms and removing the last reference to a Position
is the equivalent of deleting it. Each Realm may
have its own authorizations governing who is allowed to operate on it.
Adding a reference of a Position to another
Realm is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignPositionToRealm(Id positionId,
Id realmId)
Adds an existing
Position to a Realm. |
boolean |
canAssignPositions()
Tests if this user can alter position/realm mappings.
|
boolean |
canAssignPositionsToRealm(Id realmId)
Tests if this user can alter position/realm mappings.
|
IdList |
getAssignableRealmIds(Id realmId)
Gets a list of realms including and under the given realm node in
which any position can be assigned.
|
IdList |
getAssignableRealmIdsForPosition(Id realmId,
Id positionId)
Gets a list of realms including and under the given realm node in
which a specific position can be assigned.
|
void |
unassignPositionFromRealm(Id positionId,
Id realmId)
Removes a
Position from a Realm. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignPositions()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignPositionsToRealm(Id realmId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.realmId - the Id of the Realm false if mapping is not authorized, true
otherwiseNullArgumentException - realmId is
null mandatory - This method must be implemented. IdList getAssignableRealmIds(Id realmId) throws OperationFailedException
realmId - the Id of the Realm Ids NullArgumentException - realmId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableRealmIdsForPosition(Id realmId, Id positionId) throws OperationFailedException
realmId - the Id of the Realm positionId - the Id of the Position
Ids NullArgumentException - realmId or
positionId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignPositionToRealm(Id positionId, Id realmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Position to a Realm. positionId - the Id of the Position
realmId - the Id of the Realm AlreadyExistsException - positionId
already assigned to realmId NotFoundException - positionId or
realmId not foundNullArgumentException - positionId or
realmId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignPositionFromRealm(Id positionId, Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Position from a Realm. positionId - the Id of the Position
realmId - the Id of the Realm NotFoundException - positionId or
realmId not found or positionId not
mapped to realmId NullArgumentException - positionId or
realmId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.