Class WorkflowServiceInternalImpl
java.lang.Object
org.craftercms.studio.impl.v2.service.workflow.internal.WorkflowServiceInternalImpl
- All Implemented Interfaces:
WorkflowServiceInternal
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowServiceInternalImpl
(DependencyServiceInternal dependencyService, RetryingDatabaseOperationFacade retryingDatabaseOperationFacade, WorkflowDAO workflowDao) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteWorkflowEntries
(String siteId, Collection<String> paths) Delete workflow entries for given site and pathsvoid
deleteWorkflowEntries
(String siteId, Collection<String> paths, String workflowState) Delete workflow entries for given site and paths matching the workflow statevoid
deleteWorkflowEntriesForSite
(long siteId) Delete workflow entries for given sitevoid
deleteWorkflowEntry
(String siteId, String path) Delete workflow entry for given site and pathvoid
deleteWorkflowPackages
(String siteId, Collection<String> affectedPackages) Delete workflow packages matching the affected package idsgetContentPendingApproval
(String siteId, int offset, int limit) Get workflow packages pending approvalgetContentPendingApprovalDetail
(String siteId, String packageId) Get items from workflow package pending approvalint
getContentPendingApprovalTotal
(String siteId) Get total number of workflow packages pending approvalgetSubmittedItems
(String site) Get submitted items for sitegetWorkflowAffectedPaths
(String siteId, String path) Get workflow affected paths if content is editedgetWorkflowEntry
(String siteId, String path) Get workflow entrygetWorkflowEntry
(String siteId, String path, String publishingPackageId) Get workflow entrygetWorkflowEntryForApproval
(Long itemId) Get workflow entry for approvalgetWorkflowHardDeps
(String siteId, String path) Get the path hard dependencies that are currently in workflowgetWorkflowItem
(String siteId, String path, String state) void
insertWorkflow
(Workflow workflow) insert new workflow entryvoid
insertWorkflowEntries
(List<Workflow> workflowEntries) insert new workflow entriesvoid
updateWorkflow
(Workflow workflow) Update new workflow entry
-
Constructor Details
-
WorkflowServiceInternalImpl
@ConstructorProperties({"dependencyService","retryingDatabaseOperationFacade","workflowDao"}) public WorkflowServiceInternalImpl(DependencyServiceInternal dependencyService, RetryingDatabaseOperationFacade retryingDatabaseOperationFacade, WorkflowDAO workflowDao)
-
-
Method Details
-
getWorkflowItem
- Specified by:
getWorkflowItem
in interfaceWorkflowServiceInternal
-
getWorkflowEntry
Description copied from interface:WorkflowServiceInternal
Get workflow entry- Specified by:
getWorkflowEntry
in interfaceWorkflowServiceInternal
- Parameters:
siteId
-path
-- Returns:
-
getWorkflowEntryForApproval
Description copied from interface:WorkflowServiceInternal
Get workflow entry for approval- Specified by:
getWorkflowEntryForApproval
in interfaceWorkflowServiceInternal
- Parameters:
itemId
- item identifier- Returns:
-
getWorkflowEntry
Description copied from interface:WorkflowServiceInternal
Get workflow entry- Specified by:
getWorkflowEntry
in interfaceWorkflowServiceInternal
- Parameters:
siteId
-path
-publishingPackageId
-- Returns:
-
insertWorkflow
Description copied from interface:WorkflowServiceInternal
insert new workflow entry- Specified by:
insertWorkflow
in interfaceWorkflowServiceInternal
- Parameters:
workflow
- workflow entry
-
insertWorkflowEntries
Description copied from interface:WorkflowServiceInternal
insert new workflow entries- Specified by:
insertWorkflowEntries
in interfaceWorkflowServiceInternal
- Parameters:
workflowEntries
- list of workflow entries
-
updateWorkflow
Description copied from interface:WorkflowServiceInternal
Update new workflow entry- Specified by:
updateWorkflow
in interfaceWorkflowServiceInternal
- Parameters:
workflow
- workflow entry
-
getSubmittedItems
Description copied from interface:WorkflowServiceInternal
Get submitted items for site- Specified by:
getSubmittedItems
in interfaceWorkflowServiceInternal
- Parameters:
site
- site identifier- Returns:
-
deleteWorkflowEntries
Description copied from interface:WorkflowServiceInternal
Delete workflow entries for given site and paths- Specified by:
deleteWorkflowEntries
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site identifierpaths
- list of paths to delete workflow
-
deleteWorkflowEntries
Description copied from interface:WorkflowServiceInternal
Delete workflow entries for given site and paths matching the workflow state- Specified by:
deleteWorkflowEntries
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site identifierpaths
- list of paths to delete workflowworkflowState
- workflow state to match
-
deleteWorkflowEntry
Description copied from interface:WorkflowServiceInternal
Delete workflow entry for given site and path- Specified by:
deleteWorkflowEntry
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site identifierpath
- path to delete workflow
-
deleteWorkflowEntriesForSite
public void deleteWorkflowEntriesForSite(long siteId) Description copied from interface:WorkflowServiceInternal
Delete workflow entries for given site- Specified by:
deleteWorkflowEntriesForSite
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site id
-
getContentPendingApprovalTotal
Description copied from interface:WorkflowServiceInternal
Get total number of workflow packages pending approval- Specified by:
getContentPendingApprovalTotal
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site identifier- Returns:
- total number of workflow packages
-
getContentPendingApproval
public List<DashboardPublishingPackage> getContentPendingApproval(String siteId, int offset, int limit) Description copied from interface:WorkflowServiceInternal
Get workflow packages pending approval- Specified by:
getContentPendingApproval
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site identifieroffset
- offset of the first record in the resultlimit
- limit number of records in the result- Returns:
- list of workflow packages
-
getContentPendingApprovalDetail
Description copied from interface:WorkflowServiceInternal
Get items from workflow package pending approval- Specified by:
getContentPendingApprovalDetail
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site identifierpackageId
- workflow package identifier- Returns:
- list of workflow entries
-
getWorkflowAffectedPaths
public Collection<String> getWorkflowAffectedPaths(String siteId, String path) throws ServiceLayerException Description copied from interface:WorkflowServiceInternal
Get workflow affected paths if content is edited- Specified by:
getWorkflowAffectedPaths
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- site identifierpath
- path of the content to be edited- Returns:
- List of sandbox items that will be taken out of workflow after edit
- Throws:
ServiceLayerException
-
getWorkflowHardDeps
public Collection<String> getWorkflowHardDeps(String siteId, String path) throws ServiceLayerException Description copied from interface:WorkflowServiceInternal
Get the path hard dependencies that are currently in workflow- Specified by:
getWorkflowHardDeps
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- the site identifierpath
- the path to get hard dependencies for- Returns:
- collection of paths that are hard dependencies of path and are in workflow
- Throws:
ServiceLayerException
- if an error occurs while getting the hard dependencies
-
deleteWorkflowPackages
Description copied from interface:WorkflowServiceInternal
Delete workflow packages matching the affected package ids- Specified by:
deleteWorkflowPackages
in interfaceWorkflowServiceInternal
- Parameters:
siteId
- the site identifieraffectedPackages
- the affected package ids to delete
-