Interface JobConstrainerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface JobConstrainerAdminSession extends OsidSession

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

  • 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.
    • canCreateJobConstrainer

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

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

      JobConstrainerForm getJobConstrainerFormForCreate(Type[] jobConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the job constrainer form for creating new job constrainers. A new form should be requested for each create transaction.
      Parameters:
      jobConstrainerRecordTypes - array of job constrainer record types
      Returns:
      the job constrainer form
      Throws:
      NullArgumentException - jobConstrainerRecordTypes 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.
    • createJobConstrainer

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

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

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

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

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

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

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

      void aliasJobConstrainer(Id jobConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a JobConstrainer for the purpose of creating compatibility. The primary Id of the JobConstrainer 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 constrainer. it is reassigned to the given job constrainer Id .
      Parameters:
      jobConstrainerId - the Id of a JobConstrainer
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - jobConstrainerId not found
      NullArgumentException - jobConstrainerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.