Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2354 - trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService

Subject: perfsonar development work

List archive

perfsonar: r2354 - trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2354 - trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService
  • Date: Wed, 25 Apr 2007 09:00:43 -0400

Author: mac
Date: 2007-04-25 09:00:42 -0400 (Wed, 25 Apr 2007)
New Revision: 2354

Modified:

trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
Log:
Support for new Lookup Info parameters.
They all are optional, so using the registration component the same as before
won't cause any problems (NullPointer).

New parameters are:
- service.r.organization_name
- service.r.service_version
- service.r.contact_email

Modified:
trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
2007-04-25 10:22:55 UTC (rev 2353)
+++
trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
2007-04-25 13:00:42 UTC (rev 2354)
@@ -8,10 +8,13 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.AccessPoint;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ContactEmail;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Organization;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Service;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceDescription;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceName;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceType;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceVersion;
import org.ggf.ns.nmwg.tools.org.perfsonar.v1_0.Subject;

import org.perfsonar.client.commons.requests.RequestGenerator;
@@ -110,14 +113,40 @@
st.setServiceType(serviceTypeString);
service.setServiceType(st);

+ String param;
//service description -- optional
- String
serviceDescString=(String)commonParameters.get("service_description");
- if (serviceDescString==null) {
+ param=(String)commonParameters.get("service_description");
+ if (param==null) {
ServiceDescription sd = new ServiceDescription();
- sd.setServiceDescription(serviceDescString);
+ sd.setServiceDescription(param);
service.setServiceDescription(sd);
}
+
+ //organization name - optional
+ param=(String)commonParameters.get("organization_name");
+ if (param==null) {
+ Organization o = new Organization();
+ o.setOrganization(param);
+ service.setOrganization(o);
+ }
+
+ //service version - optional
+ param=(String)commonParameters.get("service_version");
+ if (param==null) {
+ ServiceVersion sv = new ServiceVersion();
+ sv.setServiceVersion(param);
+ service.setServiceVersion(sv);
+ }

+ //contact-email - optional
+ param=(String)commonParameters.get("contact_email");
+ if (param==null) {
+ ContactEmail ce = new ContactEmail();
+ ce.setContactEmail(param);
+ service.setContactEmail(ce);
+ }
+
+
//data fields

System.out.println("LSRegisterRequestGenerator: ");




Archive powered by MHonArc 2.6.16.

Top of Page