Interface ValueEnablerConfigurationAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ValueEnablerConfigurationAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignValueEnablers

      boolean canAssignValueEnablers()
      Tests if this user can alter value enabler/configuration 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.
    • canAssignValueEnablersToConfiguration

      boolean canAssignValueEnablersToConfiguration(Id configurationId)
      Tests if this user can alter value enabler/configuration 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:
      configurationId - the Id of the Configuration
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - configurationId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableConfigurationIds

      IdList getAssignableConfigurationIds(Id configurationId) throws OperationFailedException
      Gets a list of configurations including and under the given configuration node in which any value enabler can be assigned.
      Parameters:
      configurationId - the Id of the Configuration
      Returns:
      list of assignable configuration Ids
      Throws:
      NullArgumentException - configurationId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableConfigurationIdsForValueEnabler

      IdList getAssignableConfigurationIdsForValueEnabler(Id configurationId, Id valueEnablerId) throws OperationFailedException
      Gets a list of configurations including and under the given configuration node in which a specific value enabler can be assigned.
      Parameters:
      configurationId - the Id of the Configuration
      valueEnablerId - the Id of the ValueEnabler
      Returns:
      list of assignable configuration Ids
      Throws:
      NullArgumentException - configurationId or valueEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignValueEnablerToConfiguration

      void assignValueEnablerToConfiguration(Id valueEnablerId, Id configurationId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing ValueEnabler to a Configuration .
      Parameters:
      valueEnablerId - the Id of the ValueEnabler
      configurationId - the Id of the Configuration
      Throws:
      AlreadyExistsException - valueEnablerId is already assigned to configurationId
      NotFoundException - valueEnablerId or configurationId not found
      NullArgumentException - valueEnablerId or configurationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignValueEnablerFromConfiguration

      void unassignValueEnablerFromConfiguration(Id valueEnablerId, Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a ValueEnabler from a Configuration .
      Parameters:
      valueEnablerId - the Id of the ValueEnabler
      configurationId - the Id of the Configuration
      Throws:
      NotFoundException - valueEnablerId or configurationId not found or valueEnablerId is not assigned to configurationId
      NullArgumentException - valueEnablerId or configurationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignValueEnablerToConfiguration

      void reassignValueEnablerToConfiguration(Id valueEnablerId, Id fromConfigurationId, Id toConfigurationId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a ValueEnabler from one Configuration to another. Mappings to other Configurations are unaffected.
      Parameters:
      valueEnablerId - the Id of the ValueEnabler
      fromConfigurationId - the Id of the current Configuration
      toConfigurationId - the Id of the destination Configuration
      Throws:
      AlreadyExistsException - valueEnablerId already assigned to toConfigurationId
      NotFoundException - valueEnablerId, fromConfigurationId , or toConfigurationId not found or valueEnablerId not mapped to fromConfigurationId
      NullArgumentException - valueEnablerId, cromConfigurationId , or toConfigurationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.