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
FieldsModifier and TypeFieldDescriptionprotected ContentHelperThe content helperprotected UserManagerRuntime users managerFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected I18nizableTextgetAllRightContentDescription(Content content) Get i18n description for all right contentgetContentDefaultParameters(Content content) Get the default content's parametersprotected I18nizableTextgetLockedContentDescription(Content content) Get the description when content is lockedprotected I18nizableTextgetNoModifiableContentDescription(Content content) Get the description when content is not modifiableprotected I18nizableTextgetNoRightContentDescription(Content content) Get the description when user has no right on contentprotected booleanDetermines if user has convenient right on contentprotected booleanDetermines if a content is lockedvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParametersMethods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toStringMethods 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:
servicein interfaceServiceable- Overrides:
servicein 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
I18nizableTextdescription
-
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
-