Class DefaultCMSWorkflowParticipantService
- java.lang.Object
-
- de.hybris.platform.cms2.workflow.service.impl.DefaultCMSWorkflowParticipantService
-
- All Implemented Interfaces:
CMSWorkflowParticipantService
public class DefaultCMSWorkflowParticipantService extends java.lang.Object implements CMSWorkflowParticipantService
Default implementation ofCMSWorkflowParticipantService
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSWorkflowParticipantService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CMSWorkflowServicegetCmsWorkflowService()java.util.Collection<PrincipalModel>getRelatedPrincipals(PrincipalModel user)Finds all principals for the given user.protected UserServicegetUserService()booleanisActiveWorkflowActionParticipant(WorkflowModel workflow)Determines if the current session user is a participant of an active action of a workflow.booleanisParticipantForAttachedItems(java.util.List<? extends CMSItemModel> cmsItems)Determines if the current session user is a participant of all workflows containing the given CMS items as attachments.booleanisWorkflowActionParticipant(WorkflowActionModel workflowAction)Determines if the current session user is a participant of the given workflow.booleanisWorkflowParticipant(WorkflowModel workflow)Determines if the current session user is a participant of the given workflow.voidsetCmsWorkflowService(CMSWorkflowService cmsWorkflowService)voidsetUserService(UserService userService)
-
-
-
Method Detail
-
isWorkflowParticipant
public boolean isWorkflowParticipant(WorkflowModel workflow)
Description copied from interface:CMSWorkflowParticipantServiceDetermines if the current session user is a participant of the given workflow.- Specified by:
isWorkflowParticipantin interfaceCMSWorkflowParticipantService- Parameters:
workflow- - the workflow template containing the list of participants allowed to interact in the workflow- Returns:
TRUEwhen the current user is a participant in the workflow; otherwiseFALSE
-
isActiveWorkflowActionParticipant
public boolean isActiveWorkflowActionParticipant(WorkflowModel workflow)
Description copied from interface:CMSWorkflowParticipantServiceDetermines if the current session user is a participant of an active action of a workflow.- Specified by:
isActiveWorkflowActionParticipantin interfaceCMSWorkflowParticipantService- Parameters:
workflow- the workflow to verify- Returns:
- TRUE if the workflow has active action and the user is a participant of this action, FALSE otherwise.
-
isWorkflowActionParticipant
public boolean isWorkflowActionParticipant(WorkflowActionModel workflowAction)
Description copied from interface:CMSWorkflowParticipantServiceDetermines if the current session user is a participant of the given workflow.- Specified by:
isWorkflowActionParticipantin interfaceCMSWorkflowParticipantService- Parameters:
workflowAction- - the workflow template containing the list of participants allowed to interact in the workflow- Returns:
TRUEwhen the current user is a participant in the workflow action; otherwiseFALSE
-
isParticipantForAttachedItems
public boolean isParticipantForAttachedItems(java.util.List<? extends CMSItemModel> cmsItems)
Description copied from interface:CMSWorkflowParticipantServiceDetermines if the current session user is a participant of all workflows containing the given CMS items as attachments.- Specified by:
isParticipantForAttachedItemsin interfaceCMSWorkflowParticipantService- Parameters:
cmsItems- - the items saved as attachments to a workflow- Returns:
TRUEwhen the current user is a participant in all workflows containing the given items or when the items are not contained in any workflow; otherwiseFALSE
-
getRelatedPrincipals
public java.util.Collection<PrincipalModel> getRelatedPrincipals(PrincipalModel user)
Description copied from interface:CMSWorkflowParticipantServiceFinds all principals for the given user. Note that a principal can be a user or a user group.- Specified by:
getRelatedPrincipalsin interfaceCMSWorkflowParticipantService- Parameters:
user- - the user for whom a list of principals is to be retrieved.- Returns:
- a list of principals.
-
getCmsWorkflowService
protected CMSWorkflowService getCmsWorkflowService()
-
setCmsWorkflowService
public void setCmsWorkflowService(CMSWorkflowService cmsWorkflowService)
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
-