Package org.ametys.cms.clientsideelement
Class ContentConsistencyTestClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.cms.clientsideelement.ContentConsistencyTestClientSideElement
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
This element creates a toggle button representing the consistency state.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
Field Summary
Modifier and TypeFieldDescriptionprotected ConsistencyChecker
The consistency checkerprotected ContentHelper
The content helperprotected AmetysObjectResolver
Repository contentstatic final String
Right to check the content consistency of a contentFields 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
_getMainlyOkDescription
(Content content) Get content i18n description when the consistency check returned at least one unknown linkprotected I18nizableText
_getNoRightDescription
(Content content) Get content i18n description when the user don't have the right to checkprotected I18nizableText
_getNotOkDescription
(Content content) Get content i18n description when the consistency check has failed for at least one linkprotected I18nizableText
_getOkDescription
(Content content) Get content i18n description when the consistency check has succeedcheckConsistency
(List<String> contentsId, boolean shortTest) Check the consistency of contentsgetContentDefaultParameters
(Content content) Get the default content's parametersvoid
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
-
RIGHTS_CONTENT_CONSISTENCY
Right to check the content consistency of a content- See Also:
-
_resolver
Repository content -
_consistencyChecker
The consistency checker -
_contentHelper
The content helper
-
-
Constructor Details
-
ContentConsistencyTestClientSideElement
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
checkConsistency
Check the consistency of contents- Parameters:
contentsId
- The ids of contents to testshortTest
- true to make a short test, that means that long tests will return UNKNOWN immediately- Returns:
- the consistency test results
-
getContentDefaultParameters
Get the default content's parameters- Parameters:
content
- The content- Returns:
- The default parameters
-
_getOkDescription
Get content i18n description when the consistency check has succeed- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getNotOkDescription
Get content i18n description when the consistency check has failed for at least one link- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getMainlyOkDescription
Get content i18n description when the consistency check returned at least one unknown link- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getNoRightDescription
Get content i18n description when the user don't have the right to check- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-