Package org.ametys.cms.content.version
Class CompareContentVersionClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.cms.content.version.CompareContentVersionClientSideElement
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
CompareContentWithLiveVersionClientSideElement
,CompareOldContentWithCurrentVersionClientSideElement
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
Modifier and TypeFieldDescriptionprotected CompareVersionHelper
The compare version helperprotected AmetysObjectResolver
The Ametys object resolverFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getBaseVersion
(VersionAwareAmetysObject versionable) Gets the base version of comparison.protected String
getVersionToCompare
(VersionAwareAmetysObject versionable) Gets the version to compare.isComparable
(String contentId, String version) Gets comparison-information about the given content
Information is if the content is comparable with its last validation version and the concerned versions.void
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
-
_resolver
The Ametys object resolver -
_compareVersionHelper
The compare version helper
-
-
Constructor Details
-
CompareContentVersionClientSideElement
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in 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 idversion
- The current version- 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. By default the previous one- Parameters:
versionable
- TheVersionAwareAmetysObject
- Returns:
- the base version
-