Interface DemographicEnablerBinAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DemographicEnablerBinAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignDemographicEnablers

      boolean canAssignDemographicEnablers()
      Tests if this user can alter demographic enabler/bin 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.
    • canAssignDemographicEnablersToBin

      boolean canAssignDemographicEnablersToBin(Id binId)
      Tests if this user can alter demographic enabler/bin 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.
      Parameters:
      binId - the Id of the Bin
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - binId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBinIds

      IdList getAssignableBinIds(Id binId) throws OperationFailedException
      Gets a list of bins including and under the given bin node in which any demographic enabler can be assigned.
      Parameters:
      binId - the Id of the Bin
      Returns:
      list of assignable bin Ids
      Throws:
      NullArgumentException - binId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBinIdsForDemographicEnabler

      IdList getAssignableBinIdsForDemographicEnabler(Id binId, Id demographicEnablerId) throws OperationFailedException
      Gets a list of bins including and under the given bin node in which a specific demographic enabler can be assigned.
      Parameters:
      binId - the Id of the Bin
      demographicEnablerId - the Id of the DemographicEnabler
      Returns:
      list of assignable bin Ids
      Throws:
      NullArgumentException - binId or demographicEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignDemographicEnablerToBin

      void assignDemographicEnablerToBin(Id demographicEnablerId, Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing DemographicEnabler to an Bin .
      Parameters:
      demographicEnablerId - the Id of the DemographicEnabler
      binId - the Id of the Bin
      Throws:
      NotFoundException - demographicEnablerId or binId not found
      NullArgumentException - demographicEnablerId or binId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignDemographicEnablerFromBin

      void unassignDemographicEnablerFromBin(Id demographicEnablerId, Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a DemographicEnabler from an Bin .
      Parameters:
      demographicEnablerId - the Id of the DemographicEnabler
      binId - the Id of the Bin
      Throws:
      NotFoundException - demographicEnablerId or binId not found
      NullArgumentException - demographicEnablerId or binId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignDemographicEnablerToBin

      void reassignDemographicEnablerToBin(Id demographicEnablerId, Id fromBinId, Id toBinId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a DemographicEnabler from one Bin to another. Mappings to other Bins are unaffected.
      Parameters:
      demographicEnablerId - the Id of the DemographicEnabler
      fromBinId - the Id of the current Bin
      toBinId - the Id of the destination Bin
      Throws:
      AlreadyExistsException - demographicEnablerId already assigned to toBinId
      NotFoundException - demographicEnablerId, fromBinId , or toBinId not found or demographicEnablerId not mapped to fromBinId
      NullArgumentException - demographicEnablerId, fromBinId , or toBinId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.