Interface ParameterConfigurationAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ParameterConfigurationAssignmentSession extends OsidSession

This session provides methods to re-assign Parameters to Configurations . A Parameter may appear in multiple Configurations and removing the last reference to a Parameter is the equivalent of deleting it which may or may not be permitted. Each Configuration may have its own authorizations as to who is allowed to operate on it.

Moving or adding a reference of a Parameter to another Configuration is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignParameterConfigurations

      boolean canAssignParameterConfigurations()
      Tests if this user can change parameter configuration mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer assignment operations.
      Returns:
      false if parameter configuration assignment is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignParametersToConfiguration

      boolean canAssignParametersToConfiguration(Id configurationId)
      Tests if this user can alter parameter/configuration parameters. A return of true does not guarantee successful authorization. A return of false indicates that it is known parameter 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 configuration 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 parameter 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.
    • getAssignableConfigurationIdsForParameter

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

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

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

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