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 Detail

      • addItems

        java.util.List<WorkflowItemAttachmentModel> addItems​(WorkflowModel workflow,
                                                             java.util.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,
                                 java.util.List<WorkflowItemAttachmentModel> itemsToRemove)
        Removes attachments from workflow
        Parameters:
        workflow - from which attachments should be removed
        itemsToRemove - items to remove
      • containsItem

        ItemModel containsItem​(WorkflowModel workflow,
                               java.util.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

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

        java.util.List<ItemModel> getAttachmentsForAction​(WorkflowActionModel action,
                                                          java.lang.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

        java.util.List<ItemModel> getAttachmentsForAction​(WorkflowActionModel action,
                                                          java.util.List<java.lang.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