Package org.ametys.cms.content.version
Class AbstractCompareContentVersionClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.cms.content.version.AbstractCompareContentVersionClientSideElement
- All Implemented Interfaces:
ClientSideElement,LogEnabled,PluginAware,Configurable,Serviceable
- Direct Known Subclasses:
CompareContentWithLiveVersionClientSideElement
public abstract class AbstractCompareContentVersionClientSideElement
extends StaticClientSideElement
ClientSideElement for the button for comparing a content between two version-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CompareVersionHelperThe compare version helperprotected AmetysObjectResolverThe Ametys object resolverFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBaseVersion(VersionAwareAmetysObject versionable) Gets the base version of comparison.protected abstract StringgetVersionToCompare(VersionAwareAmetysObject versionable) Gets the version to compare.isComparable(String contentId) Gets comparison-information about the given content
Information is if the content is comparable with its last validation version and the concerned versions.voidservice(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
-
_resolver
The Ametys object resolver -
_compareVersionHelper
The compare version helper
-
-
Constructor Details
-
AbstractCompareContentVersionClientSideElement
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classStaticFileImportsClientSideElement- Throws:
ServiceException
-
isComparable
Gets comparison-information about the given content
Information is if the content is comparable with its last validation version and the concerned versions.- Parameters:
contentId- The content id- Returns:
- The information
-
getVersionToCompare
Gets the version to compare. By default, it is the current one.- Parameters:
versionable- TheVersionAwareAmetysObject- Returns:
- the source version
-
getBaseVersion
Gets the base version of comparison.- Parameters:
versionable- TheVersionAwareAmetysObject- Returns:
- the base version
-