Package org.craftercms.studio.api.v2.dal
Interface WorkflowDAO
public interface WorkflowDAO
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteWorkflowEntries
(String siteId, Collection<String> paths, String workflowState) Delete workflow entriesvoid
deleteWorkflowEntriesForSite
(long siteId) Delete workflow entries for sitevoid
deleteWorkflowEntry
(String siteId, String path) Delete workflow entryvoid
deleteWorkflowEntryById
(long id) Delete workflow entryvoid
deleteWorkflowPackages
(String siteId, Collection<String> affectedPackages) getContentPendingApproval
(String siteId, String openedState, int offset, int limit) Get workflow packages pending approvalgetContentPendingApprovalDetail
(String siteId, String packageId) Get content pending approval for given workflow package idgetContentPendingApprovalTotal
(String siteId, String openedState) Get total number of workflow packages pending approvaldefault Collection
<String> getPathsInWorkflow
(String siteId, Collection<String> paths) From the given list of paths, return the ones in workflowgetPathsInWorkflow
(String siteId, Collection<String> paths, String state) From the given list of paths, return the ones in workflow matching the given statedefault Collection
<String> getSamePackagePaths
(String siteId, String path) Get the paths sharing publishing package with the given pathgetSamePackagePaths
(String siteId, String path, String state) Get the paths sharing publishing package with the given path matching the stategetSubmittedItems
(String site, String stateOpened) Get submitted itemsgetWorkflowEntry
(String siteId, String path, String publishingPackageId) Get workflow entrygetWorkflowEntryForApproval
(Long itemId, String stateOpened) Get workflow entry for approvalgetWorkflowEntryOpened
(String siteId, String path, String stateOpened) Get workflow entryvoid
insertWorkflowEntries
(List<Workflow> workflowEntries) Insert workflow entriesvoid
insertWorkflowEntry
(Workflow workflow) Insert workflow entryvoid
updateWorkflowEntry
(Workflow workflow) Update workflow entry
-
Method Details
-
getWorkflowEntryOpened
WorkflowItem getWorkflowEntryOpened(@Param("siteId") String siteId, @Param("path") String path, @Param("stateOpened") String stateOpened) Get workflow entry- Parameters:
siteId
- site identifierpath
- path of the itemstateOpened
- state opened- Returns:
-
getWorkflowEntryForApproval
Workflow getWorkflowEntryForApproval(@Param("itemId") Long itemId, @Param("stateOpened") String stateOpened) Get workflow entry for approval- Parameters:
itemId
- item identifierstateOpened
- state opened- Returns:
-
getWorkflowEntry
Workflow getWorkflowEntry(@Param("siteId") String siteId, @Param("path") String path, @Param("publishingPackageId") String publishingPackageId) Get workflow entry- Parameters:
siteId
- site identifierpath
-publishingPackageId
-- Returns:
-
deleteWorkflowEntryById
void deleteWorkflowEntryById(@Param("id") long id) Delete workflow entry- Parameters:
id
- entry id
-
insertWorkflowEntry
Insert workflow entry- Parameters:
workflow
- workflow entry
-
insertWorkflowEntries
Insert workflow entries- Parameters:
workflowEntries
- list of workflow entries
-
updateWorkflowEntry
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 identifierstateOpened
- 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 identifierpaths
- list of pathsworkflowState
- state to filter workflow entries, null to match all states
-
deleteWorkflowEntry
Delete workflow entry- Parameters:
siteId
- site identifierpath
- 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 identifieropenedState
- 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 identifieropenedState
- value for OPENED stateoffset
- offset of the first record in the resultlimit
- 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 identifierpackageId
- 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 idpath
- 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 idpath
- the path to teststate
- 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 idpaths
- 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 idpaths
- the paths to search for in workflowstate
- the state to match- Returns:
- list of paths in workflow
-
deleteWorkflowPackages
void deleteWorkflowPackages(@Param("siteId") String siteId, @Param("packageIds") Collection<String> affectedPackages)
-