perfsonar-dev - perfsonar: r4141 - trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store
Subject: perfsonar development work
List archive
perfsonar: r4141 - trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4141 - trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store
- Date: Tue, 8 Jul 2008 09:22:28 -0400
Author: roman
Date: 2008-07-08 09:22:28 -0400 (Tue, 08 Jul 2008)
New Revision: 4141
Modified:
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
Log:
If 'timeValue' attribute in datum element of store request is missing then
the current time is used.
Modified:
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
===================================================================
---
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
2008-07-08 13:13:19 UTC (rev 4140)
+++
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
2008-07-08 13:22:28 UTC (rev 4141)
@@ -6,6 +6,7 @@
import java.util.Map;
+import java.util.Date;
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.event.status.base.v2_0.Datum;
@@ -40,12 +41,17 @@
public Map prepareStoreParameters(Element datum, Map ibatisParams) {
String timeValue = ((Datum)datum).getTimeValue();
+ int timeValueInt;
+ if (timeValue.equals("")) {
+ timeValueInt = (int)((new Date()).getTime() / 1000);
+ ibatisParams.put("timeValue", timeValueInt);
+ } else {
+ ibatisParams.put("timeValue", Integer.parseInt(timeValue));
+ }
String stateAdmin = ((Datum)datum).getStateAdmin().getStateAdmin();
String stateOper = ((Datum)datum).getStateOper().getStateOper();
- ibatisParams.put("timeValue", Integer.parseInt(timeValue));
-
ibatisParams.put("stateAdmin", stateAdmin);
ibatisParams.put("stateOper", stateOper);
- perfsonar: r4141 - trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/store, svnlog, 07/08/2008
Archive powered by MHonArc 2.6.16.