Interface CMSWorkflowService
-
- All Superinterfaces:
WorkflowService
- All Known Implementing Classes:
DefaultCMSWorkflowService
public interface CMSWorkflowService extends WorkflowService
The Interface used for managing workflows.
-
-
Method Summary
All Methods Instance Methods Abstract 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 offindAllWorkflowsByAttachedItems(List, Set)
This method finds allWorkflowModel, with the specified workflow statuses, to which the given items are attached to.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 itemModel)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 itemModel)This method verifies whether the item model can be edited by session user.-
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
boolean isAnyItemInWorkflow(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.- 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
SearchResult<WorkflowModel> findWorkflowsForAttachedItemsAndStatuses(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses, PageableData pageableData)
This is the pageable version offindAllWorkflowsByAttachedItems(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.- 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
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. If the items are not attached to any workflow, the list will be empty.- 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
java.util.List<WorkflowModel> getRelatedWorkflowsForItem(CMSItemModel item, java.util.Set<CronJobStatus> statuses)
This method returns a list of related workflows for an item. The list is sorted by creationtime in ascending order.- Parameters:
item- theCMSItemModelstatuses- the list ofCronJobStatusstatuses- Returns:
- the list of
WorkflowModel
-
isItemEditableBySessionUser
boolean isItemEditableBySessionUser(CMSItemModel itemModel)
This method verifies whether the item model can be edited by session user.- Parameters:
itemModel- theCMSItemModelto verify- Returns:
- TRUE if the item model can be edited by session user, FALSE otherwise
-
getWorkflowWhereItemEditable
java.util.Optional<WorkflowModel> getWorkflowWhereItemEditable(CMSItemModel itemModel)
Returns a workflow where providedCMSItemModelis editable.- Parameters:
itemModel- theCMSItemModelto verify- Returns:
- the optional
WorkflowModel
-
-