Skip to Content.
Sympa Menu

perfsonar-dev - [GEANT/SA2/ps-java-services] r5620 - trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration

Subject: perfsonar development work

List archive

[GEANT/SA2/ps-java-services] r5620 - trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration


Chronological Thread 
  • From:
  • To:
  • Subject: [GEANT/SA2/ps-java-services] r5620 - trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration
  • Date: Tue, 11 May 2010 11:33:53 +0100

Author: psnc.pietrzak
Date: 2010-05-11 11:33:53 +0100 (Tue, 11 May 2010)
New Revision: 5620

Modified:

trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
Log:
Added "config-directory" option to component. It describes the path to the
configuration files that should be rewritten to the new configuration.xml.
The path must be absolute.

Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
2010-05-10 10:44:02 UTC (rev 5619)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
2010-05-11 10:33:53 UTC (rev 5620)
@@ -31,7 +31,11 @@
*/
@Override
public void init() throws PerfSONARException {
- configFiles = new ConfigFilesCollection();
+ if (getConfigDirectory() == null)
+ configFiles = new ConfigFilesCollection();
+ else
+ configFiles = new
ConfigFilesCollection(getConfigDirectory());
+
try {
engine = new
TemplateEngine(configFiles.loadProperties());
} catch (IOException ex) {
@@ -40,6 +44,14 @@
}
}

+ private File getConfigDirectory() {
+ if (getOption("config-directory") == null)
+ return null;
+ if (getOption("config-directory").getValue().length() <= 0)
+ return null;
+ return new File(getOption("config-directory").getValue());
+ }
+
/**
* Converts psbase-1 configuration files to psbase-2 format.
*



  • [GEANT/SA2/ps-java-services] r5620 - trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration, svn-noreply, 05/11/2010

Archive powered by MHonArc 2.6.16.

Top of Page