Class DefaultCMSWorkflowDao

All Implemented Interfaces:
CMSWorkflowDao, Dao

public class DefaultCMSWorkflowDao extends AbstractCMSItemDao implements CMSWorkflowDao
Default implementation of CMSWorkflowDao interface.
  • Constructor Details

    • DefaultCMSWorkflowDao

      public DefaultCMSWorkflowDao()
  • Method Details

    • findAllWorkflowsByAttachedItems

      public List<WorkflowModel> findAllWorkflowsByAttachedItems(List<? extends CMSItemModel> items, Set<CronJobStatus> statuses)
      Description copied from interface: CMSWorkflowDao
      This method finds all the WorkflowModel, with the specified workflow statuses, to which the given items are attached to. If the items are not attached to any workflow for the given statuses, the list will be empty.
      Specified by:
      findAllWorkflowsByAttachedItems in interface CMSWorkflowDao
      Parameters:
      items - - the CMS Items for which to find the workflows they are attached to.
      statuses - - the workflow statuses used to filter the result
      Returns:
      the list of WorkflowModel to which the given pages are attached to; never null.
    • findWorkflowForCode

      public Optional<WorkflowModel> findWorkflowForCode(String code)
      Description copied from interface: CMSWorkflowDao
      This method returns the WorkflowModel for the provided code.
      Specified by:
      findWorkflowForCode in interface CMSWorkflowDao
      Parameters:
      code - - the code of the WorkflowModel.
      Returns:
      the WorkflowModel to for the provided input code.
    • findWorkflowsByAttachedItems

      public SearchResult<WorkflowModel> findWorkflowsByAttachedItems(List<? extends CMSItemModel> items, Set<CronJobStatus> statuses, PageableData pageableData)
      Description copied from interface: CMSWorkflowDao
      Specified by:
      findWorkflowsByAttachedItems in interface CMSWorkflowDao
      Parameters:
      items - - the CMS Items for which to find the workflows they are attached to.
      statuses - - the workflow statuses used to filter the result
      pageableData - - the pagination object used to set the page index and page size
      Returns:
      the search result object containing the resulting the list of WorkflowModel to which the given pages are attached to and the pagination object; never null.
    • buildFindWorkflowsByAttachedItemsQuery

      protected String buildFindWorkflowsByAttachedItemsQuery(List<? extends CMSItemModel> items, Set<CronJobStatus> statuses, Map<String,Object> queryParameters)
      Builds the query string to search for workflows containing the given CMS items and matching the provided workflow statuses.
      Parameters:
      items - - the CMS Items for which to find the workflows they are attached to.
      statuses - - the workflow statuses used to filter the result
      queryParameters - - the query parameter values to be applied to the query
      Returns:
      the query string