Interface ProcessConstrainerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProcessConstrainerAdminSession extends OsidSession

This session creates, updates, and deletes ProcessConstrainers . The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a ProcessConstrainer , a ProcessConstrainerForm is requested using getProcessConstrainerFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned ProcessConstrainerForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the ProcessConstrainerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ProcessConstrainerForm corresponds to an attempted transaction.

For updates, ProcessConstrainerForms are requested to the ProcessConstrainer Id that is to be updated using getProcessConstrainerFormForUpdate() . Similarly, the ProcessConstrainerForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ProcessConstrainerForm can only be used once for a successful update and cannot be reused.

The delete operations delete ProcessConstrainers . To unmap a ProcessConstrainer from the current Office , the ProcessConstrainerOfficeAssignmentSession should be used. These delete operations attempt to remove the ProcessConstrainer itself thus removing it from all known Office catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id .

  • Method Details

    • getOfficeId

      Id getOfficeId()
      Gets the Office Id associated with this session.
      Returns:
      the Office Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOffice

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

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

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

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

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

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

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

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

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

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

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

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