Interface WorkflowAttachmentService

All Known Implementing Classes:
DefaultWorkflowAttachmentService

public interface WorkflowAttachmentService
Service to manipulate workflow's attachments. Workflow attachment are part of an workflow and can be mapped to an action of the workflow additionally.
  • Method Details

    • addItems

      List<WorkflowItemAttachmentModel> addItems(WorkflowModel workflow, List<? extends ItemModel> itemsToAdd)
      Adds items to workflow as an attachment
      Parameters:
      workflow - to which items should be added
      itemsToAdd - items to add
      Returns:
      attachments
    • removeItems

      default void removeItems(WorkflowModel workflow, List<WorkflowItemAttachmentModel> itemsToRemove)
      Removes attachments from workflow
      Parameters:
      workflow - from which attachments should be removed
      itemsToRemove - items to remove
    • containsItem

      ItemModel containsItem(WorkflowModel workflow, List<? extends ItemModel> itemsToCheck)
      Checks if workflow contains item as an attachment and returns this item or null if not found
      Parameters:
      workflow - to check
      itemsToCheck - items to check
      Returns:
      founded item or null
    • getAttachmentsForAction

      List<ItemModel> getAttachmentsForAction(WorkflowActionModel action)
      Returns attachments assigned to action or empty list
      Parameters:
      action -
      Returns:
      attachments collection
    • getAttachmentsForAction

      List<ItemModel> getAttachmentsForAction(WorkflowActionModel action, String attachmentClassName)
      Returns attachments assigned to action that match class name or empty list
      Parameters:
      action -
      attachmentClassName - class name to be matched
      Returns:
      attachments collection
    • getAttachmentsForAction

      List<ItemModel> getAttachmentsForAction(WorkflowActionModel action, List<String> attachmentClassNames)
      Returns attachments assigned to action that match all class names passed as a paremeter
      Parameters:
      action -
      attachmentClassNames - class names collection to be matched
      Returns:
      attachments collection