Interface PositionRealmAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

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 ).

  • Method Details

    • canAssignPositions

      boolean canAssignPositions()
      Tests if this user can alter position/realm 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignPositionsToRealm

      boolean canAssignPositionsToRealm(Id realmId)
      Tests if this user can alter position/realm 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      realmId - the Id of the Realm
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - realmId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableRealmIds

      IdList getAssignableRealmIds(Id realmId) throws OperationFailedException
      Gets a list of realms including and under the given realm node in which any position can be assigned.
      Parameters:
      realmId - the Id of the Realm
      Returns:
      list of assignable realm Ids
      Throws:
      NullArgumentException - realmId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableRealmIdsForPosition

      IdList getAssignableRealmIdsForPosition(Id realmId, Id positionId) throws OperationFailedException
      Gets a list of realms including and under the given realm node in which a specific position can be assigned.
      Parameters:
      realmId - the Id of the Realm
      positionId - the Id of the Position
      Returns:
      list of assignable realm Ids
      Throws:
      NullArgumentException - realmId or positionId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignPositionToRealm

      void assignPositionToRealm(Id positionId, Id realmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Position to a Realm .
      Parameters:
      positionId - the Id of the Position
      realmId - the Id of the Realm
      Throws:
      AlreadyExistsException - positionId already assigned to realmId
      NotFoundException - positionId or realmId not found
      NullArgumentException - positionId or realmId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignPositionFromRealm

      void unassignPositionFromRealm(Id positionId, Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Position from a Realm .
      Parameters:
      positionId - the Id of the Position
      realmId - the Id of the Realm
      Throws:
      NotFoundException - positionId or realmId not found or positionId not mapped to realmId
      NullArgumentException - positionId or realmId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignPositionToRealm

      void reassignPositionToRealm(Id positionId, Id fromRealmId, Id toRealmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Position from one Realm to another. Mappings to other Realms are unaffected.
      Parameters:
      positionId - the Id of the Position
      fromRealmId - the Id of the current Realm
      toRealmId - the Id of the destination Realm
      Throws:
      AlreadyExistsException - positionId already assigned to toRealmId
      NotFoundException - positionId, fromRealmId , or toRealmId not found or positionId not mapped to fromRealmId
      NullArgumentException - positionId, fromRealmId , or toRealmId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.