Interface CMSWorkflowAttachmentService

All Known Implementing Classes:
DefaultCMSWorkflowAttachmentService

public interface CMSWorkflowAttachmentService
Service to manage workflow attachments.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines if at least one of the item models is an attachment to an active workflow.
    <T extends CMSItemModel>
    boolean
    validateAttachmentAndParticipant(javax.servlet.http.HttpServletResponse response, T cmsItem)
    Validates that the current user is a workflow participant to an active workflow that contains the given item.
    boolean
    validateAttachmentsAndParticipant(javax.servlet.http.HttpServletResponse response, List<? extends CMSItemModel> cmsItems)
    Validates that the current user is a workflow participant to all active workflows that contain all given items.
  • Method Details

    • isWorkflowAttachedItems

      boolean isWorkflowAttachedItems(List<? extends CMSItemModel> cmsItems)
      Determines if at least one of the item models is an attachment to an active workflow.
      Parameters:
      cmsItems - - the CMS item models
      Returns:
      TRUE when at least one of the items is an attachment in a workflow that is still in progress; FALSE otherwise.
    • validateAttachmentAndParticipant

      <T extends CMSItemModel> boolean validateAttachmentAndParticipant(javax.servlet.http.HttpServletResponse response, T cmsItem) throws IOException
      Validates that the current user is a workflow participant to an active workflow that contains the given item. In the case that the given item is attached to a workflow that is still in progress and the current session user is not a participant in that workflow, an error in the HTTP response with the status HttpStatus.CONFLICT is returned.
      Parameters:
      response - - the HTTP servlet response containing the error message if the items are attached to an active workflow
      cmsItem - - the CMS item model
      Returns:
      TRUE when the item is not attached to any workflow or when the current user is a participant to the active workflow containing the given item as attachment; FALSE otherwise.
      Throws:
      IOException - when an error occurs while raising the error
    • validateAttachmentsAndParticipant

      boolean validateAttachmentsAndParticipant(javax.servlet.http.HttpServletResponse response, List<? extends CMSItemModel> cmsItems) throws IOException
      Validates that the current user is a workflow participant to all active workflows that contain all given items. In the case that at least one of the given item is attached to a workflow that is still in progress and the current session user is not a participant in that workflow, an error in the HTTP response with the status HttpStatus.CONFLICT is returned.
      Parameters:
      response - - the HTTP servlet response containing the error message if the items are attached to an active workflow
      cmsItems - - the CMS item models
      Returns:
      TRUE when the items are not attached to any workflow or when the current user is a participant to all active workflows containing the given items as attachments; FALSE otherwise.
      Throws:
      IOException - when an error occurs while raising the error