Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3316 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin

Subject: perfsonar development work

List archive

perfsonar: r3316 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3316 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin
  • Date: Wed, 6 Feb 2008 09:26:02 -0500

Author: mac
Date: 2008-02-06 09:26:02 -0500 (Wed, 06 Feb 2008)
New Revision: 3316

Modified:

trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin/LSWizardHandler.java
Log:
working WebAdmin Wizard handler

Modified:
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin/LSWizardHandler.java
===================================================================
---
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin/LSWizardHandler.java
2008-02-06 14:24:18 UTC (rev 3315)
+++
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin/LSWizardHandler.java
2008-02-06 14:26:02 UTC (rev 3316)
@@ -98,9 +98,11 @@
// Each group is independent from each other and can be
configured
// without any depemdencies
try {
+
// Handling exist configuration
// True if this is done properly
eXistDone = handleExist(request);
+
} catch (Exception e) {

throw new Exception(
@@ -112,16 +114,16 @@
// configuration procedures are called
if (eXistDone) {
try {
+
configured = finishConfiguration();
- // if everything has gone OK then true is returned
- return configured;
+
} catch (Exception e) {
throw new Exception("Problem finishing configuration.\n"
+ getFault(e));
}
- } else {
- return configured;
- }
+ }
+
+ return configured;

}

@@ -194,9 +196,12 @@
private boolean handleExist(HttpServletRequest request) throws
Exception {

boolean done = false;
+
// Getting the exist database associated properties
WizardProperties existProperties =
groupedProperties.get("eXist");
+
Iterator it = existProperties.orderedKeys();
+
// The first key is about using or not the database.So this
parameter is
// retrieved from the request
String statusKey = (String) it.next();
@@ -223,7 +228,7 @@

serviceProperties = new ServicePropertiesImpl(ServicePath
+ ServicePropertiesPath);
-
+
// Property set
serviceProperties.setProperty(useExistProperty.getKey(),
useExistProperty.getValue());
@@ -231,6 +236,7 @@
serviceProperties.storeProperties();
// Set done to true
done = true;
+
} catch (IOException e) {

// If anything happens set done to false
@@ -239,10 +245,14 @@

}

+
+
return done;


} else {
+
+
// If the user wishes to use exist then set the property
value
useExistProperty.setPropertyValue("on");
// Set the wizard property to the exist group properties
@@ -341,9 +351,7 @@

serviceProperties.setProperty(key, finalProperties
.getProperty(key));
- System.out.println(" ---"+key+" == "+finalProperties
- .getProperty(key));
-
+
if (key.endsWith(".db_uri")) {
serviceProperties.setProperty(key, existURI);
serviceProperties.setProperty(key+".xmlrpc",
getXMLDBUri(existURI));
@@ -362,6 +370,9 @@
if (key.endsWith(".db_password")) {
password = finalProperties.getProperty(key);
}
+
+ //mac
+ serviceProperties.storeProperties();

}

@@ -488,4 +499,22 @@
return uri;
}

- }
+
+ private void showServiceProperties(ServiceProperties
serviceProperties) {
+ System.out.println("==finishConfiguration.serviceProperties==");
+ for (Object key : serviceProperties.getProperties().keySet()) {
+ System.out.println(key+" =
"+serviceProperties.getProperty((String)key));
+ }
+ System.out.println();
+
+ }
+
+ private void showServiceProperties(WizardProperties wizProperties) {
+ System.out.println("==handleExist.existProperties==");
+ for (Object key : wizProperties.keySet()) {
+ System.out.println(key+" =
"+wizProperties.getProperty((String)key));
+ }
+ System.out.println();
+ }
+
+} //LSWizardHandler



  • perfsonar: r3316 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/webadmin, svnlog, 02/06/2008

Archive powered by MHonArc 2.6.16.

Top of Page