Interface WorkflowEventAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface WorkflowEventAdminSession extends OsidSession

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

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

The delete operations delete WorkflowEvents . To unmap a WorkflowEvent from the current Office , the WorkflowEventOfficeAssignmentSession should be used. These delete operations attempt to remove the WorkflowEvent 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.
    • canCreateWorkflowEvents

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

      boolean canCreateWorkflowEventWithRecordTypes(Type[] workflowEventRecordTypes)
      Tests if this user can create a single WorkflowEvent using the desired record types. While WorkflowEventManager.getWorkflowEventRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific WorkflowEvent . Providing an empty array tests if a WorkflowEvent c an be created with no records.
      Parameters:
      workflowEventRecordTypes - array of workflow event record types
      Returns:
      true if WorkflowEvent creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - workflowEventRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getWorkflowEventFormForCreate

      WorkflowEventForm getWorkflowEventFormForCreate(Type[] workflowEventRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the workflow event form for creating new workflow events. A new form should be requested for each create transaction.
      Parameters:
      workflowEventRecordTypes - array of workflow event record types
      Returns:
      the workflow event form
      Throws:
      NullArgumentException - workflowEventRecordTypes 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.
    • createWorkflowEvent

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

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

      WorkflowEventForm getWorkflowEventFormForUpdate(Id workflowEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the workflow event form for updating an existing workflow event. A new workflow event form should be requested for each update transaction.
      Parameters:
      workflowEventId - the Id of the WorkflowEvent
      Returns:
      the workflow event form
      Throws:
      NotFoundException - workflowEventId is not found
      NullArgumentException - workflowEventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateWorkflowEvent

      void updateWorkflowEvent(WorkflowEventForm workflowEventForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing workflow event.
      Parameters:
      workflowEventForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - workflowEventForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - workflowEventForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - workflowEventForm did not originate from getWorkflowEventFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteWorkflowEvents

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

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

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

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