Interface VersionHandler
-
- All Known Implementing Classes:
AbstractVersionHandler
,JavaVersionHandler
,ScriptVersionHandler
,SingleVersionHandler
public interface VersionHandler
Handler to get or set version
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addVersion(Version newVersion)
Adds a new version for a componentVersionConfiguration
getConfiguration(String componentId, Configuration versionConfiguration)
Create a specific object containing usefull data for the handler/storageList<Version>
getCurrentVersions(String componentId, VersionConfiguration configuration)
Get the list of all curent versions for this component id based on the configuration
-
-
-
Method Detail
-
getConfiguration
VersionConfiguration getConfiguration(String componentId, Configuration versionConfiguration) throws ConfigurationException, NotMigrableInSafeModeException
Create a specific object containing usefull data for the handler/storage- Parameters:
componentId
- id of the componentversionConfiguration
- configuration from the plugin.xml- Returns:
- the confuguration object
- Throws:
ConfigurationException
- something wrong in the configurationNotMigrableInSafeModeException
- Impossible to determine the version (e.g. Safe Mode without access to the conf)
-
getCurrentVersions
List<Version> getCurrentVersions(String componentId, VersionConfiguration configuration) throws MigrationException, NotMigrableInSafeModeException
Get the list of all curent versions for this component id based on the configuration- Parameters:
componentId
- id to checkconfiguration
- configuration of this version- Returns:
- a non-null list of
Version
. Can be an empty list if no version can be computed (e.g. configuration not filled). Beware, returning an empty list will not initialize the component ; to initialize a component, you need to return a list with a Version with null id. - Throws:
MigrationException
- Something went wrongNotMigrableInSafeModeException
- Impossible to determine the version (e.g. Safe Mode without access to the conf)
-
addVersion
void addVersion(Version newVersion) throws MigrationException
Adds a new version for a component- Parameters:
newVersion
- Version to set- Throws:
MigrationException
- Something went wrong
-
-