public class SmartContentClientSideElement extends StaticClientSideElement implements Contextualizable
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected Context |
_context
The context
|
protected AmetysObjectResolver |
_resolver
Ametys object resolver
|
protected UserManager |
_userManager
Runtime users manager
|
protected CurrentUserProvider |
_userProvider
The current user provider
|
protected WorkflowProvider |
_workflowProvider
Workflow provider
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
SmartContentClientSideElement() |
Modifier and Type | Method and Description |
---|---|
protected I18nizableText |
_getAllRightDescription(Content content)
Get i18n description when user can do action
|
protected I18nizableText |
_getIncorrectWorkflowStepDescription(Content content)
Get i18n description when user can not do action because the workflow step is incorrect
|
protected I18nizableText |
_getLockedDescription(Content content)
Get i18n description when user can not do action because the content is locked
|
protected I18nizableText |
_getNoModifiableDescription(Content content)
Get i18n description when user can not do action because the content is not modifiable
|
protected I18nizableText |
_getNoRightDescription(Content content)
Get i18n description when user can not do action because he has no right on content
|
protected I18nizableText |
_getWorkflowActionUnvailableDescription(Content content)
Get i18n description when user can not do action because there is no workflow action unvailable
|
protected boolean |
_hasRight(Content content)
Determines if the user has sufficient right for the given content
|
protected boolean |
_isAllRight(Content content,
boolean hasError,
Map<String,Object> results)
Determines if the user can finally do action on content
|
protected boolean |
_isLocked(Content content)
Determines if the content is locked
|
protected boolean |
_isModifiable(Content content)
Determines if the content is modifiable
|
protected boolean |
_isWorkflowStepCorrect(Content content)
Determines if the workflow step is correct
|
protected int |
_workflowAction(Content content)
Determines if the workflow action is correct
|
void |
contextualize(Context context) |
protected Map<String,Object> |
getContentDefaultParameters(Content content)
Get the default content's parameters
|
Map<String,Object> |
getStatus(List<String> contentsId)
Get informations on contents' state
|
void |
service(ServiceManager manager) |
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected UserManager _userManager
protected WorkflowProvider _workflowProvider
protected AmetysObjectResolver _resolver
protected CurrentUserProvider _userProvider
public SmartContentClientSideElement()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public Map<String,Object> getStatus(List<String> contentsId)
contentsId
- the ids of contentsprotected boolean _isAllRight(Content content, boolean hasError, Map<String,Object> results)
content
- The contenthasError
- true if a error has already occursresults
- The result parameters to be passed to client sideprotected Map<String,Object> getContentDefaultParameters(Content content)
content
- The contentprotected boolean _isLocked(Content content)
content
- the contentprotected boolean _isModifiable(Content content)
content
- the contentprotected boolean _hasRight(Content content)
content
- the contentprotected int _workflowAction(Content content)
content
- the contentprotected boolean _isWorkflowStepCorrect(Content content)
content
- the contentprotected I18nizableText _getNoRightDescription(Content content)
content
- The contentI18nizableText
descriptionprotected I18nizableText _getLockedDescription(Content content)
content
- The contentI18nizableText
descriptionprotected I18nizableText _getWorkflowActionUnvailableDescription(Content content)
content
- The contentI18nizableText
descriptionprotected I18nizableText _getIncorrectWorkflowStepDescription(Content content)
content
- The contentI18nizableText
descriptionprotected I18nizableText _getNoModifiableDescription(Content content)
content
- The contentI18nizableText
descriptionprotected I18nizableText _getAllRightDescription(Content content)
content
- The contentI18nizableText
description