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:
AbstractExportClientSideElement
,LockedContentClientSideElement
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
Modifier and TypeFieldDescriptionprotected ContentHelper
The content helperprotected UserManager
Runtime users managerFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected I18nizableText
getAllRightContentDescription
(Content content) Get i18n description for all right contentgetContentDefaultParameters
(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
Determines if user has convenient right on contentprotected boolean
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 Details
-
_userManager
Runtime users manager -
_contentHelper
The content helper
-
-
Constructor Details
-
AbstractContentClientSideElement
public AbstractContentClientSideElement()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
getContentDefaultParameters
Get the default content's parameters- Parameters:
content
- The content- Returns:
- The default parameters
-
getNoRightContentDescription
Get the description when user has no right on content- Parameters:
content
- the content- Returns:
- the description
-
getNoModifiableContentDescription
Get the description when content is not modifiable- Parameters:
content
- the content- Returns:
- the description
-
getLockedContentDescription
Get the description when content is locked- Parameters:
content
- the content- Returns:
- the description
-
getAllRightContentDescription
Get i18n description for all right content- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
isLocked
Determines if a content is locked- Parameters:
content
- the content- Returns:
- true if the content is locked.
-
hasRight
Determines if user has convenient right on content- Parameters:
content
- The content- Returns:
- true if the user has convenient right
-