Interface ProvisionableDistributorAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProvisionableDistributorAssignmentSession extends OsidSession

This session provides methods to re-assign Provisionables to Distributor mappings. A Provisionable may appear in multiple Distributor objects and removing the last reference to a Provisionable is the equivalent of deleting it. Each Distributor may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Provisionable to another Distributor is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignProvisionables

      boolean canAssignProvisionables()
      Tests if this user can alter provisionable/distributor 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 provisionable is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignProvisionablesToDistributor

      boolean canAssignProvisionablesToDistributor(Id distributorId)
      Tests if this user can alter provisionable/distributor 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:
      distributorId - the Id of the Distributor
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - distributorId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableDistributorIds

      IdList getAssignableDistributorIds(Id distributorId) throws OperationFailedException
      Gets a list of distributors including and under the given distributor node in which any provisionable can be assigned.
      Parameters:
      distributorId - the Id of the Distributor
      Returns:
      list of assignable distributor Ids
      Throws:
      NullArgumentException - distributorId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableDistributorIdsForProvisionable

      IdList getAssignableDistributorIdsForProvisionable(Id distributorId, Id provisionableId) throws OperationFailedException
      Gets a list of distributors including and under the given distributor node in which a specific provisionable can be assigned.
      Parameters:
      distributorId - the Id of the Distributor
      provisionableId - the Id of the Provisionable
      Returns:
      list of assignable distributor Ids
      Throws:
      NullArgumentException - distributorId or provisionableId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignProvisionableToDistributor

      void assignProvisionableToDistributor(Id provisionableId, Id distributorId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Provisionable to a Distributor .
      Parameters:
      provisionableId - the Id of the Provisionable
      distributorId - the Id of the Distributor
      Throws:
      AlreadyExistsException - provisionableId is already assigned to distributorId
      NotFoundException - provisionableId or distributorId not found
      NullArgumentException - provisionableId or distributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignProvisionableFromDistributor

      void unassignProvisionableFromDistributor(Id provisionableId, Id distributorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Provisionable from a Distributor .
      Parameters:
      provisionableId - the Id of the Provisionable
      distributorId - the Id of the Distributor
      Throws:
      NotFoundException - provisionableId or distributorId not found or provisionableId not assigned to distributorId
      NullArgumentException - provisionableId or distributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignProvisionableToDistributor

      void reassignProvisionableToDistributor(Id provisionableId, Id fromDistributorId, Id toDistributorId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Provisionable from one Distributor to another. Mappings to other Distributors are unaffected.
      Parameters:
      provisionableId - the Id of the Provisionable
      fromDistributorId - the Id of the current Distributor
      toDistributorId - the Id of the destination Distributor
      Throws:
      AlreadyExistsException - provisionableId already assigned to toDistributorId
      NotFoundException - provisionableId, fromDistributorId , or toDistributorId not found or provisionableId not mapped to fromDistributorId
      NullArgumentException - provisionableId, fromDistributorId , or toDistributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.