|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.resourcemanagement.support.server.managers.services.SWRepositoryUpgrader
public class SWRepositoryUpgrader
Responsible to interact with the repository manager to require an update of the infrastructure.
To facilitate the monitoring of main steps involved the
UpgradeListener class has been introduced.
Notice that one single update per time can be required. If a pending update is running the next request will be blocked and an exception will be raised.
Three files will be created at update request (the folder in which they will be created depends on the parameter reportsDir).
// [optional] // to ensure at least a repository manager is registered in the scope new SWRepositoryManager().getSoftwareRepository(scope); ServerConsole.info(LOG_PREFIX, "Software repository [FOUND]"); new SWRepositoryUpgrader( // The URL containing the list of packages to update "http://acme.org/builds/build.txt", // The directory to store report files "temp", // The scope "/gcube/devsec") // requires the upgrade .doUpgrade();
| Constructor Summary | |
|---|---|
SWRepositoryUpgrader(String todeployTxtURL,
String reportsDir,
String scope)
Builds a new instance of repository update manager. |
|
| Method Summary | |
|---|---|
void |
addListener(UpgradeListener listener)
|
void |
doUpgrade()
Upgrades a software repository. |
double |
getProgressStatus()
Gives the completed upgrade percentage (0...1). |
String |
getScope()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SWRepositoryUpgrader(String todeployTxtURL,
String reportsDir,
String scope)
throws Exception
todeployTxtURL - the URL to use to retrieve the list of software to updatereportsDir - where the reports must be stored
Exception| Method Detail |
|---|
public final String getScope()
public final void doUpgrade()
throws Exception
softwareRepositoryURL - the url to contact the service repositorytodeployTxtURL - the txt file containing software descriptionsreportFileName - the filename where report must be storeddistributionFileName - the filename where distribution must be storedscope -
Exceptionpublic final double getProgressStatus()
public final void addListener(UpgradeListener listener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||