Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r5294 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . registerService

Subject: perfsonar development work

List archive

perfsonar: r5294 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . registerService


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r5294 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . registerService
  • Date: Thu, 1 Oct 2009 09:09:47 -0400

Author: trzaszcz
Date: 2009-10-01 09:09:47 -0400 (Thu, 01 Oct 2009)
New Revision: 5294

Modified:

branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java

branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java

branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/registerService/LSRegisterServiceHelper.java
Log:
refactoring

Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
2009-10-01 10:50:55 UTC (rev 5293)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
2009-10-01 13:09:47 UTC (rev 5294)
@@ -81,10 +81,17 @@
*/
public String getParameterFromKey(
Metadata requestMetadata, String parameterName) {
-
+ if(requestMetadata.getChildren("key")==null){
+ return null;
+ }
for (Element key : requestMetadata.getChildren("key")) {
-
+ if(key.getChildren("parameters")==null){
+ return null;
+ }
for (Element params : key.getChildren("parameters")) {
+ if(params.getChildren("parameter")==null){
+ return null;
+ }
for (Element p : params.getChildren("parameter")) {
String parameterValue = extractParameterValue(p);
if (parameterName.equals(p.getAttribute("name"))) {

Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
2009-10-01 10:50:55 UTC (rev 5293)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
2009-10-01 13:09:47 UTC (rev 5294)
@@ -50,7 +50,7 @@

if (requestMetadata==null) {
String m="LSDeregisterAction: No metadata in request";
- logger.error(m);
+ logger.warn(m);
throw new PerfSONARException("error/ls/no_metadata", m);
}

@@ -61,7 +61,7 @@

if (keyValue==null) {
String m="LSDeregisterAction: No key in metadata";
- logger.error(m);
+ logger.warn(m);
throw new PerfSONARException("error/ls/no_key", m);
}
int elementsRemoved = dao.removeLookupInfo(keyValue);

Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/registerService/LSRegisterServiceHelper.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/registerService/LSRegisterServiceHelper.java
2009-10-01 10:50:55 UTC (rev 5293)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/registerService/LSRegisterServiceHelper.java
2009-10-01 13:09:47 UTC (rev 5294)
@@ -137,8 +137,7 @@
throw new PerfSONARException(
" minTTL must be less then
maxTTL ");
}
- logger.info("TTL parameters are set <" + result[0] +
","
- + result[1] + ">");
+
return result;
} else if (strMinTTL != strMaxTTL) {
throw new PerfSONARException(



  • perfsonar: r5294 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . registerService, svnlog, 10/01/2009

Archive powered by MHonArc 2.6.16.

Top of Page