Interface VersionStorage
-
- All Known Implementing Classes:
JcrDataVersionStorage
,SqlVersionStorage
public interface VersionStorage
Store the versions of a migrable component
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addVersion(Version version)
Add a versionList<Version>
getAllVersions(String componentIdentifier, VersionConfiguration configuration, String versionHandlerId)
Get the history of all versions for a component identifierVersionConfiguration
getConfiguration(String componentId, Configuration versionConfiguration)
Create a specific object containing usefull data for the handler/storageVersion
getCurrentVersion(String componentIdentifier, VersionConfiguration configuration, String versionHandlerId)
Find the current version for a component identifiervoid
removeAllVersions(String componentIdentifier, VersionConfiguration configuration)
Remove all versions for a component identifier
-
-
-
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
-
getCurrentVersion
Version getCurrentVersion(String componentIdentifier, VersionConfiguration configuration, String versionHandlerId) throws MigrationException, NotMigrableInSafeModeException
Find the current version for a component identifier- Parameters:
componentIdentifier
- component to look forconfiguration
- configuration to useversionHandlerId
- id of theVersionHandler
- Returns:
- the current version for this component (can have a versionId null if no version is found), or null if it is impossible to determine the version (e.g. safe mode).
- Throws:
MigrationException
- Something went wrongNotMigrableInSafeModeException
- Impossible to determine the version
-
getAllVersions
List<Version> getAllVersions(String componentIdentifier, VersionConfiguration configuration, String versionHandlerId) throws MigrationException, NotMigrableInSafeModeException
Get the history of all versions for a component identifier- Parameters:
componentIdentifier
- component to look forconfiguration
- configuration to useversionHandlerId
- id of theVersionHandler
- Returns:
- list of all versions for this component
- Throws:
MigrationException
- Something went wrongNotMigrableInSafeModeException
- Impossible to determine the version
-
addVersion
void addVersion(Version version) throws MigrationException
Add a version- Parameters:
version
- Version to store (contains the component identifier)- Throws:
MigrationException
- Something went wrong
-
removeAllVersions
void removeAllVersions(String componentIdentifier, VersionConfiguration configuration) throws MigrationException
Remove all versions for a component identifier- Parameters:
componentIdentifier
- component to clearconfiguration
- configuration to use- Throws:
MigrationException
- Something went wrong
-
-