Interface ProcessProcessorAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProcessProcessorAdminSession extends OsidSession

This session creates, updates, and deletes ProcessProcessors . 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 ProcessProcessor , a ProcessProcessorForm is requested using getProcessProcessorFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned ProcessProcessorForm 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 ProcessProcessorForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ProcessProcessorForm corresponds to an attempted transaction.

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

The delete operations delete ProcessProcessors . To unmap a ProcessProcessor from the current Office , the ProcessProcessorOfficeAssignmentSession should be used. These delete operations attempt to remove the ProcessProcessor 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.
    • canCreateProcessProcessors

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

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

      ProcessProcessorForm getProcessProcessorFormForCreate(Type[] processProcessorRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the process processor form for creating new process processors. A new form should be requested for each create transaction.
      Parameters:
      processProcessorRecordTypes - array of process processor record types
      Returns:
      the process processor form
      Throws:
      NullArgumentException - processProcessorRecordTypes 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.
    • createProcessProcessor

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

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

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

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

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

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

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

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