Interface DemographicEnablerRuleApplicationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DemographicEnablerRuleApplicationSession extends OsidSession

This session provides methods to apply DemographicEnablers to Demographics . A Demographic with multiple DemographicEnablers means any positive rule evaluation across the enablers result in an effective Demographic .

  • Method Details

    • getBinId

      Id getBinId()
      Gets the Bin Id associated with this session.
      Returns:
      the Bin Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBin

      Gets the Bin associated with this session.
      Returns:
      the bin
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canAssignDemographicEnablers

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

      void assignDemographicEnablerToDemographic(Id demographicEnablerId, Id demographicId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing DemographicEnabler to a Demographic .
      Parameters:
      demographicEnablerId - the Id of the DemographicEnabler
      demographicId - the Id of the Demographic
      Throws:
      AlreadyExistsException - demographicEnablerId is already assigned to demographicId
      NotFoundException - demographicEnablerId or demographicId not found
      NullArgumentException - demographicEnablerId or demographicId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignDemographicEnablerFromDemographic

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