Package org.ametys.cms.clientsideelement
Class AbstractContentClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.cms.clientsideelement.AbstractContentClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
LockedContentClientSideElement
public abstract class AbstractContentClientSideElement extends StaticClientSideElement
Abstract client side element for contents.
-
-
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 UserManager
_userManager
Runtime users manager-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description AbstractContentClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected I18nizableText
getAllRightContentDescription(Content content)
Get i18n description for all right contentprotected Map<String,Object>
getContentDefaultParameters(Content content)
Get the default content's parametersprotected I18nizableText
getLockedContentDescription(Content content)
Get the description when content is lockedprotected I18nizableText
getNoModifiableContentDescription(Content content)
Get the description when content is not modifiableprotected I18nizableText
getNoRightContentDescription(Content content)
Get the description when user has no right on contentprotected boolean
hasRight(Content content)
Determines if user has convenient right on contentprotected boolean
isLocked(Content content)
Determines if a content is lockedvoid
service(ServiceManager smanager)
-
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
-
_userManager
protected UserManager _userManager
Runtime users manager
-
_contentHelper
protected ContentHelper _contentHelper
The content helper
-
-
Constructor Detail
-
AbstractContentClientSideElement
public AbstractContentClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
getContentDefaultParameters
protected Map<String,Object> getContentDefaultParameters(Content content)
Get the default content's parameters- Parameters:
content
- The content- Returns:
- The default parameters
-
getNoRightContentDescription
protected I18nizableText getNoRightContentDescription(Content content)
Get the description when user has no right on content- Parameters:
content
- the content- Returns:
- the description
-
getNoModifiableContentDescription
protected I18nizableText getNoModifiableContentDescription(Content content)
Get the description when content is not modifiable- Parameters:
content
- the content- Returns:
- the description
-
getLockedContentDescription
protected I18nizableText getLockedContentDescription(Content content)
Get the description when content is locked- Parameters:
content
- the content- Returns:
- the description
-
getAllRightContentDescription
protected I18nizableText getAllRightContentDescription(Content content)
Get i18n description for all right content- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
isLocked
protected boolean isLocked(Content content)
Determines if a content is locked- Parameters:
content
- the content- Returns:
- true if the content is locked.
-
-