Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3999 - in trunk/surfnet_java-flowsa-ma: . conf/axis-1.4/WEB-INF src/main/java/org/perfsonar/service/measurementArchive/flowsa

Subject: perfsonar development work

List archive

perfsonar: r3999 - in trunk/surfnet_java-flowsa-ma: . conf/axis-1.4/WEB-INF src/main/java/org/perfsonar/service/measurementArchive/flowsa


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3999 - in trunk/surfnet_java-flowsa-ma: . conf/axis-1.4/WEB-INF src/main/java/org/perfsonar/service/measurementArchive/flowsa
  • Date: Thu, 12 Jun 2008 08:14:30 -0400

Author: michael.bischoff
Date: 2008-06-12 08:14:30 -0400 (Thu, 12 Jun 2008)
New Revision: 3999

Removed:
trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/server-config.wsdd
Modified:
trunk/surfnet_java-flowsa-ma/.classpath

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/EventType.java

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaGetRequest.java

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
Log:
RESOLVED - bug 486: When no time is specified a soap fault instead of a
perfsonar error is returned
https://bugzilla.perfsonar.net/show_bug.cgi?id=486

Modified: trunk/surfnet_java-flowsa-ma/.classpath
===================================================================
--- trunk/surfnet_java-flowsa-ma/.classpath 2008-06-12 12:12:35 UTC (rev
3998)
+++ trunk/surfnet_java-flowsa-ma/.classpath 2008-06-12 12:14:30 UTC (rev
3999)
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry including="**/*.java" kind="src"
output="target/test-classes" path="src/test/java"/>
<classpathentry including="**/*.java" kind="src"
path="src/main/java"/>
- <classpathentry including="**/*.java" kind="src"
output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="con"
path="org.devzuz.q.maven.jdt.core.mavenClasspathContainer"/>
+ <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.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con"
path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="output" path="bin"/>

Deleted: trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/server-config.wsdd

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/EventType.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/EventType.java
2008-06-12 12:12:35 UTC (rev 3998)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/EventType.java
2008-06-12 12:14:30 UTC (rev 3999)
@@ -16,18 +16,19 @@
TOP_FLOW_REQUEST("http://ggf.org/ns/nmwg/tools/flow/top/2.0/";);

/**
- * Looks throught all EventTypes(EventType.values()) and looks for an
type
+ * Looks through all EventTypes(EventType.values()) and looks for an
type
* belonging to this name.
*
* @param name
* @return the enum representing this value or null if not found
*/
public static EventType get(String name) {
- if(!name.endsWith("/")) {
- name = name + "/";
+ String namespace = name;
+ if(!namespace.endsWith("/")) {
+ namespace = namespace + "/";
}
for (EventType type : EventType.values()) {
- if (type.name.equalsIgnoreCase(name))
+ if (type.name.equalsIgnoreCase(namespace))
return type;
}
return null;

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaGetRequest.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaGetRequest.java
2008-06-12 12:12:35 UTC (rev 3998)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaGetRequest.java
2008-06-12 12:14:30 UTC (rev 3999)
@@ -33,7 +33,7 @@
/**
* Class representing a GET request.
*
- * @see ActionType.GET_DATA
+ * @see ActionType#GET_DATA
* @author michael.bischoff
*
*/
@@ -61,19 +61,19 @@
processMetadata(request);
}

- private void processMetadata(Message request) {
- for (Metadata metadata : request.getMetadataArray()) {
+ private void processMetadata(Message message) {
+ for (Metadata metadata : message.getMetadataArray()) {
processSubject(metadata.getSubject());
processParameters(metadata.getParameters());
processEventType(metadata.getEventType());
}
}

- private void processParameters(Parameters parameters) {
- if (parameters == null) {
+ private void processParameters(Parameters params) {
+ if (params == null) {
return;
}
- for (Parameter parameter : parameters.getParameterArray()) {
+ for (Parameter parameter : params.getParameterArray()) {
String name =
parameter.getParameterName().toLowerCase();
if ("starttime".equals(name) ||
"endtime".equals(name)) {
processTimeParameter(parameter);
@@ -92,11 +92,11 @@
}
}

- private void processEventType(org.ggf.ns.nmwg.base.v2_0.EventType
eventType) {
- if (eventType == null) {
+ private void processEventType(org.ggf.ns.nmwg.base.v2_0.EventType
type) {
+ if (type == null) {
return;
}
- this.eventTypeValue = eventType.getEventType();
+ this.eventTypeValue = type.getEventType();
logger.debug("FlowsaMAServiceEngine.processGetDataRequest:
Eventype indentified as: " + eventTypeValue);
this.eventType = EventType.get(eventTypeValue);
}
@@ -131,7 +131,7 @@
/**
* get's the logger component
*
- * @return
+ * @return LoggerComponent or dies.
* @throws PerfSONARException
*/
private static LoggerComponent getLoggerComponent() throws
PerfSONARException {

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
2008-06-12 12:12:35 UTC (rev 3998)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
2008-06-12 12:14:30 UTC (rev 3999)
@@ -7,6 +7,7 @@
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
+import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Set;
@@ -106,7 +107,7 @@
this.ls = new LSRegistrationControll();
logger.debug("FlowsaMAServiceEngine.<Constructor> Successfully
created LSRegistrationControll.");

- if(ls.IsConfigured(configuration) && !ls.hasStarted()) {
+ if(ls.isConfigured(configuration) && !ls.hasStarted()) {
ls.start(nfcapd.getExporters());
logger.debug("FlowsaMAServiceEngine.<Constructor> Started
LSRegistrationControll.");
}
@@ -374,9 +375,13 @@
* @throws PerfSONARException if FileData couldn't be found.
*/
protected FileData getFileDataFrom(FlowsaGetRequest request) throws
PerfSONARException {
+ Collection<String> hostNames = request.getHostNames();
+ Date startTime = request.getStartTime();
+ Date endTime = request.getEndTime();
+ if(startTime==null || endTime==null) throw new
PerfSONARException("error.ma.fetching","Time range not specified correctly
startTime or EndTime is absent.");
FileData fileData;
- try {
- fileData = nfcapd.getFileData(request.getHostNames(),
request.getStartTime(), request.getEndTime());
+ try {
+ fileData = nfcapd.getFileData(hostNames, startTime,
endTime);
} catch (FileNotFoundException e) {
logger.error(e.getLocalizedMessage());
throw new PerfSONARException("error.ma.query","No
data avail for specified range");

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
2008-06-12 12:12:35 UTC (rev 3998)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
2008-06-12 12:14:30 UTC (rev 3999)
@@ -64,7 +64,7 @@
* @param configuration
* @return true if the ls registration is configured
*/
- public boolean IsConfigured(ConfigurationComponent configuration) {
+ public boolean isConfigured(ConfigurationComponent configuration) {
try {
String lsUrl =
configuration.getProperty("service.r.ls_url");
return !lsUrl.trim().equals("");
@@ -73,7 +73,6 @@
}
}

-
/**
* Checks if registration has started
* @return true if it has started



  • perfsonar: r3999 - in trunk/surfnet_java-flowsa-ma: . conf/axis-1.4/WEB-INF src/main/java/org/perfsonar/service/measurementArchive/flowsa, svnlog, 06/12/2008

Archive powered by MHonArc 2.6.16.

Top of Page