Interface WorkflowEventOfficeAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface WorkflowEventOfficeAssignmentSession extends OsidSession

This session provides methods to re-assign WorkflowEvents to Office mappings. A WorkflowEvent may appear in multiple Office catalogs and removing the last reference to a WorkflowEvent is the equivalent of deleting it. Each Office may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a WorkflowEvent to another Office is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignWorkflowEvents

      boolean canAssignWorkflowEvents()
      Tests if this user can alter workflow event/office mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignWorkflowEventToOffice

      boolean canAssignWorkflowEventToOffice(Id officeId)
      Tests if this user can alter workflow event/office mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      officeId - the Id of the Office
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - officeId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableOfficeIds

      IdList getAssignableOfficeIds(Id officeId) throws OperationFailedException
      Gets a list of offices including and under the given office node in which any workflow event can be assigned.
      Parameters:
      officeId - the Id of the Office
      Returns:
      list of assignable office Ids
      Throws:
      NullArgumentException - officeId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableOfficeIdsForWorkflowEvent

      IdList getAssignableOfficeIdsForWorkflowEvent(Id officeId, Id workflowEventId) throws OperationFailedException
      Gets a list of offices including and under the given office node in which a specific workflow event can be assigned.
      Parameters:
      officeId - the Id of the Office
      workflowEventId - the Id of the WorkflowEvent
      Returns:
      list of assignable office Ids
      Throws:
      NullArgumentException - officeId or workflowEventId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignWorkflowEventToOffice

      void assignWorkflowEventToOffice(Id workflowEventId, Id officeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing WorkflowEvent to an Office .
      Parameters:
      workflowEventId - the Id of the WorkflowEvent
      officeId - the Id of the Office
      Throws:
      AlreadyExistsException - workflowEventId is already assigned to officeId
      NotFoundException - workflowEventId or officeId not found
      NullArgumentException - workflowEventId or officeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignWorkflowEventFromOffice

      void unassignWorkflowEventFromOffice(Id workflowEventId, Id officeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a WorkflowEvent from an Office .
      Parameters:
      workflowEventId - the Id of the WorkflowEvent
      officeId - the Id of the Office
      Throws:
      NotFoundException - workflowEventId or officeId not found or workflowEventId not assigned to officeId
      NullArgumentException - workflowEventId or officeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignWorkflowEventToOffice

      void reassignWorkflowEventToOffice(Id workflowEventId, Id fromOfficeId, Id toOfficeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a WorkflowEvent from one Office to another. Mappings to other Offices are unaffected.
      Parameters:
      workflowEventId - the Id of the WorkflowEvent
      fromOfficeId - the Id of the current Office
      toOfficeId - the Id of the destination Office
      Throws:
      AlreadyExistsException - workflowEventId already assigned to toofficeId
      NotFoundException - workflowEventId, fromOfficeId , or toOfficeeId not found or workflowEventId not mapped to fromOfficeId
      NullArgumentException - workflowEventId, fromOfficeId , or toOfficeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.