Class DefaultCMSWorkflowService
- java.lang.Object
-
- de.hybris.platform.workflow.impl.DefaultWorkflowService
-
- de.hybris.platform.cms2.workflow.service.impl.DefaultCMSWorkflowService
-
- All Implemented Interfaces:
CMSWorkflowService,WorkflowService
public class DefaultCMSWorkflowService extends DefaultWorkflowService implements CMSWorkflowService
Default implementation of theCMSWorkflowService.
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSWorkflowService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<WorkflowModel>findAllWorkflowsByAttachedItems(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses)This method finds allWorkflowModel, with the specified workflow statuses, to which the given items are attached to.SearchResult<WorkflowModel>findWorkflowsForAttachedItemsAndStatuses(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses, PageableData pageableData)This is the pageable version ofCMSWorkflowService.findAllWorkflowsByAttachedItems(List, Set)
This method finds allWorkflowModel, with the specified workflow statuses, to which the given items are attached to.protected CMSWorkflowDaogetCmsWorkflowDao()protected CMSWorkflowParticipantServicegetCmsWorkflowParticipantService()protected RelatedItemsServicegetRelatedItemsService()java.util.List<WorkflowModel>getRelatedWorkflowsForItem(CMSItemModel item, java.util.Set<CronJobStatus> statuses)This method returns a list of related workflows for an item.java.util.Optional<WorkflowModel>getWorkflowWhereItemEditable(CMSItemModel item)Returns a workflow where providedCMSItemModelis editable.booleanisAnyItemInWorkflow(java.util.List<? extends CMSItemModel> itemUids)This method checks if any of the provided CmsItems are already part of an active (RUNNING or PAUSED) workflow.booleanisItemEditableBySessionUser(CMSItemModel item)This method verifies whether the item model can be edited by session user.voidsetCmsWorkflowDao(CMSWorkflowDao cmsWorkflowDao)voidsetCmsWorkflowParticipantService(CMSWorkflowParticipantService cmsWorkflowParticipantService)voidsetRelatedItemsService(RelatedItemsService relatedItemsService)-
Methods inherited from class de.hybris.platform.workflow.impl.DefaultWorkflowService
assignUser, canBeStarted, createAdhocWorkflow, createWorkflow, createWorkflow, createWorkflow, getAllAdhocWorkflows, getAllAdhocWorkflows, getAllWorkflows, getAllWorkflows, getStartTime, getWorkAction, getWorkflowForCode, getWorkflowsForTemplateAndUser, isAdhocWorkflow, isCompleted, isFinished, isPaused, isPlanned, isRunning, isTerminated, setActionsWorkflowTemplateFactory, setDecisionsActionTemplateFactory, setModelService, setPredecessorsActionTemplateFactory, setWorkflowActionService, setWorkflowDao, setWorkflowTemplateService, unassignUser, writeAutomatedComment
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.workflow.WorkflowService
assignUser, canBeStarted, createAdhocWorkflow, createWorkflow, createWorkflow, createWorkflow, getAllAdhocWorkflows, getAllAdhocWorkflows, getAllWorkflows, getAllWorkflows, getStartTime, getWorkflowForCode, getWorkflowsForTemplateAndUser, isAdhocWorkflow, isCompleted, isFinished, isPaused, isPlanned, isRunning, isTerminated, unassignUser
-
-
-
-
Method Detail
-
isAnyItemInWorkflow
public boolean isAnyItemInWorkflow(java.util.List<? extends CMSItemModel> itemUids)
Description copied from interface:CMSWorkflowServiceThis method checks if any of the provided CmsItems are already part of an active (RUNNING or PAUSED) workflow.- Specified by:
isAnyItemInWorkflowin interfaceCMSWorkflowService- Parameters:
itemUids- - The uids of the CmsItems to check if they are part of an active workflow.- Returns:
Trueif any of the given CmsItems is part of an active workflow.False, otherwise.
-
findWorkflowsForAttachedItemsAndStatuses
public SearchResult<WorkflowModel> findWorkflowsForAttachedItemsAndStatuses(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses, PageableData pageableData)
Description copied from interface:CMSWorkflowServiceThis is the pageable version ofCMSWorkflowService.findAllWorkflowsByAttachedItems(List, Set)
This method finds allWorkflowModel, with the specified workflow statuses, to which the given items are attached to. If the items are not attached to any workflow, the list will be empty.- Specified by:
findWorkflowsForAttachedItemsAndStatusesin interfaceCMSWorkflowService- Parameters:
items- - the CMS Items for which to find the workflows they are attached to.statuses- - the workflow statusespageableData- - the pagination object used to set the page index and page size- Returns:
- the search result object containing the resulting the list of
WorkflowModel, in the specified statuses, to which the given pages are attached to and the pagination object; never null.
-
findAllWorkflowsByAttachedItems
public java.util.List<WorkflowModel> findAllWorkflowsByAttachedItems(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses)
Description copied from interface:CMSWorkflowServiceThis method finds allWorkflowModel, with the specified workflow statuses, to which the given items are attached to. If the items are not attached to any workflow, the list will be empty.- Specified by:
findAllWorkflowsByAttachedItemsin interfaceCMSWorkflowService- Parameters:
items- - the CMS Items for which to find the workflows they are attached to.statuses- - the workflow statuses- Returns:
- the list of
WorkflowModel, in the specified statuses, to which the given pages are attached to; never null.
-
getRelatedWorkflowsForItem
public java.util.List<WorkflowModel> getRelatedWorkflowsForItem(CMSItemModel item, java.util.Set<CronJobStatus> statuses)
Description copied from interface:CMSWorkflowServiceThis method returns a list of related workflows for an item. The list is sorted by creationtime in ascending order.- Specified by:
getRelatedWorkflowsForItemin interfaceCMSWorkflowService- Parameters:
item- theCMSItemModelstatuses- the list ofCronJobStatusstatuses- Returns:
- the list of
WorkflowModel
-
isItemEditableBySessionUser
public boolean isItemEditableBySessionUser(CMSItemModel item)
Description copied from interface:CMSWorkflowServiceThis method verifies whether the item model can be edited by session user.- Specified by:
isItemEditableBySessionUserin interfaceCMSWorkflowService- Parameters:
item- theCMSItemModelto verify- Returns:
- TRUE if the item model can be edited by session user, FALSE otherwise
-
getWorkflowWhereItemEditable
public java.util.Optional<WorkflowModel> getWorkflowWhereItemEditable(CMSItemModel item)
Description copied from interface:CMSWorkflowServiceReturns a workflow where providedCMSItemModelis editable.- Specified by:
getWorkflowWhereItemEditablein interfaceCMSWorkflowService- Parameters:
item- theCMSItemModelto verify- Returns:
- the optional
WorkflowModel
-
getCmsWorkflowDao
protected CMSWorkflowDao getCmsWorkflowDao()
-
setCmsWorkflowDao
public void setCmsWorkflowDao(CMSWorkflowDao cmsWorkflowDao)
-
getRelatedItemsService
protected RelatedItemsService getRelatedItemsService()
-
setRelatedItemsService
public void setRelatedItemsService(RelatedItemsService relatedItemsService)
-
getCmsWorkflowParticipantService
protected CMSWorkflowParticipantService getCmsWorkflowParticipantService()
-
setCmsWorkflowParticipantService
public void setCmsWorkflowParticipantService(CMSWorkflowParticipantService cmsWorkflowParticipantService)
-
-