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
public class ContentConsistencyTestClientSideElement extends StaticClientSideElement
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
Fields Modifier and Type Field Description protected ConsistencyChecker
_consistencyChecker
The consistency checkerprotected ContentHelper
_contentHelper
The content helperprotected AmetysObjectResolver
_resolver
Repository content-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description ContentConsistencyTestClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected I18nizableText
_getMainlyOkDescription(Content content)
Get content i18n description when the consistency check returned at least one unknown linkprotected 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 succeedMap<String,Object>
checkConsistency(List<String> contentsId, boolean shortTest)
Check the consistency of contentsprotected Map<String,Object>
getContentDefaultParameters(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 Detail
-
_resolver
protected AmetysObjectResolver _resolver
Repository content
-
_consistencyChecker
protected ConsistencyChecker _consistencyChecker
The consistency checker
-
_contentHelper
protected ContentHelper _contentHelper
The content helper
-
-
Constructor Detail
-
ContentConsistencyTestClientSideElement
public ContentConsistencyTestClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
checkConsistency
public Map<String,Object> checkConsistency(List<String> contentsId, boolean shortTest)
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
protected Map<String,Object> getContentDefaultParameters(Content content)
Get the default content's parameters- Parameters:
content
- The content- Returns:
- The default parameters
-
_getOkDescription
protected I18nizableText _getOkDescription(Content content)
Get content i18n description when the consistency check has succeed- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getNotOkDescription
protected I18nizableText _getNotOkDescription(Content content)
Get content i18n description when the consistency check has failed for at least one link- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getMainlyOkDescription
protected I18nizableText _getMainlyOkDescription(Content content)
Get content i18n description when the consistency check returned at least one unknown link- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
-