Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4078 - in trunk/surfnet_java-flowsubscription-mp: . conf contrib/client src/main/java/org/perfsonar/service/measurementPoint/flowsubscription src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard

Subject: perfsonar development work

List archive

perfsonar: r4078 - in trunk/surfnet_java-flowsubscription-mp: . conf contrib/client src/main/java/org/perfsonar/service/measurementPoint/flowsubscription src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4078 - in trunk/surfnet_java-flowsubscription-mp: . conf contrib/client src/main/java/org/perfsonar/service/measurementPoint/flowsubscription src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard
  • Date: Wed, 2 Jul 2008 05:36:29 -0400

Author: michael.bischoff
Date: 2008-07-02 05:36:29 -0400 (Wed, 02 Jul 2008)
New Revision: 4078

Added:

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/AuthenticatorImpl.java

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/BasicServiceConfig.java

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/FlowSubscriptionMpConfig.java

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/ServiceConfig.java

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/Wizard.java

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizzardRequest.java

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizzardResponse.java
Modified:
trunk/surfnet_java-flowsubscription-mp/.classpath
trunk/surfnet_java-flowsubscription-mp/.project
trunk/surfnet_java-flowsubscription-mp/conf/service.properties
trunk/surfnet_java-flowsubscription-mp/contrib/client/config.py

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/NfReplayControll.java

trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizardHandler.java
Log:
In between checking so that gijs can rename the svn.

Modified: trunk/surfnet_java-flowsubscription-mp/.classpath
===================================================================
--- trunk/surfnet_java-flowsubscription-mp/.classpath 2008-07-02 09:36:08
UTC (rev 4077)
+++ trunk/surfnet_java-flowsubscription-mp/.classpath 2008-07-02 09:36:29
UTC (rev 4078)
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src"
path="src/main/java"/>
- <classpathentry kind="con"
path="org.devzuz.q.maven.jdt.core.mavenClasspathContainer">
- <attributes>
- <attribute
name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
- </attributes>
- </classpathentry>
+ <classpathentry kind="con"
path="org.devzuz.q.maven.jdt.core.mavenClasspathContainer"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Modified: trunk/surfnet_java-flowsubscription-mp/.project
===================================================================
--- trunk/surfnet_java-flowsubscription-mp/.project 2008-07-02 09:36:08
UTC (rev 4077)
+++ trunk/surfnet_java-flowsubscription-mp/.project 2008-07-02 09:36:29
UTC (rev 4078)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>flowsubscription-mp</name>
+ <name>surfnet_java-flowsubscription-mp</name>
<comment></comment>
<projects>
</projects>

Modified: trunk/surfnet_java-flowsubscription-mp/conf/service.properties
===================================================================
--- trunk/surfnet_java-flowsubscription-mp/conf/service.properties
2008-07-02 09:36:08 UTC (rev 4077)
+++ trunk/surfnet_java-flowsubscription-mp/conf/service.properties
2008-07-02 09:36:29 UTC (rev 4078)
@@ -97,41 +97,41 @@
service.mp.flow.max_conn=20

### network layout
-service.mp.flow.router.0.name=arthur
-service.mp.flow.router.0.enabled=true
-service.mp.flow.router.0.address=145.145.127.1
-service.mp.flow.router.0.flowport=29001
-service.mp.flow.router.0.interfaces=1,2,3,4,5,6
+service.mp.flow.exporter.0.name=arthur
+service.mp.flow.exporter.0.enabled=true
+service.mp.flow.exporter.0.address=145.145.127.1
+service.mp.flow.exporter.0.flowport=29001
+service.mp.flow.exporter.0.interfaces=1,2,3,4,5,6

-service.mp.flow.router.1.name=ford
-service.mp.flow.router.1.enabled=true
-service.mp.flow.router.1.address=145.145.127.2
-service.mp.flow.router.1.flowport=29002
-service.mp.flow.router.1.interfaces=1,2,3,4,5,6
+service.mp.flow.exporter.1.name=ford
+service.mp.flow.exporter.1.enabled=true
+service.mp.flow.exporter.1.address=145.145.127.2
+service.mp.flow.exporter.1.flowport=29002
+service.mp.flow.exporter.1.interfaces=1,2,3,4,5,6

-service.mp.flow.router.2.name=trillian
-service.mp.flow.router.2.enabled=true
-service.mp.flow.router.2.address=145.145.127.3
-service.mp.flow.router.2.flowport=29003
-service.mp.flow.router.2.interfaces=1,2,3,4,5,6
+service.mp.flow.exporter.2.name=trillian
+service.mp.flow.exporter.2.enabled=true
+service.mp.flow.exporter.2.address=145.145.127.3
+service.mp.flow.exporter.2.flowport=29003
+service.mp.flow.exporter.2.interfaces=1,2,3,4,5,6

-service.mp.flow.router.3.name=zaphod
-service.mp.flow.router.3.enabled=true
-service.mp.flow.router.3.address=145.145.127.4
-service.mp.flow.router.3.flowport=29004
-service.mp.flow.router.3.interfaces=1,2,3,4,5,6
+service.mp.flow.exporter.3.name=zaphod
+service.mp.flow.exporter.3.enabled=true
+service.mp.flow.exporter.3.address=145.145.127.4
+service.mp.flow.exporter.3.flowport=29004
+service.mp.flow.exporter.3.interfaces=1,2,3,4,5,6

-service.mp.flow.router.4.name=router4
-service.mp.flow.router.4.enabled=false
-service.mp.flow.router.4.address=127.0.0.1
-service.mp.flow.router.4.flowport=6999
-service.mp.flow.router.4.interfaces=1,2,3,4,5,6
+service.mp.flow.exporter.4.name=router4
+service.mp.flow.exporter.4.enabled=false
+service.mp.flow.exporter.4.address=127.0.0.1
+service.mp.flow.exporter.4.flowport=6999
+service.mp.flow.exporter.4.interfaces=1,2,3,4,5,6

-service.mp.flow.router.5.name=router5
-service.mp.flow.router.5.enabled=false
-service.mp.flow.router.5.address=127.0.0.1
-service.mp.flow.router.5.flowport=6999
-service.mp.flow.router.5.interfaces=1,2,3,4,5,6
+service.mp.flow.exporter.5.name=router5
+service.mp.flow.exporter.5.enabled=false
+service.mp.flow.exporter.5.address=127.0.0.1
+service.mp.flow.exporter.5.flowport=6999
+service.mp.flow.exporter.5.interfaces=1,2,3,4,5,6

### application locations


Modified: trunk/surfnet_java-flowsubscription-mp/contrib/client/config.py
===================================================================
--- trunk/surfnet_java-flowsubscription-mp/contrib/client/config.py
2008-07-02 09:36:08 UTC (rev 4077)
+++ trunk/surfnet_java-flowsubscription-mp/contrib/client/config.py
2008-07-02 09:36:29 UTC (rev 4078)
@@ -1,7 +1,7 @@

# where to connect to
-#serveraddress="localhost"
-serveraddress="sonar1.amsterdam.surfnet.nl"
+serveraddress="localhost"
+#serveraddress="sonar1.amsterdam.surfnet.nl"
#serveraddress="192.168.1.99"
serverport="8080"

#servicepath="/surfnet_java-flowsubscription-mp/services/FlowsubscriptionMeasurementPointService"

Modified:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/NfReplayControll.java
===================================================================
---
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/NfReplayControll.java
2008-07-02 09:36:08 UTC (rev 4077)
+++
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/NfReplayControll.java
2008-07-02 09:36:29 UTC (rev 4078)
@@ -328,7 +328,7 @@

for(int i = 0; ;i++) {
try {
-
configuration.getProperty("service.mp.flow.router."+i+".name");
+
configuration.getProperty("service.mp.flow.exporter."+i+".name");
} catch (PerfSONARException e) {
break;
}

Added:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/AuthenticatorImpl.java

Added:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/BasicServiceConfig.java

Added:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/FlowSubscriptionMpConfig.java

Added:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/ServiceConfig.java

Added:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/Wizard.java

Modified:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizardHandler.java
===================================================================
---
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizardHandler.java
2008-07-02 09:36:08 UTC (rev 4077)
+++
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizardHandler.java
2008-07-02 09:36:29 UTC (rev 4078)
@@ -27,669 +27,557 @@
import perfSONARWebAdmin.auxiliary.xmlDB.xmlDBManager;
import perfSONARWebAdmin.auxiliary.xmlDB.xmlDBManagerImpl;

-public class WizardHandler implements ServiceConfig, ConfigurationHandler {
+/**
+ * This code is beeing revised do not use.
+ *
+ * @author michael
+ *
+ */
+public class WizardHandler {
+
+ private Hashtable<String, WizardProperties> groupedProperties;

- // Hashtable containg Wizard Properties as values and the various
groups in
- // which the properties are divided to as keys
- private Hashtable<String, WizardProperties> groupedProperties = null;

- // All of the Wizard Properties
- private WizardProperties properties = null;
-
- // The path to the configuration directory
- private static final String confPath =
"WEB-INF/classes/perfsonar/conf/";
-
- // The path to the service.properties file
- private static final String ServicePropertiesPath = confPath +
"service.properties";
-
- // The path to the logging properties file
- private static final String LoggingPropertiesPath = confPath +
"log4j.properties";
-
- // The path to the componenets.properties file
- private static final String ComponentsPropertiesPath = confPath +
"components.properties";
-
- // The path to the objects properties file
- private static final String ObjectsConfigPath = confPath +
"objects.config";
-
- // The path to the wizard.properties file
- private static final String WizardPropertiesPath = confPath +
"wizard.properties";
-
- // The path to the servlet.properties file
- private static final String ServletPropertiesPath = confPath
- + "servlet.properties";
-
- // The path to the directory under the webapps folder in which the
service
- // is installed
- private static String ServicePath;
-
- // Bollean that states if the configuration process is finished
- private static boolean configured = false;
-
- public boolean handleRequest(HttpServletRequest request) throws
Exception {
- // Setting configured to false
- configured = false;
-// don't need exist
+ public WizardHandler() {
+ throw new AssertionError("Do not use this class is beeing
revised.");
+ }
+//
+//
+// public boolean handleRequest(HttpServletRequest request) throws
Exception {
+// boolean succes = true;
+//// don't need exist
+//// try {
+//// handleExist(request);
+//// } catch (Exception e) {
+//// throw new Exception("Problem with eXist
configuration!\nPlease check your input.\n" + getFault(e));
+//// }
// try {
-// handleExist(request);
+// handleLS(request);
// } catch (Exception e) {
-// throw new Exception("Problem with eXist
configuration!Please check your input.\n" + getFault(e));
+// succes = false;
+// throw new Exception("Problem with LS
configuration!\nPlease check your input.\n" + getFault(e));
// }
- try {
- handleLS(request);
- } catch (Exception e) {
- throw new Exception("Problem with LS
configuration!Please check your input.\n" + getFault(e));
- }
- try {
- handleOther(request);
- } catch (Exception e) {
- throw new Exception("Problem with Store
configuration!Please check your input.\n" + getFault(e));
- }
- configured = true;
- return true;
- }
+// try {
+// handleOther(request);
+// } catch (Exception e) {
+// throw new Exception("Problem with Store
configuration!\nPlease check your input.\n" + getFault(e));
+// }
+// return true;
+// }
+//
+// /**
+// * Method used for handling other groups configuration(That is other
than LS
+// * and exist)
+// *
+// * @param request
+// * The HttpServletRequest containing input from the user
+// * @throws Exception
+// */
+// public void handleOther(HttpServletRequest request) throws Exception {
+// // Iterating through the groups
+// for(String group : groupedProperties.keySet()) {
+// // Every other group should be handled except for
eXist and LS
+// if (!(group.equals("eXist") || group.equals("LS"))) {
+//
+// // Retrieving the properties belonging to the
group
+// WizardProperties groupProperties =
groupedProperties.get(group);
+// // Iterating through the properties. This way
using the key of
+// // each property we can retrieve the users
input from the
+// // request
+// Iterator it = groupProperties.orderedKeys();
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// // get the value from the request
+// String value =
request.getParameter(key).trim();
+// WizardProperty pr =
groupProperties.getWizardProperty(key);
+// // Set the property value
+// pr.setPropertyValue(value);
+// // if the property does not the check
field set, the also
+// // put the user input as the proposed
value also
+// // This happens, because properties
that have the check
+// // property set, are usually
important for the rest of the
+// // group properties since their value
would determine if the
+// // rest need to be configured. So
their proposed value is
+// // left to thr developer
+// if (!pr.getCheck()) {
+// pr.setProposedValue(value);
+// }
+// // Updating the property inside the
group propereties
+//
groupProperties.setWizardProperty(key, pr);
+// }
+// // Updating the grouped properties
+// groupedProperties.put(group, groupProperties);
+// // Applying the configuration input from the
user to the service
+// try {
+// otherActions(group, groupProperties);
+// } catch (Exception e) {
+// throw new Exception(getFault(e));
+// }
+// }
+// }
+// }
+//
+// /**
+// * Method used for handling LS registration configuration
+// *
+// * @param request
+// * The HttpServletRequest containing input from the user
+// * @return True if LS registration is configured successfully
+// * @throws Exception
+// */
+// private boolean handleLS(HttpServletRequest request) throws Exception
{
+//
+// // Retrieving the useLS parameter. The useLS parammeter is
inserted as
+// // input by the shoaAllProperties method of the HTMLOutput
class
+// // automatically. It is the answer to if the user wants to
register to
+// // an LS since their is no service property that corresponds
to this
+// // question
+// String useLS = request.getParameter("useLS").trim();
+// // If yes all other properties regarding LS registration are
retrieved
+// if (useLS.equals("yes")) {
+// // Retrieving all propertie associated with LS
+// WizardProperties lsProperties =
groupedProperties.get("LS");
+// // Getting the keys of the properties
+// Iterator it = lsProperties.orderedKeys();
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// // Using the keys for retrieving the users
input
+// String value =
request.getParameter(key).trim();
+// WizardProperty pr =
lsProperties.getWizardProperty(key);
+// // Setting property value and proposed value
+// pr.setPropertyValue(value);
+// pr.setProposedValue(value);
+// // Setting property
+// lsProperties.setWizardProperty(key, pr);
+// }
+// // Setting the LS group properties
+// groupedProperties.put("LS", lsProperties);
+// boolean done = false;
+// // Trying to perfom the LS configuration actions to
the service
+// try {
+// lsActions(lsProperties);
+// done = true;
+// } catch (Exception e) {
+// // False if an error happens
+// done = false;
+// throw new Exception(getFault(e));
+// }
+//
+// return done;
+// }
+// removeRegistrationComponents();
+// return true;
+// }
+//
+// /**
+// * Method used for handling eXist database configuration
+// *
+// * @param request
+// * The HttpServletRequest containing input from the user
+// * @return True if LS registration is configured successfully
+// * @throws Exception
+// */
+// public void handleExist(HttpServletRequest request) throws Exception {
+// // 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();
+// String status = request.getParameter(statusKey);
+// WizardProperty useExistProperty =
existProperties.getWizardProperty(statusKey);
+//
+// if (status.equals("off")) {
+// useExistProperty.setPropertyValue("off");
+// existProperties.setWizardProperty(statusKey,
useExistProperty);
+// properties.setWizardProperty(statusKey,
useExistProperty);
+// groupedProperties.put("eXist", existProperties);
+// try {
+// ServiceProperties serviceProperties;
+// serviceProperties = new
ServicePropertiesImpl(servicePath +
+// SERVICE_PROPERTIES_PATH); // Property set
+//
serviceProperties.setProperty(useExistProperty.getKey(),
+// useExistProperty.getValue()); // new
Properties stored
+// serviceProperties.storeProperties();
+// } catch (IOException e) { // If anything happens set
done to false
+// throw new Exception(getFault(e));
+// }
+// } 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
+// * existProperties.setWizardProperty(statusKey,
useExistProperty); Get
+// * all other parameters regarding exist in the users
reqauest
+// */
+//
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// // Get the parameter
+// String value =
request.getParameter(key).trim();
+// // Get the property
+// WizardProperty pr =
existProperties.getWizardProperty(key);
+// // Set value and proposed value
+// pr.setPropertyValue(value);
+// pr.setProposedValue(value);
+// // Set the property in the exist group
properties
+// existProperties.setWizardProperty(key, pr);
+// }
+// // Update the exist group Property
+// groupedProperties.put("eXist", existProperties);
+// try {
+// // Call for the needed actions for exist
configuration.The exist
+// // group properties are used as input
+// existActions(existProperties);
+// } catch (Exception e) {
+// // Set doen to false if anything happens
+// throw new Exception(getFault(e));
+// }
+// }
+//
+// }
+//
+// /**
+// * Method for handling all configuration actions regarding any other
group
+// * besides LS and eXist
+// *
+// * @param group
+// * The group
+// * @param functionProperties
+// * The properties regardung the group
+// * @throws IOException
+// */
+// private void otherActions(String group, WizardProperties
functionProperties) throws IOException {
+//
+// // The only other group for rrd ma is the Store group
+// // So in this case changes go into the service.property file
that uses
+// // groupig and description
+// // In order to keep that functionality we need in this case
to use the
+// // PerfsonarProperties class
+// if (!group.equals("Administration")) {
+//
+// // Using PerfsonarProperties in order to keep the
grouping and
+// // description
+// PerfsonarProperties serviceProperties = null;
+// serviceProperties = new PerfsonarPropertiesImpl();
+// serviceProperties.loadProperties(new
FileInputStream(servicePath
+// + SERVICE_PROPERTIES_PATH));
+// // Getting the names for every property of the group
+// Iterator it = functionProperties.orderedKeys();
+// // Setting the value of each property
+//
+// // An object that holds the property
group,description,value and key
+// PerfsonarProperty property = new PerfsonarProperty();
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// // Setting service properties and wizard
properties
+//
+// // Get the property
+// property = serviceProperties.getProperty(key);
+// // If key property does not exist the throw
an exception
+// if (property == null) {
+// throw new IOException("Key is invalid
" + key + " ");
+// } else {
+// // Change the value of the property
+// if
(functionProperties.getProperty(key).equals("yes"))
+// property.setValue("on");
+// else if
(functionProperties.getProperty(key).equals("no"))
+// property.setValue("off");
+// else
+//
property.setValue(functionProperties.getProperty(key));
+//
+// serviceProperties.setProperty(key,
property);
+// }
+// properties.setWizardProperty(key,
functionProperties
+// .getWizardProperty(key));
+// }
+// // Storing all changes
+// serviceProperties.storeProperties(new
FileOutputStream(servicePath
+// + SERVICE_PROPERTIES_PATH));
+// }
+// // We don't really have any other groups just the ones for
the servlet
+// // administration, that does not use grouping and description
so we can
+// // use
+// // the ServiceProperties class as usual
+// else {
+// // A class that makes modifying service properties a
little bit
+// // easier
+// ServiceProperties serviceProperties = new
ServicePropertiesImpl(servicePath + SERVLET_PROPERTIES_PATH);
+// // Getting the names for every property of the group
+// Iterator it = functionProperties.orderedKeys();
+// // Setting the value of each property
+// String value = null;
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// // Setting service properties and wizard
properties
+// value = functionProperties.getProperty(key);
+// if (value == null) {
+// throw new IOException("Key is invalid
" + key + " ");
+// } else {
+// serviceProperties.setProperty(key,
value);
+// }
+// properties.setWizardProperty(key,
functionProperties.getWizardProperty(key));
+// }
+// serviceProperties.storeProperties();
+//
+// }
+// properties.storeToXML(new FileOutputStream(new
File(servicePath
+// + WIZARD_PROPERTIES_PATH)), " Last
Modification "
+// +
Calendar.getInstance().getTime().toString());
+// }
+//
+// /**
+// * Method for handling all configuration actions regarding the LS
+// * registration
+// *
+// * @param finalProperties
+// * The WizardProperties that belong to the LS registration
group
+// * @throws IOException
+// */
+// private void lsActions(WizardProperties finalProperties) throws
IOException {
+// // Changes happen into the service.property file that uses
groupig and
+// // description
+// // In order to keep that functionality we need in this case
to use the
+// // PerfsonarProperties class
+// PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
+// serviceProperties.loadProperties(new
FileInputStream(servicePath
+// + SERVICE_PROPERTIES_PATH));
+// Iterator it = finalProperties.orderedKeys();
+// // Iterating through the LS registration properties properties
+//
+// // Initializing the PerfsonarProperty object that holds
information
+// // about grouping and description
+// PerfsonarProperty property = new PerfsonarProperty();
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// // Set the service properties
+//
+// // Get the PerfsonarProperty object
+// property = serviceProperties.getProperty(key);
+//
+// // If property key does not exist throw an exceptrion
+// if (property == null) {
+// throw new IOException("Key is invalid " + key
+ " ");
+// } else {
+// // Else set the value right
+//
property.setValue(finalProperties.getProperty(key));
+// serviceProperties.setProperty(key, property);
+// }
+// // Set the wizard properties
+// properties.setWizardProperty(key, finalProperties
+// .getWizardProperty(key));
+// }
+// // Storing service properties
+// serviceProperties.storeProperties(new
FileOutputStream(servicePath + SERVICE_PROPERTIES_PATH));
+// // Setting the LS registration componenets in components
properties file
+// addRegistrationComponents();
+// // Storing the wizard properties
+// properties.storeToXML(new FileOutputStream(new
File(servicePath
+// + WIZARD_PROPERTIES_PATH)), " Last
Modification "
+// +
Calendar.getInstance().getTime().toString());
+// }
+//
+// /**
+// * Method used for handling all actions associated with exist db
+// * confoguration
+// *
+// * @param finalProperties
+// * The Wizard Properties associated with the exist group
+// * @throws Exception
+// */
+// private void existActions(WizardProperties finalProperties)
throws Exception {
+// // Changes happen into the service.property file that uses
groupig and
+// // description in order to keep that functionality we need in
this case
+// // to use the PerfsonarProperties class
+// PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
+// serviceProperties.loadProperties(new
FileInputStream(servicePath
+// + SERVICE_PROPERTIES_PATH));
+// // Any changes happening to the URL of the exist db and on
the admin
+// // password should be reflected on the servlet.properties as
well
+// ServiceProperties servletProperties = new
ServicePropertiesImpl(servicePath + SERVLET_PROPERTIES_PATH);
+// // Get an iterator for all service properties
+// Iterator it = serviceProperties.getKeysIterator();
+// // Get the type of the service. Will be used for making the
new db
+// // collection
+// String serviceName = servletProperties.getProperty(
+// "servlet.service_type").trim();
+// // Naming the new collection on exist db
+// String dbCollection = serviceName + "config";
+// // Initializing all necessary fileds
+// String adminPass = null;
+// String existURI = "";
+// String newAdminPass = null;
+// String username = null;
+// String password = null;
+// String confFile = null;
+// // Need to get the new xmlDBURI and old and new admin
password so that
+// // we can make the changes
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// if (key.endsWith("xmldb.db_adminpassword")) {
+// // adminPass =
serviceProperties.getProperty(key).getValue()
+// // .trim();
+// newAdminPass =
finalProperties.getProperty(key).trim();
+// }
+// if (key.endsWith("xmldb.db_uri")) {
+// existURI = finalProperties.getProperty(key);
+// }
+//
+// }
+//
+// it = finalProperties.orderedKeys();
+// // Iterating though tthe users input
+// while (it.hasNext()) {
+// String key = (String) it.next();
+// // The input from the user is also set in service
properties with a
+// // slight modification for tyhe xmldb uri. We need to
add the
+// // collection at the end of the URI
+// PerfsonarProperty property = new PerfsonarProperty();
+// if (!key.endsWith("xmldb.db_uri")) {
+// if (key.equals("old_adminpassword")) {
+// adminPass =
finalProperties.getProperty(key).trim();
+// } else {
+// property =
serviceProperties.getProperty(key);
+// // If property key does not exist
throw an exceptrion
+// if (property == null) {
+// throw new Exception("Key is
invalid " + key + " ");
+// }
+//
property.setValue(finalProperties.getProperty(key));
+// serviceProperties.setProperty(key,
property);
+// }
+// } else {
+// property = serviceProperties.getProperty(key);
+// property.setValue(existURI + "/db/" +
dbCollection);
+// serviceProperties.setProperty(key, property);
+// }
+// // Setting also the wizard properties
+// properties.setWizardProperty(key,
finalProperties.getWizardProperty(key));
+//
+// // Also getting all needed information in orer to
configure the
+// // exist db
+// if (key.endsWith("xmldb.db_username")) {
+// username =
finalProperties.getProperty(key).trim();
+// }
+// if (key.endsWith("xmldb.db_password")) {
+// password =
finalProperties.getProperty(key).trim();
+// }
+// if (key.endsWith("conf_file")) {
+// confFile =
finalProperties.getProperty(key).trim();
+// }
+//
+// }
+//
+// // If admin pass is not set than its considered to be empty
+// if (adminPass == null) {
+// adminPass = "";
+// }
+//
+// // Creating all necessary collections and users in exist
+// if (existURI == null) {
+// throw new Exception("eXist xmldb URI is empty!\n");
+// }
+// xmlDBManager manager = new xmlDBManagerImpl(existURI,
"admin", adminPass);
+// // Creating collection and users
+// manager.createCollection(dbCollection);
+// manager.createUser(dbCollection, username, password, null);
+// // Adding the metadata config document
+// manager.getCollection(dbCollection).addDocument(new
File(confFile),
+// username);
+// // Modifying the admin user password
+// manager.modifyUser("admin", newAdminPass, null, null);
+//
+// serviceProperties.storeProperties(new
FileOutputStream(servicePath
+// + SERVICE_PROPERTIES_PATH));
+// properties.storeToXML(new FileOutputStream(new
File(servicePath
+// + WIZARD_PROPERTIES_PATH)), " Last
Modification "
+// +
Calendar.getInstance().getTime().toString());
+//
+// }
+//
+// /**
+// * Method used for adding registration componenets to the
+// * componenets.properties file
+// *
+// * @throws IOException
+// */
+// private void addRegistrationComponents() throws IOException {
+// File comp = new File(servicePath +
COMPONENTS_PROPERTIES_PATH);
+// FileReader fr = new FileReader(comp);
+// StringBuffer contents = new StringBuffer();
+// BufferedReader br = new BufferedReader(fr);
+// String line = "";
+// while (line != null) {
+// if (line.startsWith("#ma_scheduler")) {
+// line = line.substring(1);
+// }
+// if (line.startsWith("#registrator")) {
+// line = line.substring(1);
+// }
+// contents.append(line + "\n");
+// line = br.readLine();
+// }
+//
+// FileWriter fw = new FileWriter(comp);
+// BufferedWriter bw = new BufferedWriter(fw);
+// bw.write(contents.toString().trim());
+// bw.close();
+// fw.close();
+// br.close();
+// fr.close();
+// }
+//
+// /**
+// * Method for removing ls registration components from
components.properties
+// * file
+// *
+// * @throws IOException
+// */
+// private void removeRegistrationComponents() throws IOException {
+// File comp = new File(servicePath +
COMPONENTS_PROPERTIES_PATH);
+// FileReader fr = new FileReader(comp);
+// StringBuffer contents = new StringBuffer();
+// BufferedReader br = new BufferedReader(fr);
+// String line = "";
+// while (line != null) {
+// if (line.startsWith("ma_scheduler")) {
+// line = "#" + line;
+// }
+// if (line.startsWith("registrator")) {
+// line = "#" + line;
+// }
+// contents.append(line + "\n");
+// line = br.readLine();
+// }
+//
+// FileWriter fw = new FileWriter(comp);
+// BufferedWriter bw = new BufferedWriter(fw);
+// bw.write(contents.toString().trim());
+// bw.close();
+// fw.close();
+// br.close();
+// fr.close();
+// }
+//
+//
+// /**
+// * Method to get the stack trace of an exception
+// *
+// * @param e
+// * The exception
+// * @return A string with stack the trace
+// */
+// private String getFault(Exception e) {
+// StackTraceElement[] trace = e.getStackTrace();
+// String fault = e.getMessage();
+// for (int j = 0; j < trace.length; j++) {
+// fault += trace[j].toString() + "\n";
+// }
+// return fault;
+// }
+

- public boolean isConfigured() {
- return configured;
- }
+

- public void setHTMLOutput(HTMLOutput output) { /* QUESTION not used?
*/ }
-
- public void setProperties(WizardProperties loadedProperties) {
- properties = loadedProperties;
- }
-
- public void setGroupedProperties(Hashtable<String, WizardProperties>
otherProperties) {
- groupedProperties = otherProperties;
- }
-
- public void setServicePath(String servicePath) {
- ServicePath = servicePath;
- }
-
- /**
- * Method used for handling other groups configuration(That is other
than LS
- * and exist)
- *
- * @param request
- * The HttpServletRequest containing input from the user
- * @throws Exception
- */
- public void handleOther(HttpServletRequest request) throws Exception {
-
- // Iterating through the groups
- for(String group : groupedProperties.keySet()) {
- // Every other group should be handled except for
eXist and LS
- if (!(group.equals("eXist") || group.equals("LS"))) {
-
- // Retrieving the properties belonging to the
group
- WizardProperties groupProperties =
groupedProperties.get(group);
- // Iterating through the properties. This way
using the key of
- // each property we can retrieve the users
input from the
- // request
- Iterator it = groupProperties.orderedKeys();
- while (it.hasNext()) {
- String key = (String) it.next();
- // get the value from the request
- String value =
request.getParameter(key).trim();
- WizardProperty pr =
groupProperties.getWizardProperty(key);
- // Set the property value
- pr.setPropertyValue(value);
- // if the property does not the check
field set, the also
- // put the user input as the proposed
value also
- // This happens, because properties
that have the check
- // property set, are usually
important for the rest of the
- // group properties since their value
would determine if the
- // rest need to be configured. So
their proposed value is
- // left to thr developer
- if (!pr.getCheck()) {
- pr.setProposedValue(value);
- }
- // Updating the property inside the
group propereties
-
groupProperties.setWizardProperty(key, pr);
- }
- // Updating the grouped properties
- groupedProperties.put(group, groupProperties);
- // Applying the configuration input from the
user to the service
- try {
- otherActions(group, groupProperties);
- } catch (Exception e) {
- throw new Exception(getFault(e));
- }
- }
- }
- }
-
- /**
- * Method used for handling LS registration configuration
- *
- * @param request
- * The HttpServletRequest containing input from the user
- * @return True if LS registration is configured successfully
- * @throws Exception
- */
- private boolean handleLS(HttpServletRequest request) throws Exception
{
-
- // Retrieving the useLS parameter. The useLS parammeter is
inserted as
- // input by the shoaAllProperties method of the HTMLOutput
class
- // automatically. It is the answer to if the user wants to
register to
- // an LS since their is no service property that corresponds
to this
- // question
- String useLS = request.getParameter("useLS").trim();
- // If yes all other properties regarding LS registration are
retrieved
- if (useLS.equals("yes")) {
- // Retrieving all propertie associated with LS
- WizardProperties lsProperties =
groupedProperties.get("LS");
- // Getting the keys of the properties
- Iterator it = lsProperties.orderedKeys();
- while (it.hasNext()) {
- String key = (String) it.next();
- // Using the keys for retrieving the users
input
- String value =
request.getParameter(key).trim();
- WizardProperty pr =
lsProperties.getWizardProperty(key);
- // Setting property value and proposed value
- pr.setPropertyValue(value);
- pr.setProposedValue(value);
- // Setting property
- lsProperties.setWizardProperty(key, pr);
- }
- // Setting the LS group properties
- groupedProperties.put("LS", lsProperties);
- boolean done = false;
- // Trying to perfom the LS configuration actions to
the service
- try {
- lsActions(lsProperties);
- done = true;
- } catch (Exception e) {
- // False if an error happens
- done = false;
- throw new Exception(getFault(e));
- }
-
- return done;
- }
- // If no then the registration componenets are commented in
the
- // components.properties file
- else {
- removeRegistrationComponents();
- return true;
- }
- }
-
- /**
- * Method used for handling eXist database configuration
- *
- * @param request
- * The HttpServletRequest containing input from the user
- * @return True if LS registration is configured successfully
- * @throws Exception
- */
- public void handleExist(HttpServletRequest request) throws Exception {
- // 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();
- String status = request.getParameter(statusKey);
- WizardProperty useExistProperty =
existProperties.getWizardProperty(statusKey);
-
- if (status.equals("off")) {
- useExistProperty.setPropertyValue("off");
- existProperties.setWizardProperty(statusKey,
useExistProperty);
- properties.setWizardProperty(statusKey,
useExistProperty);
- groupedProperties.put("eXist", existProperties);
- try {
- ServiceProperties serviceProperties;
- serviceProperties = new
ServicePropertiesImpl(ServicePath +
- ServicePropertiesPath); // Property set
-
serviceProperties.setProperty(useExistProperty.getKey(),
- useExistProperty.getValue()); // new
Properties stored
- serviceProperties.storeProperties();
- } catch (IOException e) { // If anything happens set
done to false
- throw new Exception(getFault(e));
- }
- } 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
- * existProperties.setWizardProperty(statusKey,
useExistProperty); Get
- * all other parameters regarding exist in the users
reqauest
- */
-
- while (it.hasNext()) {
- String key = (String) it.next();
- // Get the parameter
- String value =
request.getParameter(key).trim();
- // Get the property
- WizardProperty pr =
existProperties.getWizardProperty(key);
- // Set value and proposed value
- pr.setPropertyValue(value);
- pr.setProposedValue(value);
- // Set the property in the exist group
properties
- existProperties.setWizardProperty(key, pr);
- }
- // Update the exist group Property
- groupedProperties.put("eXist", existProperties);
- try {
- // Call for the needed actions for exist
configuration.The exist
- // group properties are used as input
- existActions(existProperties);
- } catch (Exception e) {
- // Set doen to false if anything happens
- throw new Exception(getFault(e));
- }
- }
-
- }
-
- /**
- * Method for handling all configuration actions regarding any other
group
- * besides LS and eXist
- *
- * @param group
- * The group
- * @param functionProperties
- * The properties regardung the group
- * @throws IOException
- */
- private void otherActions(String group, WizardProperties
functionProperties) throws IOException {
-
- // The only other group for rrd ma is the Store group
- // So in this case changes go into the service.property file
that uses
- // groupig and description
- // In order to keep that functionality we need in this case
to use the
- // PerfsonarProperties class
- if (!group.equals("Administration")) {
-
- // Using PerfsonarProperties in order to keep the
grouping and
- // description
- PerfsonarProperties serviceProperties = null;
- serviceProperties = new PerfsonarPropertiesImpl();
- serviceProperties.loadProperties(new
FileInputStream(ServicePath
- + ServicePropertiesPath));
- // Getting the names for every property of the group
- Iterator it = functionProperties.orderedKeys();
- // Setting the value of each property
-
- // An object that holds the property
group,description,value and key
- PerfsonarProperty property = new PerfsonarProperty();
- while (it.hasNext()) {
- String key = (String) it.next();
- // Setting service properties and wizard
properties
-
- // Get the property
- property = serviceProperties.getProperty(key);
- // If key property does not exist the throw
an exception
- if (property == null) {
- throw new IOException("Key is invalid
" + key + " ");
- } else {
- // Change the value of the property
- if
(functionProperties.getProperty(key).equals("yes"))
- property.setValue("on");
- else if
(functionProperties.getProperty(key).equals("no"))
- property.setValue("off");
- else
-
property.setValue(functionProperties.getProperty(key));
-
- serviceProperties.setProperty(key,
property);
- }
- properties.setWizardProperty(key,
functionProperties
- .getWizardProperty(key));
- }
- // Storing all changes
- serviceProperties.storeProperties(new
FileOutputStream(ServicePath
- + ServicePropertiesPath));
- }
- // We don't really have any other groups just the ones for
the servlet
- // administration, that does not use grouping and description
so we can
- // use
- // the ServiceProperties class as usual
- else {
- // A class that makes modifying service properties a
little bit
- // easier
- ServiceProperties serviceProperties = new
ServicePropertiesImpl(ServicePath + ServletPropertiesPath);
- // Getting the names for every property of the group
- Iterator it = functionProperties.orderedKeys();
- // Setting the value of each property
- String value = null;
- while (it.hasNext()) {
- String key = (String) it.next();
- // Setting service properties and wizard
properties
- value = functionProperties.getProperty(key);
- if (value == null) {
- throw new IOException("Key is invalid
" + key + " ");
- } else {
- serviceProperties.setProperty(key,
value);
- }
- properties.setWizardProperty(key,
functionProperties.getWizardProperty(key));
- }
- serviceProperties.storeProperties();
-
- }
- properties.storeToXML(new FileOutputStream(new
File(ServicePath
- + WizardPropertiesPath)), " Last Modification
"
- +
Calendar.getInstance().getTime().toString());
- }
-
- /**
- * Method for handling all configuration actions regarding the LS
- * registration
- *
- * @param finalProperties
- * The WizardProperties that belong to the LS registration
group
- * @throws IOException
- */
- private void lsActions(WizardProperties finalProperties) throws
IOException {
- // Changes happen into the service.property file that uses
groupig and
- // description
- // In order to keep that functionality we need in this case
to use the
- // PerfsonarProperties class
- PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
- serviceProperties.loadProperties(new
FileInputStream(ServicePath
- + ServicePropertiesPath));
- Iterator it = finalProperties.orderedKeys();
- // Iterating through the LS registration properties properties
-
- // Initializing the PerfsonarProperty object that holds
information
- // about grouping and description
- PerfsonarProperty property = new PerfsonarProperty();
- while (it.hasNext()) {
- String key = (String) it.next();
- // Set the service properties
-
- // Get the PerfsonarProperty object
- property = serviceProperties.getProperty(key);
-
- // If property key does not exist throw an exceptrion
- if (property == null) {
- throw new IOException("Key is invalid " + key
+ " ");
- } else {
- // Else set the value right
-
property.setValue(finalProperties.getProperty(key));
- serviceProperties.setProperty(key, property);
- }
- // Set the wizard properties
- properties.setWizardProperty(key, finalProperties
- .getWizardProperty(key));
- }
- // Storing service properties
- serviceProperties.storeProperties(new
FileOutputStream(ServicePath + ServicePropertiesPath));
- // Setting the LS registration componenets in components
properties file
- addRegistrationComponents();
- // Storing the wizard properties
- properties.storeToXML(new FileOutputStream(new
File(ServicePath
- + WizardPropertiesPath)), " Last Modification
"
- +
Calendar.getInstance().getTime().toString());
- }
-
- /**
- * Method used for handling all actions associated with exist db
- * confoguration
- *
- * @param finalProperties
- * The Wizard Properties associated with the exist group
- * @throws Exception
- */
- private void existActions(WizardProperties finalProperties)
throws Exception {
- // Changes happen into the service.property file that uses
groupig and
- // description in order to keep that functionality we need in
this case
- // to use the PerfsonarProperties class
- PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
- serviceProperties.loadProperties(new
FileInputStream(ServicePath
- + ServicePropertiesPath));
- // Any changes happening to the URL of the exist db and on
the admin
- // password should be reflected on the servlet.properties as
well
- ServiceProperties servletProperties = new
ServicePropertiesImpl(ServicePath + ServletPropertiesPath);
- // Get an iterator for all service properties
- Iterator it = serviceProperties.getKeysIterator();
- // Get the type of the service. Will be used for making the
new db
- // collection
- String serviceName = servletProperties.getProperty(
- "servlet.service_type").trim();
- // Naming the new collection on exist db
- String dbCollection = serviceName + "config";
- // Initializing all necessary fileds
- String adminPass = null;
- String existURI = "";
- String newAdminPass = null;
- String username = null;
- String password = null;
- String confFile = null;
- // Need to get the new xmlDBURI and old and new admin
password so that
- // we can make the changes
- while (it.hasNext()) {
- String key = (String) it.next();
- if (key.endsWith("xmldb.db_adminpassword")) {
- // adminPass =
serviceProperties.getProperty(key).getValue()
- // .trim();
- newAdminPass =
finalProperties.getProperty(key).trim();
- }
- if (key.endsWith("xmldb.db_uri")) {
- existURI = finalProperties.getProperty(key);
- }
-
- }
-
- it = finalProperties.orderedKeys();
- // Iterating though tthe users input
- while (it.hasNext()) {
- String key = (String) it.next();
- // The input from the user is also set in service
properties with a
- // slight modification for tyhe xmldb uri. We need to
add the
- // collection at the end of the URI
- PerfsonarProperty property = new PerfsonarProperty();
- if (!key.endsWith("xmldb.db_uri")) {
- if (key.equals("old_adminpassword")) {
- adminPass =
finalProperties.getProperty(key).trim();
- } else {
- property =
serviceProperties.getProperty(key);
- // If property key does not exist
throw an exceptrion
- if (property == null) {
- throw new Exception("Key is
invalid " + key + " ");
- } else {
-
property.setValue(finalProperties.getProperty(key));
-
serviceProperties.setProperty(key, property);
- }
- }
- } else {
- property = serviceProperties.getProperty(key);
- property.setValue(existURI + "/db/" +
dbCollection);
- serviceProperties.setProperty(key, property);
- }
- // Setting also the wizard properties
- properties.setWizardProperty(key,
finalProperties.getWizardProperty(key));
-
- // Also getting all needed information in orer to
configure the
- // exist db
- if (key.endsWith("xmldb.db_username")) {
- username =
finalProperties.getProperty(key).trim();
- }
- if (key.endsWith("xmldb.db_password")) {
- password =
finalProperties.getProperty(key).trim();
- }
- if (key.endsWith("conf_file")) {
- confFile =
finalProperties.getProperty(key).trim();
- }
-
- }
-
- // If admin pass is not set than its considered to be empty
- if (adminPass == null) {
- adminPass = "";
- }
-
- // Creating all necessary collections and users in exist
- if (existURI == null) {
- throw new Exception("eXist xmldb URI is empty!\n");
- } else {
- xmlDBManager manager = new xmlDBManagerImpl(existURI,
"admin", adminPass);
- // Creating collection and users
- manager.createCollection(dbCollection);
- manager.createUser(dbCollection, username, password,
null);
- // Adding the metadata config document
- manager.getCollection(dbCollection).addDocument(new
File(confFile),
- username);
- // Modifying the admin user password
- manager.modifyUser("admin", newAdminPass, null, null);
-
- serviceProperties.storeProperties(new
FileOutputStream(ServicePath
- + ServicePropertiesPath));
- properties.storeToXML(new FileOutputStream(new
File(ServicePath
- + WizardPropertiesPath)), " Last
Modification "
- +
Calendar.getInstance().getTime().toString());
- }
-
- }
-
- /**
- * Method used for adding registration componenets to the
- * componenets.properties file
- *
- * @throws IOException
- */
- private void addRegistrationComponents() throws IOException {
- File comp = new File(ServicePath + ComponentsPropertiesPath);
- FileReader fr = new FileReader(comp);
- StringBuffer contents = new StringBuffer();
- BufferedReader br = new BufferedReader(fr);
- String line = "";
- while (line != null) {
- if (line.startsWith("#ma_scheduler")) {
- line = line.substring(1);
- }
- if (line.startsWith("#registrator")) {
- line = line.substring(1);
- }
- contents.append(line + "\n");
- line = br.readLine();
- }
-
- FileWriter fw = new FileWriter(comp);
- BufferedWriter bw = new BufferedWriter(fw);
- bw.write(contents.toString().trim());
- bw.close();
- fw.close();
- br.close();
- fr.close();
- }
-
- /**
- * Method for removing ls registration components from
components.properties
- * file
- *
- * @throws IOException
- */
- private void removeRegistrationComponents() throws IOException {
- File comp = new File(ServicePath + ComponentsPropertiesPath);
- FileReader fr = new FileReader(comp);
- StringBuffer contents = new StringBuffer();
- BufferedReader br = new BufferedReader(fr);
- String line = "";
- while (line != null) {
- if (line.startsWith("ma_scheduler")) {
- line = "#" + line;
- }
- if (line.startsWith("registrator")) {
- line = "#" + line;
- }
- contents.append(line + "\n");
- line = br.readLine();
- }
-
- FileWriter fw = new FileWriter(comp);
- BufferedWriter bw = new BufferedWriter(fw);
- bw.write(contents.toString().trim());
- bw.close();
- fw.close();
- br.close();
- fr.close();
- }
-
- /**
- * Method for performing final actions for service configuration
- *
- * @return
- * @throws Exception
- */
- public void finishConfiguration() throws Exception {
- PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
- serviceProperties.loadProperties(new
FileInputStream(ServicePath + ServicePropertiesPath));
- PerfsonarProperty property = new PerfsonarProperty();
- property.setKey("service.sax_parser.config");
- property.setValue(ServicePath + ObjectsConfigPath);
- property.setGroup("Internals");
- property.setDescription("Sax parser configuration paramater");
- serviceProperties.setProperty(property.getKey(), property);
- property = new PerfsonarProperty();
- property.setKey("service.log.log4j.config");
- property.setValue(ServicePath + LoggingPropertiesPath);
- property.setGroup("Internals");
- property.setDescription("Logging Properties path");
- serviceProperties.setProperty(property.getKey(), property);
- serviceProperties.storeProperties(new
FileOutputStream(ServicePath + ServicePropertiesPath));
- }
-
- /**
- * Method to get the stack trace of an exception
- *
- * @param e
- * The exception
- * @return A string with stack the trace
- */
- private String getFault(Exception e) {
- StackTraceElement[] trace = e.getStackTrace();
- String fault = e.getMessage();
- for (int j = 0; j < trace.length; j++) {
- fault += trace[j].toString() + "\n";
- }
- return fault;
- }
-
- public WizardProperties getExistProperties() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public WizardProperties getLSProperties() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Hashtable getOtherProperties() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void handleLSRegistration(HttpServletRequest request)
- throws Exception {
- // TODO Auto-generated method stub
-
- }
-
- public void setExistProperties(WizardProperties properties) {
- // TODO Auto-generated method stub
-
- }
-
- public void setLSProperties(WizardProperties properties) {
- // TODO Auto-generated method stub
-
- }
-
- public void setOtherProperties(
- Hashtable<String, WizardProperties> propertiestable) {
- // TODO Auto-generated method stub
-
- }
-
- public void setProperties(WizardProperties existProperties,
- WizardProperties lsProperties,
- Hashtable<String, WizardProperties> otherProperties) {
- // TODO Auto-generated method stub
-
- }
-
}

Added:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizzardRequest.java

Added:
trunk/surfnet_java-flowsubscription-mp/src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard/WizzardResponse.java



  • perfsonar: r4078 - in trunk/surfnet_java-flowsubscription-mp: . conf contrib/client src/main/java/org/perfsonar/service/measurementPoint/flowsubscription src/main/java/org/perfsonar/service/measurementPoint/flowsubscription/wizard, svnlog, 07/02/2008

Archive powered by MHonArc 2.6.16.

Top of Page