T - The type of application that this version manager supports.public abstract class AbstractVersionManager<T extends com.github.essobedo.appma.spi.Manageable> extends Object implements com.github.essobedo.appma.spi.VersionManager<T>
Simple implementation of a VersionManager based on the gitlab API. It assumes that
you have a specific branch in your (private) gitlab project in which you have one directory
per version knowing that the name of the directories is the corresponding version id.
In each directory you have a patch file that is used to upgrade the application.
This implementation relies on the gitlab API to check if there is a directory in the branch dedicated to the releases whose name comes after the current version id, if so it means that there is a new version available and will retrieve the patch file available in the directory.
| Constructor and Description |
|---|
AbstractVersionManager()
Constructs an
AbstractVersionManager with the real end point to gitlab. |
| Modifier and Type | Method and Description |
|---|---|
com.github.essobedo.appma.task.Task<String> |
check(T application) |
protected abstract ConnectionConfiguration |
createConfiguration(T application)
Creates the
ConnectionConfiguration that will be used to access to the gitlab repository. |
com.github.essobedo.appma.task.Task<Void> |
store(T application,
OutputStream outputStream) |
public AbstractVersionManager()
AbstractVersionManager with the real end point to gitlab.protected abstract ConnectionConfiguration createConfiguration(T application) throws com.github.essobedo.appma.exception.ApplicationException
ConnectionConfiguration that will be used to access to the gitlab repository.application - the application for which we want to access to the corresponding gitlab repository.ConnectionConfiguration that will be used to access to the gitlab repository.com.github.essobedo.appma.exception.ApplicationException - if the ConnectionConfiguration could not be created.public com.github.essobedo.appma.task.Task<String> check(T application) throws com.github.essobedo.appma.exception.ApplicationException
check in interface com.github.essobedo.appma.spi.VersionManager<T extends com.github.essobedo.appma.spi.Manageable>com.github.essobedo.appma.exception.ApplicationExceptionpublic com.github.essobedo.appma.task.Task<Void> store(T application, OutputStream outputStream) throws com.github.essobedo.appma.exception.ApplicationException
store in interface com.github.essobedo.appma.spi.VersionManager<T extends com.github.essobedo.appma.spi.Manageable>com.github.essobedo.appma.exception.ApplicationExceptionCopyright © 2016. All rights reserved.