Interface AvailabilityFoundryAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AvailabilityFoundryAssignmentSession extends OsidSession

This session provides methods to re-assign Availabilities to Foundry mappings. An Availability may appear in multiple Foundry objects and removing the last reference to an Availability is the equivalent of deleting it. Each Foundry may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Availability to another Foundry is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignAvailabilities

      boolean canAssignAvailabilities()
      Tests if this user can alter availability/foundry 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.
      Returns:
      false if availability is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignAvailabilitiesToFoundry

      boolean canAssignAvailabilitiesToFoundry(Id foundryId)
      Tests if this user can alter availability/foundry 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:
      foundryId - the Id of the Foundry
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - foundryId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableFoundryIds

      IdList getAssignableFoundryIds(Id foundryId) throws OperationFailedException
      Gets a list of foundries including and under the given foundry node in which any availability can be assigned.
      Parameters:
      foundryId - the Id of the Foundry
      Returns:
      list of assignable foundry Ids
      Throws:
      NullArgumentException - foundryId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableFoundryIdsForAvailability

      IdList getAssignableFoundryIdsForAvailability(Id foundryId, Id availabilityId) throws OperationFailedException
      Gets a list of foundries including and under the given foundry node in which a specific availability can be assigned.
      Parameters:
      foundryId - the Id of the Foundry
      availabilityId - the Id of the Availability
      Returns:
      list of assignable foundry Ids
      Throws:
      NullArgumentException - foundryId or availabilityId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignAvailabilityToFoundry

      void assignAvailabilityToFoundry(Id availabilityId, Id foundryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Availability to a Foundry .
      Parameters:
      availabilityId - the Id of the Availability
      foundryId - the Id of the Foundry
      Throws:
      NotFoundException - availabilityId or foundryId not found
      NullArgumentException - availabilityId or foundryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignAvailabilityFromFoundry

      void unassignAvailabilityFromFoundry(Id availabilityId, Id foundryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Availability from a Foundry .
      Parameters:
      availabilityId - the Id of the Availability
      foundryId - the Id of the Foundry
      Throws:
      NotFoundException - availabilityId or foundryId not found
      NullArgumentException - availabilityId or foundryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignAvailabilityToFoundry

      void reassignAvailabilityToFoundry(Id availabilityId, Id fromFoundryId, Id toFoundryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Availability from one Foundry to another. Mappings to other Foundries are unaffected.
      Parameters:
      availabilityId - the Id of the Availability
      fromFoundryId - the Id of the current Foundry
      toFoundryId - the Id of the destination Foundry
      Throws:
      AlreadyExistsException - availabilityId already assigned to toFoundryId
      NotFoundException - availabilityId, fromFoundryId , or toFoundryId not found or availabilityId not mapped to fromFoundryId
      NullArgumentException - availabilityId, fromFoundryId , or toFoundryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.