Interface JobProcessorAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface JobProcessorAdminSession extends OsidSession

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

  • Method Details

    • getFoundryId

      Id getFoundryId()
      Gets the Foundry Id associated with this session.
      Returns:
      the Foundry Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getFoundry

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

      boolean canCreateJobProcessor()
      Tests if this user can create job processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a JobProcessor 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 JobProcessor creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateJobProcessorWithRecordTypes

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

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

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

      boolean canUpdateJobProcessors()
      Tests if this user can update job processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a JobProcessor 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 JobProcessor modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getJobProcessorFormForUpdate

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

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

      boolean canDeleteJobProcessors()
      Tests if this user can delete job processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a JobProcessor 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 JobProcessor deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteJobProcessor

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

      boolean canManageJobProcessorAliases()
      Tests if this user can manage Id aliases for job 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 JobProcessor aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasJobProcessor

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