Class DefaultVersionsHandler
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.core.impl.version.DefaultVersionsHandler
-
- All Implemented Interfaces:
VersionsHandler
,LogEnabled
,ThreadSafe
public class DefaultVersionsHandler extends AbstractLogEnabled implements VersionsHandler, ThreadSafe
Default implementation of a VersionHandler returning exactly two versions : that of the Runtime kernel and that of the running application.
Applications may subclass this default implementation
-
-
Field Summary
Fields Modifier and Type Field Description private Version
_ametysVersion
private Version
_applicationVersion
-
Fields inherited from interface org.ametys.core.version.VersionsHandler
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultVersionsHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Version
_getApplicationVersion()
protected Version
_getVersionFromClasspath(String path, String versionName)
Helper for getting Version from an XML file in the classpath.
The file must be formed like this :
<version>
<version>Version name</version>
<date>Version date in format "yyyyMMdd'T'HHmmz"</date>
</version>protected Collection<Version>
getAdditionalVersions()
Returns any additional versions informations displayable in the administrator area.
Note: This implementation returns null.Collection<Version>
getVersions()
Returns all Versions to be displayed in the administrator area-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_ametysVersion
private Version _ametysVersion
-
_applicationVersion
private Version _applicationVersion
-
-
Constructor Detail
-
DefaultVersionsHandler
public DefaultVersionsHandler()
-
-
Method Detail
-
getVersions
public final Collection<Version> getVersions()
Description copied from interface:VersionsHandler
Returns all Versions to be displayed in the administrator area- Specified by:
getVersions
in interfaceVersionsHandler
- Returns:
- all Versions to be displayed in the administrator area
-
getAdditionalVersions
protected Collection<Version> getAdditionalVersions()
Returns any additional versions informations displayable in the administrator area.
Note: This implementation returns null.- Returns:
- any additional versions informations displayable in the administrator area.
-
_getApplicationVersion
private Version _getApplicationVersion()
-
_getVersionFromClasspath
protected final Version _getVersionFromClasspath(String path, String versionName)
Helper for getting Version from an XML file in the classpath.
The file must be formed like this :
<version>
<version>Version name</version>
<date>Version date in format "yyyyMMdd'T'HHmmz"</date>
</version>- Parameters:
path
- a path in the classpath poiting to an XML fileversionName
- the name of the Version to create- Returns:
- the created Version
-
-