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 CMSWorkflowService
getCmsWorkflowService()
java.util.Collection<PrincipalModel>
getRelatedPrincipals(PrincipalModel user)
Finds all principals for the given user.protected UserService
getUserService()
boolean
isActiveWorkflowActionParticipant(WorkflowModel workflow)
Determines if the current session user is a participant of an active action of a workflow.boolean
isParticipantForAttachedItems(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.boolean
isWorkflowActionParticipant(WorkflowActionModel workflowAction)
Determines if the current session user is a participant of the given workflow.boolean
isWorkflowParticipant(WorkflowModel workflow)
Determines if the current session user is a participant of the given workflow.void
setCmsWorkflowService(CMSWorkflowService cmsWorkflowService)
void
setUserService(UserService userService)
-
-
-
Method Detail
-
isWorkflowParticipant
public boolean isWorkflowParticipant(WorkflowModel workflow)
Description copied from interface:CMSWorkflowParticipantService
Determines if the current session user is a participant of the given workflow.- Specified by:
isWorkflowParticipant
in interfaceCMSWorkflowParticipantService
- Parameters:
workflow
- - the workflow template containing the list of participants allowed to interact in the workflow- Returns:
TRUE
when the current user is a participant in the workflow; otherwiseFALSE
-
isActiveWorkflowActionParticipant
public boolean isActiveWorkflowActionParticipant(WorkflowModel workflow)
Description copied from interface:CMSWorkflowParticipantService
Determines if the current session user is a participant of an active action of a workflow.- Specified by:
isActiveWorkflowActionParticipant
in 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:CMSWorkflowParticipantService
Determines if the current session user is a participant of the given workflow.- Specified by:
isWorkflowActionParticipant
in interfaceCMSWorkflowParticipantService
- Parameters:
workflowAction
- - the workflow template containing the list of participants allowed to interact in the workflow- Returns:
TRUE
when 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:CMSWorkflowParticipantService
Determines if the current session user is a participant of all workflows containing the given CMS items as attachments.- Specified by:
isParticipantForAttachedItems
in interfaceCMSWorkflowParticipantService
- Parameters:
cmsItems
- - the items saved as attachments to a workflow- Returns:
TRUE
when 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:CMSWorkflowParticipantService
Finds all principals for the given user. Note that a principal can be a user or a user group.- Specified by:
getRelatedPrincipals
in 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)
-
-