public interface AppVersioningStrategy
Defines a strategy for managing app versions and detecting updates and conflicts as the apps are transferred between systems.
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableMap<String,String> |
getAppVersioningMetaData(String appModelId)
Returns the metadata that should be stored as part of the export.
|
void |
incrementVersion(String appModelId,
String comment)
Increments the version number for the given app.
|
boolean |
isNewerVersion(String appModelId,
Map<String,String> incomingMetaData)
Checks that the incoming app is a newer version of the current app.
|
void |
markAsModified(String appModelId)
Called whenever an app has been modified (e.g. when it transitions to the 'pending' state).
|
void incrementVersion(String appModelId, String comment) throws AppVersioningException
Increments the version number for the given app.
appModelId
- the ID of the app model whose version is to be incrementedcomment
- the modification commentAppVersioningException
- if the ID does not correspond to a valid app modelcom.google.common.collect.ImmutableMap<String,String> getAppVersioningMetaData(String appModelId) throws AppVersioningException
Returns the metadata that should be stored as part of the export.
This metadata will be needed to check whether or not a particular version should be imported.
appModelId
- the ID of the app model being exportedAppVersioningException
- if the app does not contain versioning informationboolean isNewerVersion(String appModelId, Map<String,String> incomingMetaData) throws AppVersioningException
Checks that the incoming app is a newer version of the current app.
appModelId
- the ID of the local app model to be checkedincomingMetaData
- the incoming app versioning metadatatrue
if the incoming app is a newer versionAppVersioningException
- if the app versioning information is incompatiblevoid markAsModified(String appModelId)
Called whenever an app has been modified (e.g. when it transitions to the 'pending' state).
appModelId
- the modified app model IDCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.