Skip to Content.
Sympa Menu

perfsonar-dev - [GEANT/SA2/ps-java-services] r5654 - in branches: . perfsonar-java-xml-ls-1.5-stable perfsonar-java-xml-ls-1.5-stable/log4j/production perfsonar-java-xml-ls-1.5-stable/packaging/deb perfsonar-java-xml-ls-1.5-stable/packaging/rpm perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf perfsonar-java-xml-ls-1.5-stable/src/main/webapp perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components

Subject: perfsonar development work

List archive

[GEANT/SA2/ps-java-services] r5654 - in branches: . perfsonar-java-xml-ls-1.5-stable perfsonar-java-xml-ls-1.5-stable/log4j/production perfsonar-java-xml-ls-1.5-stable/packaging/deb perfsonar-java-xml-ls-1.5-stable/packaging/rpm perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf perfsonar-java-xml-ls-1.5-stable/src/main/webapp perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components


Chronological Thread 
  • From:
  • To:
  • Subject: [GEANT/SA2/ps-java-services] r5654 - in branches: . perfsonar-java-xml-ls-1.5-stable perfsonar-java-xml-ls-1.5-stable/log4j/production perfsonar-java-xml-ls-1.5-stable/packaging/deb perfsonar-java-xml-ls-1.5-stable/packaging/rpm perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf perfsonar-java-xml-ls-1.5-stable/src/main/webapp perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components
  • Date: Wed, 19 May 2010 09:24:29 +0100

Author: psnc.trzaszczka
Date: 2010-05-19 09:24:28 +0100 (Wed, 19 May 2010)
New Revision: 5654

Added:
branches/perfsonar-java-xml-ls-1.5-stable/
branches/perfsonar-java-xml-ls-1.5-stable/log4j/production/log4j.properties
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/changelog
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/control
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postinst
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postrm

branches/perfsonar-java-xml-ls-1.5-stable/packaging/rpm/perfsonar-java-xml-ls.specs
branches/perfsonar-java-xml-ls-1.5-stable/pom.xml

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml

branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml.template

branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/webAdminConfig.xml
branches/perfsonar-java-xml-ls-1.5-stable/src/main/webapp/temp/

branches/perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
Removed:
branches/perfsonar-java-xml-ls-1.5-stable/log4j/production/log4j.properties
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/changelog
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/control
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postinst
branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postrm

branches/perfsonar-java-xml-ls-1.5-stable/packaging/rpm/perfsonar-java-xml-ls.specs
branches/perfsonar-java-xml-ls-1.5-stable/pom.xml

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java

branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml

branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/webAdminConfig.xml

branches/perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
Log:


Copied: branches/perfsonar-java-xml-ls-1.5-stable (from rev 5530,
trunk/perfsonar-java-xml-ls)

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/log4j/production/log4j.properties
===================================================================
--- trunk/perfsonar-java-xml-ls/log4j/production/log4j.properties
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/log4j/production/log4j.properties
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,9 +0,0 @@
-log4j.rootLogger=WARN, out
-
-log4j.appender.out=org.apache.log4j.RollingFileAppender
-log4j.appender.out.MaxFileSize=100KB
-log4j.appender.out.MaxBackupIndex=1
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%p] %c{1} - %m%n
-log4j.appender.out.File=../logs/perfsonar.log
-

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/log4j/production/log4j.properties
(from rev 5610, trunk/perfsonar-java-xml-ls/log4j/production/log4j.properties)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/log4j/production/log4j.properties
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/log4j/production/log4j.properties
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,8 @@
+log4j.rootLogger=WARN, out
+
+log4j.appender.out=org.apache.log4j.RollingFileAppender
+log4j.appender.out.MaxFileSize=100KB
+log4j.appender.out.MaxBackupIndex=1
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=[%p] %c{1} - %m%n
+log4j.appender.out.File=/var/log/perfsonar-java-xml-ls/perfsonar.log
\ No newline at end of file

Deleted: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/changelog
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/deb/changelog 2010-03-08 14:13:37
UTC (rev 5530)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/changelog
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,73 +0,0 @@
-perfsonar-java-xml-ls (1.5-0RC1) stable; urgency=low
-
- * Change: removed admin-guide document
- * Change: changed package name to perfsonar-java-xml-ls
- * Fixes: bugs fixes
- * Change: new naming policy(perfsonar-java-xml-ls)
- * Change: psBase2 used instead psBase1
- * New: new web-admin
- * New: summarization added
-
- -- Slawomir Trzaszczka
<>
Tue, 02 Feb 2010 10:00:00 +0200
-
-perfsonar-java-xml-ls (1.4-1) stable; urgency=low
-
- * Change: removed admin-guide document
- * Change: changed package name to perfsonar-java-xml-ls
-
- -- Slawomir Trzaszczka
<>
Mon, 16 Mar 2009 10:00:00 +0200
-
-geant2-java-xml-ls (1.3.1-1) stable; urgency=low
-
- * bug fix in gLS registration
- * Final release, license added
- * Change: nmwg-jar=nmwg-1.0.20090304.jar
- * Change: ps-antxml-ver=1.0.20080204
- * Change: ps-jar-ver=1.0.20090316
- * Change: ps-webadmin=0.9.8b
-
- -- Maciej Glowiak
<>
Mon, 16 Mar 2009 10:00:00 +0200
-
-geant2-java-xml-ls (1.3-12) stable; urgency=low
-
- * Final release, license added
- * Change: nmwg-jar=nmwg-1.0.20081015.jar
- * Change: ps-antxml-ver=1.0.20080204
- * Change: ps-jar-ver=1.0.20080924
- * Change: ps-webadmin=0.9.8b
-
- -- Maciej Glowiak
<>
Thu, 15 Jan 2009 14:00:00 +0200
-
-geant2-java-xml-ls (1.3-11) stable; urgency=low
-
- * Change: Webadmin deployment test works
- * Fixes bugs 649, 690, 685, 680
- * Change: nmwg-jar=nmwg-1.0.20081015.jar
- * Change: ps-antxml-ver=1.0.20080204
- * Change: ps-jar-ver=1.0.20080924
- * Change: ps-webadmin=0.9.8b
-
- -- Maciej Glowiak
<>
Fri, 28 Nov 2008 14:00:00 +0200
-
- geant2-java-xml-ls (1.3-10) stable; urgency=low
-
- * Change: Webadmin deployment test works
- * Fixes in scripts
- * New: WebAdmin wizard script improvements
- * New: Support for OWAMP
- * New: Support for more eventTypes
- * New: XQuery supports 'escaped' parameter, rejects other
- * New: XQuery return eventType
- * New: LSDiscovery for hLS
- * New: Global LS implementation
- * New: Registration to LS (hLS to gLS)
- * New: IP addresses summarization (hLS)
- * New: Self test implemented
- * New: Packaging (DEB+RPM)
- * New: Authentication
- * Change: nmwg-jar=nmwg-1.0.20081015.jar
- * Change: ps-antxml-ver=1.0.20080204
- * Change: ps-jar-ver=1.0.20080924
- * Change: ps-webadmin=0.9.8b
-
- -- Maciej Glowiak
<>
Fri, 31 Oct 2008 14:00:00 +0200
\ No newline at end of file

Copied: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/changelog
(from rev 5642, trunk/perfsonar-java-xml-ls/packaging/deb/changelog)
===================================================================
--- branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/changelog
(rev 0)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/changelog
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,84 @@
+perfsonar-java-xml-ls (1.5-0rc3) stable; urgency=low
+
+ * Fixes: bugs fixes PSSERVICES-443, PSSERVICES-479
+ * New: old naming policy supported geant2-java-xml-ls
+ -- Slawomir Trzaszczka
<>
Thu, 13 May 2010 10:00:00 +0200
+
+perfsonar-java-xml-ls (1.5-0RC2) stable; urgency=low
+
+ * Fixes: bugs fixes
+ -- Slawomir Trzaszczka
<>
Thu, 18 Mar 2010 10:00:00 +0200
+
+perfsonar-java-xml-ls (1.5-0RC1) stable; urgency=low
+
+ * Change: removed admin-guide document
+ * Change: changed package name to perfsonar-java-xml-ls
+ * Fixes: bugs fixes
+ * Change: new naming policy(perfsonar-java-xml-ls)
+ * Change: psBase2 used instead psBase1
+ * New: new web-admin
+ * New: summarization added
+
+ -- Slawomir Trzaszczka
<>
Tue, 02 Feb 2010 10:00:00 +0200
+
+perfsonar-java-xml-ls (1.4-1) stable; urgency=low
+
+ * Change: removed admin-guide document
+ * Change: changed package name to perfsonar-java-xml-ls
+
+ -- Slawomir Trzaszczka
<>
Mon, 16 Mar 2009 10:00:00 +0200
+
+geant2-java-xml-ls (1.3.1-1) stable; urgency=low
+
+ * bug fix in gLS registration
+ * Final release, license added
+ * Change: nmwg-jar=nmwg-1.0.20090304.jar
+ * Change: ps-antxml-ver=1.0.20080204
+ * Change: ps-jar-ver=1.0.20090316
+ * Change: ps-webadmin=0.9.8b
+
+ -- Maciej Glowiak
<>
Mon, 16 Mar 2009 10:00:00 +0200
+
+geant2-java-xml-ls (1.3-12) stable; urgency=low
+
+ * Final release, license added
+ * Change: nmwg-jar=nmwg-1.0.20081015.jar
+ * Change: ps-antxml-ver=1.0.20080204
+ * Change: ps-jar-ver=1.0.20080924
+ * Change: ps-webadmin=0.9.8b
+
+ -- Maciej Glowiak
<>
Thu, 15 Jan 2009 14:00:00 +0200
+
+geant2-java-xml-ls (1.3-11) stable; urgency=low
+
+ * Change: Webadmin deployment test works
+ * Fixes bugs 649, 690, 685, 680
+ * Change: nmwg-jar=nmwg-1.0.20081015.jar
+ * Change: ps-antxml-ver=1.0.20080204
+ * Change: ps-jar-ver=1.0.20080924
+ * Change: ps-webadmin=0.9.8b
+
+ -- Maciej Glowiak
<>
Fri, 28 Nov 2008 14:00:00 +0200
+
+ geant2-java-xml-ls (1.3-10) stable; urgency=low
+
+ * Change: Webadmin deployment test works
+ * Fixes in scripts
+ * New: WebAdmin wizard script improvements
+ * New: Support for OWAMP
+ * New: Support for more eventTypes
+ * New: XQuery supports 'escaped' parameter, rejects other
+ * New: XQuery return eventType
+ * New: LSDiscovery for hLS
+ * New: Global LS implementation
+ * New: Registration to LS (hLS to gLS)
+ * New: IP addresses summarization (hLS)
+ * New: Self test implemented
+ * New: Packaging (DEB+RPM)
+ * New: Authentication
+ * Change: nmwg-jar=nmwg-1.0.20081015.jar
+ * Change: ps-antxml-ver=1.0.20080204
+ * Change: ps-jar-ver=1.0.20080924
+ * Change: ps-webadmin=0.9.8b
+
+ -- Maciej Glowiak
<>
Fri, 31 Oct 2008 14:00:00 +0200
\ No newline at end of file

Deleted: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/control
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/deb/control 2010-03-08 14:13:37
UTC (rev 5530)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/control
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,12 +0,0 @@
-Source: perfsonar-java-xml-ls
-Section: web
-Priority: extra
-Maintainer: Slawomir Trzaszczka
<>
-Build-Depends: debhelper (>= 5), maven2
-Standards-Version: 3.7.2
-
-Package: perfsonar-java-xml-ls
-Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, tomcat5.5-exist
-Description: perfSONAR Lookup Service
-

Copied: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/control (from
rev 5625, trunk/perfsonar-java-xml-ls/packaging/deb/control)
===================================================================
--- branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/control
(rev 0)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/control
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,12 @@
+Source: perfsonar-java-xml-ls
+Section: web
+Priority: extra
+Maintainer: Slawomir Trzaszczka
<>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: perfsonar-java-xml-ls
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, exist, java6-runtime
+Description: perfSONAR Lookup Service
+

Deleted: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postinst
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/deb/postinst 2010-03-08 14:13:37
UTC (rev 5530)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postinst
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,73 +0,0 @@
-#!/bin/sh
-# postinst script for geant2-java-xml-ls
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <postinst> `abort-remove'
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-SERVICENAME="perfsonar-java-xml-ls"
-SERVICEPATH="/usr/lib/perfsonar/services"
-
-
-
-case "$1" in
- configure)
- if [ -h /var/lib/tomcat5.5/webapps/$SERVICENAME ]
- then
- rm -rf /var/lib/tomcat5.5/webapps/$SERVICENAME
- fi
- ln -sf $SERVICEPATH/$SERVICENAME /var/lib/tomcat5.5/webapps/$SERVICENAME
|| true
- if [ -h /etc/$SERVICENAME ]
- then
- rm -rf /etc/$SERVICENAME
- fi
- ln -sf $SERVICEPATH/$SERVICENAME/WEB-INF/classes/perfsonar/conf
/etc/$SERVICENAME || true
-
- if [ -h /var/log/$SERVICENAME ]
- then
- rm -rf /var/log/$SERVICENAME
- fi
- mkdir -p $SERVICEPATH/$SERVICENAME/WEB-INF/log
- ln -sf $SERVICEPATH/$SERVICENAME/WEB-INF/log /var/log/$SERVICENAME ||
true
-
- if [ -h /usr/share/doc/$SERVICENAME/spec ]
- then
- rm -rf /usr/share/doc/$SERVICENAME/spec
- fi
- ln -sf $SERVICEPATH/$SERVICENAME/doc /usr/share/doc/$SERVICENAME/spec ||
true
-
- chown -R tomcat55
$SERVICEPATH/$SERVICENAME/WEB-INF/classes/perfsonar/conf
- chown tomcat55 $SERVICEPATH/$SERVICENAME/WEB-INF/log
-
- /etc/init.d/tomcat5.5 restart
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-

Copied: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postinst
(from rev 5629, trunk/perfsonar-java-xml-ls/packaging/deb/postinst)
===================================================================
--- branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postinst
(rev 0)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postinst
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,76 @@
+#!/bin/sh
+# postinst script for geant2-java-xml-ls
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+OLD_SERVICENAME="geant2-java-xml-ls"
+SERVICENAME="perfsonar-java-xml-ls"
+SERVICEPATH="/usr/lib/perfsonar/services"
+
+
+
+case "$1" in
+ configure)
+ if [ -h /var/lib/tomcat5.5/webapps/$SERVICENAME ]
+ then
+ rm -rf /var/lib/tomcat5.5/webapps/$SERVICENAME
+ fi
+ ln -sf $SERVICEPATH/$SERVICENAME /var/lib/tomcat5.5/webapps/$SERVICENAME
|| true
+ if [ -h /etc/$SERVICENAME ]
+ then
+ rm -rf /etc/$SERVICENAME
+ fi
+ ln -sf $SERVICEPATH/$SERVICENAME/WEB-INF/classes/perfsonar/conf
/etc/$SERVICENAME || true
+
+ if [ -h /var/log/$SERVICENAME ]
+ then
+ rm -rf /var/log/$SERVICENAME
+ fi
+ mkdir -p $SERVICEPATH/$SERVICENAME/WEB-INF/log
+ ln -sf $SERVICEPATH/$SERVICENAME/WEB-INF/log /var/log/$SERVICENAME ||
true
+
+ if [ -h /usr/share/doc/$SERVICENAME/spec ]
+ then
+ rm -rf /usr/share/doc/$SERVICENAME/spec
+ fi
+ ln -sf $SERVICEPATH/$SERVICENAME/doc /usr/share/doc/$SERVICENAME/spec ||
true
+
+ ln -sf $SERVICEPATH/$SERVICENAME
/var/lib/tomcat5.5/webapps/$OLD_SERVICENAME
+
+ chown -R tomcat55
$SERVICEPATH/$SERVICENAME/WEB-INF/classes/perfsonar/conf
+ chown tomcat55 $SERVICEPATH/$SERVICENAME/WEB-INF/log
+
+ /etc/init.d/tomcat5.5 restart
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Deleted: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postrm
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/deb/postrm 2010-03-08 14:13:37
UTC (rev 5530)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postrm
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,66 +0,0 @@
-#!/bin/sh
-# postrm script for geant2-java-xml-ls
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <overwriter>
-# <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-SERVICENAME="perfsonar-java-xml-ls"
-SERVICEPATH="/usr/lib/perfsonar/services"
-
-
-case "$1" in
- purge)
- if [ -h /var/lib/tomcat5.5/webapps/$SERVICENAME ]
- then
- rm /var/lib/tomcat5.5/webapps/$SERVICENAME
- fi
-
- if [ -h /etc/$SERVICENAME ]
- then
- rm /etc/$SERVICENAME
- fi
-
- if [ -h /var/log/$SERVICENAME ]
- then
- rm /var/log/$SERVICENAME
- fi
- rm -fr $SERVICEPATH/$SERVICENAME/WEB-INF/log
-
- if [ -h /usr/share/doc/$SERVICENAME/spec ]
- then
- rm /usr/share/doc/$SERVICENAME/spec
- fi
- ;;
-
- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-

Copied: branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postrm (from
rev 5609, trunk/perfsonar-java-xml-ls/packaging/deb/postrm)
===================================================================
--- branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postrm
(rev 0)
+++ branches/perfsonar-java-xml-ls-1.5-stable/packaging/deb/postrm
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,72 @@
+#!/bin/sh
+# postrm script for geant2-java-xml-ls
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+SERVICENAME="perfsonar-java-xml-ls"
+OLD_SERVICENAME="geant2-java-xml-ls"
+SERVICEPATH="/usr/lib/perfsonar/services"
+
+
+case "$1" in
+ purge)
+ if [ -h /var/lib/tomcat5.5/webapps/$SERVICENAME ]
+ then
+ rm /var/lib/tomcat5.5/webapps/$SERVICENAME
+ fi
+
+ if [ -h /etc/$SERVICENAME ]
+ then
+ rm /etc/$SERVICENAME
+ fi
+
+ if [ -h /var/log/$SERVICENAME ]
+ then
+ rm /var/log/$SERVICENAME
+ fi
+ rm -fr $SERVICEPATH/$SERVICENAME/WEB-INF/log
+
+ if [ -h /usr/share/doc/$SERVICENAME/spec ]
+ then
+ rm /usr/share/doc/$SERVICENAME/spec
+ fi
+
+ if [ -h /usr/share/tomcat5.5/webapps/$OLD_SERVICENAME ]
+ then
+ rm -rf /usr/share/tomcat5.5/webapps/$OLD_SERVICENAME
+ fi
+ ;;
+
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/packaging/rpm/perfsonar-java-xml-ls.specs
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/rpm/perfsonar-java-xml-ls.specs
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/packaging/rpm/perfsonar-java-xml-ls.specs
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,164 +0,0 @@
-%define prefix /usr/lib/perfsonar/services/%{name}
-
-Name: perfsonar-java-xml-ls
-Version: 1.5
-License: Modified BSD
-Release: RC1
-Summary: perfSONAR Lookup Service
-Source0: %{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
-Group: Network/Web service
-packager: Slawomir Trzaszczka
<>
-URL: http://www.perfsonar.org
-Requires: tomcat5-exist
-BuildArch: noarch
-
-
-
-%description
-perfSONAR Lookup Service based on psBase2
-
-
-
-%prep
-%{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}
-%setup -q
-
-
-
-%build
-pushd ${RPM_BUILD_DIR}/%{name}-%{version}
-popd
-
-
-
-%install
-# make the directory
-rm -rf $RPM_BUILD_ROOT
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}/usr/share/doc/%{name}
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}/usr/share/doc/%{name}/schema
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/requests
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/responses
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_var}/run/%{name}
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/log
-
-
-# copy the service content to the tomcat webapps directory
-pushd ${RPM_BUILD_DIR}
- %{__cp} -a %{name}-%{version}/* ${RPM_BUILD_ROOT}%{prefix}
-popd
-
-pushd ${RPM_BUILD_DIR}/%{name}-%{version}/doc
- %{__cp} -a * ${RPM_BUILD_ROOT}/usr/share/doc/%{name}
-popd
-
-
-pushd ${RPM_BUILD_DIR}/%{name}-%{version}
- %{__cp} -a samples/requests/*
${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/requests
- %{__cp} -a samples/responses/*
${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/responses
-popd
-
-%post
-## make symlink for easy access to conf
-%{__ln_s} -f %{prefix}/WEB-INF/classes/perfsonar/conf/*.xml
%{_sysconfdir}/%{name}
-%{__ln_s} -f %{prefix}/WEB-INF/log %{_var}/log/%{name}
-%{__ln_s} -f %{prefix} %{_var}/lib/tomcat5/webapps/%{name}
-
-## restart tomcat
-/sbin/service tomcat5 restart
-
-
-
-%preun
-## remove symlink
-if [ ! -e %{prefix}/WEB-INF/classes/perfsonar/conf/configuration.xml ]; then
- %{__rm} -rf %{_sysconfdir}/%{name}/*.xml || true
- %{__rm} -rf %{_var}/log/%{name} || true
- %{__rm} -rf %{_var}/lib/tomcat5/webapps/%{name} || true
-fi
-
-
-
-%postun
-## restart tomcat
-/sbin/service tomcat5 restart
-
-
-
-%clean
-# clean up the durt
-rm -rf $RPM_BUILD_ROOT
-
-
-
-%files
-%defattr(0644,root,tomcat,0755)
-%attr(755,tomcat,tomcat) %{_var}/run/%{name}
-%attr(755,tomcat,tomcat) %{prefix}/WEB-INF/log
-%attr(640,tomcat,tomcat) %config(noreplace)
%{prefix}/WEB-INF/classes/perfsonar/conf/*.xml
-%{prefix}
-%{_sysconfdir}/%{name}
-/usr/share/doc/%{name}
-/usr/share/doc/%{name}/schema
-
-
-
-
-%changelog
-* Tue Feb 02 2010 Slawomir Trzaszczka
<>
1.5-RC1
-- Fixes: bugs fixes
-- Change: new naming policy(perfsonar-java-xml-ls)
-- Change: psBase2 used instead psBase1
-- New: new web-admin
-- New: summarization added
-
-* Wed Jul 08 2009 Slawomir Trzaszczka
<>
1.4-1
-- Change:removed admin guide
-- Change:renamed package to perfsonar-java-xml-ls
-
-* Mon Mar 16 2009 Maciej Glowiak
<>
1.3.1-1
-- bug fix in gLS registration
-- Change: nmwg-jar=nmwg-1.0.20090304.jar
-- Change: ps-antxml-ver=1.0.20080204
-- Change: ps-jar-ver=1.0.20090316
-- Change: ps-webadmin=0.9.8b
-
-
-* Thu Jan 15 2009 Maciej Glowiak
<>
1.3-12
-- Final release, license added
-- Change: nmwg-jar=nmwg-1.0.20081015.jar
-- Change: ps-antxml-ver=1.0.20080204
-- Change: ps-jar-ver=1.0.20080924
-- Change: ps-webadmin=0.9.8b
-
-* Fri Nov 28 2008 Maciej Glowiak
<>
1.3-11
-- Fixes bugs 649, 690, 685, 680
-- Change: nmwg-jar=nmwg-1.0.20081015.jar
-- Change: ps-antxml-ver=1.0.20080204
-- Change: ps-jar-ver=1.0.20080924
-- Change: ps-webadmin=0.9.8b
-
-* Fri Oct 31 2008 Maciej Glowiak
<>
1.3-10
-- Change: Webadmin deployment test works
-- Fixes in scripts
-- New: WebAdmin wizard script improvements
-- New: Support for OWAMP
-- New: Support for more eventTypes
-- New: XQuery supports 'escaped' parameter, rejects other
-- New: XQuery return eventType
-- New: LSDiscovery for hLS
-- New: Global LS implementation
-- New: Registration to LS (hLS to gLS)
-- New: IP addresses summarization (hLS)
-- New: Self test implemented
-- New: Packaging (DEB+RPM)
-- New: Authentication
-- Change: nmwg-jar=nmwg-1.0.20081015.jar
-- Change: ps-antxml-ver=1.0.20080204
-- Change: ps-jar-ver=1.0.20080924
-- Change: ps-webadmin=0.9.8b
-

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/packaging/rpm/perfsonar-java-xml-ls.specs
(from rev 5642,
trunk/perfsonar-java-xml-ls/packaging/rpm/perfsonar-java-xml-ls.specs)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/packaging/rpm/perfsonar-java-xml-ls.specs
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/packaging/rpm/perfsonar-java-xml-ls.specs
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,190 @@
+%define prefix /usr/lib/perfsonar/services/%{name}
+%define old_name geant2-java-xml-ls
+
+Name: perfsonar-java-xml-ls
+Version: 1.5
+License: Modified BSD
+Release: rc3
+Summary: perfSONAR Lookup Service
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
+Group: Network/Web service
+packager: Slawomir Trzaszczka
<>
+URL: http://www.perfsonar.org
+Requires: exist
+BuildArch: noarch
+
+
+
+%description
+perfSONAR Lookup Service based on psBase2
+
+
+
+%prep
+%{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}
+%setup -q
+
+
+
+%build
+pushd ${RPM_BUILD_DIR}/%{name}-%{version}
+popd
+
+
+
+%install
+# make the directory
+rm -rf $RPM_BUILD_ROOT
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}/usr/share/doc/%{name}
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}/usr/share/doc/%{name}/schema
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/requests
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/responses
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_var}/run/%{name}
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}/WEB-INF/log
+
+
+# copy the service content to the tomcat webapps directory
+pushd ${RPM_BUILD_DIR}
+ %{__cp} -a %{name}-%{version}/* ${RPM_BUILD_ROOT}%{prefix}
+popd
+
+pushd ${RPM_BUILD_DIR}/%{name}-%{version}/doc
+ %{__cp} -a * ${RPM_BUILD_ROOT}/usr/share/doc/%{name}
+popd
+
+
+pushd ${RPM_BUILD_DIR}/%{name}-%{version}
+ %{__cp} -a samples/requests/*
${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/requests
+ %{__cp} -a samples/responses/*
${RPM_BUILD_ROOT}%{prefix}/WEB-INF/samples/responses
+popd
+
+%post
+## make symlink for easy access to conf
+%{__ln_s} -f %{prefix}/WEB-INF/classes/perfsonar/conf/*.xml
%{_sysconfdir}/%{name}
+%{__ln_s} -f %{prefix}/WEB-INF/log %{_var}/log/%{name}
+if [ ! -e %{_var}/lib/tomcat5/webapps/%{name} ]; then
+ %{__ln_s} -f %{prefix} %{_var}/lib/tomcat5/webapps/%{name} || true
+fi
+
+## workaround - to create link to old name - geant2-...
+sh %{prefix}/temp/link_creator.sh %{prefix}
%{_var}/lib/tomcat5/webapps/%{old_name} &
+
+## restart tomcat
+/sbin/service tomcat5 restart
+
+
+
+%preun
+## remove symlink
+
+if [ $1 -eq 1 ]; then
+ ## upgrade - do nothing
+ echo
+else
+ ## remove - cleanup
+ if [ ! -e %{prefix}/WEB-INF/classes/perfsonar/conf/configuration.xml
]; then
+ %{__rm} -rf %{_sysconfdir}/%{name}/*.xml || true
+ %{__rm} -rf %{_var}/log/%{name} || true
+ fi
+ if [ -e %{_var}/lib/tomcat5/webapps/%{name} ]; then
+ %{__rm} -rf %{_var}/lib/tomcat5/webapps/%{name} || true
+ fi
+ if [ -e %{_var}/lib/tomcat5/webapps/%{old_name} ]; then
+ %{__rm} -rf %{_var}/lib/tomcat5/webapps/%{old_name} || true
+ fi
+fi
+
+
+
+
+%postun
+## restart tomcat
+/sbin/service tomcat5 restart
+
+
+
+%clean
+# clean up the durt
+rm -rf $RPM_BUILD_ROOT
+
+
+
+%files
+%defattr(0644,root,tomcat,0755)
+%attr(755,tomcat,tomcat) %{_var}/run/%{name}
+%attr(755,tomcat,tomcat) %{prefix}/WEB-INF/log
+%attr(640,tomcat,tomcat) %config(noreplace)
%{prefix}/WEB-INF/classes/perfsonar/conf/*.xml
+%{prefix}
+%{_sysconfdir}/%{name}
+/usr/share/doc/%{name}
+/usr/share/doc/%{name}/schema
+
+
+
+
+%changelog
+* Thu May 13 2010 Slawomir Trzaszczka
<>
1.5-rc3
+- Fixes: bugs fixes PSSERVICES-443, PSSERVICES-479
+- New: old naming policy supported geant2-java-xml-ls
+
+* Thu Mar 18 2010 Slawomir Trzaszczka
<>
1.5-RC2
+- Fixes: bugs fixes
+
+* Tue Feb 02 2010 Slawomir Trzaszczka
<>
1.5-RC1
+- Fixes: bugs fixes
+- Change: new naming policy(perfsonar-java-xml-ls)
+- Change: psBase2 used instead psBase1
+- New: new web-admin
+- New: summarization added
+
+* Wed Jul 08 2009 Slawomir Trzaszczka
<>
1.4-1
+- Change:removed admin guide
+- Change:renamed package to perfsonar-java-xml-ls
+
+* Mon Mar 16 2009 Maciej Glowiak
<>
1.3.1-1
+- bug fix in gLS registration
+- Change: nmwg-jar=nmwg-1.0.20090304.jar
+- Change: ps-antxml-ver=1.0.20080204
+- Change: ps-jar-ver=1.0.20090316
+- Change: ps-webadmin=0.9.8b
+
+
+* Thu Jan 15 2009 Maciej Glowiak
<>
1.3-12
+- Final release, license added
+- Change: nmwg-jar=nmwg-1.0.20081015.jar
+- Change: ps-antxml-ver=1.0.20080204
+- Change: ps-jar-ver=1.0.20080924
+- Change: ps-webadmin=0.9.8b
+
+* Fri Nov 28 2008 Maciej Glowiak
<>
1.3-11
+- Fixes bugs 649, 690, 685, 680
+- Change: nmwg-jar=nmwg-1.0.20081015.jar
+- Change: ps-antxml-ver=1.0.20080204
+- Change: ps-jar-ver=1.0.20080924
+- Change: ps-webadmin=0.9.8b
+
+* Fri Oct 31 2008 Maciej Glowiak
<>
1.3-10
+- Change: Webadmin deployment test works
+- Fixes in scripts
+- New: WebAdmin wizard script improvements
+- New: Support for OWAMP
+- New: Support for more eventTypes
+- New: XQuery supports 'escaped' parameter, rejects other
+- New: XQuery return eventType
+- New: LSDiscovery for hLS
+- New: Global LS implementation
+- New: Registration to LS (hLS to gLS)
+- New: IP addresses summarization (hLS)
+- New: Self test implemented
+- New: Packaging (DEB+RPM)
+- New: Authentication
+- Change: nmwg-jar=nmwg-1.0.20081015.jar
+- Change: ps-antxml-ver=1.0.20080204
+- Change: ps-jar-ver=1.0.20080924
+- Change: ps-webadmin=0.9.8b
+

Deleted: branches/perfsonar-java-xml-ls-1.5-stable/pom.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/pom.xml 2010-03-08 14:13:37 UTC (rev 5530)
+++ branches/perfsonar-java-xml-ls-1.5-stable/pom.xml 2010-05-19 08:24:28
UTC (rev 5654)
@@ -1,247 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.perfsonar.service.lookupservice</groupId>
- <artifactId>ps-mdm-ls</artifactId>
- <packaging>war</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>ps-mdm-ls Maven Webapp</name>
- <url>http://maven.apache.org</url>
-
- <properties>
- <configurationFile>configuration.xml
- </configurationFile>
- <axis2Id>axis2-1.4.1</axis2Id>
- <packageName>perfsonar-java-xml-ls</packageName>
- </properties>
-
- <build>
-
- <finalName>perfsonar-java-xml-ls</finalName>
-
- <plugins>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>create-configuration</id>
-
<phase>process-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>create-aar</id>
- <phase>compile</phase>
- <configuration>
- <tasks>
- <property
name="aar.name" value="${packageName}" />
- <mkdir
dir="${project.build.directory}/META-INF" />
- <copy
todir="${project.build.directory}/META-INF">
-
<fileset file="axis/services.xml" />
- </copy>
- <jar
destfile="${project.build.directory}/${aar.name}.aar"
-
update="true"
-
basedir="${project.build.directory}"
-
includes="META-INF/services.xml"
- >
-
- </jar>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
-
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
-
<directory>${basedir}/log4j/${log4j}
- </directory>
- <includes>
-
<include>log4j.properties</include>
- </includes>
-
<targetPath>WEB-INF/classes</targetPath>
- </resource>
- <resource>
-
<directory>${basedir}/db</directory>
- <includes>
-
<include>**/*.xml</include>
- </includes>
-
<targetPath>db</targetPath>
- </resource>
- <resource>
-
<directory>${project.build.directory}</directory>
- <includes>
-
<include>**/*.aar</include>
- </includes>
-
<targetPath>WEB-INF/services</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <linkXref>true</linkXref>
- <sourceEncoding>utf-8</sourceEncoding>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.6</targetJdk>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin
- </artifactId>
- <reportSets>
- <reportSet>
- <reports>
- <report>index</report>
- <report>cim</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <xmlOutput>true</xmlOutput>
-
<xmlOutputDirectory>target/site</xmlOutputDirectory>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
-
-
- <repositories>
-
- <repository>
- <id>ibiblio</id>
- <name>ibiblio repository</name>
- <url>http://www.ibiblio.org/maven2</url>
- </repository>
- <repository>
- <id>personar</id>
- <name>personar repository</name>
- <url>
-
http://anonsvn.internet2.edu/svn/perfsonar/trunk/jar-repository/
- </url>
- </repository>
- <repository>
- <id>personar_leg</id>
- <name>personar repository</name>
- <url>
-
http://anonsvn.internet2.edu/svn/perfsonar/trunk/jar-repository/
- </url>
- <layout>legacy</layout>
- </repository>
- <repository>
- <id>codehaus-release-repo</id>
- <name>Codehaus Release Repo</name>
- <url>http://repository.codehaus.org
- </url>
- </repository>
-
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.8.2</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.7</version>
- </dependency>
-
- <!-- taken from axis2 sources -->
-
- <dependency>
- <groupId>perfsonar</groupId>
- <artifactId>ps-mdm-base2</artifactId>
- <version>0.0.3</version>
- </dependency>
-
- <dependency>
- <artifactId>xmlrpc-common</artifactId>
- <groupId>org.apache.xmlrpc</groupId>
- <version>3.1.2</version>
- </dependency>
- <dependency>
- <artifactId>xmlrpc-server</artifactId>
- <groupId>org.apache.xmlrpc</groupId>
- <version>3.1.2</version>
- </dependency>
- <dependency>
- <groupId>commons-pool</groupId>
- <artifactId>commons-pool</artifactId>
- <version>1.5.4</version>
- </dependency>
- <dependency>
- <groupId>antlr</groupId>
- <artifactId>antlr</artifactId>
- <version>2.7.2</version>
- </dependency>
- <dependency>
- <groupId>exist</groupId>
- <artifactId>exist-xmldb</artifactId>
- <version>1.0rc</version>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <id>test</id>
- <properties>
- <log4j>test</log4j>
- </properties>
- </profile>
- <profile>
- <id>production</id>
- <properties>
- <log4j>production</log4j>
- </properties>
- </profile>
- </profiles>
-
-</project>

Copied: branches/perfsonar-java-xml-ls-1.5-stable/pom.xml (from rev 5651,
trunk/perfsonar-java-xml-ls/pom.xml)
===================================================================
--- branches/perfsonar-java-xml-ls-1.5-stable/pom.xml
(rev 0)
+++ branches/perfsonar-java-xml-ls-1.5-stable/pom.xml 2010-05-19 08:24:28
UTC (rev 5654)
@@ -0,0 +1,274 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.perfsonar.service.lookupservice</groupId>
+ <artifactId>ps-mdm-ls</artifactId>
+ <packaging>war</packaging>
+ <version>1.5</version>
+ <name>ps-mdm-ls Maven Webapp</name>
+ <url>http://maven.apache.org</url>
+
+ <properties>
+ <configurationFile>configuration.xml
+ </configurationFile>
+ <axis2Id>axis2-1.4.1</axis2Id>
+ <packageName>perfsonar-java-xml-ls</packageName>
+ </properties>
+
+ <build>
+
+ <finalName>perfsonar-java-xml-ls</finalName>
+
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-configuration</id>
+
<phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>create-aar</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <property
name="aar.name" value="${packageName}" />
+ <mkdir
dir="${project.build.directory}/META-INF" />
+ <copy
todir="${project.build.directory}/META-INF">
+
<fileset file="axis/services.xml" />
+ </copy>
+ <jar
destfile="${project.build.directory}/${aar.name}.aar"
+
update="true" basedir="${project.build.directory}"
includes="META-INF/services.xml">
+
+ </jar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+
<directory>${basedir}/log4j/${log4j}
+ </directory>
+ <includes>
+
<include>log4j.properties</include>
+ </includes>
+
<targetPath>WEB-INF/classes</targetPath>
+ </resource>
+ <resource>
+
<directory>${basedir}/db</directory>
+ <includes>
+
<include>**/*.xml</include>
+ </includes>
+
<targetPath>db</targetPath>
+ </resource>
+ <resource>
+
<directory>${project.build.directory}</directory>
+ <includes>
+
<include>**/*.aar</include>
+ </includes>
+
<targetPath>WEB-INF/services</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <linkXref>true</linkXref>
+ <sourceEncoding>utf-8</sourceEncoding>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.6</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+
<groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ <configuration>
+ <includes>
+
<include>target/**/perfsonar/conf/*.xml</include>
+ </includes>
+ <replacements>
+ <replacement>
+
<token>%PORT%</token>
+
<value>${port}</value>
+ </replacement>
+ </replacements>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin
+ </artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ <report>cim</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <xmlOutput>true</xmlOutput>
+
<xmlOutputDirectory>target/site</xmlOutputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+
+ <repositories>
+
+ <repository>
+ <id>ibiblio</id>
+ <name>ibiblio repository</name>
+ <url>http://www.ibiblio.org/maven2</url>
+ </repository>
+ <repository>
+ <id>personar</id>
+ <name>personar repository</name>
+
<url>http://svn.geant.net/GEANT/SA2/ps-java-services/trunk/jar-repository/</url>
+ </repository>
+ <repository>
+ <id>personar_leg</id>
+ <name>personar repository</name>
+
<url>http://svn.geant.net/GEANT/SA2/ps-java-services/trunk/jar-repository/</url>
+ <layout>legacy</layout>
+ </repository>
+ <repository>
+ <id>codehaus-release-repo</id>
+ <name>Codehaus Release Repo</name>
+ <url>http://repository.codehaus.org
+ </url>
+ </repository>
+
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.8.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- taken from axis2 sources -->
+
+ <dependency>
+ <groupId>perfsonar</groupId>
+ <artifactId>ps-mdm-base2</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+
+ <dependency>
+ <artifactId>xmlrpc-common</artifactId>
+ <groupId>org.apache.xmlrpc</groupId>
+ <version>3.1.2</version>
+ </dependency>
+ <dependency>
+ <artifactId>xmlrpc-server</artifactId>
+ <groupId>org.apache.xmlrpc</groupId>
+ <version>3.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.5.4</version>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.2</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>exist-xmldb</artifactId>
+ <version>1.0rc</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <id>test</id>
+ <properties>
+ <log4j>test</log4j>
+ <port>8080</port>
+ </properties>
+ </profile>
+ <profile>
+ <id>deb</id>
+ <properties>
+ <log4j>production</log4j>
+ <port>8180</port>
+ </properties>
+ </profile>
+ <profile>
+ <id>rpm</id>
+ <properties>
+ <log4j>production</log4j>
+ <port>8080</port>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,238 +0,0 @@
-package org.perfsonar.service.lookupservice;
-
-import java.util.Collection;
-import java.util.HashSet;
-
-import org.perfsonar.base2.service.exceptions.PerfSONARException;
-import org.perfsonar.base2.xml.Element;
-
-/**
- * Discovery Query Generator
- *
- * @author Maciej Glowiak
- *
- */
-public class DiscoveryQueryGenerator {
-
- private Element discoverySubject = null;
- private boolean extracted = false;
- private HashSet<String> ipAddresses = new HashSet<String>();
- private HashSet<String> domains = new HashSet<String>();
- private HashSet<String> eventTypes = new HashSet<String>();
- private HashSet<String> keywords = new HashSet<String>();
- private String query = null;
-
- public DiscoveryQueryGenerator(Element subject) {
- setSubject(subject);
- }
-
- public void setSubject(Element discoverySubject) {
-
- this.discoverySubject = discoverySubject;
- extracted = false;
- ipAddresses.clear();
- domains.clear();
- eventTypes.clear();
- keywords.clear();
- }
-
- public void extractSubject() throws PerfSONARException {
-
- if (discoverySubject == null)
- throw new PerfSONARException("No subject");
- if (!extracted) {
-
- for (Element e : discoverySubject.getChildren()) {
- String elementName = e.getName();
- if (elementName.equals("address")) {
- addIpAddress(e);
-
- } else if (elementName.equals("domain")) {
- addDomain(e);
-
- } else if (elementName.equals("eventType")) {
- addEventType(e);
-
- } else if (elementName.equals("parameters")) {
-
- Collection<Element> params =
e.getChildren("parameter");
- if (params != null) {
- for (Element p : params) {
-
- String name =
p.getAttribute("name");
- String value =
p.getText();
-
- if (value != null) {
- value =
value.trim();
- if
("keyword".equals(name)) {
-
keywords.add(value);
- } else if
("eventType".equals(name)) {
-
eventTypes.add(value);
- }
- }
- }
-
- }
- }
- }
- }
- extracted = true;
- }
-
- private void addEventType(Element eventType) {
-
- String evt = eventType.getText();
- if (evt != null) {
- eventTypes.add(evt.trim());
- }
- }
-
- private void addDomain(Element domain) {
-
- Element name = domain.getFirstChild("name");
- if (name != null) {
- String n = name.getText();
- if (n != null)
- domains.add(n.trim());
- }
- }
-
- private void addIpAddress(Element ipAddress) {
-
- String ip = ipAddress.getText();
- if (ip != null) {
- ipAddresses.add(ip.trim());
- }
- }
-
- /**
- * Generates query and stores to query property
- *
- * @return
- * @throws PerfSONARException
- */
- public String generateQuery() throws PerfSONARException {
-
- if (!extracted) {
- extractSubject();
- }
-
- StringBuffer q = new StringBuffer();
-
- // add declarations
- q
- .append("declare namespace
nmwg='http://ggf.org/ns/nmwg/base/2.0/'; \n");
- q
- .append("declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/'; \n");
-
- // add for expression
- q.append("for $d in
/nmwg:store[@type='LSStore']/nmwg:data
\n");
- if (!ipAddresses.isEmpty() || !domains.isEmpty() ||
!keywords.isEmpty()
- || !!eventTypes.isEmpty()) {
-
- // generate query conditions
- q.append("where \n");
-
- int i = 0;
- i += putCollectionToQueryBuffer(q, ipAddresses,
- "$d/nmwg:metadata//nmwgt:ifAddress",
(i > 0), null);
- i += putCollectionToQueryBuffer(q, domains,
- "$d/nmwg:metadata//nmwgt:hostName",
(i > 0), "ends-with");
- i += putCollectionToQueryBuffer(q, eventTypes,
- "$d/nmwg:metadata/nmwg:eventType", (i
> 0), null);
- i += putCollectionToQueryBuffer(q, keywords,
-
"$d/nmwg:metadata//nmwg:parameter[@name='keyword']",
- (i > 0), null);
-
- }
- // add return statemet
- q.append("return data($d/@metadataIdRef)");
-
- query = q.toString();
- return query;
-
- }
-
- /**
- * Makes AND/OR query
- *
- * @param q
- * buffer to be appended
- * @param col
- * collection where to take data from
- * @param element
- * name of an element to be checked
- * @param addAND
- * indicates whether to add AND at the beginning of the
- * expression
- * @param function
- * name of function, if null then equal "=" will be used
- * @return number of elements added
- */
- private int putCollectionToQueryBuffer(StringBuffer q,
- Collection<String> col, String element, boolean
addAND,
- String function) {
-
- if ((col.size() > 0) && (addAND == true))
- q.append(" and \n");
-
- int i = 0;
- for (String c : col) {
- if (i == 0)
- q.append("(");
- else
- q.append(" or ");
- if (function == null) {
- q.append(" ");
- q.append(element);
- q.append(" = '");
- q.append(c);
- q.append("' ");
- } else {
- q.append(" ");
- q.append(function);
- q.append("(");
- q.append(element);
- q.append(",'");
- q.append(c);
- q.append("') ");
- }
- i++;
- }
- if (i > 0)
- q.append(")\n");
- return i;
-
- }
-
- /**
- * Returns formatted query parameters string in string buffer
- *
- * @return
- */
- public StringBuffer printQueryParameters() {
-
- StringBuffer sb = new StringBuffer();
- sb.append("Discovery Query Parameters\n");
-
sb.append("==================================================\n");
- sb.append(ipAddresses);
- sb.append("\n");
-
sb.append("==================================================\n");
- sb.append(domains);
- sb.append("\n");
-
sb.append("==================================================\n");
- sb.append(eventTypes);
- sb.append("\n");
-
sb.append("==================================================\n");
- sb.append(keywords);
- sb.append("\n");
-
sb.append("==================================================\n");
- return sb;
- }
-
- public String getQuery() {
-
- return query;
- }
-
-}

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
(from rev 5588,
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/DiscoveryQueryGenerator.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,259 @@
+package org.perfsonar.service.lookupservice;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.perfsonar.base2.service.exceptions.PerfSONARException;
+import org.perfsonar.base2.xml.Element;
+
+/**
+ * Discovery Query Generator
+ *
+ * @author Maciej Glowiak
+ *
+ */
+public class DiscoveryQueryGenerator {
+
+ private Element discoverySubject = null;
+ public static final String nmtbUri =
"http://ogf.org/schema/network/topology/base/20070828/";;
+ private Set<String> nmwgUris = new HashSet<String>();
+ private boolean extracted = false;
+ private HashSet<String> ipAddresses = new HashSet<String>();
+ private HashSet<String> domains = new HashSet<String>();
+ private HashSet<String> eventTypes = new HashSet<String>();
+ private HashSet<String> keywords = new HashSet<String>();
+ private String query = null;
+
+ public DiscoveryQueryGenerator(Element subject) {
+ setSubject(subject);
+ nmwgUris.add("http://ggf.org/ns/nmwg/base/2.0/";);
+ nmwgUris.add("http://ggf.org/ns/nmwg/base/1.0/";);
+ }
+
+ public void setSubject(Element discoverySubject) {
+
+ this.discoverySubject = discoverySubject;
+ extracted = false;
+ ipAddresses.clear();
+ domains.clear();
+ eventTypes.clear();
+ keywords.clear();
+ }
+
+
+ public void extractSubject() throws PerfSONARException {
+
+ if (discoverySubject == null)
+ throw new PerfSONARException("No subject");
+ if (!extracted) {
+
+ for (Element e : discoverySubject.getChildren()) {
+ String elementName = e.getName();
+ String namespaceUri = e.getNamespaceUri();
+
+ if (namespaceUri.equals(nmtbUri)) {
+ if (elementName.equals("address")) {
+ addIpAddress(e);
+ } else if
(elementName.equals("domain")) {
+ addDomain(e);
+ } else {
+ throw new
PerfSONARException("error.ls.query",
+ "Unsupported
element :" + elementName);
+ }
+ } else if (nmwgUris.contains(namespaceUri)) {
+ if (elementName.equals("eventType")) {
+ addEventType(e);
+ } else if
(elementName.equals("parameters")) {
+ Collection<Element> params =
e.getChildren("parameter");
+ if (params != null) {
+ for (Element p :
params) {
+
+ String name =
p.getAttribute("name");
+ String value
= p.getText();
+
+ if (value !=
null) {
+ value
= value.trim();
+ if
("keyword".equals(name)) {
+
keywords.add(value);
+ }
else if ("eventType".equals(name)) {
+
eventTypes.add(value);
+ }
+ }
+ }
+ }
+ } else {
+ throw new
PerfSONARException("error.ls.query",
+ "Unsupported
element :" + elementName);
+ }
+ } else {
+ throw new
PerfSONARException("error.ls.query",
+ "Unsupported
namespace :" + namespaceUri);
+ }
+ }
+ }
+ extracted = true;
+ }
+
+ private void addEventType(Element eventType) {
+
+ String evt = eventType.getText();
+ if (evt != null) {
+ eventTypes.add(evt.trim());
+ }
+ }
+
+ private void addDomain(Element domain) {
+
+ Element name = domain.getFirstChild("name");
+ if (name != null) {
+ String n = name.getText();
+ if (n != null)
+ domains.add(n.trim());
+ }
+ }
+
+ private void addIpAddress(Element ipAddress) {
+
+ String ip = ipAddress.getText();
+ if (ip != null) {
+ ipAddresses.add(ip.trim());
+ }
+ }
+
+ /**
+ * Generates query and stores to query property
+ *
+ * @return
+ * @throws PerfSONARException
+ */
+ public String generateQuery() throws PerfSONARException {
+
+ if (!extracted) {
+ extractSubject();
+ }
+
+ if (!ipAddresses.isEmpty() || !domains.isEmpty() ||
!keywords.isEmpty()
+ || !eventTypes.isEmpty()) {
+
+ StringBuffer q = new StringBuffer();
+
+ // add declarations
+ q
+ .append("declare namespace
nmwg='http://ggf.org/ns/nmwg/base/2.0/'; \n");
+ q
+ .append("declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/'; \n");
+
+ // add for expression
+ q.append("for $d in
/nmwg:store[@type='LSStore']/nmwg:data
\n");
+
+ // generate query conditions
+ q.append("where \n");
+
+ int i = 0;
+ i += putCollectionToQueryBuffer(q, ipAddresses,
+ "$d/nmwg:metadata//nmwgt:ifAddress",
(i > 0), null);
+ i += putCollectionToQueryBuffer(q, domains,
+ "$d/nmwg:metadata//nmwgt:hostName",
(i > 0), "ends-with");
+ i += putCollectionToQueryBuffer(q, eventTypes,
+ "$d/nmwg:metadata/nmwg:eventType", (i
> 0), null);
+ i += putCollectionToQueryBuffer(q, keywords,
+
"$d/nmwg:metadata//nmwg:parameter[@name='keyword']",
+ (i > 0), null);
+
+ q.append("return data($d/@metadataIdRef)");
+
+ query = q.toString();
+ // add return statemet
+
+ return query;
+
+ } else {
+ throw new PerfSONARException("error.ls.query",
+ "Lack of specified subject
elements(ip,domain,eventType,keyword)");
+ }
+ }
+
+ /**
+ * Makes AND/OR query
+ *
+ * @param q
+ * buffer to be appended
+ * @param col
+ * collection where to take data from
+ * @param element
+ * name of an element to be checked
+ * @param addAND
+ * indicates whether to add AND at the beginning of the
+ * expression
+ * @param function
+ * name of function, if null then equal "=" will be used
+ * @return number of elements added
+ */
+ private int putCollectionToQueryBuffer(StringBuffer q,
+ Collection<String> col, String element, boolean
addAND,
+ String function) {
+
+ if ((col.size() > 0) && (addAND == true))
+ q.append(" and \n");
+
+ int i = 0;
+ for (String c : col) {
+ if (i == 0)
+ q.append("(");
+ else
+ q.append(" or ");
+ if (function == null) {
+ q.append(" ");
+ q.append(element);
+ q.append(" = '");
+ q.append(c);
+ q.append("' ");
+ } else {
+ q.append(" ");
+ q.append(function);
+ q.append("(");
+ q.append(element);
+ q.append(",'");
+ q.append(c);
+ q.append("') ");
+ }
+ i++;
+ }
+ if (i > 0)
+ q.append(")\n");
+ return i;
+
+ }
+
+ /**
+ * Returns formatted query parameters string in string buffer
+ *
+ * @return
+ */
+ public StringBuffer printQueryParameters() {
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("Discovery Query Parameters\n");
+
sb.append("==================================================\n");
+ sb.append(ipAddresses);
+ sb.append("\n");
+
sb.append("==================================================\n");
+ sb.append(domains);
+ sb.append("\n");
+
sb.append("==================================================\n");
+ sb.append(eventTypes);
+ sb.append("\n");
+
sb.append("==================================================\n");
+ sb.append(keywords);
+ sb.append("\n");
+
sb.append("==================================================\n");
+ return sb;
+ }
+
+ public String getQuery() {
+
+ return query;
+ }
+
+}

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,158 +0,0 @@
-package org.perfsonar.service.lookupservice;
-
-import org.apache.log4j.Logger;
-import org.perfsonar.base2.service.configuration.Configuration;
-import org.perfsonar.base2.service.configuration.ConfigurationManager;
-import org.perfsonar.base2.service.exceptions.PerfSONARException;
-import org.perfsonar.base2.service.requesthandler.ServiceEngine;
-import org.perfsonar.base2.xml.Element;
-import org.perfsonar.base2.xml.nmwg.Message;
-import org.perfsonar.base2.xml.nmwg.Metadata;
-import org.perfsonar.service.lookupservice.storage.LookupServiceDAO;
-import org.perfsonar.service.lookupservice.storage.LookupServiceDAOFactory;
-
-/**
- * provides support for operation on messages
- *
- * @author Maciej Glowiak, Slawomir Trzaszczka
- *
- */
-public abstract class GenericLSServiceEngine implements ServiceEngine {
-
- private final Logger logger =
Logger.getLogger(GenericLSServiceEngine.class);
-
- protected final LookupServiceDAO dao;
- protected final Configuration configuration;
- protected final ConfigurationManager configurationManager;
- private boolean gls;
-
- protected static final String LS_KEY = "lsKey";
-
- public GenericLSServiceEngine() throws PerfSONARException {
- dao = getDao();
-
- configurationManager = ConfigurationManager.getInstance();
- configuration = configurationManager.getConfiguration();
- }
-
- protected LookupServiceDAO getDao() throws PerfSONARException {
- return LookupServiceDAOFactory.getDAO();
- }
-
- /**
- * extracts eventType from message
- *
- * @param request
- * @return
- */
- protected String extractEventType(Message request) {
-
- // find eventType in the metadatas
- String eventType = null;
- for (Metadata m : request.getMetadataCollection()) {
- eventType = m.getFirstEventType().getEventType();
- if (eventType != null)
- return eventType;
- }
- return null;
- }
-
- /**
- * Extracts first Metadata from Request
- *
- * @param request
- * @return Metadata
- */
- protected Metadata getFirstMetadataFromRequest(Message request)
- throws PerfSONARException {
-
- for (Metadata m : request.getMetadataCollection()) {
- return m;
- }
- return null;
- }
-
- /**
- * Extracts Key of specific Id from Metadata
- *
- * @param requestMetadata
- * @param keyId
- * Key identifier
- * @return Key value
- *
- *
- * <!-- lsKey to be updated --> <nmwg:key> <nmwg:parameters
- * id="param1"> <nmwg:parameter
- * name="lsKey">http://shower.fr:8080/axis
- * /services/MeasurementArchiveService</nmwg:parameter>
- * </nmwg:parameters> </nmwg:key>
- */
- 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"))) {
- logger.debug("Found Parameter
[" + parameterName
- + "] in
metadata [" + requestMetadata.getId()
- + "]");
- return parameterValue; // if
key has keyId and
- }
- }
- }
- }
- return null;
- }
-
- public boolean isGLS() {
- return gls;
- }
-
- public void setGLS(boolean g) {
- gls = g;
- }
-
- /**
- * Extract parameter value if value attribute not null or text content
- *
- * @param p
- * @return
- */
- protected String extractParameterValue(Element p) {
- String val = p.getAttribute("value");
- if (val != null)
- return val;
- String txt = p.getText().trim();
- return txt;
- }
-
- /**
- *
- * checks whether string occurs in string array
- *
- * @param needle
- * @param haystack
- * @return
- */
- protected boolean isEventTypeOccurInArray(String needle, String[]
haystack) {
-
- for (String h : haystack) {
- if (h.equals(needle))
- return true;
- else if (h.equals(needle + "/"))
- return true;
- }
- return false;
- }
-
-}
\ No newline at end of file

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
(from rev 5586,
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,158 @@
+package org.perfsonar.service.lookupservice;
+
+import org.apache.log4j.Logger;
+import org.perfsonar.base2.service.configuration.Configuration;
+import org.perfsonar.base2.service.configuration.ConfigurationManager;
+import org.perfsonar.base2.service.exceptions.PerfSONARException;
+import org.perfsonar.base2.service.requesthandler.ServiceEngine;
+import org.perfsonar.base2.xml.Element;
+import org.perfsonar.base2.xml.nmwg.Message;
+import org.perfsonar.base2.xml.nmwg.Metadata;
+import org.perfsonar.service.lookupservice.storage.LookupServiceDAO;
+import org.perfsonar.service.lookupservice.storage.LookupServiceDAOFactory;
+
+/**
+ * provides support for operation on messages
+ *
+ * @author Maciej Glowiak, Slawomir Trzaszczka
+ *
+ */
+public abstract class GenericLSServiceEngine implements ServiceEngine {
+
+ private final Logger logger =
Logger.getLogger(GenericLSServiceEngine.class);
+
+ protected final LookupServiceDAO dao;
+ protected final Configuration configuration;
+ protected final ConfigurationManager configurationManager;
+ private boolean gls;
+
+ protected static final String LS_KEY = "lsKey";
+
+ public GenericLSServiceEngine() throws PerfSONARException {
+ dao = getDao();
+
+ configurationManager = ConfigurationManager.getInstance();
+ configuration = configurationManager.getConfiguration();
+ }
+
+ protected LookupServiceDAO getDao() throws PerfSONARException {
+ return LookupServiceDAOFactory.getDAO();
+ }
+
+ /**
+ * extracts eventType from message
+ *
+ * @param request
+ * @return
+ */
+ protected String extractEventType(Message request) {
+
+ // find eventType in the metadatas
+ String eventType = null;
+ for (Metadata m : request.getMetadataCollection()) {
+ eventType = m.getFirstEventType().getEventType();
+ if (eventType != null)
+ return eventType;
+ }
+ return null;
+ }
+
+ /**
+ * Extracts first Metadata from Request
+ *
+ * @param request
+ * @return Metadata
+ */
+ protected Metadata getFirstMetadataFromRequest(Message request)
+ throws PerfSONARException {
+
+ for (Metadata m : request.getMetadataCollection()) {
+ return m;
+ }
+ return null;
+ }
+
+ /**
+ * Extracts Key of specific Id from Metadata
+ *
+ * @param requestMetadata
+ * @param keyId
+ * Key identifier
+ * @return Key value
+ *
+ *
+ * <!-- lsKey to be updated --> <nmwg:key> <nmwg:parameters
+ * id="param1"> <nmwg:parameter
+ * name="lsKey">http://shower.fr:8080/axis
+ * /services/MeasurementArchiveService</nmwg:parameter>
+ * </nmwg:parameters> </nmwg:key>
+ */
+ public String getParameterFromKey(Metadata requestMetadata,
+ String parameterName) {
+ if
(requestMetadata.getChildren("key","http://ggf.org/ns/nmwg/base/2.0/";) ==
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"))) {
+ logger.debug("Found Parameter
[" + parameterName
+ + "] in
metadata [" + requestMetadata.getId()
+ + "]");
+ return parameterValue; // if
key has keyId and
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public boolean isGLS() {
+ return gls;
+ }
+
+ public void setGLS(boolean g) {
+ gls = g;
+ }
+
+ /**
+ * Extract parameter value if value attribute not null or text content
+ *
+ * @param p
+ * @return
+ */
+ protected String extractParameterValue(Element p) {
+ String val = p.getAttribute("value");
+ if (val != null)
+ return val;
+ String txt = p.getText().trim();
+ return txt;
+ }
+
+ /**
+ *
+ * checks whether string occurs in string array
+ *
+ * @param needle
+ * @param haystack
+ * @return
+ */
+ protected boolean isEventTypeOccurInArray(String needle, String[]
haystack) {
+
+ for (String h : haystack) {
+ if (h.equals(needle))
+ return true;
+ else if (h.equals(needle + "/"))
+ return true;
+ }
+ return false;
+ }
+
+}
\ No newline at end of file

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,80 +0,0 @@
-package org.perfsonar.service.lookupservice.components;
-
-import org.perfsonar.base2.service.configuration.Component;
-import org.perfsonar.base2.service.exceptions.PerfSONARException;
-
-/**
- *
- * contains username,password nad url to databse, optionally contains
read-only user
- *
- * @author Slawomir Trzaszczka
- */
-public class DataSourceComponent extends Component {
-
- private String username;
- private String password;
- private String usernameRO;
- private String passwordRO;
- private boolean hasReadOnlyUser=false;
- private String url;
-
- @Override
- public void init() throws PerfSONARException {
- username = getOption("username").getValue();
- password = getOption("password").getValue();
- url = getOption("url").getValue();
-
-
if(!getOptions().containsKey("usernameRO")||!getOptions().containsKey("passwordRO")){
- usernameRO=username;
- passwordRO=password;
- }else{
- usernameRO = getOption("usernameRO").getValue();
- passwordRO = getOption("passwordRO").getValue();
- hasReadOnlyUser=true;
- }
- }
-
- @Override
- public void run() throws PerfSONARException {
-
- }
-
- @Override
- public void destroy() throws PerfSONARException {
- username = null;
- password = null;
- usernameRO = null;
- passwordRO = null;
- url = null;
- }
-
- public String getUsername() {
- return username;
- }
-
- public String getPassword() {
- return password;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getUsernameRO() {
- return usernameRO;
- }
-
- public String getPasswordRO() {
- return passwordRO;
- }
-
- /**
- * checks whether DataSource contains read-only credential
- *
- * @return
- */
- public boolean hasReadOnlyUser() {
- return hasReadOnlyUser;
- }
-
-}

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java
(from rev 5599,
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/DataSourceComponent.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,111 @@
+package org.perfsonar.service.lookupservice.components;
+
+import org.perfsonar.base2.service.configuration.Component;
+import org.perfsonar.base2.service.exceptions.PerfSONARException;
+
+/**
+ *
+ * contains username,password nad url to databse, optionally contains
read-only
+ * user
+ *
+ * @author Slawomir Trzaszczka
+ */
+public class DataSourceComponent extends Component {
+
+ private String username;
+ private String password;
+ private String usernameRO;
+ private String passwordRO;
+ private boolean hasReadOnlyUser = false;
+ private String url;
+ private String mainCollection;
+
+ @Override
+ public void init() throws PerfSONARException {
+ username = getOption("username").getValue();
+ password = getOption("password").getValue();
+ String[] splitedAddress =
splitURL(getOption("url").getValue());
+ if(splitedAddress==null || splitedAddress.length!=2){
+ throw new PerfSONARException("Cannot split exist
url");
+ }
+
+ url=splitedAddress[0];
+ mainCollection=splitedAddress[1];
+
+ if (!getOptions().containsKey("usernameRO")
+ || !getOptions().containsKey("passwordRO")) {
+ usernameRO = username;
+ passwordRO = password;
+ } else {
+ usernameRO = getOption("usernameRO").getValue();
+ passwordRO = getOption("passwordRO").getValue();
+ hasReadOnlyUser = true;
+ }
+ }
+
+ @Override
+ public void run() throws PerfSONARException {
+
+ }
+
+ @Override
+ public void destroy() throws PerfSONARException {
+ username = null;
+ password = null;
+ usernameRO = null;
+ passwordRO = null;
+ url=null;
+ mainCollection=null;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public String getUsernameRO() {
+ return usernameRO;
+ }
+
+ public String getPasswordRO() {
+ return passwordRO;
+ }
+
+ /**
+ * checks whether DataSource contains read-only credential
+ *
+ * @return
+ */
+ public boolean hasReadOnlyUser() {
+ return hasReadOnlyUser;
+ }
+
+ /**
+ * splits existDbURL to 2 parts: first is direct address to Exist and
second
+ * is main collection name
+ *
+ * @param url
+ * @return
+ */
+ private String[] splitURL(String url) {
+ url.indexOf("exist/xmlrpc/db");
+ final String pattern = "exist/xmlrpc/db/";
+ final int index = url.indexOf("exist/xmlrpc/db/") +
pattern.length();
+ String[] result = new String[2];
+ result[0] = url.substring(0, index - 1);
+ result[1] = url.substring(index);
+ return result;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public String getMainCollection() {
+ return mainCollection;
+ }
+
+}

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,283 +0,0 @@
-package org.perfsonar.service.lookupservice.components;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashSet;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.OutputKeys;
-
-import org.apache.log4j.Logger;
-import org.perfsonar.base2.service.configuration.Component;
-import org.perfsonar.base2.service.configuration.ConfigurationManager;
-import org.perfsonar.base2.service.exceptions.PerfSONARException;
-import org.perfsonar.base2.service.storage.xml.XMLDBResult;
-import org.perfsonar.base2.xml.ConfigurationStaxParser;
-import org.perfsonar.base2.xml.Element;
-import org.perfsonar.base2.xml.StaxParser;
-import org.xmldb.api.DatabaseManager;
-import org.xmldb.api.base.Collection;
-import org.xmldb.api.base.Database;
-import org.xmldb.api.base.Resource;
-import org.xmldb.api.base.ResourceIterator;
-import org.xmldb.api.base.ResourceSet;
-import org.xmldb.api.base.XMLDBException;
-import org.xmldb.api.modules.XPathQueryService;
-
-/**
- *
- * Component responsible of existDb operations. It uses XML:DB connection.
Component is configured by:
- * - configuration option dataSource-ref
- *
- * @author Slawomir Trzaszczka
- *
- */
-public class XMLDBComponent extends Component {
-
- private Logger logger = Logger.getLogger(XMLDBComponent.class);
- private String url;
- private String username;
- private String password;
- public final static String DATASOURCE_KEY = "dataSource-ref";
- public final static String READ_ONLY_KEY = "readOnly";
- private XPathQueryService service;
-
- @Override
- public void init() throws PerfSONARException {
- if (!getOptions().containsKey(DATASOURCE_KEY)) {
- throw new PerfSONARException("Lack of " +
DATASOURCE_KEY
- + " option in " + getClassName() + "
component");
- } else {
- String dataSourceRefValue =
getOption(DATASOURCE_KEY).getValue();
- DataSourceComponent dataSource =
(DataSourceComponent) ConfigurationManager
-
.getInstance().getConfiguration().getAuxiliaryComponent(
- dataSourceRefValue);
-
- url = dataSource.getUrl();
-
- if (getOption(READ_ONLY_KEY) != null
- &&
getOption(READ_ONLY_KEY).getValue().equals("true")) {
- logger.debug("readOnly compoenent");
- username = dataSource.getUsernameRO();
- password = dataSource.getPasswordRO();
- } else {
- username = dataSource.getUsername();
- password = dataSource.getPassword();
- }
- registerDatabase();
- }
- }
-
-
- /**
- * registers database Class
- */
- @SuppressWarnings("unchecked")
- private void registerDatabase(){
- try {
- Class cl =
Class.forName("org.exist.xmldb.DatabaseImpl");
- Database database = (Database) cl.newInstance();
- DatabaseManager.registerDatabase(database);
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- } catch (XMLDBException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
-
- }
-
- private boolean initiDBElements() {
- logger.debug("Iniialize XMLDBCompoenent");
- try {
- // get the collection
- Collection col = DatabaseManager.getCollection(url +
"/ls",
- username, password);
- if (col == null) {
- return false;
- }
- col.setProperty(OutputKeys.INDENT, "no");
- service = (XPathQueryService)
col.getService("XPathQueryService",
- "1.0");
- service.setProperty("indent", "yes");
-
- return true;
- } catch (XMLDBException e) {
- e.printStackTrace();
- }
- return false;
- }
-
- @Override
- public void run() throws PerfSONARException {
- }
-
- @Override
- public void destroy() throws PerfSONARException {
- }
-
- /**
- *
- * gets reference to the service
- *
- * @return
- * @throws PerfSONARException
- */
- public XPathQueryService getService() throws PerfSONARException {
- // if service is null - initialize it if initialization
returns false -
- // throw exception
- if (service == null && !initiDBElements()) {
-// TODO: url event types
- throw new PerfSONARException(
- "error.ls.no_storage",
- "Cannot initialize Db access - wrong
datasource or db is not initialized");
- }
- return service;
- }
-
- /**
- *
- * provides access to DB collection using xml:db interface
- *
- * @param connectionURL
- * @return
- */
- private Collection getDbCollection(String connectionURL) {
- try {
- Collection col =
DatabaseManager.getCollection(connectionURL,
- username, password);
- return col;
- } catch (XMLDBException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- /**
- *
- * uploads file to ExistDb using xml:db interface
- *
- * @param name
- * @param content
- */
- public synchronized void uploadStoreFile(String name, String content)
{
- try {
- Collection col = getDbCollection(url + "/ls/store");
- Resource res = col.createResource(name,
"XMLResource");
- res.setContent(content);
- col.storeResource(res);
- } catch (XMLDBException e) {
- e.printStackTrace();
- }
- }
-
- /**
- *
- * removes file from ExistDb using xml:db interface
- *
- * @param name
- */
- public synchronized void removeFile(String name) {
- try {
- Collection col = getDbCollection(url + "/ls/store");
- Resource res = col.getResource(name);
- if (res != null) {
- col.removeResource(res);
- }
- } catch (XMLDBException e) {
- e.printStackTrace();
- }
- }
-
- /**
- *
- * executes XQuery query
- *
- * @param xquery
- * @return
- * @throws PerfSONARException
- */
- public synchronized XMLDBResult performXQuery(String xquery) throws
PerfSONARException {
- XPathQueryService service = getService();
- try {
-
- // CompiledExpression compiled =
service.compile(xquery);
- ResourceSet rs = service.query(xquery);
- ResourceIterator i = rs.getIterator();
-
- StringBuffer sb = new StringBuffer();
- int count = 0;
- sb.append("<exist>");
- while (i.hasMoreResources()) {
- Resource r = i.nextResource();
- String value = r.getContent().toString();
- if (!value.startsWith("<")) {
- sb.append("<value>");
- sb.append(value);
- sb.append("</value>");
- } else {
- sb.append(value);
- }
-
- count++;
- }
- sb.append("</exist>");
- String existResult = sb.toString();
- if (existResult == null || existResult.isEmpty()) {
- return new XMLDBResult(new
HashSet<Element>(), 0, 0, 0);
- } else {
- return parseExistXMLReponse(new
ByteArrayInputStream(
- existResult.getBytes()),
count);
- }
- } catch (XMLDBException e) {
- logger.debug("------------------------------------");
- logger.debug(xquery);
- logger.debug("------------------------------------");
- e.printStackTrace();
-// TODO: url event types
- throw new PerfSONARException("error.ls.query",
- "Problem with executing xquery :" +
e.getMessage());
- } catch (IOException e) {
- e.printStackTrace();
- } catch (XMLStreamException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- /**
- *
- *
- * this method converts imputStream to XMLDBResult. XmlDBResult is
used in
- * all DB operations
- *
- * @param inputStream
- * @param count
- * - nr of hits in DB
- * @return
- * @throws IOException
- * @throws XMLStreamException
- */
- private XMLDBResult parseExistXMLReponse(InputStream inputStream, int
count)
- throws IOException, XMLStreamException {
-
- // parse
- StaxParser sp = new ConfigurationStaxParser();
- Element e = sp.parse(inputStream);
-
- // get numbers
- int hits = count;
- int first = 0;
-
- if (count > -1) {
- return new XMLDBResult(e.getChildren(), hits, count,
first);
- } else
- return null;
-
- }
-
-}

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
(from rev 5599,
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,284 @@
+package org.perfsonar.service.lookupservice.components;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashSet;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.transform.OutputKeys;
+
+import org.apache.log4j.Logger;
+import org.perfsonar.base2.service.configuration.Component;
+import org.perfsonar.base2.service.configuration.ConfigurationManager;
+import org.perfsonar.base2.service.exceptions.PerfSONARException;
+import org.perfsonar.base2.service.storage.xml.XMLDBResult;
+import org.perfsonar.base2.xml.ConfigurationStaxParser;
+import org.perfsonar.base2.xml.Element;
+import org.perfsonar.base2.xml.StaxParser;
+import org.xmldb.api.DatabaseManager;
+import org.xmldb.api.base.Collection;
+import org.xmldb.api.base.Database;
+import org.xmldb.api.base.Resource;
+import org.xmldb.api.base.ResourceIterator;
+import org.xmldb.api.base.ResourceSet;
+import org.xmldb.api.base.XMLDBException;
+import org.xmldb.api.modules.XPathQueryService;
+
+/**
+ *
+ * Component responsible of existDb operations. It uses XML:DB connection.
Component is configured by:
+ * - configuration option dataSource-ref
+ *
+ * @author Slawomir Trzaszczka
+ *
+ */
+public class XMLDBComponent extends Component {
+
+ private Logger logger = Logger.getLogger(XMLDBComponent.class);
+ private String url;
+ private String mainCollection;
+ private String username;
+ private String password;
+ public final static String DATASOURCE_KEY = "dataSource-ref";
+ public final static String READ_ONLY_KEY = "readOnly";
+ private XPathQueryService service;
+
+ @Override
+ public void init() throws PerfSONARException {
+ if (!getOptions().containsKey(DATASOURCE_KEY)) {
+ throw new PerfSONARException("Lack of " +
DATASOURCE_KEY
+ + " option in " + getClassName() + "
component");
+ } else {
+ String dataSourceRefValue =
getOption(DATASOURCE_KEY).getValue();
+ DataSourceComponent dataSource =
(DataSourceComponent) ConfigurationManager
+
.getInstance().getConfiguration().getAuxiliaryComponent(
+ dataSourceRefValue);
+
+ url = dataSource.getUrl();
+ mainCollection=dataSource.getMainCollection();
+
+ if (getOption(READ_ONLY_KEY) != null
+ &&
getOption(READ_ONLY_KEY).getValue().equals("true")) {
+ logger.debug("readOnly compoenent");
+ username = dataSource.getUsernameRO();
+ password = dataSource.getPasswordRO();
+ } else {
+ username = dataSource.getUsername();
+ password = dataSource.getPassword();
+ }
+ registerDatabase();
+ }
+ }
+
+
+ /**
+ * registers database Class
+ */
+ @SuppressWarnings("unchecked")
+ private void registerDatabase(){
+ try {
+ Class cl =
Class.forName("org.exist.xmldb.DatabaseImpl");
+ Database database = (Database) cl.newInstance();
+ DatabaseManager.registerDatabase(database);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (XMLDBException e) {
+ e.printStackTrace();
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ private boolean initiDBElements() {
+ logger.debug("Iniialize XMLDBCompoenent");
+ try {
+ // get the collection
+ Collection col = DatabaseManager.getCollection(url +
"/"+mainCollection,username, password);
+ if (col == null) {
+ return false;
+ }
+ col.setProperty(OutputKeys.INDENT, "no");
+ service = (XPathQueryService)
col.getService("XPathQueryService",
+ "1.0");
+ service.setProperty("indent", "yes");
+
+ return true;
+ } catch (XMLDBException e) {
+ e.printStackTrace();
+ }
+ return false;
+ }
+
+ @Override
+ public void run() throws PerfSONARException {
+ }
+
+ @Override
+ public void destroy() throws PerfSONARException {
+ }
+
+ /**
+ *
+ * gets reference to the service
+ *
+ * @return
+ * @throws PerfSONARException
+ */
+ public XPathQueryService getService() throws PerfSONARException {
+ // if service is null - initialize it if initialization
returns false -
+ // throw exception
+ if (service == null && !initiDBElements()) {
+// TODO: url event types
+ throw new PerfSONARException(
+ "error.ls.no_storage",
+ "Cannot initialize Db access - wrong
datasource or db is not initialized");
+ }
+ return service;
+ }
+
+ /**
+ *
+ * provides access to DB collection using xml:db interface
+ *
+ * @param connectionURL
+ * @return
+ */
+ private Collection getDbCollection(String connectionURL) {
+ try {
+ Collection col =
DatabaseManager.getCollection(connectionURL,
+ username, password);
+ return col;
+ } catch (XMLDBException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ *
+ * uploads file to ExistDb using xml:db interface
+ *
+ * @param name
+ * @param content
+ */
+ public synchronized void uploadStoreFile(String name, String content)
{
+ try {
+ Collection col = getDbCollection(url +
"/"+mainCollection+"/store");
+ Resource res = col.createResource(name,
"XMLResource");
+ res.setContent(content);
+ col.storeResource(res);
+ } catch (XMLDBException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ *
+ * removes file from ExistDb using xml:db interface
+ *
+ * @param name
+ */
+ public synchronized void removeFile(String name) {
+ try {
+ Collection col = getDbCollection(url +
"/"+mainCollection+"/store");
+ Resource res = col.getResource(name);
+ if (res != null) {
+ col.removeResource(res);
+ }
+ } catch (XMLDBException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ *
+ * executes XQuery query
+ *
+ * @param xquery
+ * @return
+ * @throws PerfSONARException
+ */
+ public synchronized XMLDBResult performXQuery(String xquery) throws
PerfSONARException {
+ XPathQueryService service = getService();
+ try {
+
+ // CompiledExpression compiled =
service.compile(xquery);
+ ResourceSet rs = service.query(xquery);
+ ResourceIterator i = rs.getIterator();
+
+ StringBuffer sb = new StringBuffer();
+ int count = 0;
+ sb.append("<exist>");
+ while (i.hasMoreResources()) {
+ Resource r = i.nextResource();
+ String value = r.getContent().toString();
+ if (!value.startsWith("<")) {
+ sb.append("<value>");
+ sb.append(value);
+ sb.append("</value>");
+ } else {
+ sb.append(value);
+ }
+
+ count++;
+ }
+ sb.append("</exist>");
+ String existResult = sb.toString();
+ if (existResult == null || existResult.isEmpty()) {
+ return new XMLDBResult(new
HashSet<Element>(), 0, 0, 0);
+ } else {
+ return parseExistXMLReponse(new
ByteArrayInputStream(
+ existResult.getBytes()),
count);
+ }
+ } catch (XMLDBException e) {
+ logger.debug("------------------------------------");
+ logger.debug(xquery);
+ logger.debug("------------------------------------");
+ e.printStackTrace();
+// TODO: url event types
+ throw new PerfSONARException("error.ls.query",
+ "Problem with executing xquery :" +
e.getMessage());
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (XMLStreamException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ *
+ *
+ * this method converts imputStream to XMLDBResult. XmlDBResult is
used in
+ * all DB operations
+ *
+ * @param inputStream
+ * @param count
+ * - nr of hits in DB
+ * @return
+ * @throws IOException
+ * @throws XMLStreamException
+ */
+ private XMLDBResult parseExistXMLReponse(InputStream inputStream, int
count)
+ throws IOException, XMLStreamException {
+
+ // parse
+ StaxParser sp = new ConfigurationStaxParser();
+ Element e = sp.parse(inputStream);
+
+ // get numbers
+ int hits = count;
+ int first = 0;
+
+ if (count > -1) {
+ return new XMLDBResult(e.getChildren(), hits, count,
first);
+ } else
+ return null;
+
+ }
+
+}

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,138 +0,0 @@
-package org.perfsonar.service.lookupservice.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URISyntaxException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.exist.security.User;
-import org.exist.xmldb.UserManagementService;
-import org.exist.xmldb.XmldbURI;
-import org.perfsonar.base2.service.configuration.ConfigurationManager;
-import org.perfsonar.base2.service.exceptions.PerfSONARException;
-import org.perfsonar.base2.servlets.ExistDBInitServlet;
-import org.perfsonar.service.lookupservice.components.DataSourceComponent;
-import org.xmldb.api.base.Collection;
-import org.xmldb.api.base.XMLDBException;
-import org.xmldb.api.modules.CollectionManagementService;
-
-/**
- * This servlet initializes eXist database
- *
- * @author Slawomir Trzaszczka
- *
- */
-@SuppressWarnings("serial")
-public class ExistDbInitializerServlet extends ExistDBInitServlet {
-
- /**
- *
- * main function which initializes database
- *
- *
- * @param dbContentDirPath
- * - path to directory where database resource files are
stored
- * @param configManager
- * @return
- * @throws IOException
- * @throws PerfSONARException
- */
- public boolean initializeDatabase(String dbContentDirPath,
- ConfigurationManager configManager) throws
PerfSONARException {
- try {
-
- DataSourceComponent existDbComponent =
(DataSourceComponent) configManager
- .getConfiguration()
-
.getAuxiliaryComponent("existDataSource");
-
- String dbUrl = existDbComponent.getUrl();
-
-
- Collection collection = getMainCollection(dbUrl);
-
- UserManagementService usrMngmtService =
getUserManagmentService(collection);
- CollectionManagementService colMngmtService =
getCollectionManagmentService(collection);
-
- Collection lsCollection =
colMngmtService.createCollection("ls");
- Collection copyCollection = colMngmtService
- .createCollection("copy");
-
- // removes all existing resources from store
collection (remove old
- // registered service stored in collection)
- Collection storeCollection = colMngmtService
- .createCollection("ls/store");
-
- for (String resourceName :
storeCollection.listResources()) {
- storeCollection.removeResource(storeCollection
- .getResource(resourceName));
- }
-
- User user=createUser(existDbComponent.getUsername(),
- existDbComponent.getPassword(),
"dba");
- user.setHome(XmldbURI.xmldbUriFor("ls"));
-
- if (existDbComponent.hasReadOnlyUser()) {
- User
userRO=createUser(existDbComponent.getUsernameRO(),
-
existDbComponent.getPasswordRO(), "guest");
- usrMngmtService.addUser(userRO);
- }
-
- usrMngmtService.addUser(user);
-
- // uploadFile("LSStore.xml", dbContentDirPath,
lsCollection);
-
- uploadFile("LSStore-control.xml", dbContentDirPath,
lsCollection);
- uploadFile("LSStore-summary.xml", dbContentDirPath,
lsCollection);
-
- uploadFile("LSStore-summary.xml", dbContentDirPath,
copyCollection);
-
- return true;
- } catch (PerfSONARException e) {
- throw new PerfSONARException(e.getMessage());
- } catch (XMLDBException e) {
- throw new PerfSONARException(e.getMessage());
- } catch (URISyntaxException e) {
- throw new PerfSONARException(e.getMessage());
- }
- }
-
- @Override
- protected String getPassword(ConfigurationManager configManager)
- throws PerfSONARException {
-
- return ((DataSourceComponent) configManager.getConfiguration()
-
.getAuxiliaryComponent("existDataSource")).getPassword();
- }
-
- @Override
- protected String getUsername(ConfigurationManager configManager)
- throws PerfSONARException {
- return ((DataSourceComponent) configManager.getConfiguration()
-
.getAuxiliaryComponent("existDataSource")).getUsername();
- }
-
- @Override
- protected void processRequest(HttpServletRequest req,
- HttpServletResponse resp) {
-
- try {
- PrintWriter out = resp.getWriter();
- ConfigurationManager configManager;
- configManager = ConfigurationManager.getInstance();
- String dbContentDirPath =
getServletContext().getRealPath("/")+"/db";
- try {
- initializeDatabase(dbContentDirPath,
configManager);
- out.append("DbInitializer - success");
- } catch (PerfSONARException ex) {
- out.append(ex.getMessage());
- }
- } catch (IOException e) {
- e.printStackTrace();
- } catch (PerfSONARException e) {
- e.printStackTrace();
- }
-
- }
-}

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
(from rev 5649,
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,135 @@
+package org.perfsonar.service.lookupservice.servlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.URISyntaxException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+import org.exist.security.User;
+import org.exist.xmldb.UserManagementService;
+import org.exist.xmldb.XmldbURI;
+import org.perfsonar.base2.service.configuration.ConfigurationManager;
+import org.perfsonar.base2.service.exceptions.PerfSONARException;
+import org.perfsonar.base2.servlets.ExistDBInitServlet;
+import org.perfsonar.service.lookupservice.components.DataSourceComponent;
+import org.xmldb.api.base.Collection;
+import org.xmldb.api.base.XMLDBException;
+import org.xmldb.api.modules.CollectionManagementService;
+
+/**
+ * This servlet initializes eXist database
+ *
+ * @author Slawomir Trzaszczka
+ *
+ */
+@SuppressWarnings("serial")
+public class ExistDbInitializerServlet extends ExistDBInitServlet {
+
+ private Logger
logger=Logger.getLogger(ExistDbInitializerServlet.class);
+
+ /**
+ *
+ * main function which initializes database
+ *
+ *
+ * @param dbContentDirPath
+ * - path to directory where database resource files are
stored
+ * @param configManager
+ * @return
+ * @throws IOException
+ * @throws PerfSONARException
+ */
+ public boolean initializeDatabase(String dbContentDirPath,
+ ConfigurationManager configManager) throws
PerfSONARException {
+ try {
+
+ DataSourceComponent existDbComponent =
(DataSourceComponent) configManager
+ .getConfiguration()
+
.getAuxiliaryComponent("existDataSource");
+
+ String dbUrl = existDbComponent.getUrl();
+ String
mainCollection=existDbComponent.getMainCollection();
+
+ Collection collection = getMainCollection(dbUrl);
+
+ UserManagementService usrMngmtService =
getUserManagmentService(collection);
+ CollectionManagementService colMngmtService =
getCollectionManagmentService(collection);
+
+ Collection lsCollection =
colMngmtService.createCollection(mainCollection);
+ Collection copyCollection = colMngmtService
+ .createCollection("copy");
+
+ // removes all existing resources from store
collection (remove old
+ // registered service stored in collection)
+ Collection storeCollection = colMngmtService
+
.createCollection(mainCollection+"/store");
+
+ for (String resourceName :
storeCollection.listResources()) {
+ storeCollection.removeResource(storeCollection
+ .getResource(resourceName));
+ }
+
+ User user=createUser(existDbComponent.getUsername(),
+ existDbComponent.getPassword(),
"dba");
+ user.setHome(XmldbURI.xmldbUriFor(mainCollection));
+
+ if (existDbComponent.hasReadOnlyUser()) {
+ User
userRO=createUser(existDbComponent.getUsernameRO(),
+
existDbComponent.getPasswordRO(), "guest");
+ usrMngmtService.addUser(userRO);
+ }
+
+ usrMngmtService.addUser(user);
+
+ // uploadFile("LSStore.xml", dbContentDirPath,
lsCollection);
+
+ uploadFile("LSStore-control.xml", dbContentDirPath,
lsCollection);
+ uploadFile("LSStore-summary.xml", dbContentDirPath,
lsCollection);
+
+ uploadFile("LSStore-summary.xml", dbContentDirPath,
copyCollection);
+
+ return true;
+ } catch (PerfSONARException e) {
+ throw new PerfSONARException(e.getMessage());
+ } catch (XMLDBException e) {
+ throw new PerfSONARException(e.getMessage());
+ } catch (URISyntaxException e) {
+ throw new PerfSONARException(e.getMessage());
+ }
+ }
+
+ @Override
+ protected String getPassword(ConfigurationManager configManager)
+ throws PerfSONARException {
+
+ return ((DataSourceComponent) configManager.getConfiguration()
+
.getAuxiliaryComponent("existDataSource")).getPassword();
+ }
+
+ @Override
+ protected String getUsername(ConfigurationManager configManager)
+ throws PerfSONARException {
+ return ((DataSourceComponent) configManager.getConfiguration()
+
.getAuxiliaryComponent("existDataSource")).getUsername();
+ }
+
+ @Override
+ protected void processRequest(HttpServletRequest req,
+ HttpServletResponse resp) throws PerfSONARException{
+
+ try {
+ PrintWriter out = resp.getWriter();
+ ConfigurationManager configManager;
+ configManager = ConfigurationManager.getInstance();
+ String dbContentDirPath =
getServletContext().getRealPath("/")+"/db";
+ initializeDatabase(dbContentDirPath,
configManager);
+ out.append("DbInitializer - success");
+ } catch (IOException e) {
+ logger.warn(e);
+ }
+
+ }
+}

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/configuration.xml
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,226 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-
-<configuration xmlns="http://service.perfsonar.org/ns/config/base/0.9/";>
-
-
- <service name="xmlls">
-
- <!--
....................................................................................
-->
-
- <!-- Lookup Info of the LS instance -->
-
- <lookupInformation>
- <option name="accessPoint"
value="http://localhost:8080/perfsonar-java-xml-ls/services/LookupService"/>
- <option name="serviceName" value="Geant3 JAVA - XML LS "/>
- <option name="serviceType" value="LS"/>
- </lookupInformation>
-
- <!--
....................................................................................
-->
-
- <!-- Message Handlers - message types and service engines -->
-
- <messageHandler>
-
- <!-- Echo -->
- <message type="EchoRequest"
-
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
- <option name="ServiceEngine"
-
value="org.perfsonar.service.lookupservice.EchoServiceEngine" />
- <option name="authN" value="no" />
- </message>
-
- <!-- Register -->
- <message type="LSRegisterRequest"
-
handler="org.perfsonar.service.lookupservice.LSRegistrationMessageHandler">
- <option name="ServiceEngine"
-
value="org.perfsonar.service.lookupservice.LSRegisterServiceEngine"/>
- <option name="authN" value="no" />
- <option name="minTTL" value="10" />
- <option name="maxTTL" value="100000" />
- </message>
-
- <!-- QUERY -->
- <message type="LSQueryRequest"
-
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
- <option name="ServiceEngine"
-
value="org.perfsonar.service.lookupservice.LSQueryServiceEngine" />
- <option name="authN" value="no" />
- </message>
-
- <!-- Keepalive -->
- <message type="LSKeepaliveRequest"
-
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
- <option name="ServiceEngine"
-
value="org.perfsonar.service.lookupservice.LSKeepaliveServiceEngine" />
- <option name="authN" value="no" />
- </message>
-
- <!-- Deregister -->
- <message type="LSDeregisterRequest"
-
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
- <option name="ServiceEngine"
-
value="org.perfsonar.service.lookupservice.LSDeregisterServiceEngine" />
- <option name="authN" value="no" />
- </message>
-
- </messageHandler>
-
- <!--
....................................................................................
-->
-
- <!-- Additional auxiliary components -->
-
- <auxiliaryComponents>
-
- <!-- exist datasource contains optionally read-only credentials -->
- <component name="existDataSource"
-
className="org.perfsonar.service.lookupservice.components.DataSourceComponent">
- <option name="url"
value="xmldb:exist://localhost:8080/exist/xmlrpc/db"/>
- <option name="username" value="lookupservice"/>
- <option name="password" value="sonar"/>
- <option name="usernameRO" value="guest"/>
- <option name="passwordRO" value="guest"/>
- </component>
-
- <!-- provides access to ExistDb with all permissions -->
- <component name="existAccessManager"
className="org.perfsonar.service.lookupservice.components.XMLDBComponent">
- <option name="dataSource-ref" value="existDataSource"/>
- </component>
-
- <!-- provides access to ExistDb with read-only permissions -->
- <component name="existAccessManagerRO"
className="org.perfsonar.service.lookupservice.components.XMLDBComponent">
- <option name="dataSource-ref" value="existDataSource"/>
- <option name="readOnly" value="true"/>
- </component>
-
- <!-- Lookup Service DAO -->
- <component name="lsdao"
className="org.perfsonar.service.lookupservice.storage.exist.dao.MultipleFilesDAOImpl">
- <option name="dbAccessManager-ref" value="existAccessManager"/>
- </component>
-
- <!-- Lookup Service DAO with read-only permission. It is used in
LSQueryRequest -->
- <component name="lsdao-ro"
className="org.perfsonar.service.lookupservice.storage.exist.dao.MultipleFilesDAOImpl">
- <option name="dbAccessManager-ref" value="existAccessManagerRO"/>
- </component>
-
- <!-- Summarization Service DAO -->
- <component name="summarizationdao"
className="org.perfsonar.service.lookupservice.storage.exist.dao.SummarizationDAOImpl">
- <option name="dbAccessManager-ref" value="existAccessManager"/>
- </component>
-
- <!-- contains a nr of changes in DB - is used to synchronization -->
- <component name="modificationCounterComponent"
className="org.perfsonar.service.lookupservice.components.ModificationCounterComponent"/>
-
-
- <!-- auth configuration -->
- <component name="auth"
className="org.perfsonar.base2.service.authn.component.wssec.WSSecAuthNComponent">
- <option name="as_endpoint"
value="http://homer.rediris.es:8080/geant2-java-as-1.2/services/SimpleService"/>
- <option name="comp_id" value="urn:compId"/>
- </component>
-
-
- <!-- Scheduler -->
- <component name="scheduling"
-
className="org.perfsonar.base2.service.scheduler.SchedulingComponent">
-
- <option name="schedulerClassName"
value="org.perfsonar.base2.service.scheduler.singleThread.SingleThreadScheduler"/>
- <option name="interval" value="60"/> <!-- sec -->
- <actions>
-
- <!--
- action invokes cleanup operations on database. lsTTL -
default value of Time to live parameter.
- After lsTTL time, if service didn't re-register, service will
be removed.
- -->
- <action name="LSCleanup_1"
className="org.perfsonar.service.lookupservice.schedulerActions.CleanupSchedulerAction">
- <option name="status" value="on" />
- <option name="interval" value="300" />
- <option name="lsTTL" value="86400"/>
- </action>
-
- <!--
- this action supports synchronization of summarized data
stored in LSStore-summary with data stored in LSStore.xml
- nrOfModifications - nr of changes in db after which
summarization process is executed immediately
- nrOfIterations - after this nr of iteration if there are
some changes in db - summarization process is executed
- -->
- <action name="LSSummarySynchronization"
className="org.perfsonar.service.lookupservice.schedulerActions.SummarySynchronizationAction">
- <option name="status" value="on" />
- <option name="interval" value="60" />
- <option name="nrOfModifications" value="10"/>
- <option name="nrOfIterations" value="4"/>
- </action>
-
- <action name="registration"
className="org.perfsonar.service.lookupservice.schedulerActions.GLSRegistrationAction">
-
- <option name="status" value="on" />
- <option name="interval" value="43200" />
-
- <option name="registerDataSource"
-
value="org.perfsonar.service.lookupservice.registration.LSSummaryRegisterDataSource"/>
-
- <option name="registerEventType"
-
value="http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/registration/summary/2.0"/>
- <!--
- <option name="registerEventType"
-
value="http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/registration/service/2.0"/>
- -->
- <option name="registrator"
-
value="org.perfsonar.base2.service.registration.GenericLSRegistrator"/>
-
- <!-- define lsAddresses (lsAddress-1,lsAddress-2,..) where
this LS will be registered -->
- <!--
- <option name="lsAddress-1"
-
value="http://localhost:8080/perfsonar-java-xml-ls/services/LookupService"/>
- -->
- <!-- or define localizations of the root.hints
(lsList-1,lsList-2,...) which consists of gls addresses -->
-
- <option name="lsList-1"
value="http://www.perfsonar.net/gls.root.hints"/>
-
- <!-- number of registration to GLS in a single iteration -->
- <option name="nrOfGLSRegistration" value="1"/>
-
- </action>
-
- </actions>
- </component>
-
- </auxiliaryComponents>
-
-
- <!--
....................................................................................
-->
-
- <!-- Protocol mappings, XML elements and their bingings -->
-
- <protocolMappings>
-
-
- <!-- default mapping -->
-
-
- <!-- general mappings -->
- <element name="{http://ggf.org/ns/nmwg/base/2.0/}message";
- mapping="org.perfsonar.base2.xml.nmwg.Message"/>
- <element name="{http://ggf.org/ns/nmwg/base/2.0/}metadata";
- mapping="org.perfsonar.base2.xml.nmwg.Metadata"/>
- <element name="{http://ggf.org/ns/nmwg/base/2.0/}eventType";
- mapping="org.perfsonar.base2.xml.nmwg.EventType"/>
- <element name="{http://ggf.org/ns/nmwg/base/2.0/}data";
- mapping="org.perfsonar.base2.xml.nmwg.Data"/>
- <element name="{*}subject"
- mapping="org.perfsonar.base2.xml.nmwg.Subject"/>
- <element name="{http://ggf.org/ns/nmwg/base/2.0/}parameters";
- mapping="org.perfsonar.base2.xml.nmwg.Parameters"/>
- <element name="{http://ggf.org/ns/nmwg/base/2.0/}parameter";
- mapping="org.perfsonar.base2.xml.nmwg.Parameter"/>
- <element name="*"
- mapping="org.perfsonar.base2.xml.Element"/>
- <element
name="{http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/}subject";

- mapping="org.perfsonar.base2.xml.TextElement"/>
-
-
- </protocolMappings>
-
-
- </service>
-
-
-</configuration>

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml
(from rev 5629,
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/configuration.xml)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,230 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+
+<configuration xmlns="http://service.perfsonar.org/ns/config/base/0.9/";>
+
+
+ <service name="xmlls">
+
+ <!--
....................................................................................
-->
+
+ <!-- Lookup Info of the LS instance -->
+
+ <lookupInformation>
+ <option name="accessPoint"
value="http://localhost:%PORT%/perfsonar-java-xml-ls/services/LookupService"/>
+ <option name="serviceName" value="Geant3 JAVA - XML LS "/>
+ <option name="serviceType" value="LS"/>
+ </lookupInformation>
+
+ <!--
....................................................................................
-->
+
+ <!-- Message Handlers - message types and service engines -->
+
+ <messageHandler>
+
+ <!-- Echo -->
+ <message type="EchoRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.EchoServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ <!-- Register -->
+ <message type="LSRegisterRequest"
+
handler="org.perfsonar.service.lookupservice.LSRegistrationMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSRegisterServiceEngine"/>
+ <option name="authN" value="no" />
+ <option name="minTTL" value="10" />
+ <option name="maxTTL" value="100000" />
+ </message>
+
+ <!-- QUERY -->
+ <message type="LSQueryRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSQueryServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ <!-- Keepalive -->
+ <message type="LSKeepaliveRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSKeepaliveServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ <!-- Deregister -->
+ <message type="LSDeregisterRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSDeregisterServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ </messageHandler>
+
+ <!--
....................................................................................
-->
+
+ <!-- Additional auxiliary components -->
+
+ <auxiliaryComponents>
+
+ <!-- exist datasource contains optionally read-only credentials -->
+ <component name="existDataSource"
+
className="org.perfsonar.service.lookupservice.components.DataSourceComponent">
+ <option name="url"
value="xmldb:exist://localhost:%PORT%/exist/xmlrpc/db/ls"/>
+ <option name="username" value="lookupservice"/>
+ <option name="password" value="sonar"/>
+ <option name="usernameRO" value="guest"/>
+ <option name="passwordRO" value="guest"/>
+ </component>
+
+ <!-- provides access to ExistDb with all permissions -->
+ <component name="existAccessManager"
className="org.perfsonar.service.lookupservice.components.XMLDBComponent">
+ <option name="dataSource-ref" value="existDataSource"/>
+ </component>
+
+ <!-- provides access to ExistDb with read-only permissions -->
+ <component name="existAccessManagerRO"
className="org.perfsonar.service.lookupservice.components.XMLDBComponent">
+ <option name="dataSource-ref" value="existDataSource"/>
+ <option name="readOnly" value="true"/>
+ </component>
+
+ <!-- Lookup Service DAO -->
+ <component name="lsdao"
className="org.perfsonar.service.lookupservice.storage.exist.dao.MultipleFilesDAOImpl">
+ <option name="dbAccessManager-ref" value="existAccessManager"/>
+ </component>
+
+ <!-- Lookup Service DAO with read-only permission. It is used in
LSQueryRequest -->
+ <component name="lsdao-ro"
className="org.perfsonar.service.lookupservice.storage.exist.dao.MultipleFilesDAOImpl">
+ <option name="dbAccessManager-ref" value="existAccessManagerRO"/>
+ </component>
+
+ <!-- Summarization Service DAO -->
+ <component name="summarizationdao"
className="org.perfsonar.service.lookupservice.storage.exist.dao.SummarizationDAOImpl">
+ <option name="dbAccessManager-ref" value="existAccessManager"/>
+ </component>
+
+ <!-- contains a nr of changes in DB - is used to synchronization -->
+ <component name="modificationCounterComponent"
className="org.perfsonar.service.lookupservice.components.ModificationCounterComponent"/>
+
+
+ <!-- auth configuration -->
+ <component name="auth"
className="org.perfsonar.base2.service.authn.component.wssec.WSSecAuthNComponent">
+ <option name="as_endpoint"
value="http://homer.rediris.es:8080/geant2-java-as-1.2/services/SimpleService"/>
+ <option name="comp_id" value="urn:compId"/>
+ </component>
+
+ <!-- MIGRATION COMPONENT -->
+ <component name="migrator"
className="org.perfsonar.base2.service.configuration.migration.MigratorComponent">
+ <option name="config-directory"
value="/usr/lib/perfsonar/services/geant2-java-xml-ls/WEB-INF/classes/perfsonar/conf/"/>
+ </component>
+
+ <!-- Scheduler -->
+ <component name="scheduling"
+
className="org.perfsonar.base2.service.scheduler.SchedulingComponent">
+
+ <option name="schedulerClassName"
value="org.perfsonar.base2.service.scheduler.singleThread.SingleThreadScheduler"/>
+ <option name="interval" value="60"/> <!-- sec -->
+ <actions>
+
+ <!--
+ action invokes cleanup operations on database. lsTTL -
default value of Time to live parameter.
+ After lsTTL time, if service didn't re-register, service will
be removed.
+ -->
+ <action name="LSCleanup_1"
className="org.perfsonar.service.lookupservice.schedulerActions.CleanupSchedulerAction">
+ <option name="status" value="on" />
+ <option name="interval" value="300" />
+ <option name="lsTTL" value="86400"/>
+ </action>
+
+ <!--
+ this action supports synchronization of summarized data
stored in LSStore-summary with data stored in LSStore.xml
+ nrOfModifications - nr of changes in db after which
summarization process is executed immediately
+ nrOfIterations - after this nr of iteration if there are
some changes in db - summarization process is executed
+ -->
+ <action name="LSSummarySynchronization"
className="org.perfsonar.service.lookupservice.schedulerActions.SummarySynchronizationAction">
+ <option name="status" value="on" />
+ <option name="interval" value="60" />
+ <option name="nrOfModifications" value="10"/>
+ <option name="nrOfIterations" value="4"/>
+ </action>
+
+ <action name="registration"
className="org.perfsonar.service.lookupservice.schedulerActions.GLSRegistrationAction">
+
+ <option name="status" value="on" />
+ <option name="interval" value="43200" />
+
+ <option name="registerDataSource"
+
value="org.perfsonar.service.lookupservice.registration.LSSummaryRegisterDataSource"/>
+
+ <option name="registerEventType"
+
value="http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/registration/summary/2.0"/>
+ <!--
+ <option name="registerEventType"
+
value="http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/registration/service/2.0"/>
+ -->
+ <option name="registrator"
+
value="org.perfsonar.base2.service.registration.GenericLSRegistrator"/>
+
+ <!-- define lsAddresses (lsAddress-1,lsAddress-2,..) where
this LS will be registered -->
+ <!--
+ <option name="lsAddress-1"
+
value="http://localhost:8080/perfsonar-java-xml-ls/services/LookupService"/>
+ -->
+ <!-- or define localizations of the root.hints
(lsList-1,lsList-2,...) which consists of gls addresses -->
+
+ <option name="lsList-1"
value="http://www.perfsonar.net/gls.root.hints"/>
+
+ <!-- number of registration to GLS in a single iteration -->
+ <option name="nrOfGLSRegistration" value="1"/>
+
+ </action>
+
+ </actions>
+ </component>
+
+ </auxiliaryComponents>
+
+
+ <!--
....................................................................................
-->
+
+ <!-- Protocol mappings, XML elements and their bingings -->
+
+ <protocolMappings>
+
+
+ <!-- default mapping -->
+
+
+ <!-- general mappings -->
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}message";
+ mapping="org.perfsonar.base2.xml.nmwg.Message"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}metadata";
+ mapping="org.perfsonar.base2.xml.nmwg.Metadata"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}eventType";
+ mapping="org.perfsonar.base2.xml.nmwg.EventType"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}data";
+ mapping="org.perfsonar.base2.xml.nmwg.Data"/>
+ <element name="{*}subject"
+ mapping="org.perfsonar.base2.xml.nmwg.Subject"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}parameters";
+ mapping="org.perfsonar.base2.xml.nmwg.Parameters"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}parameter";
+ mapping="org.perfsonar.base2.xml.nmwg.Parameter"/>
+ <element name="*"
+ mapping="org.perfsonar.base2.xml.Element"/>
+ <element
name="{http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/}subject";

+ mapping="org.perfsonar.base2.xml.TextElement"/>
+
+
+ </protocolMappings>
+
+
+ </service>
+
+
+</configuration>

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml.template
(from rev 5609,
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/configuration.xml.template)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml.template
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/configuration.xml.template
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,225 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+
+<configuration xmlns="http://service.perfsonar.org/ns/config/base/0.9/";>
+
+
+ <service name="xmlls">
+
+ <!--
....................................................................................
-->
+
+ <!-- Lookup Info of the LS instance -->
+
+ <lookupInformation>
+ <option name="accessPoint" value="${service.r.access_point}"/>
+ <option name="serviceName" value="${service.r.service_name}"/>
+ <option name="serviceType" value="${service.r.service_type}"/>
+ </lookupInformation>
+
+ <!--
....................................................................................
-->
+
+ <!-- Message Handlers - message types and service engines -->
+
+ <messageHandler>
+
+ <!-- Echo -->
+ <message type="EchoRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.EchoServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ <!-- Register -->
+ <message type="LSRegisterRequest"
+
handler="org.perfsonar.service.lookupservice.LSRegistrationMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSRegisterServiceEngine"/>
+ <option name="authN" value="no" />
+ <option name="minTTL" value="10" />
+ <option name="maxTTL" value="100000" />
+ </message>
+
+ <!-- QUERY -->
+ <message type="LSQueryRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSQueryServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ <!-- Keepalive -->
+ <message type="LSKeepaliveRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSKeepaliveServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ <!-- Deregister -->
+ <message type="LSDeregisterRequest"
+
handler="org.perfsonar.base2.service.messages.GenericMessageHandler">
+ <option name="ServiceEngine"
+
value="org.perfsonar.service.lookupservice.LSDeregisterServiceEngine" />
+ <option name="authN" value="no" />
+ </message>
+
+ </messageHandler>
+
+ <!--
....................................................................................
-->
+
+ <!-- Additional auxiliary components -->
+
+ <auxiliaryComponents>
+
+ <!-- exist datasource contains optionally read-only credentials -->
+ <component name="existDataSource"
+
className="org.perfsonar.service.lookupservice.components.DataSourceComponent">
+ <option name="url" value="#replace(string
"${service.ls.db_uri}" regexp "http://(.+)/exist/rest/db/(.*)" with
"xmldb:exist://$1/exist/xmlrpc/db/$2")"/>
+ <option name="username" value="${service.ls.db_username}"/>
+ <option name="password" value="${service.ls.db_password}"/>
+ <option name="usernameRO" value="guest"/>
+ <option name="passwordRO" value="guest"/>
+ </component>
+
+ <!-- provides access to ExistDb with all permissions -->
+ <component name="existAccessManager"
className="org.perfsonar.service.lookupservice.components.XMLDBComponent">
+ <option name="dataSource-ref" value="existDataSource"/>
+ </component>
+
+ <!-- provides access to ExistDb with read-only permissions -->
+ <component name="existAccessManagerRO"
className="org.perfsonar.service.lookupservice.components.XMLDBComponent">
+ <option name="dataSource-ref" value="existDataSource"/>
+ <option name="readOnly" value="true"/>
+ </component>
+
+ <!-- Lookup Service DAO -->
+ <component name="lsdao"
className="org.perfsonar.service.lookupservice.storage.exist.dao.MultipleFilesDAOImpl">
+ <option name="dbAccessManager-ref" value="existAccessManager"/>
+ </component>
+
+ <!-- Lookup Service DAO with read-only permission. It is used in
LSQueryRequest -->
+ <component name="lsdao-ro"
className="org.perfsonar.service.lookupservice.storage.exist.dao.MultipleFilesDAOImpl">
+ <option name="dbAccessManager-ref" value="existAccessManagerRO"/>
+ </component>
+
+ <!-- Summarization Service DAO -->
+ <component name="summarizationdao"
className="org.perfsonar.service.lookupservice.storage.exist.dao.SummarizationDAOImpl">
+ <option name="dbAccessManager-ref" value="existAccessManager"/>
+ </component>
+
+ <!-- contains a nr of changes in DB - is used to synchronization -->
+ <component name="modificationCounterComponent"
className="org.perfsonar.service.lookupservice.components.ModificationCounterComponent"/>
+
+
+ <!-- auth configuration -->
+ <component name="auth"
className="org.perfsonar.base2.service.authn.component.wssec.WSSecAuthNComponent">
+ <option name="as_endpoint" value="${service.as.point}"/>
+ <option name="comp_id" value="urn:compId"/>
+ </component>
+
+ <!-- MIGRATION COMPONENT -->
+ <component name="migrator"
className="org.perfsonar.base2.service.configuration.migration.MigratorComponent"
/>
+
+ <!-- Scheduler -->
+ <component name="scheduling"
+
className="org.perfsonar.base2.service.scheduler.SchedulingComponent">
+
+ <option name="schedulerClassName"
value="org.perfsonar.base2.service.scheduler.singleThread.SingleThreadScheduler"/>
+ <option name="interval" value="60"/> <!-- sec -->
+ <actions>
+
+ <!--
+ action invokes cleanup operations on database. lsTTL -
default value of Time to live parameter.
+ After lsTTL time, if service didn't re-register, service will
be removed.
+ -->
+ <action name="LSCleanup_1"
className="org.perfsonar.service.lookupservice.schedulerActions.CleanupSchedulerAction">
+ <option name="status" value="on" />
+ <option name="interval"
value="${component.ls_cleanup_loader.interval}" />
+ <option name="lsTTL" value="${service.ls.ttl}"/>
+ </action>
+
+ <!--
+ this action supports synchronization of summarized data
stored in LSStore-summary with data stored in LSStore.xml
+ nrOfModifications - nr of changes in db after which
summarization process is executed immediately
+ nrOfIterations - after this nr of iteration if there are
some changes in db - summarization process is executed
+ -->
+ <action name="LSSummarySynchronization"
className="org.perfsonar.service.lookupservice.schedulerActions.SummarySynchronizationAction">
+ <option name="status" value="on" />
+ <option name="interval" value="60" />
+ <option name="nrOfModifications" value="10"/>
+ <option name="nrOfIterations" value="4"/>
+ </action>
+
+ <action name="registration"
className="org.perfsonar.service.lookupservice.schedulerActions.GLSRegistrationAction">
+
+ <option name="status" value="on" />
+ <option name="interval"
value="${component.registrator.interval}" />
+
+ <option name="registerDataSource"
+
value="org.perfsonar.service.lookupservice.registration.LSSummaryRegisterDataSource"/>
+
+ <option name="registerEventType"
+
value="http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/registration/summary/2.0"/>
+ <!--
+ <option name="registerEventType"
+
value="http://ogf.org/ns/nmwg/tools/org/perfsonar/service/lookup/registration/service/2.0"/>
+ -->
+ <option name="registrator"
+
value="org.perfsonar.base2.service.registration.GenericLSRegistrator"/>
+
+ <!-- define lsAddresses (lsAddress-1,lsAddress-2,..) where
this LS will be registered -->
+
+#for(var lsAddress string "${service.r.ls_url}" split ",")
+ <option name="lsAddress-#indexer()" value="${lsAddress}"
/>#end()
+
+
+ <!-- number of registration to GLS in a single iteration -->
+ <option name="nrOfGLSRegistration" value="1"/>
+
+ </action>
+
+ </actions>
+ </component>
+
+ </auxiliaryComponents>
+
+
+ <!--
....................................................................................
-->
+
+ <!-- Protocol mappings, XML elements and their bingings -->
+
+ <protocolMappings>
+
+
+ <!-- default mapping -->
+
+
+ <!-- general mappings -->
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}message";
+ mapping="org.perfsonar.base2.xml.nmwg.Message"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}metadata";
+ mapping="org.perfsonar.base2.xml.nmwg.Metadata"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}eventType";
+ mapping="org.perfsonar.base2.xml.nmwg.EventType"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}data";
+ mapping="org.perfsonar.base2.xml.nmwg.Data"/>
+ <element name="{*}subject"
+ mapping="org.perfsonar.base2.xml.nmwg.Subject"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}parameters";
+ mapping="org.perfsonar.base2.xml.nmwg.Parameters"/>
+ <element name="{http://ggf.org/ns/nmwg/base/2.0/}parameter";
+ mapping="org.perfsonar.base2.xml.nmwg.Parameter"/>
+ <element name="*"
+ mapping="org.perfsonar.base2.xml.Element"/>
+ <element
name="{http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/}subject";

+ mapping="org.perfsonar.base2.xml.TextElement"/>
+
+
+ </protocolMappings>
+
+
+ </service>
+
+
+</configuration>

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/webAdminConfig.xml
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/webAdminConfig.xml
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/webAdminConfig.xml
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,444 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-
-<wa:interface
- xmlns:wa="http://webadmin.perfsonar.org/base2/waschema/v20090201";>
-
- <!-- service information cosists of name nad version (only for
displaying purpose) and accessPoint - selfTest -->
- <wa:serviceInformation>
-
<wa:accessPoint>http://localhost:8080/perfsonar-java-xml-ls/services/LookupService</wa:accessPoint>
- <wa:serviceName>Lookup service</wa:serviceName>
- <wa:version>1.5-1</wa:version>
- </wa:serviceInformation>
-
- <!-- credential for WA -->
- <wa:credential>
- <wa:username>perfsonaruser</wa:username>
- <wa:password>perfsonarpass</wa:password>
- </wa:credential>
-
- <wa:basiclink>
- <wa:pageId>basic</wa:pageId> <!-- page identifier -->
- <wa:title>Service settings</wa:title>
- </wa:basiclink>
-
- <wa:basiclink>
- <wa:pageId>changePassword</wa:pageId> <!-- page identifier -->
- <wa:title>Change WA settings</wa:title>
- </wa:basiclink>
-
- <wa:basiclink>
- <wa:redirectTo>initDb</wa:redirectTo>
- <wa:title>Init exist DB</wa:title>
- </wa:basiclink>
-
- <wa:advancedlink>
- <wa:pageId>advanced</wa:pageId> <!-- page identifier -->
- <wa:title>Advanced Service Settings</wa:title>
- </wa:advancedlink>
-
- <wa:advancedlink>
- <wa:redirectTo>/exist</wa:redirectTo>
- <wa:title>Exist configuration</wa:title>
- </wa:advancedlink>
-
- <wa:map>
-
<wa:url>http://service.perfsonar.org/ns/config/base/0.9/</wa:url>
- <wa:ns>ns1</wa:ns>
- </wa:map>
-
- <wa:map>
-
<wa:url>http://webadmin.perfsonar.org/base2/waschema/v20090201</wa:url>
- <wa:ns>webAdmin</wa:ns>
- </wa:map>
-
- <wa:page>
- <wa:pageId><wa:text>changePassword</wa:text></wa:pageId>
- <wa:title><wa:text>Change Password</wa:text></wa:title>
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/webAdminConfig.xml")//webAdmin:interface/webAdmin:credential/webAdmin:username
- </wa:xpath>
- </wa:default>
-
<wa:title><wa:text>username</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
- <wa:plain>
- <wa:password>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/webAdminConfig.xml")//webAdmin:interface/webAdmin:credential/webAdmin:password
- </wa:xpath>
- </wa:default>
-
<wa:title><wa:text>password</wa:text></wa:title>
- </wa:password>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/webAdminConfig.xml")//webAdmin:interface/webAdmin:serviceInformation/webAdmin:accessPoint
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>access point for
service</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- </wa:page>
-
- <wa:page>
- <wa:pageId><wa:text>basic</wa:text></wa:pageId>
- <wa:title><wa:text>Basic configuration</wa:text></wa:title>
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="accessPoint"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Access
point</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceName"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Service
name</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceType"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Service
type</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="username"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Exist DB
username</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="password"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Exist DB
password</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="interval"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>cleanup
interval</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="lsTTL"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>cleanup
lsTTL</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- </wa:page>
-
-
- <wa:page>
- <wa:pageId><wa:text>advanced</wa:text></wa:pageId>
- <wa:title><wa:text>Advanced settings</wa:text></wa:title>
-
- <!-- AUTH -->
-
- <wa:plain>
- <wa:radio>
- <wa:default>
-
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="EchoRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
- </wa:default>
- <wa:title><wa:text>EchoRequest message type
should be authenticated ?</wa:text></wa:title>
-
<wa:values><wa:text>yes,no</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:radio>
- <wa:default>
-
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSRegisterRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
- </wa:default>
- <wa:title><wa:text>LSRegisterRequest message
type should be authenticated ?</wa:text></wa:title>
-
<wa:values><wa:text>yes,no</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:radio>
- <wa:default>
-
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSQueryRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
- </wa:default>
- <wa:title><wa:text>LSQueryRequest message
type should be authenticated ?</wa:text></wa:title>
-
<wa:values><wa:text>yes,no</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:radio>
- <wa:default>
-
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSKeepaliveRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
- </wa:default>
- <wa:title><wa:text>LSKeepaliveRequest message
type should be authenticated ?</wa:text></wa:title>
-
<wa:values><wa:text>yes,no</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:radio>
- <wa:default>
-
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSDeregisterRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
- </wa:default>
- <wa:title><wa:text>LSDeregisterRequest
message type should be authenticated ?</wa:text></wa:title>
-
<wa:values><wa:text>yes,no</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="auth"]/ns1:option[@name="as_endpoint"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>AS
endpoint</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="accessPoint"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Access
point</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceName"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Service
name</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceType"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Service
type</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="url"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Exist DB
url</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="username"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Exist DB
username</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="password"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Exist DB
password</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="usernameRO"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Exist DB username
(read-only)</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="passwordRO"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Exist DB password
(read-only)</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:option[@name="interval"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>Scheduler
interval</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:radio>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="status"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>gls registration enabled
?</wa:text></wa:title>
-
<wa:values><wa:text>on,off</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="interval"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>cleanup
interval</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="lsTTL"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>cleanup
lsTTL</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
-
- <wa:plain>
- <wa:radio>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="status"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>summarization enabled
?</wa:text></wa:title>
-
<wa:values><wa:text>on,off</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="interval"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>summarization
interval</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="nrOfModifications"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>summarization - number of
modification </wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="nrOfIterations"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>summarization - number of
iteration </wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
-
- <wa:plain>
- <wa:radio>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="registration"]/ns1:option[@name="status"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>gls registration enabled
?</wa:text></wa:title>
-
<wa:values><wa:text>on,off</wa:text></wa:values>
- </wa:radio>
- </wa:plain>
-
- <wa:plain>
- <wa:textbox>
- <wa:default>
- <wa:xpath>
-
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="registration"]/ns1:option[@name="interval"]/@value
- </wa:xpath>
- </wa:default>
- <wa:title><wa:text>gls registration
interval</wa:text></wa:title>
- </wa:textbox>
- </wa:plain>
-
- </wa:page>
-
-</wa:interface>

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/webAdminConfig.xml
(from rev 5639,
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/webAdminConfig.xml)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/webAdminConfig.xml
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf/webAdminConfig.xml
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,443 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<wa:interface
+ xmlns:wa="http://webadmin.perfsonar.org/base2/waschema/v20090201";>
+
+ <!-- service information cosists of name nad version (only for
displaying purpose) and accessPoint - selfTest -->
+ <wa:serviceInformation>
+
<wa:accessPoint>http://localhost:%PORT%/perfsonar-java-xml-ls/services/LookupService</wa:accessPoint>
+ <wa:serviceName>Lookup service</wa:serviceName>
+ <wa:version>1.5-1RC3</wa:version>
+ </wa:serviceInformation>
+
+ <!-- credential for WA -->
+ <wa:credential>
+ <wa:username>perfsonaruser</wa:username>
+ <wa:password>perfsonarpass</wa:password>
+ </wa:credential>
+
+ <wa:basiclink>
+ <wa:pageId>basic</wa:pageId> <!-- page identifier -->
+ <wa:title>Service settings</wa:title>
+ </wa:basiclink>
+
+ <wa:basiclink>
+ <wa:pageId>changePassword</wa:pageId> <!-- page identifier -->
+ <wa:title>Change WA settings</wa:title>
+ </wa:basiclink>
+
+ <wa:basiclink>
+ <wa:redirectTo>initDb</wa:redirectTo>
+ <wa:title>Init exist DB</wa:title>
+ </wa:basiclink>
+
+ <wa:advancedlink>
+ <wa:pageId>advanced</wa:pageId> <!-- page identifier -->
+ <wa:title>Advanced Service Settings</wa:title>
+ </wa:advancedlink>
+
+ <wa:advancedlink>
+ <wa:redirectTo>/exist</wa:redirectTo>
+ <wa:title>Exist configuration</wa:title>
+ </wa:advancedlink>
+
+ <wa:map>
+
<wa:url>http://service.perfsonar.org/ns/config/base/0.9/</wa:url>
+ <wa:ns>ns1</wa:ns>
+ </wa:map>
+
+ <wa:map>
+
<wa:url>http://webadmin.perfsonar.org/base2/waschema/v20090201</wa:url>
+ <wa:ns>webAdmin</wa:ns>
+ </wa:map>
+
+ <wa:page>
+ <wa:pageId><wa:text>changePassword</wa:text></wa:pageId>
+ <wa:title><wa:text>Change Password</wa:text></wa:title>
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/webAdminConfig.xml")//webAdmin:interface/webAdmin:credential/webAdmin:username
+ </wa:xpath>
+ </wa:default>
+
<wa:title><wa:text>Username</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+ <wa:plain>
+ <wa:password>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/webAdminConfig.xml")//webAdmin:interface/webAdmin:credential/webAdmin:password
+ </wa:xpath>
+ </wa:default>
+
<wa:title><wa:text>Password</wa:text></wa:title>
+ </wa:password>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/webAdminConfig.xml")//webAdmin:interface/webAdmin:serviceInformation/webAdmin:accessPoint
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Access point for
service</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ </wa:page>
+
+ <wa:page>
+ <wa:pageId><wa:text>basic</wa:text></wa:pageId>
+ <wa:title><wa:text>Basic configuration</wa:text></wa:title>
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="accessPoint"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Access
point</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceName"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Service
name</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceType"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Service
type</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="username"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Exist DB
username</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="password"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Exist DB
password</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="interval"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Cleanup interval (in
sec.)</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="lsTTL"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Cleanup lsTTL (in
sec.)</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ </wa:page>
+
+
+ <wa:page>
+ <wa:pageId><wa:text>advanced</wa:text></wa:pageId>
+ <wa:title><wa:text>Advanced settings</wa:text></wa:title>
+
+ <!-- AUTH -->
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="EchoRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>EchoRequest message type
should be authenticated ?</wa:text></wa:title>
+
<wa:values><wa:text>yes,no</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSRegisterRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>LSRegisterRequest message
type should be authenticated ?</wa:text></wa:title>
+
<wa:values><wa:text>yes,no</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSQueryRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>LSQueryRequest message
type should be authenticated ?</wa:text></wa:title>
+
<wa:values><wa:text>yes,no</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSKeepaliveRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>LSKeepaliveRequest message
type should be authenticated ?</wa:text></wa:title>
+
<wa:values><wa:text>yes,no</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+
<wa:xpath>doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:messageHandler/ns1:message[@type="LSDeregisterRequest"]/ns1:option[@name="authN"]/@value</wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>LSDeregisterRequest
message type should be authenticated ?</wa:text></wa:title>
+
<wa:values><wa:text>yes,no</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="auth"]/ns1:option[@name="as_endpoint"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>AS
endpoint</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="accessPoint"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Access
point</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceName"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Service
name</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:lookupInformation/ns1:option[@name="serviceType"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Service
type</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="url"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Exist DB
url</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="username"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Exist DB
username</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="password"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Exist DB
password</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="usernameRO"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Exist DB username
(read-only)</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="existDataSource"]/ns1:option[@name="passwordRO"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Exist DB password
(read-only)</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:option[@name="interval"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Scheduler
interval</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="status"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Cleanup action enabled
?</wa:text></wa:title>
+
<wa:values><wa:text>on,off</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="interval"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Cleanup
interval</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSCleanup_1"]/ns1:option[@name="lsTTL"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Cleanup
lsTTL</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="status"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Summarization enabled
?</wa:text></wa:title>
+
<wa:values><wa:text>on,off</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="interval"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Summarization
interval</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="nrOfModifications"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Summarization - number of
modification </wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="LSSummarySynchronization"]/ns1:option[@name="nrOfIterations"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Summarization - number of
iteration </wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:radio>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="registration"]/ns1:option[@name="status"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Gls registration enabled
?</wa:text></wa:title>
+
<wa:values><wa:text>on,off</wa:text></wa:values>
+ </wa:radio>
+ </wa:plain>
+
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configuration.xml")//ns1:configuration/ns1:service[@name="xmlls"]/ns1:auxiliaryComponents/ns1:component[@name="scheduling"]/ns1:actions/ns1:action[@name="registration"]/ns1:option[@name="interval"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Gls registration
interval</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+
+ </wa:page>
+
+</wa:interface>

Copied: branches/perfsonar-java-xml-ls-1.5-stable/src/main/webapp/temp (from
rev 5630, trunk/perfsonar-java-xml-ls/src/main/webapp/temp)

Deleted:
branches/perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
2010-03-08 14:13:37 UTC (rev 5530)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -1,83 +0,0 @@
-package org.perfsonar.tests.components;
-
-import junit.framework.TestCase;
-
-import org.perfsonar.base2.service.configuration.ConfigurationManager;
-import org.perfsonar.base2.service.configuration.Option;
-import org.perfsonar.base2.service.exceptions.PerfSONARException;
-import org.perfsonar.service.lookupservice.components.XMLDBComponent;
-import org.xmldb.api.base.ResourceIterator;
-import org.xmldb.api.base.ResourceSet;
-import org.xmldb.api.modules.XPathQueryService;
-
-public class XMLDBComponentTest extends TestCase{
-
- private final String FILE_NAME = "xxxx.xml";
-
-
- public XMLDBComponent getXMLDBComponent() throws PerfSONARException{
- return
(XMLDBComponent)ConfigurationManager.getInstanceWithoutRunningComponents().getConfiguration().getAuxiliaryComponent("existAccessManager");
- }
-
- public XMLDBComponent getXMLDBComponentRO() throws PerfSONARException{
- return
(XMLDBComponent)ConfigurationManager.getInstanceWithoutRunningComponents().getConfiguration().getAuxiliaryComponent("existAccessManagerRO");
- }
-
- public void testXMLDBReadOnlyInitialization() throws
PerfSONARException{
- XMLDBComponent xmlDB=getXMLDBComponentRO();
- assertNotNull(xmlDB);
- Option
readOnlyOption=xmlDB.getOption(XMLDBComponent.READ_ONLY_KEY);
- assertNotNull(readOnlyOption);
- assertTrue(Boolean.valueOf(readOnlyOption.getValue()));
- assertNotNull(xmlDB.getOption(XMLDBComponent.DATASOURCE_KEY));
- }
-
- public void testXMLDBInitialization() throws PerfSONARException{
- XMLDBComponent xmlDB=getXMLDBComponent();
- assertNotNull(xmlDB);
- Option
readOnlyOption=xmlDB.getOption(XMLDBComponent.READ_ONLY_KEY);
- assertNull(readOnlyOption);
- assertNotNull(xmlDB.getOption(XMLDBComponent.DATASOURCE_KEY));
- }
-
- private void uploadFile() throws Exception{
- getXMLDBComponent().uploadStoreFile(FILE_NAME, "<a>text</a>");
- }
-
- private Integer getDocumentCount(XPathQueryService service) throws
Exception {
- ResourceSet rs =
service.query("count(collection('/db/ls/store/')/a)");
-
- ResourceIterator i = rs.getIterator();
- if (i.hasMoreResources()) {
- Integer value = Integer.valueOf((String)
i.nextResource()
- .getContent());
- return value;
- } else {
- throw new RuntimeException("fail !");
- }
- }
-
- public void testUpload() throws Exception {
-
- XMLDBComponent xmlDBComponent=getXMLDBComponent();
- XPathQueryService service = xmlDBComponent.getService();
- uploadFile();
- Integer count = getDocumentCount(service);
- assertTrue(count > 0);
- xmlDBComponent.removeFile(FILE_NAME);
- count = getDocumentCount(service);
- assertTrue(count == 0);
- }
-
- public void testRemove() throws Exception {
-
- XMLDBComponent xmlDBComponent=getXMLDBComponent();
- XPathQueryService service = xmlDBComponent.getService();
- uploadFile();
- xmlDBComponent.removeFile(FILE_NAME);
- Integer count = getDocumentCount(service);
- assertTrue(count == 0);
- }
-
-
-}

Copied:
branches/perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
(from rev 5542,
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java)
===================================================================
---
branches/perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
(rev 0)
+++
branches/perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components/XMLDBComponentTest.java
2010-05-19 08:24:28 UTC (rev 5654)
@@ -0,0 +1,80 @@
+package org.perfsonar.tests.components;
+
+import junit.framework.TestCase;
+
+import org.perfsonar.base2.service.configuration.ConfigurationManager;
+import org.perfsonar.base2.service.configuration.Option;
+import org.perfsonar.base2.service.exceptions.PerfSONARException;
+import org.perfsonar.service.lookupservice.components.XMLDBComponent;
+
+public class XMLDBComponentTest extends TestCase{
+
+// private final String FILE_NAME = "xxxx.xml";
+
+
+ public XMLDBComponent getXMLDBComponent() throws PerfSONARException{
+ return
(XMLDBComponent)ConfigurationManager.getInstanceWithoutRunningComponents().getConfiguration().getAuxiliaryComponent("existAccessManager");
+ }
+
+ public XMLDBComponent getXMLDBComponentRO() throws PerfSONARException{
+ return
(XMLDBComponent)ConfigurationManager.getInstanceWithoutRunningComponents().getConfiguration().getAuxiliaryComponent("existAccessManagerRO");
+ }
+
+ public void testXMLDBReadOnlyInitialization() throws
PerfSONARException{
+ XMLDBComponent xmlDB=getXMLDBComponentRO();
+ assertNotNull(xmlDB);
+ Option
readOnlyOption=xmlDB.getOption(XMLDBComponent.READ_ONLY_KEY);
+ assertNotNull(readOnlyOption);
+ assertTrue(Boolean.valueOf(readOnlyOption.getValue()));
+ assertNotNull(xmlDB.getOption(XMLDBComponent.DATASOURCE_KEY));
+ }
+
+ public void testXMLDBInitialization() throws PerfSONARException{
+ XMLDBComponent xmlDB=getXMLDBComponent();
+ assertNotNull(xmlDB);
+ Option
readOnlyOption=xmlDB.getOption(XMLDBComponent.READ_ONLY_KEY);
+ assertNull(readOnlyOption);
+ assertNotNull(xmlDB.getOption(XMLDBComponent.DATASOURCE_KEY));
+ }
+
+// private void uploadFile() throws Exception{
+// getXMLDBComponent().uploadStoreFile(FILE_NAME, "<a>text</a>");
+// }
+//
+// private Integer getDocumentCount(XPathQueryService service) throws
Exception {
+// ResourceSet rs =
service.query("count(collection('/db/ls/store/')/a)");
+//
+// ResourceIterator i = rs.getIterator();
+// if (i.hasMoreResources()) {
+// Integer value = Integer.valueOf((String)
i.nextResource()
+// .getContent());
+// return value;
+// } else {
+// throw new RuntimeException("fail !");
+// }
+// }
+//
+// public void testUpload() throws Exception {
+//
+// XMLDBComponent xmlDBComponent=getXMLDBComponent();
+// XPathQueryService service = xmlDBComponent.getService();
+// uploadFile();
+// Integer count = getDocumentCount(service);
+// assertTrue(count > 0);
+// xmlDBComponent.removeFile(FILE_NAME);
+// count = getDocumentCount(service);
+// assertTrue(count == 0);
+// }
+
+// public void testRemove() throws Exception {
+//
+// XMLDBComponent xmlDBComponent=getXMLDBComponent();
+// XPathQueryService service = xmlDBComponent.getService();
+// uploadFile();
+// xmlDBComponent.removeFile(FILE_NAME);
+// Integer count = getDocumentCount(service);
+// assertTrue(count == 0);
+// }
+
+
+}



  • [GEANT/SA2/ps-java-services] r5654 - in branches: . perfsonar-java-xml-ls-1.5-stable perfsonar-java-xml-ls-1.5-stable/log4j/production perfsonar-java-xml-ls-1.5-stable/packaging/deb perfsonar-java-xml-ls-1.5-stable/packaging/rpm perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/components perfsonar-java-xml-ls-1.5-stable/src/main/java/org/perfsonar/service/lookupservice/servlets perfsonar-java-xml-ls-1.5-stable/src/main/resources/perfsonar/conf perfsonar-java-xml-ls-1.5-stable/src/main/webapp perfsonar-java-xml-ls-1.5-stable/src/test/java/org/perfsonar/tests/components, svn-noreply, 05/19/2010

Archive powered by MHonArc 2.6.16.

Top of Page