Package org.ametys.cms.clientsideelement
Class SmartContentClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.cms.clientsideelement.SmartContentClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
ArchiveContentClientSideElement
,CopyODFContentClientSideElement
,DeleteContentClientSideElement
,EditODFPilotageCatalogClientSideElement
,EducationalBookletClientSideElement
,PilotageStatusButtonClientSideElement
,SCCSmartContentClientSideElement
,ShareableCourseContentClientSideElement
,SmartContentMenu
public class SmartContentClientSideElement extends StaticClientSideElement
Edit HMI item
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentHelper
_contentHelper
The content helperprotected AmetysObjectResolver
_resolver
Ametys object resolverprotected SmartContentClientSideElementHelper
_smartHelper
Helper for smart content client elements-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description SmartContentClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected I18nizableText
_getAllRightDescription(Content content)
Get i18n description when user can do actionprotected I18nizableText
_getIncorrectWorkflowStepDescription(Content content)
Get i18n description when user can not do action because the workflow step is incorrectprotected I18nizableText
_getLockedDescription(Content content)
Get i18n description when user can not do action because the content is lockedprotected I18nizableText
_getNoModifiableDescription(Content content)
Get i18n description when user can not do action because the content is not modifiableprotected I18nizableText
_getNoRightDescription(Content content)
Get i18n description when user can not do action because he has no right on contentprotected I18nizableText
_getWorkflowActionUnvailableDescription(Content content)
Get i18n description when user can not do action because there is no workflow action unvailableprotected boolean
_hasRight(Content content)
Determines if the user has sufficient right for the given contentprotected boolean
_isAllRight(Content content, boolean hasError, Map<String,Object> results)
Determines if the user can finally do action on contentprotected boolean
_isLocked(Content content)
Determines if the content is lockedprotected boolean
_isModifiable(Content content)
Determines if the content is modifiableprotected boolean
_isWorkflowStepCorrect(Content content)
Determines if the workflow step is correctprotected int
_workflowAction(Content content)
Determines if the workflow action is correctprotected Map<String,Object>
getContentDefaultParameters(Content content)
Get the default content's parametersMap<String,Object>
getStatus(List<String> contentsId)
Get informations on contents' statevoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_resolver
protected AmetysObjectResolver _resolver
Ametys object resolver
-
_contentHelper
protected ContentHelper _contentHelper
The content helper
-
_smartHelper
protected SmartContentClientSideElementHelper _smartHelper
Helper for smart content client elements
-
-
Constructor Detail
-
SmartContentClientSideElement
public SmartContentClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
getStatus
public Map<String,Object> getStatus(List<String> contentsId)
Get informations on contents' state- Parameters:
contentsId
- the ids of contents- Returns:
- informations on contents' state
-
_isAllRight
protected boolean _isAllRight(Content content, boolean hasError, Map<String,Object> results)
Determines if the user can finally do action on content- Parameters:
content
- The contenthasError
- true if a error has already occursresults
- The result parameters to be passed to client side- Returns:
- true if the user can finally do action on content
-
getContentDefaultParameters
protected Map<String,Object> getContentDefaultParameters(Content content)
Get the default content's parameters- Parameters:
content
- The content- Returns:
- The default parameters
-
_isLocked
protected boolean _isLocked(Content content)
Determines if the content is locked- Parameters:
content
- the content- Returns:
- true if the content is locked
-
_isModifiable
protected boolean _isModifiable(Content content)
Determines if the content is modifiable- Parameters:
content
- the content- Returns:
- true if the content is modifiable
-
_hasRight
protected boolean _hasRight(Content content)
Determines if the user has sufficient right for the given content- Parameters:
content
- the content- Returns:
- true if user has sufficient right
-
_workflowAction
protected int _workflowAction(Content content)
Determines if the workflow action is correct- Parameters:
content
- the content- Returns:
- true if the workflow action is incorrect
-
_isWorkflowStepCorrect
protected boolean _isWorkflowStepCorrect(Content content)
Determines if the workflow step is correct- Parameters:
content
- the content- Returns:
- true if the workflow step is incorrect
-
_getNoRightDescription
protected I18nizableText _getNoRightDescription(Content content)
Get i18n description when user can not do action because he has no right on content- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getLockedDescription
protected I18nizableText _getLockedDescription(Content content)
Get i18n description when user can not do action because the content is locked- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getWorkflowActionUnvailableDescription
protected I18nizableText _getWorkflowActionUnvailableDescription(Content content)
Get i18n description when user can not do action because there is no workflow action unvailable- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getIncorrectWorkflowStepDescription
protected I18nizableText _getIncorrectWorkflowStepDescription(Content content)
Get i18n description when user can not do action because the workflow step is incorrect- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getNoModifiableDescription
protected I18nizableText _getNoModifiableDescription(Content content)
Get i18n description when user can not do action because the content is not modifiable- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getAllRightDescription
protected I18nizableText _getAllRightDescription(Content content)
Get i18n description when user can do action- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
-