perfsonar-dev - perfsonar: r3883 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa test/ls
Subject: perfsonar development work
List archive
perfsonar: r3883 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa test/ls
Chronological Thread
- From:
- To:
- Subject: perfsonar: r3883 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa test/ls
- Date: Tue, 27 May 2008 11:47:37 -0400
Author: michael.bischoff
Date: 2008-05-27 11:47:37 -0400 (Tue, 27 May 2008)
New Revision: 3883
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMARequest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMATab.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/TimeRange.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryTest.java
Log:
Style and javadoc cleanup
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java
2008-05-27 15:18:22 UTC (rev 3882)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java
2008-05-27 15:47:37 UTC (rev 3883)
@@ -2,6 +2,7 @@
import java.awt.event.ActionEvent;
+import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JOptionPane;
@@ -21,7 +22,8 @@
* a
{@link
IPerfsonarResponse} which are used to call
*
{@link
IPerfsonarRequest#makeRequest(IUserData, String, IPerfsonarResponse,
boolean)}
*
- * Implement
{@link
#done()} to call the GUI (the
{@link
#done()} method is called on the event-dispatching thread.)
+ * Implement
{@link
#done(Object)} to call the GUI (the
{@link
#done(Object)} method is
+ * called on the event-dispatching thread.)
*
* @author michael.bischoff
*/
@@ -42,7 +44,7 @@
* @param request request (controller) to be used.
* @param responseProcessor response (controller) to be used
* @param userData containing the query parameters
- * @param name
{@link
Action#} NAME
+ * @param name
{@link
Action#NAME}
*/
public AbstractSetupDataRequestAction(IPerfsonarRequest request,
IUserData userData, IPerfsonarResponse responseProcessor, String name) {
this(request, userData, responseProcessor, name, null);
@@ -52,8 +54,8 @@
* @param request request (controller) to be used.
* @param responseProcessor response (controller) to be used
* @param userData containing the query parameters
- * @param name
{@link
Action#} NAME
- * @param icon
{@link
Action#} SMALL_ICON
+ * @param name
{@link
Action#NAME}
+ * @param icon
{@link
Action#SMALL_ICON}
*/
public AbstractSetupDataRequestAction(IPerfsonarRequest request,
IUserData userData, IPerfsonarResponse responseProcessor, String name, Icon
icon) {
this(request, responseProcessor, userData, name, icon,
IPerfsonarTab.defaultGroupQuery);
@@ -63,8 +65,8 @@
* @param request request (controller) to be used.
* @param responseProcessor response (controller) to be used
* @param userData containing the query parameters
- * @param name
{@link
Action#} NAME
- * @param icon
{@link
Action#} SMALL_ICON
+ * @param name
{@link
Action#NAME}
+ * @param icon
{@link
Action#SMALL_ICON}
* @param group
*/
public AbstractSetupDataRequestAction(IPerfsonarRequest request,
IPerfsonarResponse responseProcessor, IUserData userData, String name, Icon
icon, String group) {
@@ -102,9 +104,9 @@
/**
* template method to allow parameters to be set before the query is run.
- * @param userData
+ * @param data
*/
- protected void prepareQuery(IUserData userData) {
+ protected void prepareQuery(IUserData data) {
/* template method override for a useful implementation. */
}
@@ -118,7 +120,7 @@
/**
* sets the response controller associated with this object.
- * @param response the new value
+ * @param responseProcessor the new value
*/
public void setResponseProcessor(IPerfsonarResponse responseProcessor) {
this.responseProcessor = responseProcessor;
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMARequest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMARequest.java
2008-05-27 15:18:22 UTC (rev 3882)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMARequest.java
2008-05-27 15:47:37 UTC (rev 3883)
@@ -73,8 +73,7 @@
/**
* @param data
- * @return
- * @throws Exception
+ * @return Document that contains a rawRequest
*/
protected Document createRawRequest(IUserData data) {
String inputFile = "org/perfsonar/perfsonarui/flowsa/raw.xml";
@@ -99,7 +98,7 @@
/**
* @param data
- * @return
+ * @return Document containing a Top request
*/
protected Document createTopRequest(IUserData data) {
String inputFile = "org/perfsonar/perfsonarui/flowsa/top.xml";
@@ -268,7 +267,7 @@
/**
* Converts a String into a document.
* @param inputFile
- * @return
+ * @return Document which contains the data in the string.
*/
private Document parseXmlFile(String inputFile) {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMATab.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMATab.java
2008-05-27 15:18:22 UTC (rev 3882)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/FlowsaMATab.java
2008-05-27 15:47:37 UTC (rev 3883)
@@ -109,8 +109,8 @@
* @see
org.perfsonar.perfsonarui.ui.PerfsonarModel#createEndpointsAction(org.perfsonar.perfsonarui.plugins.MAEndpointList)
*/
@Override
- public PSUIAction createEndpointsAction(MAEndpointList endpointList) {
- return new SelectOneEndpointAction(endpointList) {
+ public PSUIAction createEndpointsAction(MAEndpointList list) {
+ return new SelectOneEndpointAction(list) {
private static final long serialVersionUID = 1L;
@Override
@@ -214,13 +214,12 @@
*/
@Override
protected SmartMARequest createSmartRequest() {
- SmartMARequest request = new SmartMARequest() {
+ return new SmartMARequest() {
@Override
public IPerfsonarRequest createMARequest(MAEndpoint
endpoint) {
return new FlowsaMARequest();
}
};
- return request;
}
/* (non-Javadoc)
@@ -253,23 +252,23 @@
* Looks through the list and selects the fist avail endpoint if
* none are available then it picks the first from the list enables
* it and returns that endpoint
- * @param endpointList
+ * @param list
* @return a endpoint if avail or null.
*/
- private MAEndpoint initialiseEndPoints(MAEndpointList endpointList) {
- endpointList.setMultipleEndpoints(false);
+ private MAEndpoint initialiseEndPoints(MAEndpointList list) {
+ list.setMultipleEndpoints(false);
- for (int i = 0; i < endpointList.size(); i++) {
+ for (int i = 0; i < list.size(); i++) {
// reset status
- (endpointList.get(i)).setStatusExplanation("");
- (endpointList.get(i)).setStatus("");
+ (list.get(i)).setStatusExplanation("");
+ (list.get(i)).setStatus("");
// find first selected
- if ((endpointList.get(i)).isEnabled()) {
- return endpointList.get(i);
+ if ((list.get(i)).isEnabled()) {
+ return list.get(i);
}
}
- MAEndpoint first = endpointList.get(0);
+ MAEndpoint first = list.get(0);
if(first!=null) {
first.setEnabled(true);
return first;
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/TimeRange.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/TimeRange.java
2008-05-27 15:18:22 UTC (rev 3882)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/TimeRange.java
2008-05-27 15:47:37 UTC (rev 3883)
@@ -8,20 +8,20 @@
*/
public class TimeRange {
- private final Date start;
- private final Date end;
+ private final long start;
+ private final long end;
public TimeRange(Date start, Date end) {
- this.start = start;
- this.end = end;
+ this.start = start.getTime();
+ this.end = end.getTime();
}
public Date getStart() {
- return start;
+ return new Date(start);
}
public Date getEnd() {
- return end;
+ return new Date(end);
}
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryTest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryTest.java
2008-05-27 15:18:22 UTC (rev 3882)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryTest.java
2008-05-27 15:47:37 UTC (rev 3883)
@@ -18,16 +18,16 @@
public void testServiceQuery() throws RemoteException,
ServiceException, UnmarshalException {
Service target = new Service();
-
target.setAddress("http://sonar1.amsterdam.surfnet.nl:8080/XML-LS-1.1.2/services/LookupService");
+
target.setAddress("http://ls.perfsonar.pionier.net.pl:8080/xml-ls/services/LookupService");
ServiceQuery query = new ServiceQuery(target);
System.out.println(query.execute());
}
public void testMetadataQuery() throws RemoteException,
ServiceException, UnmarshalException {
Service ls = new Service();
-
ls.setAddress("http://sonar1.amsterdam.surfnet.nl:8080/XML-LS-1.1.2/services/LookupService");
+
ls.setAddress("http://ls.perfsonar.pionier.net.pl:8080/xml-ls/services/LookupService");
Service target = new Service();
-
target.setAddress("http://sonar1.amsterdam.surfnet.nl:8080/flowsa-ma-0.9.1/services/FlowsaMeasurementArchiveService");
+
target.setAddress("http://rrdma.perfsonar.pionier.net.pl:8080/geant2-java-rrd-ma/services/MeasurementArchiveService");
MetadataQuery query = new MetadataQuery(ls, target);
System.out.println(query.execute());
}
@@ -42,6 +42,7 @@
System.out.println("taskDone");
}
public void exception(Exception e) {
+ done = true;
e.printStackTrace();
}
});
- perfsonar: r3883 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa test/ls, svnlog, 05/27/2008
Archive powered by MHonArc 2.6.16.