Class SmartContentClientSideElementHelper
java.lang.Object
org.ametys.cms.clientsideelement.content.SmartContentClientSideElementHelper
- All Implemented Interfaces:
Component
,Serviceable
Component helper for
SmartContentClientSideElement
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAllRightDescription
(Map<String, Object> parameters, Content content) Get i18n description when user can do actiongetContentDefaultParameters
(Content content) Get the default content's parametersgetIncorrectWorkflowStepDescription
(Map<String, Object> parameters, Content content) Get i18n description when user can not do action because the workflow step is incorrectgetLockedDescription
(Map<String, Object> parameters, Content content) Get i18n description when user can not do action because the content is lockedgetNoModifiableDescription
(Map<String, Object> parameters, Content content) Get i18n description when user can not do action because the content is not modifiablegetNoRightDescription
(Map<String, Object> parameters, Content content) Get i18n description when user can not do action because he has no right on contentgetWorkflowActionUnvailableDescription
(Map<String, Object> parameters, Content content) Get i18n description when user can not do action because there is no workflow action unvailableboolean
Determines if the user has sufficient right for the given contentboolean
Determines if the content is lockedboolean
isModifiable
(Content content) Determines if the content is modifiableboolean
isWorkflowStepCorrect
(Map<String, Object> parameters, Content content) Determines if the workflow step is correctvoid
service
(ServiceManager manager) int
workflowAction
(Map<String, Object> parameters, Content content) Determines if the workflow action is correct
-
Field Details
-
ROLE
The Avalon Role
-
-
Constructor Details
-
SmartContentClientSideElementHelper
public SmartContentClientSideElementHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isWorkflowStepCorrect
Determines if the workflow step is correct- Parameters:
parameters
- The client side element 's parameterscontent
- the content- Returns:
- true if the workflow step is incorrect
-
getNoRightDescription
Get i18n description when user can not do action because he has no right on content- Parameters:
parameters
- The client side element 's parameterscontent
- The content- Returns:
- The
I18nizableText
description
-
getLockedDescription
Get i18n description when user can not do action because the content is locked- Parameters:
parameters
- The client side element 's parameterscontent
- The content- Returns:
- The
I18nizableText
description
-
getWorkflowActionUnvailableDescription
public I18nizableText getWorkflowActionUnvailableDescription(Map<String, Object> parameters, Content content) Get i18n description when user can not do action because there is no workflow action unvailable- Parameters:
parameters
- The client side element 's parameterscontent
- The content- Returns:
- The
I18nizableText
description
-
getIncorrectWorkflowStepDescription
public I18nizableText getIncorrectWorkflowStepDescription(Map<String, Object> parameters, Content content) Get i18n description when user can not do action because the workflow step is incorrect- Parameters:
parameters
- The client side element 's parameterscontent
- The content- Returns:
- The
I18nizableText
description
-
getNoModifiableDescription
Get i18n description when user can not do action because the content is not modifiable- Parameters:
parameters
- The client side element 's parameterscontent
- The content- Returns:
- The
I18nizableText
description
-
getAllRightDescription
Get i18n description when user can do action- Parameters:
parameters
- The client side element 's parameterscontent
- The content- Returns:
- The
I18nizableText
description
-
isLocked
Determines if the content is locked- Parameters:
content
- the content- Returns:
- true if the content is locked
-
isModifiable
Determines if the content is modifiable- Parameters:
content
- the content- Returns:
- true if the content is modifiable
-
hasRight
Determines if the user has sufficient right for the given content- Parameters:
rights
- The client side element 's rightscontent
- the content- Returns:
- true if user has sufficient right
-
workflowAction
Determines if the workflow action is correct- Parameters:
parameters
- The client side element 's parameterscontent
- the content- Returns:
- true if the workflow action is incorrect
-
getContentDefaultParameters
Get the default content's parameters- Parameters:
content
- The content- Returns:
- The default parameters
-