perfsonar-dev - perfsonar: r4189 - in trunk/ps-mdm-flowsa-ma: . conf src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard
Subject: perfsonar development work
List archive
perfsonar: r4189 - in trunk/ps-mdm-flowsa-ma: . conf src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4189 - in trunk/ps-mdm-flowsa-ma: . conf src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard
- Date: Mon, 14 Jul 2008 20:02:58 -0400
Author: michael.bischoff
Date: 2008-07-14 20:02:57 -0400 (Mon, 14 Jul 2008)
New Revision: 4189
Added:
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/BasicConfigurationWriter.java
Modified:
trunk/ps-mdm-flowsa-ma/.project
trunk/ps-mdm-flowsa-ma/conf/wizard.properties
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/BasicServiceConfig.java
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ImmutableServiceConfig.java
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ServiceConfig.java
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/WizzardResponse.java
Log:
LS improvement
Modified: trunk/ps-mdm-flowsa-ma/.project
===================================================================
--- trunk/ps-mdm-flowsa-ma/.project 2008-07-14 15:37:52 UTC (rev 4188)
+++ trunk/ps-mdm-flowsa-ma/.project 2008-07-15 00:02:57 UTC (rev 4189)
@@ -20,10 +20,16 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+
<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.devzuz.q.maven.jdt.core.mavenNature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
</projectDescription>
Modified: trunk/ps-mdm-flowsa-ma/conf/wizard.properties
===================================================================
--- trunk/ps-mdm-flowsa-ma/conf/wizard.properties 2008-07-14 15:37:52
UTC (rev 4188)
+++ trunk/ps-mdm-flowsa-ma/conf/wizard.properties 2008-07-15 00:02:57
UTC (rev 4189)
@@ -32,67 +32,75 @@
<ProposedValue>perfsonarpass</ProposedValue>
<Group order="2">Administration</Group>
</property>
-
+
+ <property>
+ <entry key="service.common.ls.use" required="true">true</entry>
+ <Comment>Register to LS?</Comment>
+ <ProposedValue>false</ProposedValue>
+ <Group order="1" check="true">LS</Group>
+ <AcceptedValue>true</AcceptedValue>
+ <AcceptedValue>false</AcceptedValue>
+ </property>
<property>
<entry key="service.r.service_type" required="true">ma</entry>
<Comment>Enter the type of the service</Comment>
<ProposedValue>ma</ProposedValue>
- <Group order="1" check="false">LS</Group>
+ <Group order="2" check="false">LS</Group>
<AcceptedValue>ma</AcceptedValue>
</property>
<property>
<entry key="service.r.service_name" required="true">Cynet RRD MA</entry>
<Comment>Enter the service name</Comment>
<ProposedValue>Company X Flowsa MA</ProposedValue>
- <Group order="2">LS</Group>
+ <Group order="3">LS</Group>
</property>
<property>
<entry key="service.r.service_version">0.9.1</entry>
<Comment>Enter the version of the service</Comment>
<ProposedValue>0.9.1</ProposedValue>
- <Group order="3">LS</Group>
+ <Group order="4">LS</Group>
</property>
<property>
<entry key="service.r.service_description">RRD MA</entry>
<Comment>Give a description of the service</Comment>
<ProposedValue>Flowsa MA</ProposedValue>
- <Group order="4">LS</Group>
+ <Group order="5">LS</Group>
</property>
<property>
<entry
key="service.r.contact_email"></entry>
<Comment>Enter the email address of the person administrating the
service</Comment>
<ProposedValue>admin@localhost</ProposedValue>
- <Group order="5">LS</Group>
+ <Group order="6">LS</Group>
</property>
<property>
<entry key="service.r.organization_name">Company X</entry>
<Comment>Enter the name of the organization running this
service.</Comment>
<ProposedValue>Company X</ProposedValue>
- <Group order="6">LS</Group>
+ <Group order="7">LS</Group>
</property>
<property>
<entry key="service.r.ls_url" required="true"></entry>
<Comment>Give the LS url</Comment>
<ProposedValue></ProposedValue>
- <Group order="7">LS</Group>
+ <Group order="8">LS</Group>
</property>
<property>
<entry key="component.registrator.interval">3000</entry>
<Comment>Give the registration interval</Comment>
<ProposedValue>3000</ProposedValue>
- <Group order="8">LS</Group>
+ <Group order="9">LS</Group>
</property>
<property>
<entry key="service.r.access_point"
required="true">http://YOUR-HOST/flowsa-ma-0.9.1</entry>
<Comment>Give the service access point</Comment>
<ProposedValue>http://somewhere</ProposedValue>
- <Group order="9">LS</Group>
+ <Group order="10">LS</Group>
</property>
<property>
<entry
key="component.registrator.scheduler_component">ma_scheduler</entry>
<Comment>Give the registration component</Comment>
<ProposedValue>ma_scheduler</ProposedValue>
- <Group order="10">LS</Group>
+ <Group order="11">LS</Group>
<AcceptedValue>ma_scheduler</AcceptedValue>
</property>
Added:
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/BasicConfigurationWriter.java
Modified:
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/BasicServiceConfig.java
===================================================================
---
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/BasicServiceConfig.java
2008-07-14 15:37:52 UTC (rev 4188)
+++
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/BasicServiceConfig.java
2008-07-15 00:02:57 UTC (rev 4189)
@@ -1,14 +1,12 @@
package org.perfsonar.service.measurementArchive.flowsa.wizard;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -22,22 +20,14 @@
public class BasicServiceConfig implements ServiceConfig {
- private static final String SERVICE_LOG_LOG4J_CONFIG =
"service.log.log4j.config";
-
- private static final String SERVICE_SAX_PARSER_CONFIG =
"service.sax_parser.config";
-
private static final long serialVersionUID = 1L;
/** The path to the configuration directory */
public static final String CONFIGURATION_PATH =
"WEB-INF/classes/perfsonar/conf/";
/** The path to the service.properties file */
public static final String SERVICE_PROPERTIES_PATH =
CONFIGURATION_PATH + "service.properties";
- /** The path to the logging properties file */
- public static final String LOGGING_PROPERTIES_PATH =
CONFIGURATION_PATH + "log4j.properties";
- /** The path to the componenets.properties file */
+ /** The path to the components.properties file */
public static final String COMPONENTS_PROPERTIES_PATH =
CONFIGURATION_PATH + "components.properties";
- /** The path to the objects properties file */
- public static final String OBJECTS_DOT_CONFIG_PATH =
CONFIGURATION_PATH + "objects.config";
/** The path to the wizard.properties file */
public static final String WIZARD_PROPERTIES_PATH =
CONFIGURATION_PATH + "wizard.properties";
/** The path to the servlet.properties file */
@@ -64,7 +54,6 @@
private volatile boolean loaded;
-
private BasicServiceConfig(String servicePath,
Collection<ConfigurationHandler> checkList, Map<String, WizardProperties>
properties, String wizardUsername, String wizardPassword, long nanoTime) {
this.handlerList = checkList;
@@ -196,60 +185,12 @@
if(!loaded) {
throw new IllegalStateException("please load
the object first");
}
- PerfsonarProperties properties = new
PerfsonarPropertiesImpl();
- properties.loadProperties(new
FileInputStream(servicePath + SERVICE_PROPERTIES_PATH));
- for(Entry<String, WizardProperties> entry :
serviceProperties.entrySet()) {
- WizardProperties group = entry.getValue();
-
- for(Iterator<?> i = group.orderedKeys();
i.hasNext() ; ) {
- String key = (String) i.next();
- WizardProperty property =
group.getWizardProperty(key);
- properties.setProperty(
- key,
- new PerfsonarProperty(
-
property.getKey(),
-
property.getValue(),
-
property.getPropertyComment(),
-
property.getGroup()
- )
- );
- }
- }
-
- ServletProperties servletProperties = new
ServletPropertiesImpl(servicePath + SERVLET_PROPERTIES_PATH);
- servletProperties.setUserName(wizardUsername);
- servletProperties.setPassword(wizardPassword);
-
- if(properties.getProperty(SERVICE_SAX_PARSER_CONFIG)
== null) {
-
properties.setProperty(SERVICE_SAX_PARSER_CONFIG, getSaxParserProperty());
- }
- if(properties.getProperty(SERVICE_LOG_LOG4J_CONFIG)
== null) {
-
properties.setProperty(SERVICE_LOG_LOG4J_CONFIG, getLog4jProperty());
- }
-
- properties.storeProperties(new
FileOutputStream(servicePath + SERVICE_PROPERTIES_PATH));
+ BasicConfigurationWriter writer = new
BasicConfigurationWriter(servicePath,serviceProperties);
+ writer.write();
}
}
- private PerfsonarProperty getSaxParserProperty() {
- PerfsonarProperty property = new PerfsonarProperty();
- property.setKey(SERVICE_SAX_PARSER_CONFIG);
- property.setValue(servicePath + OBJECTS_DOT_CONFIG_PATH);
- property.setGroup("Internals");
- property.setDescription("Sax parser configuration paramater");
- return property;
- }
-
- private PerfsonarProperty getLog4jProperty() {
- PerfsonarProperty property = new PerfsonarProperty();
- property.setKey(SERVICE_LOG_LOG4J_CONFIG);
- property.setValue(servicePath + LOGGING_PROPERTIES_PATH);
- property.setGroup("Internals");
- property.setDescription("Logging Properties path");
- return property;
- }
-
public ServiceConfig copy() {
return new BasicServiceConfig(servicePath, new
ArrayList<ConfigurationHandler>(handlerList), serviceProperties,
wizardUsername, wizardPassword, System.nanoTime());
}
@@ -258,4 +199,5 @@
private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
lifecyleMutex = new Object();
}
+
}
Modified:
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ImmutableServiceConfig.java
===================================================================
---
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ImmutableServiceConfig.java
2008-07-14 15:37:52 UTC (rev 4188)
+++
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ImmutableServiceConfig.java
2008-07-15 00:02:57 UTC (rev 4189)
@@ -72,4 +72,5 @@
config.load(path, useChecks);
}
}
+
}
Modified:
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ServiceConfig.java
===================================================================
---
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ServiceConfig.java
2008-07-14 15:37:52 UTC (rev 4188)
+++
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/ServiceConfig.java
2008-07-15 00:02:57 UTC (rev 4189)
@@ -43,4 +43,5 @@
ConcurrentMap<String, WizardProperties> getProperties();
public long getTimeStamp();
+
}
Modified:
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/WizzardResponse.java
===================================================================
---
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/WizzardResponse.java
2008-07-14 15:37:52 UTC (rev 4188)
+++
trunk/ps-mdm-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard/WizzardResponse.java
2008-07-15 00:02:57 UTC (rev 4189)
@@ -126,20 +126,11 @@
WizardProperty pr = pro.getWizardProperty((String) it.next());
- if (group.equals("LS") || pr.getCheck()) {
+ if (pr.getCheck()) {
String onClick = "
onclick=\"showGroup(this,'"+group+"');\"";
- if (group.equals("LS")) {
+ if(pr.getCheck()) {
out.println("<tr>");
- out.println("<td><input type=\"hidden\"
value=\"yes\" id=\"Vl_useLS\" /> Do you wish to register with an LS?</td>");
- out.print("<td>");
- out.print("<input type=\"radio\"
name=\"useLS\" value=\"yes\" "+ onClick + "> yes </input>");
- out.print("<input type=\"radio\" checked
name=\"useLS\" value=\"no\" "+ onClick + "> no </input> ");
- out.print("</td>");
- out.println("</tr>");
- it = pro.orderedKeys();
- } else if(pr.getCheck()) {
- out.println("<tr>");
String[] values = pr.getAcceptedValues();
if(values.length == 2) {
out.println("<tr>");
- perfsonar: r4189 - in trunk/ps-mdm-flowsa-ma: . conf src/main/java/org/perfsonar/service/measurementArchive/flowsa/wizard, svnlog, 07/14/2008
Archive powered by MHonArc 2.6.16.