Interface ParameterProcessorAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ParameterProcessorAdminSession extends OsidSession

This session creates and removes parameter processors. The data for create and update is provided via the ParameterProcessorForm.

  • Method Details

    • getConfigurationId

      Id getConfigurationId()
      Gets the Configuration Id associated with this session.
      Returns:
      the Configuration Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getConfiguration

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

      boolean canCreateParameterProcessor()
      Tests if this user can create parameter processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a ParameterProcessor will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
      Returns:
      false if ParameterProcessor creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateParameterProcessorWithRecordTypes

      boolean canCreateParameterProcessorWithRecordTypes(Type[] parameterProcessorRecordTypes)
      Tests if this user can create a single ParameterProcessor using the desired record types. While ConfigurationRulesManager.getParameterProcessorRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific ParameterProcessor. Providing an empty array tests if a ParameterProcessor can be created with no records.
      Parameters:
      parameterProcessorRecordTypes - array of parameter processor record types
      Returns:
      true if ParameterProcessor creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - parameterProcessorRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getParameterProcessorFormForCreate

      ParameterProcessorForm getParameterProcessorFormForCreate(Type[] parameterProcessorRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the parameter processor form for creating new parameter processors. A new form should be requested for each create transaction.
      Parameters:
      parameterProcessorRecordTypes - array of parameter processor record types
      Returns:
      the parameter processor form
      Throws:
      NullArgumentException - parameterProcessorRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createParameterProcessor

      ParameterProcessor createParameterProcessor(ParameterProcessorForm parameterProcessorForm) throws OperationFailedException, PermissionDeniedException
      Creates a new ParameterProcessor.
      Parameters:
      parameterProcessorForm - the form for this ParameterProcessor
      Returns:
      the new ParameterProcessor
      Throws:
      IllegalStateException - parameterProcessorForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - parameterProcessorForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - parameterProcessorForm did not originate from getParameterProcessorFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateParameterProcessors

      boolean canUpdateParameterProcessors()
      Tests if this user can update parameter processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a ParameterProcessor will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
      Returns:
      false if ParameterProcessor modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getParameterProcessorFormForUpdate

      ParameterProcessorForm getParameterProcessorFormForUpdate(Id parameterProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the parameter processor form for updating an existing parameter processor. A new parameter processor form should be requested for each update transaction.
      Parameters:
      parameterProcessorId - the Id of the ParameterProcessor
      Returns:
      the parameter processor form
      Throws:
      NotFoundException - parameterProcessorId is not found
      NullArgumentException - parameterProcessorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateParameterProcessor

      void updateParameterProcessor(ParameterProcessorForm parameterProcessorForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing parameter processor.
      Parameters:
      parameterProcessorForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - parameterProcessorForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - parameterProcessorForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - parameterProcessorForm did not originate from getParameterProcessorFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteParameterProcessors

      boolean canDeleteParameterProcessors()
      Tests if this user can delete parameter processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a ParameterProcessor will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
      Returns:
      false if ParameterProcessor deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteParameterProcessor

      void deleteParameterProcessor(Id parameterProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a ParameterProcessor.
      Parameters:
      parameterProcessorId - the Id of the ParameterProcessor to remove
      Throws:
      NotFoundException - parameterProcessorId not found
      NullArgumentException - parameterProcessorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageParameterProcessorAliases

      boolean canManageParameterProcessorAliases()
      Tests if this user can manage Id aliases for parameter processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
      Returns:
      false if ParameterProcessor aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasParameterProcessor

      void aliasParameterProcessor(Id parameterProcessorId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a ParameterProcessor for the purpose of creating compatibility. The primary Id of the ParameterProcessor is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another parameter processor. it is reassigned to the given parameter processor Id.
      Parameters:
      parameterProcessorId - the Id of a ParameterProcessor
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - parameterProcessorId not found
      NullArgumentException - parameterProcessorId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.