Interface WorkflowDAO


public interface WorkflowDAO
  • Method Details

    • getWorkflowEntryOpened

      WorkflowItem getWorkflowEntryOpened(@Param("siteId") String siteId, @Param("path") String path, @Param("stateOpened") String stateOpened)
      Get workflow entry
      Parameters:
      siteId - site identifier
      path - path of the item
      stateOpened - state opened
      Returns:
    • getWorkflowEntryForApproval

      Workflow getWorkflowEntryForApproval(@Param("itemId") Long itemId, @Param("stateOpened") String stateOpened)
      Get workflow entry for approval
      Parameters:
      itemId - item identifier
      stateOpened - state opened
      Returns:
    • getWorkflowEntry

      Workflow getWorkflowEntry(@Param("siteId") String siteId, @Param("path") String path, @Param("publishingPackageId") String publishingPackageId)
      Get workflow entry
      Parameters:
      siteId - site identifier
      path -
      publishingPackageId -
      Returns:
    • deleteWorkflowEntryById

      void deleteWorkflowEntryById(@Param("id") long id)
      Delete workflow entry
      Parameters:
      id - entry id
    • insertWorkflowEntry

      void insertWorkflowEntry(@Param("workflow") Workflow workflow)
      Insert workflow entry
      Parameters:
      workflow - workflow entry
    • insertWorkflowEntries

      void insertWorkflowEntries(@Param("workflowEntries") List<Workflow> workflowEntries)
      Insert workflow entries
      Parameters:
      workflowEntries - list of workflow entries
    • updateWorkflowEntry

      void updateWorkflowEntry(Workflow workflow)
      Update workflow entry
      Parameters:
      workflow - workflow entry
    • getSubmittedItems

      List<WorkflowItem> getSubmittedItems(@Param("siteId") String site, @Param("state") String stateOpened)
      Get submitted items
      Parameters:
      site - site identifier
      stateOpened - state opened
      Returns:
    • deleteWorkflowEntries

      void deleteWorkflowEntries(@Param("siteId") String siteId, @Param("paths") Collection<String> paths, @Param("state") String workflowState)
      Delete workflow entries
      Parameters:
      siteId - site identifier
      paths - list of paths
      workflowState - state to filter workflow entries, null to match all states
    • deleteWorkflowEntry

      void deleteWorkflowEntry(@Param("siteId") String siteId, @Param("path") String path)
      Delete workflow entry
      Parameters:
      siteId - site identifier
      path - path
    • deleteWorkflowEntriesForSite

      void deleteWorkflowEntriesForSite(long siteId)
      Delete workflow entries for site
      Parameters:
      siteId - site id
    • getContentPendingApprovalTotal

      Optional<Integer> getContentPendingApprovalTotal(@Param("siteId") String siteId, @Param("state") String openedState)
      Get total number of workflow packages pending approval
      Parameters:
      siteId - site identifier
      openedState - value for OPENED state
      Returns:
      total number of workflow packages pending approval
    • getContentPendingApproval

      List<DashboardPublishingPackage> getContentPendingApproval(@Param("siteId") String siteId, @Param("state") String openedState, @Param("offset") int offset, @Param("limit") int limit)
      Get workflow packages pending approval
      Parameters:
      siteId - site identifier
      openedState - value for OPENED state
      offset - offset of the first record in the result
      limit - limit number of results
      Returns:
      list of workflow packages pending approval
    • getContentPendingApprovalDetail

      List<Workflow> getContentPendingApprovalDetail(@Param("siteId") String siteId, @Param("packageId") String packageId)
      Get content pending approval for given workflow package id
      Parameters:
      siteId - site identifier
      packageId - workflow package identifier
      Returns:
      List of workflow entries
    • getSamePackagePaths

      default Collection<String> getSamePackagePaths(@Param("siteId") String siteId, @Param("path") String path)
      Get the paths sharing publishing package with the given path
      Parameters:
      siteId - the site id
      path - the path to test
      Returns:
      a list of paths sharing the publishing package
    • getSamePackagePaths

      Collection<String> getSamePackagePaths(@Param("siteId") String siteId, @Param("path") String path, @Param("state") String state)
      Get the paths sharing publishing package with the given path matching the state
      Parameters:
      siteId - the site id
      path - the path to test
      state - the state to match
      Returns:
      a list of paths sharing the publishing package
    • getPathsInWorkflow

      default Collection<String> getPathsInWorkflow(@Param("siteId") String siteId, @Param("paths") Collection<String> paths)
      From the given list of paths, return the ones in workflow
      Parameters:
      siteId - the site id
      paths - the paths to search for in workflow
      Returns:
      list of paths in workflow
    • getPathsInWorkflow

      Collection<String> getPathsInWorkflow(@Param("siteId") String siteId, @Param("paths") Collection<String> paths, @Param("state") String state)
      From the given list of paths, return the ones in workflow matching the given state
      Parameters:
      siteId - the site id
      paths - the paths to search for in workflow
      state - the state to match
      Returns:
      list of paths in workflow
    • deleteWorkflowPackages

      void deleteWorkflowPackages(@Param("siteId") String siteId, @Param("packageIds") Collection<String> affectedPackages)