Move to SLC legacy
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Jul 2012 13:52:08 +0000 (13:52 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Jul 2012 13:52:08 +0000 (13:52 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@5492 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

374 files changed:
legacy/modules/org.argeo.slc.agent.ext.jdbc/pom.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.ext.xalan/pom.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.jms/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/common.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/jms.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.jms/agent.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.jms/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.agent.jms/pom.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.ext.activemq/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.ext.activemq/pom.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.activemq/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.activemq/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.activemq/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.activemq/META-INF/spring/activemq-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.activemq/META-INF/spring/activemq.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.activemq/activemq.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.activemq/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.agentproxy/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.agentproxy/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.agentproxy/agentproxy.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.agentproxy/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.castor/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.castor/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.castor/META-INF/spring/castor-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.h2/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.h2/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.h2/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.h2/META-INF/spring/h2-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.h2/META-INF/spring/h2.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.h2/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.h2/h2.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.hibernate/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.hibernate/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/db-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/db.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/transaction-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/transaction.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jcr/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jcr/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jcr/META-INF/spring/jcr-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jcr/META-INF/spring/jcr.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jcr/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jms/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jms/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jms/META-INF/spring/jms-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jms/META-INF/spring/jms.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jms/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.jms/jms.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.main/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.main/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.main/META-INF/spring/eclipseUpdateSite.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.main/META-INF/spring/main.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.main/META-INF/spring/manager.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.main/META-INF/spring/osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.main/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.mysql/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.mysql/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.mysql/META-INF/spring/mysql.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.mysql/META-INF/spring/osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.mysql/mysql.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.services/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.services/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.services/META-INF/spring/services-osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.services/META-INF/spring/services.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.services/build.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.server.services/services.properties [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/.project [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/ajaxplorer-servlet.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/applicationContext.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/doc-servlet.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/jcr-manager-servlet.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/jcr-servlet.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/osgi.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/provisioning-servlet.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/security.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/slc-service-servlet.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/web.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/webdav-config.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/webdav-servlet.xml [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultView.xsl [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultXmlView.xsl [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultXsltView.xsl [new file with mode: 0644]
legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/viewXml.xsl [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/.classpath [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/.project [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/.settings/org.maven.ide.eclipse.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/build.properties [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/pom.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgent.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxy.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxyFactory.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentListener.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentUploader.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsExecutionHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventListener.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventPublisher.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsTreeTestResultListener.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/MarshallerMessageConverter.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/ServiceMessageListenerAdapter.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.activemq/src/main/resources/org/argeo/slc/activemq/destinations.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/.classpath [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/.project [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/build.properties [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/pom.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/site/apt/index.apt [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/.classpath [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/.project [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/build.properties [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/pom.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/assembly/base.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc.bat [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/process/SlcExecutionDaoHibernate.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/runtime/SlcAgentDescriptorDaoHibernate.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/TestRunDescriptorDaoHibernate.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernate.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernate.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/package.html [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/dao.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/ehcache.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/RealizedFlow.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/sessionFactories.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/spring.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/site/apt/index.apt [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/SlcExecutionHibernateTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/CastorTestResultDaoHibernateTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernateTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernateTest.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/log4j.properties [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/withCastor.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/.classpath [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/.project [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/pom.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/ValidatingClientInterceptor.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/WebServiceUtils.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/process/WebServiceSlcExecutionNotifier.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/test/tree/WebServiceTreeTestResultNotifier.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.support.ws.client/src/main/resources/org/argeo/slc/ws/client/spring/applicationContext.xml [new file with mode: 0644]
modules/agent/org.argeo.slc.agent.ext.bsf/pom.xml [deleted file]
modules/agent/org.argeo.slc.agent.ext.jdbc/pom.xml [deleted file]
modules/agent/org.argeo.slc.agent.ext.xalan/pom.xml [deleted file]
modules/agent/org.argeo.slc.agent.jms/.project [deleted file]
modules/agent/org.argeo.slc.agent.jms/META-INF/spring/common.xml [deleted file]
modules/agent/org.argeo.slc.agent.jms/META-INF/spring/jms.xml [deleted file]
modules/agent/org.argeo.slc.agent.jms/META-INF/spring/osgi.xml [deleted file]
modules/agent/org.argeo.slc.agent.jms/agent.properties [deleted file]
modules/agent/org.argeo.slc.agent.jms/build.properties [deleted file]
modules/agent/org.argeo.slc.agent.jms/pom.xml [deleted file]
modules/agent/org.argeo.slc.ext.activemq/.project [deleted file]
modules/agent/org.argeo.slc.ext.activemq/pom.xml [deleted file]
modules/agent/org.argeo.slc.lib.build/.project [deleted file]
modules/agent/org.argeo.slc.lib.build/META-INF/MANIFEST.MF [deleted file]
modules/agent/org.argeo.slc.lib.build/build.properties [deleted file]
modules/server/org.argeo.slc.server.activemq/.project [deleted file]
modules/server/org.argeo.slc.server.activemq/.settings/org.eclipse.pde.core.prefs [deleted file]
modules/server/org.argeo.slc.server.activemq/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.activemq/META-INF/spring/activemq-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.activemq/META-INF/spring/activemq.xml [deleted file]
modules/server/org.argeo.slc.server.activemq/activemq.properties [deleted file]
modules/server/org.argeo.slc.server.activemq/build.properties [deleted file]
modules/server/org.argeo.slc.server.agentproxy/.project [deleted file]
modules/server/org.argeo.slc.server.agentproxy/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy.xml [deleted file]
modules/server/org.argeo.slc.server.agentproxy/agentproxy.properties [deleted file]
modules/server/org.argeo.slc.server.agentproxy/build.properties [deleted file]
modules/server/org.argeo.slc.server.castor/.project [deleted file]
modules/server/org.argeo.slc.server.castor/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.castor/META-INF/spring/castor-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.h2/.project [deleted file]
modules/server/org.argeo.slc.server.h2/.settings/org.eclipse.pde.core.prefs [deleted file]
modules/server/org.argeo.slc.server.h2/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.h2/META-INF/spring/h2-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.h2/META-INF/spring/h2.xml [deleted file]
modules/server/org.argeo.slc.server.h2/build.properties [deleted file]
modules/server/org.argeo.slc.server.h2/h2.properties [deleted file]
modules/server/org.argeo.slc.server.hibernate/.project [deleted file]
modules/server/org.argeo.slc.server.hibernate/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.hibernate/META-INF/spring/db-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.hibernate/META-INF/spring/db.xml [deleted file]
modules/server/org.argeo.slc.server.hibernate/META-INF/spring/transaction-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.hibernate/META-INF/spring/transaction.xml [deleted file]
modules/server/org.argeo.slc.server.jcr/.project [deleted file]
modules/server/org.argeo.slc.server.jcr/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.jcr/META-INF/spring/jcr-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.jcr/META-INF/spring/jcr.xml [deleted file]
modules/server/org.argeo.slc.server.jcr/build.properties [deleted file]
modules/server/org.argeo.slc.server.jms/.project [deleted file]
modules/server/org.argeo.slc.server.jms/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.jms/META-INF/spring/jms-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.jms/META-INF/spring/jms.xml [deleted file]
modules/server/org.argeo.slc.server.jms/build.properties [deleted file]
modules/server/org.argeo.slc.server.jms/jms.properties [deleted file]
modules/server/org.argeo.slc.server.main/.project [deleted file]
modules/server/org.argeo.slc.server.main/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.main/META-INF/spring/eclipseUpdateSite.xml [deleted file]
modules/server/org.argeo.slc.server.main/META-INF/spring/main.xml [deleted file]
modules/server/org.argeo.slc.server.main/META-INF/spring/manager.xml [deleted file]
modules/server/org.argeo.slc.server.main/META-INF/spring/osgi.xml [deleted file]
modules/server/org.argeo.slc.server.main/build.properties [deleted file]
modules/server/org.argeo.slc.server.mysql/.project [deleted file]
modules/server/org.argeo.slc.server.mysql/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.mysql/META-INF/spring/mysql.xml [deleted file]
modules/server/org.argeo.slc.server.mysql/META-INF/spring/osgi.xml [deleted file]
modules/server/org.argeo.slc.server.mysql/mysql.properties [deleted file]
modules/server/org.argeo.slc.server.services/.project [deleted file]
modules/server/org.argeo.slc.server.services/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.server.services/META-INF/spring/services-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.services/META-INF/spring/services.xml [deleted file]
modules/server/org.argeo.slc.server.services/build.properties [deleted file]
modules/server/org.argeo.slc.server.services/services.properties [deleted file]
modules/server/org.argeo.slc.webapp/.project [deleted file]
modules/server/org.argeo.slc.webapp/META-INF/MANIFEST.MF [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/ajaxplorer-servlet.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/applicationContext.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/doc-servlet.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/jcr-manager-servlet.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/jcr-servlet.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/osgi.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/provisioning-servlet.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/security.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/slc-service-servlet.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/web.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/webdav-config.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/webdav-servlet.xml [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultView.xsl [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultXmlView.xsl [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultXsltView.xsl [deleted file]
modules/server/org.argeo.slc.webapp/WEB-INF/xslt/viewXml.xsl [deleted file]
runtime/org.argeo.slc.support.activemq/.classpath [deleted file]
runtime/org.argeo.slc.support.activemq/.project [deleted file]
runtime/org.argeo.slc.support.activemq/.settings/org.eclipse.jdt.core.prefs [deleted file]
runtime/org.argeo.slc.support.activemq/.settings/org.maven.ide.eclipse.prefs [deleted file]
runtime/org.argeo.slc.support.activemq/build.properties [deleted file]
runtime/org.argeo.slc.support.activemq/pom.xml [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgent.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxy.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxyFactory.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentListener.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentUploader.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsExecutionHandler.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventListener.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventPublisher.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsTreeTestResultListener.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/MarshallerMessageConverter.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/ServiceMessageListenerAdapter.java [deleted file]
runtime/org.argeo.slc.support.activemq/src/main/resources/org/argeo/slc/activemq/destinations.xml [deleted file]
runtime/org.argeo.slc.support.castor/.classpath [deleted file]
runtime/org.argeo.slc.support.castor/.project [deleted file]
runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs [deleted file]
runtime/org.argeo.slc.support.castor/build.properties [deleted file]
runtime/org.argeo.slc.support.castor/pom.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java [deleted file]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java [deleted file]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java [deleted file]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java [deleted file]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml [deleted file]
runtime/org.argeo.slc.support.castor/src/site/apt/index.apt [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java [deleted file]
runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties [deleted file]
runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/.classpath [deleted file]
runtime/org.argeo.slc.support.hibernate/.project [deleted file]
runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.jdt.core.prefs [deleted file]
runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.pde.core.prefs [deleted file]
runtime/org.argeo.slc.support.hibernate/build.properties [deleted file]
runtime/org.argeo.slc.support.hibernate/pom.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/assembly/base.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/base/bin/slc [deleted file]
runtime/org.argeo.slc.support.hibernate/src/base/bin/slc.bat [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/process/SlcExecutionDaoHibernate.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/runtime/SlcAgentDescriptorDaoHibernate.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/TestRunDescriptorDaoHibernate.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernate.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernate.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/package.html [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/dao.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/ehcache.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/RealizedFlow.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/sessionFactories.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/spring.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/site/apt/index.apt [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/SlcExecutionHibernateTest.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/CastorTestResultDaoHibernateTest.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernateTest.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernateTest.java [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/resources/log4j.properties [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml [deleted file]
runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/withCastor.xml [deleted file]
runtime/org.argeo.slc.support.ws.client/.classpath [deleted file]
runtime/org.argeo.slc.support.ws.client/.project [deleted file]
runtime/org.argeo.slc.support.ws.client/.settings/org.eclipse.jdt.core.prefs [deleted file]
runtime/org.argeo.slc.support.ws.client/pom.xml [deleted file]
runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/ValidatingClientInterceptor.java [deleted file]
runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/WebServiceUtils.java [deleted file]
runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/process/WebServiceSlcExecutionNotifier.java [deleted file]
runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/test/tree/WebServiceTreeTestResultNotifier.java [deleted file]
runtime/org.argeo.slc.support.ws.client/src/main/resources/org/argeo/slc/ws/client/spring/applicationContext.xml [deleted file]

diff --git a/legacy/modules/org.argeo.slc.agent.ext.jdbc/pom.xml b/legacy/modules/org.argeo.slc.agent.ext.jdbc/pom.xml
new file mode 100644 (file)
index 0000000..929dc59
--- /dev/null
@@ -0,0 +1,30 @@
+<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>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>agent</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.agent.ext.jdbc</artifactId>
+       <name>SLC Agent JDBC Extension</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Fragment-Host>org.springframework.jdbc</Fragment-Host>
+                                               <Import-Package>
+                                                       *,
+                                                       com.mysql.jdbc;resolution:=optional,
+                                                       net.sourceforge.jtds.jdbc;resolution:=optional,
+                                                       org.hsqldb;resolution:=optional
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.agent.ext.xalan/pom.xml b/legacy/modules/org.argeo.slc.agent.ext.xalan/pom.xml
new file mode 100644 (file)
index 0000000..cb8bf1e
--- /dev/null
@@ -0,0 +1,29 @@
+<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>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>agent</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.agent.ext.xalan</artifactId>
+       <name>SLC Agent Xalan Extension</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Fragment-Host>org.argeo.slc.agent.ext.xalan</Fragment-Host>
+                                               <Import-Package>
+                                                       *,
+                                                       com.sun.org.apache.xml.internal.dtm;resolution:=optional,
+                                                       org.w3c.dom.traversal;resolution:=optional
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.agent.jms/.project b/legacy/modules/org.argeo.slc.agent.jms/.project
new file mode 100644 (file)
index 0000000..f9cc4f0
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.agent.jms</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/common.xml b/legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/common.xml
new file mode 100644 (file)
index 0000000..c0ce5e0
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="false">
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:agent.properties</value>
+               </property>
+       </bean>
+
+       <bean id="treeTestResultLogger" class="org.argeo.slc.core.test.tree.TreeTestResultLogger" />
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/jms.xml b/legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/jms.xml
new file mode 100644 (file)
index 0000000..7924dfe
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="false">
+
+       <import resource="classpath:org/argeo/slc/castor/spring.xml" />
+       <import resource="classpath:org/argeo/slc/activemq/destinations.xml" />
+
+       <!-- Agent implementation -->
+       <bean id="jmsAgent" class="org.argeo.slc.jms.JmsAgent"
+               init-method="init" destroy-method="dispose">
+               <property name="agentRegister" ref="slcJms.destination.agent.register" />
+               <property name="agentUnregister" ref="slcJms.destination.agent.unregister" />
+               <property name="modulesManager" ref="modulesManager" />
+               <property name="responseDestination" ref="slcJms.destination.agent.response" />
+               <property name="jmsTemplate" ref="jmsTemplate" />
+       </bean>
+
+       <!-- Listeners -->
+       <bean id="jmsAgent.listener.request" parent="listenerTemplate">
+               <property name="destination" ref="slcJms.destination.agent.request" />
+               <property name="messageSelector">
+                       <bean factory-bean="jmsAgent" factory-method="getMessageSelector" />
+               </property>
+       </bean>
+
+       <bean id="jmsAgent.listener.pingAll" parent="listenerTemplate">
+               <property name="destination" ref="slcJms.destination.agent.pingAll" />
+               <property name="messageListener" ref="jmsAgent" />
+       </bean>
+
+       <!-- Services -->
+       <bean id="resultListener" class="org.argeo.slc.jms.JmsTreeTestResultListener">
+               <property name="executionEventDestination" ref="slcJms.destination.execution.event" />
+               <property name="onlyOnClose" value="${slc.agent.jms.resultListener.onlyOnClose}" />
+               <property name="jmsTemplate" ref="jmsTemplate" />
+       </bean>
+       <bean id="attachmentUploader" class="org.argeo.slc.jms.JmsAttachmentUploader">
+               <property name="destination" ref="slcJms.destination.attachment.add" />
+               <property name="jmsTemplate" ref="jmsTemplate" />
+       </bean>
+       <bean id="slcExecutionListener" class="org.argeo.slc.jms.JmsSlcExecutionNotifier">
+               <property name="executionEventDestination" ref="slcJms.destination.execution.event" />
+               <property name="jmsTemplate" ref="jmsTemplate" />
+       </bean>
+
+       <!-- JMS -->
+       <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
+               <property name="messageConverter">
+                       <bean class="org.argeo.slc.jms.MarshallerMessageConverter">
+                               <property name="disableMarshalling" value="${slc.agent.jms.disableMarshalling}" />
+                               <property name="marshaller" ref="slcDefault.castor.marshaller" />
+                               <property name="unmarshaller" ref="slcDefault.castor.marshaller" />
+                       </bean>
+               </property>
+               <property name="connectionFactory" ref="jmsConnectionFactory" />
+       </bean>
+
+       <bean id="jmsConnectionFactory"
+               class="org.springframework.jms.connection.CachingConnectionFactory">
+               <property name="targetConnectionFactory">
+                       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+                               <property name="brokerURL">
+                                       <value>${slc.server.jms.url}</value>
+                               </property>
+                       </bean>
+               </property>
+       </bean>
+
+       <bean id="jmsTransactionManager"
+               class="org.springframework.jms.connection.JmsTransactionManager">
+               <property name="connectionFactory" ref="jmsConnectionFactory" />
+       </bean>
+
+       <!-- Templates -->
+       <bean id="listenerTemplate"
+               class="org.springframework.jms.listener.DefaultMessageListenerContainer"
+               abstract="true">
+               <property name="connectionFactory" ref="jmsConnectionFactory" />
+               <property name="messageListener" ref="jmsAgent" />
+               <property name="transactionManager" ref="jmsTransactionManager" />
+       </bean>
+
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/osgi.xml b/legacy/modules/org.argeo.slc.agent.jms/META-INF/spring/osgi.xml
new file mode 100644 (file)
index 0000000..6020ed8
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <bundle id="agent" action="start" symbolic-name="org.argeo.slc.agent" />\r
+\r
+       <!-- REFERENCES -->\r
+       <reference id="modulesManager"\r
+               interface="org.argeo.slc.execution.ExecutionModulesManager"\r
+               context-class-loader="service-provider" />\r
+\r
+       <!-- SERVICES -->\r
+       <!-- Deprecated -->\r
+       <service ref="resultListener"\r
+               interface="org.argeo.slc.core.test.tree.TreeTestResultListener" />\r
+       <service ref="resultListener" interface="org.argeo.slc.test.TestResultListener" />\r
+\r
+       <service ref="slcExecutionListener" interface="org.argeo.slc.process.SlcExecutionNotifier" />\r
+\r
+       <service ref="attachmentUploader" interface="org.argeo.slc.core.attachment.AttachmentUploader" />\r
+\r
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.agent.jms/agent.properties b/legacy/modules/org.argeo.slc.agent.jms/agent.properties
new file mode 100644 (file)
index 0000000..d688a74
--- /dev/null
@@ -0,0 +1,5 @@
+slc.server.jms.url=tcp://localhost:61616
+
+# Customization
+slc.agent.jms.disableMarshalling=false
+slc.agent.jms.resultListener.onlyOnClose=false
diff --git a/legacy/modules/org.argeo.slc.agent.jms/build.properties b/legacy/modules/org.argeo.slc.agent.jms/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/legacy/modules/org.argeo.slc.agent.jms/pom.xml b/legacy/modules/org.argeo.slc.agent.jms/pom.xml
new file mode 100644 (file)
index 0000000..d6d154f
--- /dev/null
@@ -0,0 +1,26 @@
+<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>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>agent</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.agent.jms</artifactId>
+       <name>SLC Agent JMS</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Import-Package>
+                                                       *,
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.ext.activemq/.project b/legacy/modules/org.argeo.slc.ext.activemq/.project
new file mode 100644 (file)
index 0000000..c8e5c7d
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.ext.activemq</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.ext.activemq/pom.xml b/legacy/modules/org.argeo.slc.ext.activemq/pom.xml
new file mode 100644 (file)
index 0000000..b124192
--- /dev/null
@@ -0,0 +1,51 @@
+<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>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>agent</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.ext.activemq</artifactId>
+       <name>SLC ActiveMQ Extension</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Fragment-Host>org.apache.activemq</Fragment-Host>
+                                               <Import-Package>
+                                                       *,
+                                                       org.argeo.slc.runtime,
+                                                       org.argeo.slc.execution,
+                                                       org.argeo.slc.msg,
+                                                       org.argeo.slc.build,
+                                                       org.argeo.slc.core.execution,
+                                                       org.argeo.slc.core.attachment,
+                                                       org.argeo.slc.core.structure,
+                                                       org.argeo.slc.core.structure.tree,
+                                                       org.argeo.slc.core.test,
+                                                       org.argeo.slc.core.test.tree,
+                                                       org.argeo.slc.deploy,
+                                                       org.argeo.slc.detached;resolution:=optional,
+                                                       org.argeo.slc.execution,
+                                                       org.argeo.slc.msg,
+                                                       org.argeo.slc.msg.build,
+                                                       org.argeo.slc.msg.event,
+                                                       org.argeo.slc.msg.process,
+                                                       org.argeo.slc.msg.test.tree,
+                                                       org.argeo.slc.process,
+                                                       org.argeo.slc.runtime,
+                                                       org.argeo.slc.test,
+                                                       org.argeo.slc.xml.process;resolution:=optional,
+                                                       org.argeo.slc.xml.test.tree;resolution:=optional,
+                                                       org.hibernate.collection;resolution:=optional
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.activemq/.project b/legacy/modules/org.argeo.slc.server.activemq/.project
new file mode 100644 (file)
index 0000000..872d152
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.activemq</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.activemq/.settings/org.eclipse.pde.core.prefs b/legacy/modules/org.argeo.slc.server.activemq/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..f0ef2f9
--- /dev/null
@@ -0,0 +1,4 @@
+#Sun Feb 14 20:09:09 CET 2010
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/legacy/modules/org.argeo.slc.server.activemq/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.activemq/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..4f2283f
--- /dev/null
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-SymbolicName: org.argeo.slc.server.activemq
+Import-Package: javax.jms,
+ org.apache.activemq,
+ org.argeo.slc.jms,
+ org.springframework.beans.factory.config,
+ org.springframework.jms.connection,
+ org.springframework.jms.support.converter,
+ org.springframework.oxm
+Bundle-Name: Active MQ Server
diff --git a/legacy/modules/org.argeo.slc.server.activemq/META-INF/spring/activemq-osgi.xml b/legacy/modules/org.argeo.slc.server.activemq/META-INF/spring/activemq-osgi.xml
new file mode 100644 (file)
index 0000000..1c63302
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <!-- SERVICES -->\r
+       <service ref="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" />\r
+\r
+       <service ref="jmsCastorMessageConverter"\r
+               interface="org.springframework.jms.support.converter.MessageConverter" />\r
+\r
+       <reference id="marshaller" interface="org.springframework.oxm.Marshaller" />\r
+       <reference id="unmarshaller" interface="org.springframework.oxm.Unmarshaller" />\r
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.activemq/META-INF/spring/activemq.xml b/legacy/modules/org.argeo.slc.server.activemq/META-INF/spring/activemq.xml
new file mode 100644 (file)
index 0000000..ef5f43c
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:activemq.properties</value>
+               </property>
+       </bean>
+
+       <!-- Connection Factory -->
+       <bean id="jmsConnectionFactory"
+               class="org.springframework.jms.connection.CachingConnectionFactory">
+               <property name="targetConnectionFactory">
+                       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+                               <property name="brokerURL">
+                                       <value>${slc.server.jms.url}</value>
+                               </property>
+                       </bean>
+               </property>
+       </bean>
+
+       <bean id="jmsCastorMessageConverter" class="org.argeo.slc.jms.MarshallerMessageConverter">
+               <property name="disableMarshalling" value="${slc.server.jms.disableMarshalling}" />
+               <property name="marshaller" ref="marshaller" />
+               <property name="unmarshaller" ref="unmarshaller" />
+       </bean>
+
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.activemq/activemq.properties b/legacy/modules/org.argeo.slc.server.activemq/activemq.properties
new file mode 100644 (file)
index 0000000..0e524d4
--- /dev/null
@@ -0,0 +1,3 @@
+slc.server.jms.url=tcp://localhost:61616
+
+slc.server.jms.disableMarshalling=false
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.activemq/build.properties b/legacy/modules/org.argeo.slc.server.activemq/build.properties
new file mode 100644 (file)
index 0000000..5f22cdd
--- /dev/null
@@ -0,0 +1 @@
+bin.includes = META-INF/
diff --git a/legacy/modules/org.argeo.slc.server.agentproxy/.project b/legacy/modules/org.argeo.slc.server.agentproxy/.project
new file mode 100644 (file)
index 0000000..b2a0bb1
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.agentproxy</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.agentproxy/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.agentproxy/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..599022d
--- /dev/null
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-SymbolicName: org.argeo.slc.server.agentproxy
+Import-Package: javax.jms,
+ org.apache.activemq.command,
+ org.argeo.slc.activemq,
+ org.argeo.slc.jms,
+ org.argeo.slc.runtime,
+ org.springframework.beans.factory.config,
+ org.springframework.jms.core,
+ org.springframework.jms.support.converter
+Bundle-Name: Agent Proxy
diff --git a/legacy/modules/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy-osgi.xml b/legacy/modules/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy-osgi.xml
new file mode 100644 (file)
index 0000000..874a92a
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <!-- REFERENCES -->
+       <reference id="jmsMessageConverter"
+               interface="org.springframework.jms.support.converter.MessageConverter" />
+       <reference id="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" />
+
+       <!-- SERVICES -->
+       <service ref="agentFactory" interface="org.argeo.slc.runtime.SlcAgentFactory" />
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy.xml b/legacy/modules/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy.xml
new file mode 100644 (file)
index 0000000..e67283c
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <import resource="classpath:org/argeo/slc/activemq/destinations.xml" />
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:agentproxy.properties</value>
+               </property>
+       </bean>
+
+       <!-- Agent Factory -->
+       <bean id="agentFactory" class="org.argeo.slc.jms.JmsAgentProxyFactory">
+               <property name="jmsTemplate">
+                       <bean class="org.springframework.jms.core.JmsTemplate">
+                               <property name="connectionFactory" ref="jmsConnectionFactory" />
+                               <property name="messageConverter" ref="jmsMessageConverter" />
+                               <property name="receiveTimeout" value="${slc.server.jms.agentProxy.timeout}" />
+                       </bean>
+               </property>
+               <property name="requestDestination" ref="slcJms.destination.agent.request" />
+               <property name="responseDestination" ref="slcJms.destination.agent.response" />
+               <property name="pingAllDestination" ref="slcJms.destination.agent.pingAll" />
+       </bean>
+
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.agentproxy/agentproxy.properties b/legacy/modules/org.argeo.slc.server.agentproxy/agentproxy.properties
new file mode 100644 (file)
index 0000000..b003c43
--- /dev/null
@@ -0,0 +1 @@
+slc.server.jms.agentProxy.timeout=20000
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.agentproxy/build.properties b/legacy/modules/org.argeo.slc.server.agentproxy/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/legacy/modules/org.argeo.slc.server.castor/.project b/legacy/modules/org.argeo.slc.server.castor/.project
new file mode 100644 (file)
index 0000000..f40b286
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.castor</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.castor/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.castor/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..b11b449
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-SymbolicName: org.argeo.slc.server.castor
+Import-Package: org.springframework.oxm,
+ org.argeo.slc.castor,
+ org.springframework.oxm.castor
+Bundle-Name: Server Castor
diff --git a/legacy/modules/org.argeo.slc.server.castor/META-INF/spring/castor-osgi.xml b/legacy/modules/org.argeo.slc.server.castor/META-INF/spring/castor-osgi.xml
new file mode 100644 (file)
index 0000000..aaacff8
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <import resource="classpath:org/argeo/slc/castor/spring.xml" />
+
+       <osgi:service ref="slcDefault.castor.marshaller">
+               <osgi:interfaces>
+                       <value>org.springframework.oxm.Marshaller
+                       </value>
+                       <value>org.springframework.oxm.Unmarshaller
+                       </value>
+               </osgi:interfaces>
+       </osgi:service>
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.h2/.project b/legacy/modules/org.argeo.slc.server.h2/.project
new file mode 100644 (file)
index 0000000..431324b
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.h2</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.h2/.settings/org.eclipse.pde.core.prefs b/legacy/modules/org.argeo.slc.server.h2/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..eb0a4dc
--- /dev/null
@@ -0,0 +1,4 @@
+#Tue Jul 13 15:43:47 CEST 2010
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/legacy/modules/org.argeo.slc.server.h2/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.h2/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a84864a
--- /dev/null
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Server H2
+Bundle-SymbolicName: org.argeo.slc.server.h2
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Vendor: Argeo
+Import-Package: net.sf.ehcache.hibernate,
+ org.aopalliance.aop,
+ org.argeo.slc.core.attachment,
+ org.argeo.slc.core.structure,
+ org.argeo.slc.core.structure.tree,
+ org.argeo.slc.core.test,
+ org.argeo.slc.core.test.tree,
+ org.argeo.slc.hibernate,
+ org.argeo.slc.hibernate.attachment,
+ org.argeo.slc.hibernate.process,
+ org.argeo.slc.hibernate.runtime,
+ org.argeo.slc.hibernate.structure,
+ org.argeo.slc.hibernate.test,
+ org.argeo.slc.hibernate.test.tree,
+ org.argeo.slc.process,
+ org.argeo.slc.runtime,
+ org.argeo.slc.test,
+ org.h2,
+ org.h2.jdbcx,
+ org.hibernate,
+ org.hibernate.hql.ast,
+ org.springframework.beans.factory.config,
+ org.springframework.cache.ehcache,
+ org.springframework.jdbc.datasource,
+ org.springframework.orm.hibernate3
diff --git a/legacy/modules/org.argeo.slc.server.h2/META-INF/spring/h2-osgi.xml b/legacy/modules/org.argeo.slc.server.h2/META-INF/spring/h2-osgi.xml
new file mode 100644 (file)
index 0000000..6d7b0e6
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <service ref="sessionFactory" interface="org.hibernate.SessionFactory" />\r
+\r
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.h2/META-INF/spring/h2.xml b/legacy/modules/org.argeo.slc.server.h2/META-INF/spring/h2.xml
new file mode 100644 (file)
index 0000000..fa26f33
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
+       default-lazy-init="false">
+
+       <import resource="classpath:/org/argeo/slc/hibernate/sessionFactories.xml" />
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="ignoreUnresolvablePlaceholders" value="true" />
+               <property name="locations">
+                       <value>osgibundle:h2.properties
+                       </value>
+               </property>
+       </bean>
+
+       <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
+               <property name="dataSource" ref="dataSource" />
+               <property name="hibernateProperties">
+                       <value><![CDATA[
+hibernate.dialect=org.hibernate.dialect.H2Dialect
+hibernate.hbm2ddl.auto=create
+hibernate.current_session_context_class=thread
+               ]]></value>
+               </property>
+       </bean>
+
+       <bean id="dataSource"
+               class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+               <property name="driverClassName" value="org.h2.Driver" />
+               <property name="url" value="${slc.server.h2.url}" />
+               <property name="username" value="sa" />
+               <property name="password" value="" />
+       </bean>
+
+
+       <!--<bean id="dataSource" class="org.h2.jdbcx.JdbcDataSource">
+               <property name="URL" value="${slc.server.h2.url}" />
+               <property name="user" value="sa" />
+               <property name="password" value="" />
+       </bean>
+       
+--></beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.h2/build.properties b/legacy/modules/org.argeo.slc.server.h2/build.properties
new file mode 100644 (file)
index 0000000..5f22cdd
--- /dev/null
@@ -0,0 +1 @@
+bin.includes = META-INF/
diff --git a/legacy/modules/org.argeo.slc.server.h2/h2.properties b/legacy/modules/org.argeo.slc.server.h2/h2.properties
new file mode 100644 (file)
index 0000000..0877043
--- /dev/null
@@ -0,0 +1 @@
+slc.server.h2.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.hibernate/.project b/legacy/modules/org.argeo.slc.server.hibernate/.project
new file mode 100644 (file)
index 0000000..cade579
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.hibernate</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.hibernate/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.hibernate/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..f9dc2f0
--- /dev/null
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-SymbolicName: org.argeo.slc.server.hibernate
+Import-Package: org.aopalliance.aop,
+ org.argeo.slc.core.attachment,
+ org.argeo.slc.core.structure,
+ org.argeo.slc.core.structure.tree,
+ org.argeo.slc.core.test,
+ org.argeo.slc.core.test.tree,
+ org.argeo.slc.dao.process,
+ org.argeo.slc.dao.runtime,
+ org.argeo.slc.dao.test,
+ org.argeo.slc.dao.test.tree,
+ org.argeo.slc.hibernate,
+ org.argeo.slc.hibernate.process,
+ org.argeo.slc.hibernate.runtime,
+ org.argeo.slc.hibernate.test,
+ org.argeo.slc.hibernate.test.tree,
+ org.argeo.slc.process,
+ org.argeo.slc.runtime,
+ org.argeo.slc.test,
+ org.hibernate,
+ org.hibernate.hql.ast,
+ org.hibernate.jdbc,
+ org.springframework.aop,
+ org.springframework.aop.framework,
+ org.springframework.orm.hibernate3,
+ org.springframework.orm.hibernate3.support,
+ org.springframework.transaction,
+ org.springframework.web.context.request
+Bundle-Name: Server Hibernate
diff --git a/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/db-osgi.xml b/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/db-osgi.xml
new file mode 100644 (file)
index 0000000..c85ccd5
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <service interface="org.argeo.slc.dao.process.SlcExecutionDao"\r
+               ref="slcExecutionDao" />\r
+\r
+       <service interface="org.argeo.slc.dao.test.tree.TreeTestResultDao"\r
+               ref="testResultDao" />\r
+       <service interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao"\r
+               ref="testResultCollectionDao" />\r
+       <service interface="org.argeo.slc.dao.test.TestRunDescriptorDao"\r
+               ref="testRunDescriptorDao" />\r
+       <service interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao"\r
+               ref="slcAgentDescriptorDao" />\r
+\r
+       <service\r
+               interface="org.springframework.web.context.request.WebRequestInterceptor"\r
+               ref="osivInterceptor" />\r
+\r
+       <reference id="sessionFactory" interface="org.hibernate.SessionFactory" />\r
+\r
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/db.xml b/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/db.xml
new file mode 100644 (file)
index 0000000..a5d4329
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
+       default-lazy-init="false">
+
+       <import resource="classpath:/org/argeo/slc/hibernate/dao.xml" />
+
+       <!-- DAOs -->
+       <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
+               <property name="sessionFactory" ref="sessionFactory" />
+               <property name="allowCreate" value="false" />
+       </bean>
+
+       <bean id="testResultDao" parent="slcTemplates.dao.testResultDao">
+               <property name="hibernateTemplate" ref="hibernateTemplate" />
+       </bean>
+
+       <bean id="testResultCollectionDao" parent="slcTemplates.dao.testResultCollectionDao">
+               <property name="hibernateTemplate" ref="hibernateTemplate" />
+       </bean>
+
+       <bean id="testRunDescriptorDao" parent="slcTemplates.dao.testRunDescriptorDao">
+               <property name="hibernateTemplate" ref="hibernateTemplate" />
+       </bean>
+
+       <bean id="slcExecutionDao" parent="slcTemplates.dao.slcExecutionDao">
+               <property name="hibernateTemplate" ref="hibernateTemplate" />
+       </bean>
+
+       <bean id="slcAgentDescriptorDao" parent="slcTemplates.dao.slcAgentDescriptorDao">
+               <property name="hibernateTemplate" ref="hibernateTemplate" />
+       </bean>
+
+       <bean id="osivInterceptor"
+               class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
+               <property name="sessionFactory" ref="sessionFactory" />
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/transaction-osgi.xml b/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/transaction-osgi.xml
new file mode 100644 (file)
index 0000000..f951380
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+
+       <service ref="hibernateTransactionManager"
+               interface="org.springframework.transaction.PlatformTransactionManager" />
+
+
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/transaction.xml b/legacy/modules/org.argeo.slc.server.hibernate/META-INF/spring/transaction.xml
new file mode 100644 (file)
index 0000000..7d03b64
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <!-- Transaction -->
+       <bean id="hibernateTransactionManager"
+               class="org.springframework.orm.hibernate3.HibernateTransactionManager"
+               lazy-init="false">
+               <property name="sessionFactory" ref="sessionFactory" />
+       </bean>
+
+       <!-- DAO transactions -->
+       <aop:config>
+               <aop:pointcut id="daoProcessMethods"
+                       expression="execution(* org.argeo.slc.dao.process.*.*(..))" />
+               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoProcessMethods" />
+       </aop:config>
+
+       <aop:config>
+               <aop:pointcut id="daoRuntimeMethods"
+                       expression="execution(* org.argeo.slc.dao.runtime.*.*(..))" />
+               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoRuntimeMethods" />
+       </aop:config>
+
+       <aop:config>
+               <aop:pointcut id="daoTestMethods"
+                       expression="execution(* org.argeo.slc.dao.test.*.*(..))" />
+               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestMethods" />
+       </aop:config>
+
+       <aop:config>
+               <aop:pointcut id="daoTestTreeMethods"
+                       expression="execution(* org.argeo.slc.dao.test.tree.*.*(..))" />
+               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestTreeMethods" />
+       </aop:config>
+
+       <tx:advice id="daoAdvice" transaction-manager="hibernateTransactionManager">
+               <tx:attributes>
+                       <tx:method name="get*" propagation="REQUIRED" read-only="true" />
+                       <tx:method name="list*" propagation="REQUIRED" read-only="true" />
+                       <tx:method name="*" propagation="REQUIRED" />
+               </tx:attributes>
+       </tx:advice>
+
+       <aop:config>
+               <aop:pointcut id="pointcut.services.allMethods"
+                       expression="execution(* org.argeo.slc.services.*.*.*(..))" />
+               <aop:advisor advice-ref="advice.allMethodsRequired"
+                       pointcut-ref="pointcut.services.allMethods" />
+       </aop:config>
+
+       <tx:advice id="advice.allMethodsRequired"
+               transaction-manager="hibernateTransactionManager">
+               <tx:attributes>
+                       <tx:method name="*" propagation="REQUIRED" />
+               </tx:attributes>
+       </tx:advice>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.jcr/.project b/legacy/modules/org.argeo.slc.server.jcr/.project
new file mode 100644 (file)
index 0000000..f2310ab
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.jcr</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.jcr/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.jcr/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a3de4b2
--- /dev/null
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-SymbolicName: org.argeo.slc.server.jcr
+Bundle-Name: Server JCR
+Import-Package: javax.jcr,
+ org.argeo.jcr,
+ org.argeo.jcr.mvc,
+ org.argeo.jcr.spring,
+ org.argeo.security,
+ org.argeo.security.core,
+ org.argeo.security.jcr,
+ org.argeo.slc.core.attachment,
+ org.argeo.slc.core.execution,
+ org.argeo.slc.core.structure,
+ org.argeo.slc.core.structure.tree,
+ org.argeo.slc.core.test,
+ org.argeo.slc.core.test.tree,
+ org.argeo.slc.dao.process,
+ org.argeo.slc.dao.runtime,
+ org.argeo.slc.dao.test,
+ org.argeo.slc.dao.test.tree,
+ org.argeo.slc.execution,
+ org.argeo.slc.jcr,
+ org.argeo.slc.jcr.dao,
+ org.argeo.slc.jcr.execution,
+ org.argeo.slc.process,
+ org.argeo.slc.runtime,
+ org.argeo.slc.test,
+ org.springframework.beans.factory.config,
+ org.springframework.osgi.util,
+ org.springframework.security;specification-version="2.0.6.RELEASE",
+ org.springframework.web.context.request
diff --git a/legacy/modules/org.argeo.slc.server.jcr/META-INF/spring/jcr-osgi.xml b/legacy/modules/org.argeo.slc.server.jcr/META-INF/spring/jcr-osgi.xml
new file mode 100644 (file)
index 0000000..1bf1809
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xmlns:util="http://www.springframework.org/schema/util"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+       http://www.springframework.org/schema/util\r
+       http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
+\r
+       <!-- REFERENCES -->\r
+       <reference id="repository" interface="javax.jcr.Repository"\r
+               filter="(argeo.jcr.repository.alias=slc)" />\r
+\r
+       <reference id="modulesManager"\r
+               interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
+       <reference id="authenticationManager"\r
+               interface="org.springframework.security.AuthenticationManager" />\r
+\r
+       <!-- SERVICES -->\r
+       <service interface="org.argeo.slc.execution.ExecutionModulesListener"\r
+               ref="executionModulesListener" />\r
+       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgentFactory">\r
+               <service-properties>\r
+                       <beans:entry>\r
+                               <beans:key>\r
+                                       <util:constant static-field="org.argeo.slc.jcr.SlcJcrConstants.PROPERTY_PATH" />\r
+                               </beans:key>\r
+                               <util:constant\r
+                                       static-field="org.argeo.slc.jcr.SlcJcrConstants.VM_AGENT_FACTORY_PATH" />\r
+                       </beans:entry>\r
+               </service-properties>\r
+       </service>\r
+       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgent" />\r
+\r
+       <!-- <service interface="org.argeo.slc.dao.process.SlcExecutionDao" -->\r
+       <!-- ref="slcExecutionDao" /> -->\r
+       <!-- <service interface="org.argeo.slc.dao.test.tree.TreeTestResultDao" -->\r
+       <!-- ref="testResultDao" /> -->\r
+       <!-- <service interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao" -->\r
+       <!-- ref="testResultCollectionDao" /> -->\r
+       <!-- <service interface="org.argeo.slc.dao.test.TestRunDescriptorDao" -->\r
+       <!-- ref="testRunDescriptorDao" /> -->\r
+       <!-- <service interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao" -->\r
+       <!-- ref="slcAgentDescriptorDao" /> -->\r
+\r
+       <!-- <service -->\r
+       <!-- interface="org.springframework.web.context.request.WebRequestInterceptor" -->\r
+       <!-- ref="osivInterceptor" /> -->\r
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.jcr/META-INF/spring/jcr.xml b/legacy/modules/org.argeo.slc.server.jcr/META-INF/spring/jcr.xml
new file mode 100644 (file)
index 0000000..ba5e1e1
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <!-- <bean -->\r
+       <!-- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> -->\r
+       <!-- <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" \r
+               /> -->\r
+       <!-- <property name="locations"> -->\r
+       <!-- <value>osgibundle:jcr.properties</value> -->\r
+       <!-- </property> -->\r
+       <!-- </bean> -->\r
+\r
+       <bean id="agent" class="org.argeo.slc.jcr.execution.JcrAgent"\r
+               init-method="init" destroy-method="dispose">\r
+               <property name="session" ref="session" />\r
+               <property name="modulesManager" ref="modulesManager" />\r
+       </bean>\r
+\r
+       <bean id="executionModulesListener" class="org.argeo.slc.jcr.execution.JcrExecutionModulesListener"\r
+               init-method="init" destroy-method="dispose">\r
+               <property name="agent" ref="agent" />\r
+               <property name="session" ref="session" />\r
+       </bean>\r
+\r
+       <bean id="session" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
+               <property name="repository" ref="repository" />\r
+       </bean>\r
+\r
+       <bean class="org.argeo.security.core.SystemExecutionBeanPostProcessor">\r
+               <property name="authenticationManager" ref="authenticationManager" />\r
+       </bean>\r
+\r
+       <!-- <bean id="slcAgentDescriptorDao" class="org.argeo.slc.jcr.dao.SlcAgentDescriptorDaoJcr" -->\r
+       <!-- init-method="init"> -->\r
+       <!-- <property name="session" ref="jcrSession" /> -->\r
+       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="testRunDescriptorDao" class="org.argeo.slc.jcr.dao.TestRunDescriptorDaoJcr" -->\r
+       <!-- init-method="init"> -->\r
+       <!-- <property name="session" ref="jcrSession" /> -->\r
+       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="slcExecutionDao" class="org.argeo.slc.jcr.dao.SlcExecutionDaoJcr" -->\r
+       <!-- init-method="init"> -->\r
+       <!-- <property name="session" ref="jcrSession" /> -->\r
+       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="nodeMapperProvider" class="org.argeo.slc.jcr.dao.SlcNodeMapperProvider" -->\r
+       <!-- init-method="init"> -->\r
+       <!-- <property name="defaultNodeMapper" ref="nodeMapper" /> -->\r
+       <!-- <property name="treeTestResultNodeMapper" ref="treeTestResultNodeMapper" \r
+               /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="testResultDao" class="org.argeo.slc.jcr.dao.TreeTestResultDaoJcr" -->\r
+       <!-- init-method="init"> -->\r
+       <!-- <property name="session" ref="jcrSession" /> -->\r
+       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="testResultCollectionDao" class="org.argeo.slc.jcr.dao.TreeTestResultCollectionDaoJcr" -->\r
+       <!-- init-method="init"> -->\r
+       <!-- <property name="session" ref="jcrSession" /> -->\r
+       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="osivInterceptor" -->\r
+       <!-- class="org.argeo.server.jcr.mvc.OpenSessionInViewJcrInterceptor"> -->\r
+       <!-- <property name="session" ref="jcrSession" /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="bundleClassLoader" -->\r
+       <!-- class="org.springframework.osgi.util.BundleDelegatingClassLoader" -->\r
+       <!-- factory-method="createBundleClassLoaderFor"> -->\r
+       <!-- <constructor-arg> -->\r
+       <!-- <bean factory-bean="bundleContext" factory-method="getBundle" /> -->\r
+       <!-- </constructor-arg> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="nodeMapper" class="org.argeo.jcr.BeanNodeMapper"> -->\r
+       <!-- <property name="classLoader" ref="bundleClassLoader" /> -->\r
+       <!-- </bean> -->\r
+\r
+       <!-- <bean id="treeTestResultNodeMapper" class="org.argeo.slc.jcr.dao.TreeTestResultNodeMapper"> -->\r
+       <!-- <property name="classLoader" ref="bundleClassLoader" /> -->\r
+       <!-- </bean> -->\r
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.jcr/build.properties b/legacy/modules/org.argeo.slc.server.jcr/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/legacy/modules/org.argeo.slc.server.jms/.project b/legacy/modules/org.argeo.slc.server.jms/.project
new file mode 100644 (file)
index 0000000..34ade02
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.jms</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.jms/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.jms/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a7a76c1
--- /dev/null
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-SymbolicName: org.argeo.slc.server.jms
+Import-Package: javax.jms,
+ javax.management.j2ee.statistics,
+ org.apache.activemq,
+ org.apache.activemq.command,
+ org.apache.commons.logging,
+ org.argeo.security,
+ org.argeo.security.core,
+ org.argeo.slc.activemq,
+ org.argeo.slc.core.attachment,
+ org.argeo.slc.jms,
+ org.argeo.slc.msg.event,
+ org.argeo.slc.services,
+ org.springframework.beans.factory.config,
+ org.springframework.jms.core,
+ org.springframework.jms.listener,
+ org.springframework.jms.listener.adapter,
+ org.springframework.jms.support.converter,
+ org.springframework.transaction
+Bundle-Name: Server JMS
diff --git a/legacy/modules/org.argeo.slc.server.jms/META-INF/spring/jms-osgi.xml b/legacy/modules/org.argeo.slc.server.jms/META-INF/spring/jms-osgi.xml
new file mode 100644 (file)
index 0000000..0f900ba
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       osgi:default-timeout="5000">
+
+       <!-- REFERENCES -->
+       <reference id="agentService" interface="org.argeo.slc.services.AgentService" />
+       <reference id="testManagerService" interface="org.argeo.slc.services.TestManagerService" />
+       <reference id="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" />
+
+       <reference id="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" />
+       <reference id="jmsMessageConverter"
+               interface="org.springframework.jms.support.converter.MessageConverter" />
+
+       <reference id="attachmentsStorage"
+               interface="org.argeo.slc.core.attachment.AttachmentsStorage" />
+       <reference id="systemExecutionService" interface="org.argeo.security.SystemExecutionService" />
+
+       <!-- SERVICES -->
+       <service ref="jmsEventListener" interface="org.argeo.slc.msg.event.SlcEventListener" />
+       <service ref="jmsEventPublisher" interface="org.argeo.slc.msg.event.SlcEventPublisher" />
+
+
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.jms/META-INF/spring/jms.xml b/legacy/modules/org.argeo.slc.server.jms/META-INF/spring/jms.xml
new file mode 100644 (file)
index 0000000..b7e3791
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <import resource="classpath:org/argeo/slc/activemq/destinations.xml" />
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:jms.properties</value>
+               </property>
+       </bean>
+
+       <!-- Attachments -->
+       <bean id="attachmentStorage.jmsContainer.add" parent="listenerContainer">
+               <property name="destination" ref="slcJms.destination.attachment.add" />
+               <property name="messageListener">
+                       <bean class="org.argeo.slc.jms.JmsAttachmentListener">
+                               <property name="attachmentsStorage" ref="attachmentsStorage" />
+                       </bean>
+               </property>
+       </bean>
+
+       <!-- Events -->
+       <bean id="jmsEventListener" class="org.argeo.slc.jms.JmsSlcEventListener"
+               init-method="init" destroy-method="close">
+               <property name="jmsConnectionFactory">
+                       <!-- Need its own connection factory in order to set client ids (not possible 
+                               on pool) -->
+                       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+                               <property name="brokerURL">
+                                       <value>${slc.server.jms.url}</value>
+                                       <!--<value>vm://localhost</value> -->
+                               </property>
+                       </bean>
+               </property>
+               <property name="eventsDestination" ref="slcJms.destination.events" />
+               <property name="messageConverter" ref="jmsMessageConverter" />
+       </bean>
+
+       <bean id="jmsEventPublisher" class="org.argeo.slc.jms.JmsSlcEventPublisher">
+               <property name="jmsTemplate" ref="jmsTemplate" />
+               <property name="eventsDestination" ref="slcJms.destination.events" />
+       </bean>
+
+       <!-- Agent Service -->
+       <bean id="agentService.jmsContainer.register" parent="listenerContainer">
+               <property name="destination" ref="slcJms.destination.agent.register" />
+               <property name="messageListener">
+                       <bean parent="listenerAdapterCastor">
+                               <constructor-arg ref="agentService" />
+                               <property name="defaultListenerMethod" value="register" />
+                       </bean>
+               </property>
+       </bean>
+
+       <bean id="agentService.jmsContainer.unregister" parent="listenerContainer">
+               <property name="destination" ref="slcJms.destination.agent.unregister" />
+               <property name="messageListener">
+                       <bean parent="listenerAdapterCastor">
+                               <constructor-arg ref="agentService" />
+                               <property name="defaultListenerMethod" value="unregister" />
+                       </bean>
+               </property>
+       </bean>
+
+       <bean parent="listenerContainer">
+               <property name="destination" ref="slcJms.destination.execution.event" />
+               <property name="messageListener">
+                       <bean class="org.argeo.slc.jms.JmsExecutionHandler">
+                               <property name="messageConverter" ref="jmsMessageConverter" />
+                               <property name="serviceMsgHandler">
+                                       <bean class="org.argeo.slc.services.ServiceMsgHandler">
+                                               <property name="slcExecutionService" ref="slcExecutionService" />
+                                               <property name="testManagerService" ref="testManagerService" />
+                                       </bean>
+                               </property>
+                       </bean>
+               </property>
+       </bean>
+
+       <!-- Common -->
+       <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
+               <property name="messageConverter" ref="jmsMessageConverter" />
+               <property name="connectionFactory" ref="jmsConnectionFactory" />
+       </bean>
+
+       <!-- Templates -->
+       <bean id="listenerContainer"
+               class="org.springframework.jms.listener.DefaultMessageListenerContainer"
+               abstract="true">
+               <property name="connectionFactory" ref="jmsConnectionFactory" />
+               <!-- <property name="transactionManager" ref="jmsTransactionManager" /> -->
+               <property name="taskExecutor">
+                       <bean class="org.argeo.security.core.AsyncSystemTaskExecutor">
+                               <property name="systemExecutionService" ref="systemExecutionService" />
+                       </bean>
+               </property>
+       </bean>
+
+       <bean id="listenerAdapterCastor"
+               class="org.springframework.jms.listener.adapter.MessageListenerAdapter"
+               abstract="true">
+               <property name="messageConverter" ref="jmsMessageConverter" />
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.jms/build.properties b/legacy/modules/org.argeo.slc.server.jms/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/legacy/modules/org.argeo.slc.server.jms/jms.properties b/legacy/modules/org.argeo.slc.server.jms/jms.properties
new file mode 100644 (file)
index 0000000..8244f4b
--- /dev/null
@@ -0,0 +1,2 @@
+# TODO: duplicated with activemq bundle!
+slc.server.jms.url=tcp://localhost:61616
diff --git a/legacy/modules/org.argeo.slc.server.main/.project b/legacy/modules/org.argeo.slc.server.main/.project
new file mode 100644 (file)
index 0000000..9b86d44
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.main</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.main/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.main/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..4dc489f
--- /dev/null
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Require-Bundle: org.argeo.slc.specs,org.argeo.slc.support.equinox
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Name: SLC Server Main
+Bundle-SymbolicName: org.argeo.slc.server.main
+Import-Package: org.argeo.slc.build,org.argeo.slc.osgi.build
diff --git a/legacy/modules/org.argeo.slc.server.main/META-INF/spring/eclipseUpdateSite.xml b/legacy/modules/org.argeo.slc.server.main/META-INF/spring/eclipseUpdateSite.xml
new file mode 100644 (file)
index 0000000..6e8775c
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <bean id="eclipseUpdateSite" class="org.argeo.slc.osgi.build.EclipseUpdateSite">
+               <property name="features">
+                       <list>
+                               <bean class="org.argeo.slc.osgi.build.EclipseUpdateSiteFeature">
+                                       <property name="name" value="org.argeo.slc.dep.agent" />
+                               </bean>
+                               <bean class="org.argeo.slc.osgi.build.EclipseUpdateSiteFeature">
+                                       <property name="name" value="org.argeo.slc.dep.detached" />
+                               </bean>
+                       </list>
+               </property>
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.main/META-INF/spring/main.xml b/legacy/modules/org.argeo.slc.server.main/META-INF/spring/main.xml
new file mode 100644 (file)
index 0000000..5a763ad
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <!-- Security -->
+       <bundle id="security.ldap" symbolic-name="org.argeo.security.dao.ldap"
+               action="start" />
+       <bundle id="security.services" symbolic-name="org.argeo.security.services"
+               action="start" />
+
+       <!-- Servers -->
+       <bundle id="activemq.broker" symbolic-name="org.argeo.server.activemq.broker"
+               action="start" />
+
+       <!-- SLC Middleware -->
+       <bundle id="castor" symbolic-name="org.argeo.slc.server.castor"
+               action="start" />
+       <bundle id="activemq" symbolic-name="org.argeo.slc.server.activemq"
+               action="start" />
+       <bundle id="agentProxy" symbolic-name="org.argeo.slc.server.agentproxy"
+               action="start" />
+       <bundle id="services" symbolic-name="org.argeo.slc.server.services"
+               action="start" />
+       <bundle id="jms" symbolic-name="org.argeo.slc.server.jms"
+               action="start" />
+
+       <!-- Web -->
+       <bundle id="spring.osgi.web.extender" symbolic-name="org.springframework.osgi.web.extender"
+               action="start" />
+       <bundle id="catalina" symbolic-name="org.argeo.dep.osgi.catalina.start"
+               action="start" />
+
+       <!-- Web app start order is important! Security should be first -->
+       <!-- <bundle id="security.webapp" symbolic-name="org.argeo.security.webapp" -->
+       <!-- action="start" /> -->
+       <bundle id="slc.webapp" symbolic-name="org.argeo.slc.webapp"
+               action="start" />
+
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.main/META-INF/spring/manager.xml b/legacy/modules/org.argeo.slc.server.main/META-INF/spring/manager.xml
new file mode 100644 (file)
index 0000000..bf342bb
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <bean id="dynamicRuntime" class="org.argeo.slc.equinox.EquinoxRuntime" />
+       <bean id="modularDistribution" class="org.argeo.slc.osgi.build.OsgiRuntimeModularDistribution">
+               <property name="eclipseUpdateSite" ref="eclipseUpdateSite" />
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.main/META-INF/spring/osgi.xml b/legacy/modules/org.argeo.slc.server.main/META-INF/spring/osgi.xml
new file mode 100644 (file)
index 0000000..50237f4
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <service ref="dynamicRuntime" interface="org.argeo.slc.deploy.DynamicRuntime" />
+       <service ref="modularDistribution" interface="org.argeo.slc.build.ModularDistribution" />
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.main/build.properties b/legacy/modules/org.argeo.slc.server.main/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/legacy/modules/org.argeo.slc.server.mysql/.project b/legacy/modules/org.argeo.slc.server.mysql/.project
new file mode 100644 (file)
index 0000000..a45bb02
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.mysql</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.mysql/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.mysql/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..29ddc60
--- /dev/null
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Require-Bundle: org.argeo.slc.specs,org.argeo.slc.core
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Name: Argeo SLC MySQL
+Bundle-SymbolicName: org.argeo.slc.server.mysql
+Import-Package: com.mysql.jdbc,
+ net.sf.ehcache.hibernate,
+ org.apache.commons.dbcp,
+ org.hibernate,
+ org.hibernate.hql.ast,
+ org.springframework.beans.factory.config,
+ org.springframework.cache.ehcache,
+ org.springframework.jdbc.datasource,
+ org.springframework.orm.hibernate3
diff --git a/legacy/modules/org.argeo.slc.server.mysql/META-INF/spring/mysql.xml b/legacy/modules/org.argeo.slc.server.mysql/META-INF/spring/mysql.xml
new file mode 100644 (file)
index 0000000..4f85f56
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
+       default-lazy-init="false">
+
+       <import resource="classpath:/org/argeo/slc/hibernate/spring.xml" />
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:mysql.properties
+                       </value>
+               </property>
+       </bean>
+
+       <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
+               <property name="dataSource" ref="dataSource" />
+               <property name="hibernateProperties">
+                       <value><![CDATA[
+                hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
+                hibernate.hbm2ddl.auto=update
+                hibernate.connection.autocommit=false
+            ]]></value>
+               </property>
+       </bean>
+       <!--
+               <bean id="dataSource"
+               class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
+               <property name="targetDataSource"> <bean
+               class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
+               destroy-method="destroy"> <property name="driverClassName"
+               value="com.mysql.jdbc.Driver" /> <property name="url"
+               value="jdbc:mysql://localhost/sparta_prod" /> <property
+               name="username" value="root" /> <property name="password" value="" />
+               <property name="suppressClose" value="true" /> <property
+               name="autoCommit" value="false" /> </bean> </property> </bean>
+       -->
+       <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
+               destroy-method="close">
+               <property name="driverClassName" value="com.mysql.jdbc.Driver" />
+               <property name="url" value="${jdbc.url}" />
+               <property name="username" value="${jdbc.username}" />
+               <property name="password" value="${jdbc.password}" />
+               <property name="testOnBorrow" value="true" />
+               <property name="validationQuery" value="SELECT 1" />
+               <property name="maxActive" value="10" />
+               <property name="maxIdle" value="2" />
+       </bean>
+
+
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.mysql/META-INF/spring/osgi.xml b/legacy/modules/org.argeo.slc.server.mysql/META-INF/spring/osgi.xml
new file mode 100644 (file)
index 0000000..6d7b0e6
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <service ref="sessionFactory" interface="org.hibernate.SessionFactory" />\r
+\r
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.mysql/mysql.properties b/legacy/modules/org.argeo.slc.server.mysql/mysql.properties
new file mode 100644 (file)
index 0000000..11a0d55
--- /dev/null
@@ -0,0 +1,3 @@
+jdbc.url=jdbc:mysql://localhost/slc
+jdbc.username=root
+jdbc.password=
diff --git a/legacy/modules/org.argeo.slc.server.services/.project b/legacy/modules/org.argeo.slc.server.services/.project
new file mode 100644 (file)
index 0000000..21e00d8
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.services</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.server.services/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.server.services/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..54cab2c
--- /dev/null
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Name: SLC Server Services
+Bundle-SymbolicName: org.argeo.slc.server.services
+Import-Package: org.aopalliance.aop,
+ org.argeo.security,
+ org.argeo.slc.core.attachment,
+ org.argeo.slc.dao.process,
+ org.argeo.slc.dao.runtime,
+ org.argeo.slc.dao.test,
+ org.argeo.slc.dao.test.tree,
+ org.argeo.slc.msg.event,
+ org.argeo.slc.msg.process,
+ org.argeo.slc.process,
+ org.argeo.slc.runtime,
+ org.argeo.slc.services,
+ org.argeo.slc.services.impl,
+ org.hibernate.jdbc,
+ org.springframework.aop,
+ org.springframework.aop.framework,
+ org.springframework.beans.factory.config
diff --git a/legacy/modules/org.argeo.slc.server.services/META-INF/spring/services-osgi.xml b/legacy/modules/org.argeo.slc.server.services/META-INF/spring/services-osgi.xml
new file mode 100644 (file)
index 0000000..0b80c6e
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <!-- REFERENCES -->
+       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultDao"
+               id="testResultDao" />
+       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao"
+               id="testResultCollectionDao" />
+       <reference interface="org.argeo.slc.dao.test.TestRunDescriptorDao"
+               id="testRunDescriptorDao" />
+       <reference interface="org.argeo.slc.dao.process.SlcExecutionDao"
+               id="slcExecutionDao" />
+       <reference interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao"
+               id="slcAgentDescriptorDao" />
+
+       <reference id="agentFactory" interface="org.argeo.slc.runtime.SlcAgentFactory" />
+
+       <list id="eventPublishers" interface="org.argeo.slc.msg.event.SlcEventPublisher"
+               cardinality="0..N" />
+
+       <reference id="systemExecutor" interface="org.argeo.security.SystemExecutionService" />
+
+       <!-- SERVICES -->
+       <service ref="testManagerService" interface="org.argeo.slc.services.TestManagerService" />
+       <service ref="agentService" interface="org.argeo.slc.services.AgentService" />
+       <service ref="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" />
+       <service ref="attachmentsStorage">
+               <interfaces>
+                       <beans:value>org.argeo.slc.core.attachment.AttachmentsStorage
+                       </beans:value>
+                       <beans:value>org.argeo.slc.core.attachment.AttachmentUploader
+                       </beans:value>
+               </interfaces>
+       </service>
+
+
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.services/META-INF/spring/services.xml b/legacy/modules/org.argeo.slc.server.services/META-INF/spring/services.xml
new file mode 100644 (file)
index 0000000..39f318f
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="ignoreUnresolvablePlaceholders" value="true" />
+               <property name="locations">
+                       <value>osgibundle:services.properties
+                       </value>
+               </property>
+       </bean>
+
+       <!-- Attachments -->
+       <bean id="attachmentsStorage" class="org.argeo.slc.core.attachment.FileAttachmentsStorage"></bean>
+
+       <!-- Events -->
+       <aop:aspectj-autoproxy />
+
+       <bean id="eventPublisherAspect" class="org.argeo.slc.services.EventPublisherAspect">
+               <property name="eventPublishers" ref="eventPublishers" />
+       </bean>
+
+       <!-- Services -->
+       <bean id="testManagerService" class="org.argeo.slc.services.impl.TestManagerServiceImpl">
+               <constructor-arg ref="testResultDao" />
+               <constructor-arg ref="testRunDescriptorDao" />
+               <constructor-arg ref="slcExecutionDao" />
+               <constructor-arg ref="testResultCollectionDao" />
+       </bean>
+
+       <bean id="agentService" class="org.argeo.slc.services.impl.AgentServiceImpl">
+               <constructor-arg ref="slcAgentDescriptorDao" />
+               <constructor-arg ref="agentFactory" />
+               <property name="pingCycle" value="${slc.server.services.pingCycle}" />
+               <property name="systemExecutor" ref="systemExecutor" />
+       </bean>
+
+       <bean id="slcExecutionService" class="org.argeo.slc.services.impl.SlcExecutionServiceImpl">
+               <constructor-arg ref="slcExecutionDao" />
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.server.services/build.properties b/legacy/modules/org.argeo.slc.server.services/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/legacy/modules/org.argeo.slc.server.services/services.properties b/legacy/modules/org.argeo.slc.server.services/services.properties
new file mode 100644 (file)
index 0000000..2814c6d
--- /dev/null
@@ -0,0 +1 @@
+slc.server.services.pingCycle=60000
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/.project b/legacy/modules/org.argeo.slc.webapp/.project
new file mode 100644 (file)
index 0000000..edfa86a
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.webapp.war</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/modules/org.argeo.slc.webapp/META-INF/MANIFEST.MF b/legacy/modules/org.argeo.slc.webapp/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..ce1a34d
--- /dev/null
@@ -0,0 +1,59 @@
+Manifest-Version: 1.0
+Bundle-ClassPath: WEB-INF/classes
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Name: SLC Webapp
+Web-ContextPath: org.argeo.slc.webapp
+Bundle-SymbolicName: org.argeo.slc.webapp
+Import-Package: javax.jcr,
+ net.sf.cglib.core,
+ net.sf.cglib.proxy,
+ net.sf.cglib.reflect,
+ org.aopalliance.aop,
+ org.argeo.jackrabbit.remote,
+ org.argeo.security.mvc,
+ org.argeo.server,
+ org.argeo.jcr.mvc,
+ org.argeo.server.json,
+ org.argeo.server.mvc,
+ org.argeo.slc.build,
+ org.argeo.slc.core.attachment,
+ org.argeo.slc.core.test.tree,
+ org.argeo.slc.dao.process,
+ org.argeo.slc.dao.runtime,
+ org.argeo.slc.dao.test,
+ org.argeo.slc.dao.test.tree,
+ org.argeo.slc.deploy,
+ org.argeo.slc.msg.event,
+ org.argeo.slc.runtime,
+ org.argeo.slc.services,
+ org.argeo.slc.web.ajaxplorer.file,
+ org.argeo.slc.web.ajaxplorer.mvc,
+ org.argeo.slc.web.mvc,
+ org.argeo.slc.web.mvc.controllers,
+ org.argeo.slc.web.mvc.provisioning,
+ org.hibernate.hql.ast;resolution:=optional,
+ org.hibernate.jdbc;resolution:=optional,
+ org.springframework.aop,
+ org.springframework.aop.framework,
+ org.springframework.aop.scope,
+ org.springframework.beans.factory.support,
+ org.springframework.osgi.web.context.support,
+ org.springframework.oxm,
+ org.springframework.security,
+ org.springframework.security.config,
+ org.springframework.security.context,
+ org.springframework.security.providers,
+ org.springframework.security.ui,
+ org.springframework.security.ui.webapp,
+ org.springframework.security.userdetails,
+ org.springframework.security.userdetails.memory,
+ org.springframework.transaction,
+ org.springframework.web.context,
+ org.springframework.web.context.request,
+ org.springframework.web.context.support,
+ org.springframework.web.filter,
+ org.springframework.web.servlet,
+ org.springframework.web.servlet.handler,
+ org.springframework.web.servlet.mvc,
+ org.springframework.web.servlet.mvc.annotation,
+ org.springframework.web.servlet.view
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/ajaxplorer-servlet.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/ajaxplorer-servlet.xml
new file mode 100644 (file)
index 0000000..a706606
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+
+       <import resource="classpath:/org/argeo/slc/web/ajaxplorer/file/spring.xml" />
+
+       <bean id="ajxpDriverHandler"
+               class="org.argeo.slc.web.ajaxplorer.mvc.AjxpDriverRequestHandler">
+               <property name="driver" ref="ajxpDriver" />
+       </bean>
+
+       <bean id="ajxpDriver" parent="driver.file.template">
+               <property name="basePath" value="/home/mbaudier/dev/work/dcrawTests" />
+       </bean>
+
+       <bean id="urlMapping"
+               class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+               <property name="mappings">
+                       <props>
+                               <prop key="**">ajxpDriverHandler</prop>
+                       </props>
+               </property>
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/applicationContext.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/applicationContext.xml
new file mode 100644 (file)
index 0000000..1b9c095
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <!--
+               <import resource="classpath:/org/argeo/slc/server/spring/jmx.xml" />
+       -->
+
+       <!--
+               security.xml has to be before osgi.xml, otherwise namespace parsing
+               fails
+       -->
+<!--   <import resource="security.xml" /> -->
+       <import resource="osgi.xml" />
+
+       <!--
+               Hibernate instrumentation <bean id="osivInterceptor"
+               class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
+               <property name="sessionFactory" ref="sessionFactory" /> </bean>
+       -->
+
+
+       <!--  Properties -->
+       <bean
+               class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer"
+               lazy-init="false">
+               <property name="contextOverride" value="true" />
+       </bean>
+
+       <!--
+               Web Services transactions <aop:config> <aop:pointcut id="epMethods"
+               expression="execution(*
+               org.springframework.web.servlet.mvc.Controller.handleRequest(..))" />
+               <aop:advisor advice-ref="epAdvice" pointcut-ref="epMethods" />
+               </aop:config> <tx:advice id="epAdvice"
+               transaction-manager="hibernateTransactionManager"> <tx:attributes>
+               <tx:method name="*" propagation="REQUIRED" /> </tx:attributes>
+               </tx:advice>
+       -->
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/doc-servlet.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/doc-servlet.xml
new file mode 100644 (file)
index 0000000..0576d0c
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+
+       <bean class="org.argeo.slc.web.mvc.controllers.RenderingResultController">
+               <property name="treeTestResultDao" ref="testResultDao" />
+       </bean>
+
+       <!--
+               Bean views for pdf & xls, resolved by the BeanNameViewResolver
+       -->
+       <bean name="resultExcelView" class="org.argeo.slc.web.mvc.ResultExcelView" />
+       <bean name="resultPdfView" class="org.argeo.slc.web.mvc.ResultPdfView" />
+
+       <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
+
+       <!--
+               .xml & .xslt URI files doesn't have a bean : the
+               XsltMarshallerViewResolver handle the views
+       -->
+       <bean id="viewResolverXslt" class="org.argeo.slc.web.mvc.XsltMarshallerViewResolver">
+               <property name="viewClass">
+                       <value>org.argeo.slc.web.mvc.XsltMarshallerView
+                       </value>
+               </property>
+               <property name="prefix">
+                       <value>WEB-INF/xslt/</value>
+               </property>
+               <property name="suffix">
+                       <value>.xsl</value>
+               </property>
+               <property name="marshaller" ref="marshaller" />
+       </bean>
+
+       <bean
+               class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                               <ref bean="osivInterceptor" />
+                       </list>
+               </property>
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/jcr-manager-servlet.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/jcr-manager-servlet.xml
new file mode 100644 (file)
index 0000000..78670a6
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+       <context:component-scan base-package="org.argeo.jcr.mvc" />
+
+       <bean name="**" class="org.argeo.jcr.mvc.JcrManagerController">
+       </bean>
+
+       <bean id="viewResolver" class="org.argeo.server.mvc.SerializingViewResolver">
+               <property name="serializer" ref="serverMapper" />
+       </bean>
+
+       <bean id="serverMapper" class="org.argeo.server.json.JsonServerMapper">
+       </bean>
+
+       <bean class="org.argeo.server.mvc.DefaultHandlerExceptionResolver" />
+
+       <bean id="handlerMapping"
+               class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                               <ref bean="osivInterceptor" />
+                       </list>
+               </property>
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/jcr-servlet.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/jcr-servlet.xml
new file mode 100644 (file)
index 0000000..61c8867
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
+               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+               http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+       <context:component-scan base-package="org.argeo.jcr.mvc" />
+
+       <bean name="/*.jcr" class="org.argeo.jcr.mvc.JcrBrowserController" />
+
+       <!-- Views -->
+       <bean name="getJcrItem" class="org.argeo.server.mvc.SerializingView">
+               <property name="serializer">
+                       <bean class="org.argeo.jcr.mvc.JcrXmlServerSerializer" />
+               </property>
+       </bean>
+
+       <bean name="queryJcrNodes" class="org.argeo.server.mvc.SerializingView">
+               <property name="serializer" ref="jsonSerializer" />
+       </bean>
+
+       <bean name="queryJcrTable" class="org.argeo.server.mvc.SerializingView">
+               <property name="serializer" ref="jsonSerializer" />
+       </bean>
+
+       <bean name="500" class="org.argeo.server.mvc.SerializingView">
+               <property name="serializer" ref="jsonSerializer" />
+       </bean>
+
+       <!-- Serializers -->
+       <bean id="jsonSerializer" class="org.argeo.server.json.JsonServerSerializer" />
+
+       <!-- MVC -->
+       <bean id="handlerMapping"
+               class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                               <ref bean="osivInterceptor" />
+                       </list>
+               </property>
+       </bean>
+
+       <bean id="viewResolver"
+               class="org.springframework.web.servlet.view.BeanNameViewResolver" />
+
+       <bean class="org.argeo.server.mvc.DefaultHandlerExceptionResolver" />
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/osgi.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/osgi.xml
new file mode 100644 (file)
index 0000000..25dee67
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <reference id="marshaller" interface="org.springframework.oxm.Marshaller" />\r
+       <reference id="unmarshaller" interface="org.springframework.oxm.Unmarshaller" />\r
+\r
+       <!-- DAO -->\r
+       <reference id="testResultDao" interface="org.argeo.slc.dao.test.tree.TreeTestResultDao" />\r
+       <reference id="testResultCollectionDao"\r
+               interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao" />\r
+       <reference id="testRunDescriptorDao" interface="org.argeo.slc.dao.test.TestRunDescriptorDao" />\r
+       <reference id="slcExecutionDao" interface="org.argeo.slc.dao.process.SlcExecutionDao" />\r
+       <reference id="slcAgentDescriptorDao"\r
+               interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao" />\r
+\r
+       <!-- Services -->\r
+       <reference id="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" />\r
+       <reference id="testManagerService" interface="org.argeo.slc.services.TestManagerService" />\r
+       <reference id="agentFactory" interface="org.argeo.slc.runtime.SlcAgentFactory" />\r
+       <reference id="attachmentsStorage"\r
+               interface="org.argeo.slc.core.attachment.AttachmentsStorage" />\r
+\r
+       <!-- Events -->\r
+       <reference id="eventListener" interface="org.argeo.slc.msg.event.SlcEventListener" />\r
+\r
+       <!-- Runtime -->\r
+       <reference id="dynamicRuntime" interface="org.argeo.slc.deploy.DynamicRuntime" />\r
+\r
+       <!-- Provisioning -->\r
+       <set id="modularDistributions" interface="org.argeo.slc.build.ModularDistribution"\r
+               cardinality="0..N" />\r
+\r
+       <!-- Security -->\r
+       <reference id="_authenticationManager"\r
+               interface="org.springframework.security.AuthenticationManager" />\r
+       <!-- <reference id="userDetailsService" -->\r
+       <!-- interface="org.springframework.security.userdetails.UserDetailsService" \r
+               /> -->\r
+\r
+       <!-- Optional reference to JCR repository -->\r
+       <reference id="jcrRepository" interface="javax.jcr.Repository"\r
+               cardinality="0..1" />\r
+\r
+       <reference id="osivInterceptor"\r
+               interface="org.springframework.web.context.request.WebRequestInterceptor" />\r
+</beans:beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/provisioning-servlet.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/provisioning-servlet.xml
new file mode 100644 (file)
index 0000000..bc2df74
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <bean name="getBundleHandler" class="org.argeo.slc.web.mvc.provisioning.BundleHandler">
+       </bean>
+
+       <bean name="updateSiteHandler"
+               class="org.argeo.slc.web.mvc.provisioning.EclipseUpdateSiteHandler">
+       </bean>
+
+       <bean name="availableDistributions"
+               class="org.argeo.slc.web.mvc.provisioning.AvailableDistributions">
+               <property name="modularDistributions" ref="modularDistributions" />
+       </bean>
+
+       <bean name="availableModulesHtml"
+               class="org.argeo.slc.web.mvc.provisioning.AvailableModulesHtml" />
+       <bean name="availableModulesPlain"
+               class="org.argeo.slc.web.mvc.provisioning.AvailableModulesPlain" />
+       <bean name="availableModulesOsgiBoot"
+               class="org.argeo.slc.web.mvc.provisioning.AvailableModulesOsgiBoot" />
+
+       <!-- MVC -->
+       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                               <ref local="modularDistributionInterceptor" />
+                       </list>
+               </property>
+               <property name="mappings">
+                       <value>
+                               /*/*/modules.html=availableModulesHtml
+                               /*/*/modules=availableModulesPlain
+                               /*/*/modularDistribution=availableModulesOsgiBoot
+                               /*/*/site.xml=updateSiteHandler
+                       </value>
+               </property>
+       </bean>
+
+       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                               <ref local="modularDistributionInterceptor" />
+                               <ref local="eclipseUpdateSiteInterceptor" />
+                       </list>
+               </property>
+               <property name="mappings">
+                       <value>
+                               /*/*/plugins/*=getBundleHandler
+                               /*/*/features/*=getBundleHandler
+                       </value>
+               </property>
+       </bean>
+
+       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                               <ref local="modularDistributionInterceptor" />
+                               <ref local="bundleJarInterceptor" />
+                       </list>
+               </property>
+               <property name="mappings">
+                       <value>
+                               /*/*/*.jar=getBundleHandler
+                       </value>
+               </property>
+       </bean>
+
+       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                       </list>
+               </property>
+               <property name="mappings">
+                       <value>
+                               /distributions=availableDistributions
+                       </value>
+               </property>
+       </bean>
+
+       <bean id="modularDistributionInterceptor"
+               class="org.argeo.slc.web.mvc.provisioning.ModularDistributionInterceptor">
+               <property name="modularDistributions" ref="modularDistributions" />
+       </bean>
+
+       <bean id="eclipseUpdateSiteInterceptor"
+               class="org.argeo.slc.web.mvc.provisioning.EclipseUpdateSiteInterceptor" />
+
+       <bean id="bundleJarInterceptor" class="org.argeo.slc.web.mvc.provisioning.BundleJarInterceptor" />
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/security.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/security.xml
new file mode 100644 (file)
index 0000000..9ae3de4
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:security="http://www.springframework.org/schema/security"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
+
+       <bean id="authenticationEntryPoint"
+               class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint">
+               <property name="loginFormUrl"
+                       value="http://localhost/org.argeo.security.webapp/getCredentials.ria" />
+               <property name="forceHttps" value="false" />
+       </bean>
+
+       <security:http entry-point-ref="authenticationEntryPoint">
+               <security:intercept-url pattern="/*.service"
+                       access="ROLE_USER,ROLE_ADMIN,ROLE_ANONYMOUS" />
+               <security:anonymous username="anonymous"
+                       granted-authority="ROLE_ANONYMOUS" />
+               <security:remember-me key="argeo" services-ref="rememberMeServices" />
+       </security:http>
+
+       <bean id="rememberMeServices" class="org.argeo.security.mvc.ArgeoRememberMeServices">
+               <property name="alwaysRemember" value="true" />
+               <property name="userDetailsService" ref="userDetailsService" />
+               <property name="key" value="${argeo.security.systemKey}" />
+       </bean>
+
+       <!--
+
+
+               <bean id="authenticationProcessingFilter"
+               class="org.springframework.security.ui.webapp.AuthenticationProcessingFilter">
+               <security:custom-filter position="AUTHENTICATION_PROCESSING_FILTER" />
+               <property name="authenticationManager" ref="_authenticationManager" />
+               <property name="authenticationFailureUrl" value="/getCredentials.ria"
+               /> <property name="defaultTargetUrl" value="/getCredentials.ria" />
+               <property name="filterProcessesUrl" value="/login.ria" /> <property
+               name="usernameParameter" value="username" /> <property
+               name="passwordParameter" value="password" /> </bean>
+       -->
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/slc-service-servlet.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/slc-service-servlet.xml
new file mode 100644 (file)
index 0000000..73d854d
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
+               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+               http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+       <!--<context:component-scan base-package="org.argeo.slc.web.mvc.controllers" />
+
+       --><!-- Server Handling -->
+       <bean class="org.argeo.slc.web.mvc.controllers.ServerController">
+               <property name="dynamicRuntime" ref="dynamicRuntime" />
+       </bean>
+
+       <!-- Agent Handling -->
+       <bean class="org.argeo.slc.web.mvc.controllers.AgentController">
+               <property name="slcAgentDescriptorDao" ref="slcAgentDescriptorDao" />
+       </bean>
+
+       <!--  Events  -->
+       <bean class="org.argeo.slc.web.mvc.controllers.EventController">
+               <property name="eventListenerRegister" ref="eventListenerRegister" />
+               <property name="eventListener" ref="eventListener" />
+       </bean>
+
+       <bean name="eventListenerRegister" class="org.argeo.slc.web.mvc.WebSlcEventListenerRegister"
+               scope="session">
+               <aop:scoped-proxy />
+       </bean>
+
+       <!--  Execution  -->
+       <bean class="org.argeo.slc.web.mvc.controllers.ProcessController">
+               <property name="agentFactory" ref="agentFactory" />
+               <property name="slcExecutionDao" ref="slcExecutionDao" />
+               <property name="slcExecutionService" ref="slcExecutionService" />
+               <property name="marshaller" ref="marshaller" />
+               <property name="unmarshaller" ref="unmarshaller" />
+               <property name="attachmentsStorage" ref="attachmentsStorage" />
+       </bean>
+
+       <!--  Results Handling -->
+       <bean class="org.argeo.slc.web.mvc.controllers.ResultController">
+               <property name="treeTestResultDao" ref="testResultDao" />
+               <property name="treeTestResultCollectionDao" ref="testResultCollectionDao" />
+               <property name="testManagerService" ref="testManagerService" />
+               <property name="attachmentsStorage" ref="attachmentsStorage" />
+       </bean>
+
+       <!-- Provisioning -->
+       <bean name="/listModularDistributions.service"
+               class="org.argeo.slc.web.mvc.provisioning.ListModularDistributions">
+               <property name="modularDistributions" ref="modularDistributions" />
+       </bean>
+
+       <!-- MVC -->
+       <bean
+               class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
+               <property name="interceptors">
+                       <list>
+                               <ref bean="osivInterceptor" />
+                       </list>
+               </property>
+       </bean>
+
+       <bean id="viewResolver" class="org.argeo.server.mvc.SerializingViewResolver">
+               <property name="serializer">
+                       <bean class="org.argeo.server.MarshallerServerSerializer">
+                               <property name="marshaller" ref="marshaller" />
+                       </bean>
+               </property>
+       </bean>
+
+       <bean class="org.argeo.server.mvc.DefaultHandlerExceptionResolver" />
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/web.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..a8a4042
--- /dev/null
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+       version="2.5">
+
+       <display-name>SLC Web Application</display-name>
+
+       <!-- SERVICE servlet -->
+       <servlet>
+               <servlet-name>slc-service</servlet-name>
+               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+               <init-param>
+                       <param-name>contextClass</param-name>
+                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+               </init-param>
+               <load-on-startup>1</load-on-startup>
+       </servlet>
+       <servlet-mapping>
+               <servlet-name>slc-service</servlet-name>
+               <url-pattern>*.service</url-pattern>
+       </servlet-mapping>
+
+       <!-- DOC servlet : Rendering result view  -->
+       <servlet>
+               <servlet-name>doc</servlet-name>
+               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+               <init-param>
+                       <param-name>contextClass</param-name>
+                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+               </init-param>
+       </servlet>
+
+       <servlet-mapping>
+               <servlet-name>doc</servlet-name>
+               <url-pattern>*.xls</url-pattern>
+       </servlet-mapping>
+       <servlet-mapping>
+               <servlet-name>doc</servlet-name>
+               <url-pattern>*.pdf</url-pattern>
+       </servlet-mapping>
+       <servlet-mapping>
+               <servlet-name>doc</servlet-name>
+               <url-pattern>*.xslt</url-pattern>
+       </servlet-mapping>
+       <servlet-mapping>
+               <servlet-name>doc</servlet-name>
+               <url-pattern>*.xml</url-pattern>
+       </servlet-mapping>
+
+       <!-- PROVISIONING servlet -->
+       <servlet>
+               <servlet-name>provisioning</servlet-name>
+               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+               <init-param>
+                       <param-name>contextClass</param-name>
+                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+               </init-param>
+               <load-on-startup>1</load-on-startup>
+       </servlet>
+       <servlet-mapping>
+               <servlet-name>provisioning</servlet-name>
+               <url-pattern>/dist/*</url-pattern>
+       </servlet-mapping>
+
+       <!-- JCR servlet -->
+       <servlet>
+               <servlet-name>jcr</servlet-name>
+               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+               <init-param>
+                       <param-name>contextClass</param-name>
+                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+               </init-param>
+               <load-on-startup>1</load-on-startup>
+       </servlet>
+       <servlet-mapping>
+               <servlet-name>jcr</servlet-name>
+               <url-pattern>*.jcr</url-pattern>
+       </servlet-mapping>
+
+       <!-- JCR-MANAGER servlet -->
+       <servlet>
+               <servlet-name>jcr-manager</servlet-name>
+               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+               <init-param>
+                       <param-name>contextClass</param-name>
+                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+               </init-param>
+               <load-on-startup>1</load-on-startup>
+       </servlet>
+
+       <servlet-mapping>
+               <servlet-name>jcr-manager</servlet-name>
+               <url-pattern>/jcr-manager/*</url-pattern>
+       </servlet-mapping>
+
+       <!-- AjaXplorer servlet -->
+       <servlet>
+               <servlet-name>ajaxplorer</servlet-name>
+               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+               <init-param>
+                       <param-name>contextClass</param-name>
+                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+               </init-param>
+               <load-on-startup>1</load-on-startup>
+       </servlet>
+
+       <servlet-mapping>
+               <servlet-name>ajaxplorer</servlet-name>
+               <url-pattern>/ajaxplorer/*</url-pattern>
+       </servlet-mapping>
+
+       <!-- General -->
+       <context-param>
+               <param-name>contextConfigLocation</param-name>
+               <param-value>/WEB-INF/applicationContext.xml</param-value>
+       </context-param>
+
+       <listener>
+               <display-name>Spring Context</display-name>
+               <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+       </listener>
+       <context-param>
+               <param-name>contextClass</param-name>
+               <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+       </context-param>
+
+       <!--  Security
+       <filter>
+               <filter-name>springSecurityFilterChain</filter-name>
+               <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+       </filter>
+
+       <filter-mapping>
+               <filter-name>springSecurityFilterChain</filter-name>
+               <url-pattern>/*</url-pattern>
+       </filter-mapping>
+
+       <context-param>
+               <param-name>argeo.security.systemKey</param-name>
+               <param-value>argeo</param-value>
+       </context-param> 
+       -->
+</web-app>
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/webdav-config.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/webdav-config.xml
new file mode 100644 (file)
index 0000000..f562d76
--- /dev/null
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+<!--
+<!DOCTYPE config [
+        <!ELEMENT config (iomanager , propertymanager, (collection | noncollection)? , filter?, mimetypeproperties?) >
+
+        <!ELEMENT iomanager (class, iohandler*) >
+        <!ELEMENT iohandler (class) >
+
+        <!ELEMENT propertymanager (class, propertyhandler*) >
+        <!ELEMENT propertyhandler (class) >
+
+        <!ELEMENT collection (nodetypes) >
+        <!ELEMENT noncollection (nodetypes) >
+
+        <!ELEMENT filter (class, namespaces?, nodetypes?) >
+
+        <!ELEMENT class >
+        <!ATTLIST class
+            name  CDATA #REQUIRED
+        >
+        <!ELEMENT namespaces (prefix | uri)* >
+        <!ELEMENT prefix (CDATA) >
+        <!ELEMENT uri (CDATA) >
+
+        <!ELEMENT nodetypes (nodetype)* >
+        <!ELEMENT nodetype (CDATA) >
+
+        <!ELEMENT mimetypeproperties (mimemapping*, defaultmimetype) >
+
+        <!ELEMENT mimemapping >
+        <!ATTLIST mimemapping
+            extension  CDATA #REQUIRED
+            mimetype  CDATA #REQUIRED
+        >
+
+        <!ELEMENT defaultmimetype (CDATA) >
+]>
+-->
+
+<config>
+    <!--
+     Defines the IOManager implementation that is responsible for passing
+     import/export request to the individual IO-handlers.
+    -->
+    <iomanager>
+        <!-- class element defines the manager to be used. The specified class
+             must implement the IOManager interface.
+             Note, that the handlers are being added and called in the order
+             they appear in the configuration.
+        -->
+        <class name="org.apache.jackrabbit.server.io.IOManagerImpl" />
+        <iohandler>
+            <class name="org.apache.jackrabbit.server.io.VersionHandler" />
+        </iohandler>
+        <iohandler>
+            <class name="org.apache.jackrabbit.server.io.VersionHistoryHandler" />
+        </iohandler>
+        <iohandler>
+            <class name="org.apache.jackrabbit.server.io.ZipHandler" />
+        </iohandler>
+        <iohandler>
+            <class name="org.apache.jackrabbit.server.io.XmlHandler" />
+        </iohandler>
+        <iohandler>
+            <class name="org.apache.jackrabbit.server.io.DirListingExportHandler" />
+        </iohandler>
+        <iohandler>
+            <class name="org.apache.jackrabbit.server.io.DefaultHandler" />
+        </iohandler>
+    </iomanager>
+    <!--
+     Example config for iomanager that populates its list of handlers with
+     default values. Therefore the 'iohandler' elements are omited.
+    -->
+    <!--
+    <iomanager>
+        <class name="org.apache.jackrabbit.server.io.DefaultIOManager" />
+    </iomanager>
+    -->
+    <!--
+     Defines the PropertyManager implementation that is responsible for export
+     and import of resource properties.
+    -->
+    <propertymanager>
+        <!-- class element defines the manager to be used. The specified class
+             must implement the PropertyManager interface.
+             Note, that the handlers are being added and called in the order
+             they appear in the configuration.
+        -->
+        <class name="org.apache.jackrabbit.server.io.PropertyManagerImpl" />
+        <propertyhandler>
+            <class name="org.apache.jackrabbit.server.io.VersionHandler" />
+        </propertyhandler>
+        <propertyhandler>
+            <class name="org.apache.jackrabbit.server.io.VersionHistoryHandler" />
+        </propertyhandler>
+        <propertyhandler>
+            <class name="org.apache.jackrabbit.server.io.ZipHandler" />
+        </propertyhandler>
+        <propertyhandler>
+            <class name="org.apache.jackrabbit.server.io.XmlHandler" />
+        </propertyhandler>
+        <propertyhandler>
+            <class name="org.apache.jackrabbit.server.io.DefaultHandler" />
+        </propertyhandler>
+    </propertymanager>
+    <!--
+     Define nodetypes, that should never by displayed as 'collection'
+    -->
+    <noncollection>
+        <nodetypes>
+            <nodetype>nt:file</nodetype>
+            <nodetype>nt:resource</nodetype>
+        </nodetypes>
+    </noncollection>
+    <!--
+     Example: Defines nodetypes, that should always be displayed as 'collection'.
+    -->
+    <!--
+    <collection>
+        <nodetypes>
+            <nodetype>nt:folder</nodetype>
+            <nodetype>rep:root</nodetype>
+        </nodetypes>
+    </collection>
+    -->
+    <!--
+     Filter that allows to prevent certain items from being displayed.
+     Please note, that this has an effect on PROPFIND calls only and does not
+     provide limited access to those items matching any of the filters.
+
+     However specifying a filter may cause problems with PUT or MKCOL if the
+     resource to be created is being filtered out, thus resulting in inconsistent
+     responses (e.g. PUT followed by PROPFIND on parent).
+     -->
+    <filter>
+        <!-- class element defines the resource filter to be used. The specified class
+             must implement the ItemFilter interface -->
+        <class name="org.apache.jackrabbit.webdav.simple.DefaultItemFilter" />
+        <!--
+         Nodetype names to be used to filter child nodes.
+         A child node can be filtered if the declaring nodetype of its definition
+         is one of the nodetype names specified in the nodetypes Element.
+         E.g. defining 'rep:root' as filtered nodetype whould result in jcr:system
+         being hidden but no other child node of the root node, since those
+         are defined by the nodetype nt:unstructered.
+        -->
+        <!--
+        <nodetypes>
+            <nodetype>rep:root</nodetype>
+        </nodetypes>
+        -->
+        <!--
+         Namespace prefixes or uris. Items having a name that matches any of the
+         entries will be filtered.
+        -->
+        <namespaces>
+            <prefix>rep</prefix>
+            <prefix>jcr</prefix>
+            <!--
+            <uri>internal</uri>
+            <uri>http://www.jcp.org/jcr/1.0</uri>
+            -->
+        </namespaces>
+    </filter>
+    
+    <!--
+     Optional 'mimetypeproperties' element.
+     It defines additional or replaces existing mappings for the MimeResolver
+     instance created by the ResourceConfig.
+     The default mappings are defined in org.apache.jackrabbit.server.io.mimetypes.properties.
+     If the default mime type defined by MimeResolver is 'application/octet-stream'.
+    -->
+    <!--
+    <mimetypeproperties>
+        <mimemapping extension="rtf" mimetype="application/rtf" />
+        <mimemapping extension="ott" mimetype="application/vnd.oasis.opendocument.text-template" />
+        <defaultmimetype>text/html</defaultmimetype>
+    </mimetypeproperties>
+    -->
+</config>
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/webdav-servlet.xml b/legacy/modules/org.argeo.slc.webapp/WEB-INF/webdav-servlet.xml
new file mode 100644 (file)
index 0000000..4aa3181
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <bean id="webdavServlet" class="org.argeo.server.jackrabbit.webdav.WebDavServlet">
+               <property name="repository" ref="jcrRepository" />
+               <property name="resourceConfiguration" value="osgibundle:/WEB-INF/webdav-config.xml" />
+       </bean>
+
+       <bean
+               class="org.springframework.web.servlet.handler.SimpleServletPostProcessor" />
+
+       <bean id="servletHandler"
+               class="org.springframework.web.servlet.handler.SimpleServletHandlerAdapter" />
+
+       <bean id="urlMapping"
+               class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+               <property name="mappings">
+                       <props>
+                               <prop key="**">webdavServlet</prop>
+                       </props>
+               </property>
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultView.xsl b/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultView.xsl
new file mode 100644 (file)
index 0000000..e9989bd
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet version="1.0"\r
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
+       exclude-result-prefixes="slc">\r
+\r
+       <xsl:output method="html" omit-xml-declaration="yes" />
+       
+\r
+       <xsl:template match="/">\r
+               <html>\r
+                       <head>\r
+                               <title>Result</title>\r
+                       </head>\r
+                       <body style="font-family: sans-serif">\r
+                               <h1>\r
+                                       Result\r
+                                       <xsl:value-of select="slc:tree-test-result/@uuid" />\r
+                               </h1>\r
+                               <xsl:for-each\r
+                                       select="slc:tree-test-result/slc:result-parts/slc:result-part">\r
+                                       <h2>\r
+                                               <xsl:value-of select="@path" />\r
+                                       </h2>\r
+                                       <table>\r
+                                               <xsl:for-each\r
+                                                       select="slc:part-sub-list/slc:parts/slc:simple-result-part">\r
+                                                       <tr>\r
+                                                               <xsl:choose>\r
+                                                                       <xsl:when\r
+                                                                               test="slc:status = 'PASSED' ">\r
+                                                                               <td style="color:green">\r
+                                                                                       <xsl:value-of\r
+                                                                                               select="slc:message" />\r
+                                                                               </td>\r
+                                                                       </xsl:when>\r
+                                                                       <xsl:otherwise>\r
+                                                                               <td style="color:red">\r
+                                                                                       <xsl:value-of\r
+                                                                                               select="slc:message" />\r
+                                                                               </td>\r
+                                                                       </xsl:otherwise>\r
+                                                               </xsl:choose>\r
+                                                       </tr>\r
+                                               </xsl:for-each>\r
+                                       </table>\r
+                               </xsl:for-each>\r
+                       </body>\r
+               </html>\r
+       </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultXmlView.xsl b/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultXmlView.xsl
new file mode 100644 (file)
index 0000000..87d6371
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet version="1.0"\r
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
+       exclude-result-prefixes="slc">\r
+\r
+       <xsl:template match="/">
+               <xsl:copy-of select="*"/>\r
+       </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultXsltView.xsl b/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/resultXsltView.xsl
new file mode 100644 (file)
index 0000000..e9989bd
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet version="1.0"\r
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
+       exclude-result-prefixes="slc">\r
+\r
+       <xsl:output method="html" omit-xml-declaration="yes" />
+       
+\r
+       <xsl:template match="/">\r
+               <html>\r
+                       <head>\r
+                               <title>Result</title>\r
+                       </head>\r
+                       <body style="font-family: sans-serif">\r
+                               <h1>\r
+                                       Result\r
+                                       <xsl:value-of select="slc:tree-test-result/@uuid" />\r
+                               </h1>\r
+                               <xsl:for-each\r
+                                       select="slc:tree-test-result/slc:result-parts/slc:result-part">\r
+                                       <h2>\r
+                                               <xsl:value-of select="@path" />\r
+                                       </h2>\r
+                                       <table>\r
+                                               <xsl:for-each\r
+                                                       select="slc:part-sub-list/slc:parts/slc:simple-result-part">\r
+                                                       <tr>\r
+                                                               <xsl:choose>\r
+                                                                       <xsl:when\r
+                                                                               test="slc:status = 'PASSED' ">\r
+                                                                               <td style="color:green">\r
+                                                                                       <xsl:value-of\r
+                                                                                               select="slc:message" />\r
+                                                                               </td>\r
+                                                                       </xsl:when>\r
+                                                                       <xsl:otherwise>\r
+                                                                               <td style="color:red">\r
+                                                                                       <xsl:value-of\r
+                                                                                               select="slc:message" />\r
+                                                                               </td>\r
+                                                                       </xsl:otherwise>\r
+                                                               </xsl:choose>\r
+                                                       </tr>\r
+                                               </xsl:for-each>\r
+                                       </table>\r
+                               </xsl:for-each>\r
+                       </body>\r
+               </html>\r
+       </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/viewXml.xsl b/legacy/modules/org.argeo.slc.webapp/WEB-INF/xslt/viewXml.xsl
new file mode 100644 (file)
index 0000000..87d6371
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet version="1.0"\r
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
+       exclude-result-prefixes="slc">\r
+\r
+       <xsl:template match="/">
+               <xsl:copy-of select="*"/>\r
+       </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/.classpath b/legacy/runtime/org.argeo.slc.support.activemq/.classpath
new file mode 100644 (file)
index 0000000..5815983
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/.project b/legacy/runtime/org.argeo.slc.support.activemq/.project
new file mode 100644 (file)
index 0000000..c1292c0
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.support.activemq</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/.settings/org.eclipse.jdt.core.prefs b/legacy/runtime/org.argeo.slc.support.activemq/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..8bd7b10
--- /dev/null
@@ -0,0 +1,12 @@
+#Sat Jan 10 17:12:41 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/.settings/org.maven.ide.eclipse.prefs b/legacy/runtime/org.argeo.slc.support.activemq/.settings/org.maven.ide.eclipse.prefs
new file mode 100644 (file)
index 0000000..9b6b74e
--- /dev/null
@@ -0,0 +1,8 @@
+#Sat Jan 10 17:11:12 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/build.properties b/legacy/runtime/org.argeo.slc.support.activemq/build.properties
new file mode 100644 (file)
index 0000000..f0cc4f1
--- /dev/null
@@ -0,0 +1,2 @@
+source.. = src/main/java/,\
+           src/main/resources/
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/pom.xml b/legacy/runtime/org.argeo.slc.support.activemq/pom.xml
new file mode 100644 (file)
index 0000000..6b3c1db
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>runtime</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <groupId>org.argeo.slc.runtime</groupId>
+       <artifactId>org.argeo.slc.support.activemq</artifactId>
+       <name>SLC Support ActiveMQ</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+
+                               <configuration>
+                                       <instructions>
+                                               <Export-Package>
+                                                       org.argeo.slc.jms.*,org.argeo.slc.activemq
+                                               </Export-Package>
+                                               <Import-Package>
+                                                       javax.xml.transform;version="0.0.0",
+                                                       *
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <!-- SLC -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.core</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <!-- Spring -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.jms</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.oxm</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.transaction</artifactId>
+               </dependency>
+
+               <!-- AOP -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.aspectj.weaver</artifactId>
+               </dependency>
+
+               <!-- JMS -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>javax.jms</artifactId>
+               </dependency>
+
+               <!-- ActiveMQ -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.apache.activemq</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.apache.commons.pool</artifactId>
+               </dependency>
+
+               <!-- JEE required by ActiveMQ Core -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>javax.management.j2ee</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>javax.ejb</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>javax.xml.rpc</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>javax.servlet</artifactId>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgent.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgent.java
new file mode 100644 (file)
index 0000000..3851a2a
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.util.List;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.core.runtime.DefaultAgent;
+import org.argeo.slc.execution.ExecutionModuleDescriptor;
+import org.argeo.slc.msg.ExecutionAnswer;
+import org.argeo.slc.msg.MsgConstants;
+import org.argeo.slc.msg.ReferenceList;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.runtime.SlcAgentDescriptor;
+import org.springframework.jms.JmsException;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.core.MessagePostProcessor;
+
+/** JMS based implementation of an SLC Agent. */
+public class JmsAgent extends DefaultAgent implements MessageListener {
+       public final static String PROPERTY_QUERY = "query";
+       public final static String QUERY_PING_ALL = "pingAll";
+
+       private final static Log log = LogFactory.getLog(JmsAgent.class);
+
+       private JmsTemplate jmsTemplate;
+       private Destination agentRegister;
+       private Destination agentUnregister;
+
+       private Destination responseDestination;
+
+       public void init() {
+               super.init();
+               try {
+                       jmsTemplate.convertAndSend(agentRegister, getAgentDescriptor());
+                       log.info("Agent #" + getAgentUuid() + " registered to "
+                                       + agentRegister);
+               } catch (JmsException e) {
+                       log.warn("Could not register agent "
+                                       + getAgentDescriptor().getUuid()
+                                       + " to server: "
+                                       + e.getMessage()
+                                       + ". The agent will stay offline but will keep listening for a ping all sent by server.");
+                       if (log.isTraceEnabled())
+                               log.debug("Original error.", e);
+               }
+       }
+
+       @Override
+       public void destroy() {
+               try {
+                       jmsTemplate.convertAndSend(agentUnregister, getAgentDescriptor());
+                       log.info("Agent #" + getAgentUuid() + " unregistered from "
+                                       + agentUnregister);
+               } catch (JmsException e) {
+                       log.warn("Could not unregister agent " + getAgentUuid() + ": "
+                                       + e.getMessage());
+                       if (log.isTraceEnabled())
+                               log.debug("Original error.", e);
+               }
+               super.destroy();
+       }
+
+       public void setAgentRegister(Destination agentRegister) {
+               this.agentRegister = agentRegister;
+       }
+
+       public void setAgentUnregister(Destination agentUnregister) {
+               this.agentUnregister = agentUnregister;
+       }
+
+       public String getMessageSelector() {
+               String messageSelector = "slc_agentId='" + getAgentUuid() + "'";
+               // if (log.isDebugEnabled())
+               // log.debug("Message selector: " + messageSelector);
+               return messageSelector;
+       }
+
+       public void onMessage(final Message message) {
+               final String query;
+               final String correlationId;
+               try {
+                       query = message.getStringProperty(PROPERTY_QUERY);
+                       correlationId = message.getJMSCorrelationID();
+               } catch (JMSException e1) {
+                       throw new SlcException("Cannot analyze incoming message " + message);
+               }
+
+               final Object response;
+               final Destination destinationSend;
+               if (QUERY_PING_ALL.equals(query)) {
+                       ReferenceList refList = (ReferenceList) convertFrom(message);
+                       if (!refList.getReferences().contains(getAgentUuid())) {
+                               response = getAgentDescriptor();
+                               destinationSend = agentRegister;
+                               log.info("Agent #" + getAgentUuid() + " registering to "
+                                               + agentRegister + " in reply to a " + QUERY_PING_ALL
+                                               + " query");
+                       } else {
+                               return;
+                       }
+               } else {
+                       response = process(query, message);
+                       destinationSend = responseDestination;
+               }
+
+               // Send response
+               if (log.isTraceEnabled())
+                       log.trace("About to send response " + response.getClass());
+               jmsTemplate.convertAndSend(destinationSend, response,
+                               new MessagePostProcessor() {
+                                       public Message postProcessMessage(Message messageToSend)
+                                                       throws JMSException {
+                                               messageToSend.setStringProperty(PROPERTY_QUERY, query);
+                                               messageToSend.setStringProperty(
+                                                               MsgConstants.PROPERTY_SLC_AGENT_ID,
+                                                               getAgentUuid());
+                                               messageToSend.setJMSCorrelationID(correlationId);
+                                               return messageToSend;
+                                       }
+                               });
+               if (log.isTraceEnabled())
+                       log.debug("Sent response to query '" + query
+                                       + "' with correlationId " + correlationId);
+       }
+
+       /** @return response */
+       public Object process(String query, Message message) {
+               try {
+                       if ("getExecutionModuleDescriptor".equals(query)) {
+                               String moduleName = message.getStringProperty("moduleName");
+                               String version = message.getStringProperty("version");
+                               return getExecutionModuleDescriptor(moduleName, version);
+                       } else if ("listExecutionModuleDescriptors".equals(query)) {
+
+                               List<ExecutionModuleDescriptor> lst = listExecutionModuleDescriptors();
+                               SlcAgentDescriptor agentDescriptorToSend = new SlcAgentDescriptor(
+                                               getAgentDescriptor());
+                               agentDescriptorToSend.setModuleDescriptors(lst);
+                               return agentDescriptorToSend;
+                       } else if ("runSlcExecution".equals(query)) {
+                               final SlcExecution slcExecution = (SlcExecution) convertFrom(message);
+                               new Thread() {
+                                       public void run() {
+                                               process(slcExecution);
+                                       }
+                               }.start();
+                               return ExecutionAnswer.ok("Execution started on agent "
+                                               + getAgentUuid());
+                       } else if ("ping".equals(query)) {
+                               return ExecutionAnswer.ok("Agent " + getAgentUuid()
+                                               + " is alive.");
+                       } else {
+                               throw new SlcException("Unsupported query " + query);
+                       }
+               } catch (Exception e) {
+                       log.error("Processing of query " + query + " failed", e);
+                       return ExecutionAnswer.error(e);
+               }
+       }
+
+       protected Object convertFrom(Message message) {
+               try {
+                       return jmsTemplate.getMessageConverter().fromMessage(message);
+               } catch (JMSException e) {
+                       throw new SlcException("Cannot convert message", e);
+               }
+       }
+
+       public void setResponseDestination(Destination responseDestination) {
+               this.responseDestination = responseDestination;
+       }
+
+       public void setJmsTemplate(JmsTemplate jmsTemplate) {
+               this.jmsTemplate = jmsTemplate;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxy.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxy.java
new file mode 100644 (file)
index 0000000..3b0129f
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.util.List;
+import java.util.UUID;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.execution.ExecutionModuleDescriptor;
+import org.argeo.slc.execution.ExecutionProcess;
+import org.argeo.slc.msg.ExecutionAnswer;
+import org.argeo.slc.msg.MsgConstants;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.runtime.SlcAgent;
+import org.argeo.slc.runtime.SlcAgentDescriptor;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.core.MessageCreator;
+
+public class JmsAgentProxy implements SlcAgent {
+       private final static Log log = LogFactory.getLog(JmsAgentProxy.class);
+
+       private final String agentUuid;
+       private final Destination requestDestination;
+       private final Destination responseDestination;
+       private final JmsTemplate jmsTemplate;
+
+       public JmsAgentProxy(String agentUuid, Destination requestDestination,
+                       Destination responseDestination, JmsTemplate jmsTemplate) {
+               this.agentUuid = agentUuid;
+               this.requestDestination = requestDestination;
+               this.responseDestination = responseDestination;
+               this.jmsTemplate = jmsTemplate;
+       }
+
+       public String getAgentUuid() {
+               return agentUuid;
+       }
+
+       public ExecutionModuleDescriptor getExecutionModuleDescriptor(
+                       final String moduleName, final String version) {
+               return (ExecutionModuleDescriptor) sendReceive(new AgentMC(
+                               "getExecutionModuleDescriptor") {
+                       public void setArguments(Message message) throws JMSException {
+                               message.setStringProperty("moduleName", moduleName);
+                               message.setStringProperty("version", version);
+                       }
+               });
+       }
+
+       public List<ExecutionModuleDescriptor> listExecutionModuleDescriptors() {
+               return ((SlcAgentDescriptor) sendReceive(new AgentMC(
+                               "listExecutionModuleDescriptors"))).getModuleDescriptors();
+       }
+
+       public void runSlcExecution(SlcExecution slcExecution) {
+               process(slcExecution);
+       }
+
+       public void process(ExecutionProcess executionProcess) {
+               if (!(executionProcess instanceof SlcExecution))
+                       throw new SlcException("Unsupported process type "
+                                       + executionProcess.getClass());
+               sendReceive(new AgentMC("runSlcExecution",
+                               (SlcExecution) executionProcess));
+       }
+
+       public boolean ping() {
+               Object response = sendReceive(new AgentMC("ping"), false);
+               if (response == null)
+                       return false;
+               else {
+                       ExecutionAnswer answer = (ExecutionAnswer) response;
+                       return ExecutionAnswer.OK.equals(answer.getStatus());
+               }
+       }
+
+       public void kill(ExecutionProcess process) {
+               throw new UnsupportedOperationException();
+       }
+
+       protected Object sendReceive(AgentMC messageCreator) {
+               long begin = System.currentTimeMillis();
+               Object res;
+               try {
+                       res = sendReceive(messageCreator, true);
+               } finally {
+                       if (log.isTraceEnabled())
+                               log.trace("To agent #" + agentUuid + " in "
+                                               + (System.currentTimeMillis() - begin) + " ms, query '"
+                                               + messageCreator.getQuery() + "', correlationId "
+                                               + messageCreator.getCorrelationId());
+               }
+               return res;
+       }
+
+       /**
+        * @param timeoutException
+        *            if true throws an exception if reception timeouted, else
+        *            return null
+        */
+       protected Object sendReceive(AgentMC messageCreator,
+                       boolean timeoutException) {
+               String correlationId = UUID.randomUUID().toString();
+               messageCreator.setCorrelationId(correlationId);
+               send(messageCreator);
+
+               Object response = processResponse(messageCreator, timeoutException);
+
+               if (response instanceof ExecutionAnswer) {
+                       ExecutionAnswer answer = (ExecutionAnswer) response;
+                       if (ExecutionAnswer.ERROR.equals(answer.getStatus()))
+                               throw new SlcException("Execution of '"
+                                               + messageCreator.getQuery() + "' failed on the agent "
+                                               + agentUuid + ": " + answer.getMessage()
+                                               + " (correlationId=" + correlationId + ")");
+                       else
+                               return answer;
+               } else {
+                       return response;
+               }
+       }
+
+       protected void send(AgentMC messageCreator) {
+               jmsTemplate.send(requestDestination, messageCreator);
+       }
+
+       protected Object processResponse(AgentMC messageCreator,
+                       boolean timeoutException) {
+               String correlationId = messageCreator.getCorrelationId();
+               String query = messageCreator.getQuery();
+               Message responseMsg = null;
+               try {
+                       responseMsg = jmsTemplate.receiveSelected(responseDestination,
+                                       "JMSCorrelationID='" + correlationId + "'");
+               } catch (Exception e) {
+                       throw new SlcException("Could not receive response from agent "
+                                       + agentUuid + " with correlationId " + correlationId
+                                       + " (query '" + query + "')", e);
+               }
+
+               if (responseMsg == null) {// timeout
+                       if (timeoutException)
+                               throw new SlcException("TIMEOUT: Query '" + query + "'"
+                                               + " with correlationId " + correlationId
+                                               + " sent to agent " + agentUuid + " timed out.");
+                       else
+                               return null;
+               }
+
+               try {
+                       return fromMessage(responseMsg);
+               } catch (Exception e) {
+                       throw new SlcException("Could not convert response from agent "
+                                       + agentUuid + " with correlationId " + correlationId
+                                       + " (query '" + query + "')", e);
+               }
+       }
+
+       protected Object fromMessage(Message message) throws JMSException {
+               return jmsTemplate.getMessageConverter().fromMessage(message);
+       }
+
+       protected Message toMessage(Object obj, Session session)
+                       throws JMSException {
+               return jmsTemplate.getMessageConverter().toMessage(obj, session);
+       }
+
+       protected class AgentMC implements MessageCreator {
+               private final String query;
+               private Object body = null;
+               private String correlationId;
+
+               public AgentMC(String query) {
+                       this.query = query;
+               }
+
+               public AgentMC(String query, Object body) {
+                       this.query = query;
+                       this.body = body;
+               }
+
+               public final Message createMessage(Session session) throws JMSException {
+                       if (agentUuid == null)
+                               throw new SlcException("Agent UUID not set");
+                       if (correlationId == null)
+                               throw new SlcException("JMSCorrelationID not set");
+                       final Message msg;
+                       if (body == null)
+                               msg = session.createTextMessage();
+                       else
+                               msg = toMessage(body, session);
+                       msg.setStringProperty(MsgConstants.PROPERTY_SLC_AGENT_ID, agentUuid);
+                       msg.setStringProperty(JmsAgent.PROPERTY_QUERY, query);
+                       msg.setJMSCorrelationID(correlationId);
+                       setArguments(msg);
+                       if (msg instanceof TextMessage) {
+                               TextMessage textMessage = (TextMessage) msg;
+                               if (textMessage.getText() == null) {
+                                       // TODO: remove workaround when upgrading to ActiveMQ 5.3
+                                       // Workaround for
+                                       // https://issues.apache.org/activemq/browse/AMQ-2046
+                                       textMessage.setText("");
+                               }
+                       }
+                       return msg;
+               }
+
+               protected void setArguments(Message message) throws JMSException {
+               }
+
+               public String getQuery() {
+                       return query;
+               }
+
+               public String getCorrelationId() {
+                       return correlationId;
+               }
+
+               public void setCorrelationId(String correlationId) {
+                       this.correlationId = correlationId;
+               }
+
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxyFactory.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxyFactory.java
new file mode 100644 (file)
index 0000000..6830772
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.util.List;
+import java.util.UUID;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+
+import org.argeo.slc.msg.ReferenceList;
+import org.argeo.slc.runtime.SlcAgent;
+import org.argeo.slc.runtime.SlcAgentFactory;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.core.MessagePostProcessor;
+
+public class JmsAgentProxyFactory implements SlcAgentFactory {
+       private Destination requestDestination;
+       private Destination responseDestination;
+       private Destination pingAllDestination;
+       private JmsTemplate jmsTemplate;
+
+       public SlcAgent getAgent(String uuid) {
+               return new JmsAgentProxy(uuid, requestDestination, responseDestination,
+                               jmsTemplate);
+       }
+
+       public void pingAll(List<String> activeAgentIds) {
+               ReferenceList referenceList = new ReferenceList(activeAgentIds);
+               jmsTemplate.convertAndSend(pingAllDestination, referenceList,
+                               new MessagePostProcessor() {
+
+                                       public Message postProcessMessage(Message message)
+                                                       throws JMSException {
+                                               message.setJMSCorrelationID(UUID.randomUUID()
+                                                               .toString());
+                                               message.setStringProperty(JmsAgent.PROPERTY_QUERY,
+                                                               JmsAgent.QUERY_PING_ALL);
+                                               return message;
+                                       }
+                               });
+       }
+
+       public void setRequestDestination(Destination requestDestination) {
+               this.requestDestination = requestDestination;
+       }
+
+       public void setResponseDestination(Destination responseDestination) {
+               this.responseDestination = responseDestination;
+       }
+
+       public void setJmsTemplate(JmsTemplate jmsTemplate) {
+               this.jmsTemplate = jmsTemplate;
+       }
+
+       public void setPingAllDestination(Destination pingAllDestination) {
+               this.pingAllDestination = pingAllDestination;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentListener.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentListener.java
new file mode 100644 (file)
index 0000000..57725fc
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.jms.BytesMessage;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
+import org.apache.commons.io.IOUtils;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.core.attachment.AttachmentsStorage;
+import org.argeo.slc.core.attachment.SimpleAttachment;
+
+public class JmsAttachmentListener implements MessageListener {
+       private AttachmentsStorage attachmentsStorage;
+
+       public void onMessage(Message msg) {
+               BytesMessage message = (BytesMessage) msg;
+
+               InputStream in = null;
+               try {
+                       SimpleAttachment attachment = new SimpleAttachment();
+                       attachment.setUuid(msg
+                                       .getStringProperty(JmsAttachmentUploader.ATTACHMENT_ID));
+                       attachment.setName(msg
+                                       .getStringProperty(JmsAttachmentUploader.ATTACHMENT_NAME));
+                       attachment
+                                       .setContentType(msg
+                                                       .getStringProperty(JmsAttachmentUploader.ATTACHMENT_CONTENT_TYPE));
+
+                       // Check body length
+                       Long bodyLength = message.getBodyLength();
+                       if (bodyLength > Integer.MAX_VALUE)
+                               throw new SlcException("Attachment cannot be bigger than "
+                                               + Integer.MAX_VALUE
+                                               + " bytes with this transport. Use another transport.");
+
+                       byte[] buffer = new byte[bodyLength.intValue()];
+                       message.readBytes(buffer);
+                       in = new ByteArrayInputStream(buffer);
+                       attachmentsStorage.storeAttachment(attachment, in);
+               } catch (JMSException e) {
+                       throw new SlcException("Could not process attachment message "
+                                       + msg, e);
+               } finally {
+                       IOUtils.closeQuietly(in);
+               }
+       }
+
+       public void setAttachmentsStorage(AttachmentsStorage attachmentsStorage) {
+               this.attachmentsStorage = attachmentsStorage;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentUploader.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentUploader.java
new file mode 100644 (file)
index 0000000..7408266
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.jms.BytesMessage;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Session;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.core.attachment.Attachment;
+import org.argeo.slc.core.attachment.AttachmentUploader;
+import org.springframework.core.io.Resource;
+import org.springframework.jms.JmsException;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.core.MessageCreator;
+
+public class JmsAttachmentUploader implements AttachmentUploader {
+       private final static Log log = LogFactory
+                       .getLog(JmsAttachmentUploader.class);
+
+       public final static String ATTACHMENT_ID = "slc_attachmentId";
+       public final static String ATTACHMENT_NAME = "slc_attachmentName";
+       public final static String ATTACHMENT_CONTENT_TYPE = "slc_attachmentContentType";
+
+       private JmsTemplate jmsTemplate;
+       private Destination destination;
+
+       public void upload(final Attachment attachment, final Resource resource) {
+               try {
+                       jmsTemplate.send(destination, new MessageCreator() {
+
+                               public Message createMessage(Session session)
+                                               throws JMSException {
+                                       BytesMessage message = session.createBytesMessage();
+                                       message.setStringProperty(ATTACHMENT_ID, attachment
+                                                       .getUuid());
+                                       message.setStringProperty(ATTACHMENT_NAME, attachment
+                                                       .getName());
+                                       message.setStringProperty(ATTACHMENT_CONTENT_TYPE,
+                                                       attachment.getContentType());
+
+                                       InputStream in = null;
+                                       try {
+                                               in = resource.getInputStream();
+                                               byte[] buffer = new byte[1024 * 1024];
+                                               int read = -1;
+                                               while ((read = in.read(buffer)) > 0) {
+                                                       message.writeBytes(buffer, 0, read);
+                                               }
+                                       } catch (IOException e) {
+                                               throw new SlcException(
+                                                               "Cannot write into byte message for attachment "
+                                                                               + attachment + " and resource "
+                                                                               + resource, e);
+                                       } finally {
+                                               IOUtils.closeQuietly(in);
+                                       }
+                                       return message;
+                               }
+                       });
+               } catch (JmsException e) {
+                       if (log.isTraceEnabled())
+                               log.debug("Cannot upload", e);
+                       else if (log.isDebugEnabled())
+                               log.debug("Cannot upload: " + e.getMessage());
+               }
+
+       }
+
+       public void setJmsTemplate(JmsTemplate jmsTemplate) {
+               this.jmsTemplate = jmsTemplate;
+       }
+
+       public void setDestination(Destination destination) {
+               this.destination = destination;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsExecutionHandler.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsExecutionHandler.java
new file mode 100644 (file)
index 0000000..9239c7a
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.msg.MsgHandler;
+import org.springframework.jms.support.converter.MessageConverter;
+
+public class JmsExecutionHandler implements MessageListener {
+
+       private MessageConverter messageConverter;
+       private MsgHandler serviceMsgHandler;
+
+       public void onMessage(Message message) {
+               try {
+                       serviceMsgHandler.handleMsg(messageConverter.fromMessage(message));
+               } catch (JMSException e) {
+                       throw new SlcException("Could not interpret message " + message, e);
+               }
+       }
+
+       public void setMessageConverter(MessageConverter messageConverter) {
+               this.messageConverter = messageConverter;
+       }
+
+       public void setServiceMsgHandler(MsgHandler serviceMsgHandler) {
+               this.serviceMsgHandler = serviceMsgHandler;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventListener.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventListener.java
new file mode 100644 (file)
index 0000000..35cbc70
--- /dev/null
@@ -0,0 +1,234 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.jms.TopicSubscriber;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.msg.event.SlcEvent;
+import org.argeo.slc.msg.event.SlcEventListener;
+import org.argeo.slc.msg.event.SlcEventListenerDescriptor;
+import org.springframework.jms.connection.ConnectionFactoryUtils;
+import org.springframework.jms.support.JmsUtils;
+import org.springframework.jms.support.converter.MessageConverter;
+
+public class JmsSlcEventListener implements SlcEventListener {
+       private final static Log log = LogFactory.getLog(JmsSlcEventListener.class);
+
+       // IoC
+       private Topic eventsDestination;
+       private ConnectionFactory jmsConnectionFactory;
+       private MessageConverter messageConverter;
+
+       // Initialized with init() method, released with close()
+       private Connection connection = null;
+
+       // One by instance
+       private String connectionClientId = getClass() + "#"
+                       + UUID.randomUUID().toString();
+       private Boolean isClosed = false;
+
+       private List<String> subscriberIds = new ArrayList<String>();
+
+       // private Map<String, ListeningClient> clients = Collections
+       // .synchronizedMap(new HashMap<String, ListeningClient>());
+
+       public SlcEvent listen(String subscriberId,
+                       List<SlcEventListenerDescriptor> descriptors, Long timeout) {
+               if (descriptors.size() == 0) {
+                       // No listener, just waiting
+                       try {
+                               if (log.isTraceEnabled())
+                                       log.trace("No event listener registered, sleeping...");
+                               Thread.sleep(timeout);
+                       } catch (InterruptedException e) {
+                               // silent
+                       }
+                       return null;
+               } else {
+                       Object obj = null;
+                       synchronized (subscriberIds) {
+                               while (subscriberIds.contains(subscriberId)) {
+                                       try {
+                                               subscriberIds.wait(500);
+                                               if (isClosed)
+                                                       return null;
+                                       } catch (InterruptedException e) {
+                                               // silent
+                                       }
+                               }
+                               subscriberIds.add(subscriberId);
+                               Session session = null;
+                               TopicSubscriber topicSubscriber = null;
+                               try {
+                                       // ListeningClient client = (ListeningClient)
+                                       // getClient(clientId);
+                                       session = connection.createSession(false,
+                                                       Session.AUTO_ACKNOWLEDGE);
+                                       topicSubscriber = session.createDurableSubscriber(
+                                                       eventsDestination, subscriberId,
+                                                       createSelector(descriptors), true);
+                                       Message message = topicSubscriber.receive(timeout);
+                                       obj = messageConverter.fromMessage(message);
+                               } catch (JMSException e) {
+                                       throw new SlcException("Cannot poll events for subscriber "
+                                                       + subscriberId, e);
+                               } finally {
+                                       JmsUtils.closeMessageConsumer(topicSubscriber);
+                                       JmsUtils.closeSession(session);
+                                       subscriberIds.remove(subscriberId);
+                                       subscriberIds.notifyAll();
+                               }
+
+                       }
+
+                       if (obj == null)
+                               return null;
+                       else
+                               return (SlcEvent) obj;
+               }
+       }
+
+       /** Returns null if no filter */
+       protected String createSelector(List<SlcEventListenerDescriptor> descriptors) {
+               if (descriptors.size() == 0)
+                       throw new SlcException("No listeners, cannot generate JMS selector");
+
+               StringBuffer buf = new StringBuffer(256);
+               Boolean first = true;
+               for (SlcEventListenerDescriptor descriptor : descriptors) {
+                       if (first)
+                               first = false;
+                       else
+                               buf.append(" OR ");
+
+                       buf.append('(');
+                       buf.append(SlcEvent.EVENT_TYPE).append("=").append('\'').append(
+                                       descriptor.getEventType()).append('\'');
+                       if (descriptor.getFilter() != null) {
+                               buf.append(" AND ");
+                               buf.append('(').append(descriptor.getFilter()).append(')');
+                       }
+                       buf.append(')');
+               }
+               if (log.isTraceEnabled())
+                       log.trace("selector created : " + buf.toString());
+               return buf.toString();
+       }
+
+       public boolean isClosed() {
+               return isClosed;
+       }
+
+       // Ioc
+       public void setEventsDestination(Topic eventsDestination) {
+               this.eventsDestination = eventsDestination;
+       }
+
+       public void setJmsConnectionFactory(ConnectionFactory jmsConnectionFactory) {
+               this.jmsConnectionFactory = jmsConnectionFactory;
+       }
+
+       public void setMessageConverter(MessageConverter messageConverter) {
+               this.messageConverter = messageConverter;
+       }
+
+       // Life Cycle
+       public void init() {
+               try {
+                       connection = jmsConnectionFactory.createConnection();
+                       connection.setClientID(connectionClientId);
+                       connection.start();
+               } catch (JMSException e) {
+                       throw new SlcException("Could not init connection", e);
+               }
+       }
+
+       public void close() {
+               ConnectionFactoryUtils.releaseConnection(connection,
+                               jmsConnectionFactory, true);
+               isClosed = true;
+               synchronized (subscriberIds) {
+                       subscriberIds.notifyAll();
+               }
+       }
+
+       // public void close(String clientId) {
+       // // Session session = null;
+       // // // ListeningClient client = getClient(clientId);
+       // // // Connection connection = client.getConnection();
+       // // try {
+       // // session = client.getSession();
+       // // session.unsubscribe(clientId);
+       // // } catch (JMSException e) {
+       // // log.warn("Could not unsubscribe client " + clientId, e);
+       // // } finally {
+       // // JmsUtils.closeSession(session);
+       // // }
+       // //
+       // // // synchronized (client) {
+       // // // clients.remove(clientId);
+       // // // client.notify();
+       // // // }
+       // }
+
+       // protected ListeningClient getClient(String clientId) {
+       // ListeningClient client = clients.get(clientId);
+       // if (client == null) {
+       // // Lazy init
+       // client = new ListeningClient(connection);
+       // clients.put(clientId, client);
+       // }
+       // return client;
+       // }
+
+       // protected class ListeningClient {
+       // private final Connection connection;
+       // private final Session session;
+       //
+       // public ListeningClient(Connection connection) {
+       // super();
+       // this.connection = connection;
+       // try {
+       // session = connection.createSession(false,
+       // Session.AUTO_ACKNOWLEDGE);
+       // } catch (JMSException e) {
+       // throw new SlcException("Cannot create session");
+       // }
+       // }
+       //
+       // public Connection getConnection() {
+       // return connection;
+       // }
+       //
+       // public Session getSession() {
+       // return session;
+       // }
+       //
+       // }
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventPublisher.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventPublisher.java
new file mode 100644 (file)
index 0000000..a95ffc8
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.util.Map;
+
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.msg.event.SlcEvent;
+import org.argeo.slc.msg.event.SlcEventPublisher;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.core.MessagePostProcessor;
+
+public class JmsSlcEventPublisher implements SlcEventPublisher {
+       private static final Log log = LogFactory
+                       .getLog(JmsSlcEventPublisher.class);
+       private Destination eventsDestination;
+       private JmsTemplate jmsTemplate;
+
+       public void publish(final SlcEvent event) {
+               if (jmsTemplate.getDeliveryMode() != DeliveryMode.PERSISTENT)
+                       throw new SlcException(
+                                       "Delivery mode has to be persistent in order to have durable subscription");
+
+               jmsTemplate.convertAndSend(eventsDestination, event,
+                               new MessagePostProcessor() {
+
+                                       public Message postProcessMessage(Message message)
+                                                       throws JMSException {
+                                               Map<String, String> headers = event.getHeaders();
+                                               for (String key : headers.keySet()) {
+                                                       message.setStringProperty(key, headers.get(key));
+                                               }
+                                               return message;
+                                       }
+                               });
+               if (log.isTraceEnabled()) {
+                       log.trace("Event " + event.toString() + " sent to "
+                                       + eventsDestination.toString());
+               }
+
+       }
+
+       public void setEventsDestination(Destination eventsDestination) {
+               this.eventsDestination = eventsDestination;
+       }
+
+       public void setJmsTemplate(JmsTemplate jmsTemplate) {
+               this.jmsTemplate = jmsTemplate;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java
new file mode 100644 (file)
index 0000000..4e68db3
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.util.List;
+
+import javax.jms.Destination;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.UnsupportedException;
+import org.argeo.slc.execution.ExecutionProcess;
+import org.argeo.slc.execution.ExecutionStep;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.process.SlcExecutionNotifier;
+import org.argeo.slc.process.SlcExecutionStep;
+import org.springframework.jms.JmsException;
+import org.springframework.jms.core.JmsTemplate;
+
+@SuppressWarnings("deprecation")
+public class JmsSlcExecutionNotifier implements SlcExecutionNotifier {
+       private final static Log log = LogFactory
+                       .getLog(JmsSlcExecutionNotifier.class);
+
+       private JmsTemplate jmsTemplate;
+
+       private Destination executionEventDestination;
+
+       // private Destination updateStatusDestination;
+
+       public void updateStatus(ExecutionProcess slcExecution, String oldStatus,
+                       String newStatus) {
+               SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(
+                               slcExecution.getUuid(), newStatus);
+               convertAndSend(req);
+       }
+
+       public void addSteps(ExecutionProcess slcExecution,
+                       List<ExecutionStep> additionalSteps) {
+               SlcExecutionStepsRequest req = new SlcExecutionStepsRequest(
+                               slcExecution.getUuid(), additionalSteps);
+               convertAndSend(req);
+       }
+
+       public void newExecution(SlcExecution slcExecution) {
+               throw new UnsupportedException();
+       }
+
+       public void updateExecution(SlcExecution slcExecution) {
+               throw new UnsupportedException();
+       }
+
+       public void setJmsTemplate(JmsTemplate jmsTemplate) {
+               this.jmsTemplate = jmsTemplate;
+       }
+
+       public void setExecutionEventDestination(
+                       Destination executionEventDestination) {
+               this.executionEventDestination = executionEventDestination;
+       }
+
+       protected void convertAndSend(Object req) {
+               try {
+                       jmsTemplate.convertAndSend(executionEventDestination, req);
+               } catch (JmsException e) {
+                       log.warn("Send request " + req.getClass() + " to server: "
+                                       + e.getMessage());
+                       if (log.isTraceEnabled())
+                               log.debug("Original error.", e);
+               }
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsTreeTestResultListener.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsTreeTestResultListener.java
new file mode 100644 (file)
index 0000000..2cd88c4
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import javax.jms.Destination;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.core.attachment.Attachment;
+import org.argeo.slc.core.attachment.SimpleAttachment;
+import org.argeo.slc.core.test.tree.TreeTestResult;
+import org.argeo.slc.core.test.tree.TreeTestResultListener;
+import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.ResultPartRequest;
+import org.argeo.slc.test.TestResultPart;
+import org.springframework.jms.JmsException;
+import org.springframework.jms.core.JmsTemplate;
+
+/** JMS based tree test result listener implementation. */
+public class JmsTreeTestResultListener implements TreeTestResultListener {
+       private final Log log = LogFactory.getLog(getClass());
+
+       private Boolean onlyOnClose = false;
+       private JmsTemplate jmsTemplate;
+
+       private Destination executionEventDestination;
+
+       public void resultPartAdded(TreeTestResult testResult,
+                       TestResultPart testResultPart) {
+               if (onlyOnClose)
+                       return;
+
+               try {
+                       if (testResult.getResultParts().size() == 1
+                                       && testResult.getResultParts().values().iterator().next()
+                                                       .getParts().size() == 1) {
+                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
+                                               testResult);
+
+                               if (log.isTraceEnabled())
+                                       log.trace("Send create result request for result "
+                                                       + testResult.getUuid());
+
+                               jmsTemplate.convertAndSend(executionEventDestination, req);
+                       } else {
+                               ResultPartRequest req = new ResultPartRequest(testResult);
+
+                               if (log.isTraceEnabled())
+                                       log.trace("Send result parts for result "
+                                                       + testResult.getUuid());
+
+                               jmsTemplate.convertAndSend(executionEventDestination, req);
+                       }
+               } catch (JmsException e) {
+                       log.warn("Could not notify result part to server: "
+                                       + e.getMessage());
+                       if (log.isTraceEnabled())
+                               log.debug("Original error.", e);
+               } catch (Exception e) {
+                       throw new SlcException("Could not notify to JMS", e);
+               }
+       }
+
+       public void close(TreeTestResult testResult) {
+               try {
+                       if (onlyOnClose) {
+                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
+                                               testResult);
+
+                               if (log.isTraceEnabled())
+                                       log.trace("Send onClose create result request for result "
+                                                       + testResult.getUuid());
+
+                               jmsTemplate.convertAndSend(executionEventDestination, req);
+                       } else {
+                               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(
+                                               testResult);
+
+                               if (log.isTraceEnabled())
+                                       log.trace("Send close result request for result "
+                                                       + testResult.getUuid());
+
+                               jmsTemplate.convertAndSend(executionEventDestination, req);
+
+                       }
+               } catch (JmsException e) {
+                       log.warn("Could not notify result close to server: "
+                                       + e.getMessage());
+                       if (log.isTraceEnabled())
+                               log.debug("Original error.", e);
+               } catch (Exception e) {
+                       throw new SlcException("Could not notify to JMS", e);
+               }
+       }
+
+       public void addAttachment(TreeTestResult testResult, Attachment attachment) {
+               if (onlyOnClose)
+                       return;
+
+               try {
+                       AddTreeTestResultAttachmentRequest req = new AddTreeTestResultAttachmentRequest();
+                       req.setResultUuid(testResult.getUuid());
+                       req.setAttachment((SimpleAttachment) attachment);
+                       jmsTemplate.convertAndSend(executionEventDestination, req);
+
+               } catch (JmsException e) {
+                       log
+                                       .warn("Could not notify attachment to server: "
+                                                       + e.getMessage());
+                       if (log.isTraceEnabled())
+                               log.debug("Original error.", e);
+               } catch (Exception e) {
+                       throw new SlcException("Could not notify to JMS", e);
+               }
+
+       }
+
+       /** Publishes the test result only when it gets closed. */
+       public void setOnlyOnClose(Boolean onlyOnClose) {
+               this.onlyOnClose = onlyOnClose;
+       }
+
+       public void setJmsTemplate(JmsTemplate jmsTemplate) {
+               this.jmsTemplate = jmsTemplate;
+       }
+
+       public void setExecutionEventDestination(
+                       Destination executionEventDestination) {
+               this.executionEventDestination = executionEventDestination;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/MarshallerMessageConverter.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/MarshallerMessageConverter.java
new file mode 100644 (file)
index 0000000..797abb9
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.io.Serializable;
+import java.util.Enumeration;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.ObjectMessage;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.springframework.jms.support.converter.MessageConversionException;
+import org.springframework.jms.support.converter.MessageConverter;
+import org.springframework.oxm.Marshaller;
+import org.springframework.oxm.Unmarshaller;
+import org.springframework.xml.transform.StringResult;
+import org.springframework.xml.transform.StringSource;
+
+public class MarshallerMessageConverter implements MessageConverter {
+       private final static Log log = LogFactory
+                       .getLog(MarshallerMessageConverter.class);
+
+       private Marshaller marshaller;
+       private Unmarshaller unmarshaller;
+
+       /** Use unmarshalled ObjectMessages instead of TextMessages */
+       private Boolean disableMarshalling = false;
+
+       /** @return the converted message or null if the message itself is null */
+       @SuppressWarnings("unchecked")
+       public Object fromMessage(Message message) throws JMSException,
+                       MessageConversionException {
+               long begin = System.currentTimeMillis();
+               if (message == null)
+                       return null;
+               if (log.isTraceEnabled()) {
+                       Enumeration<String> names = message.getPropertyNames();
+                       while (names.hasMoreElements()) {
+                               String name = names.nextElement();
+                               log.trace("JMS Property: " + name + "="
+                                               + message.getObjectProperty(name));
+                       }
+               }
+
+               Object res;
+               if (message instanceof TextMessage) {
+                       String text = ((TextMessage) message).getText();
+                       if (text == null)
+                               throw new SlcException(
+                                               "Cannot unmarshall message without body: " + message);
+                       try {
+                               res = unmarshaller.unmarshal(new StringSource(text));
+                       } catch (Exception e) {
+                               throw new SlcException("Could not unmarshall " + text, e);
+                       }
+               } else if (message instanceof ObjectMessage) {
+                       res = ((ObjectMessage) message).getObject();
+                       if (res == null)
+                               throw new SlcException("Message without body: " + message);
+               } else {
+                       throw new SlcException("This type of messages is not supported: "
+                                       + message);
+               }
+               if (log.isTraceEnabled())
+                       log.trace("'From' message processed in " + (System.currentTimeMillis() - begin)
+                                       + " ms");
+               return res;
+       }
+
+       public Message toMessage(Object object, Session session)
+                       throws JMSException, MessageConversionException {
+               long begin = System.currentTimeMillis();
+               Message msg;
+               if (disableMarshalling) {
+                       msg = session.createObjectMessage();
+                       ((ObjectMessage) msg).setObject((Serializable) object);
+               } else {
+                       StringResult result = new StringResult();
+                       try {
+                               marshaller.marshal(object, result);
+                       } catch (Exception e) {
+                               throw new SlcException("Could not marshall " + object, e);
+                       }
+                       msg = session.createTextMessage();
+                       ((TextMessage) msg).setText(result.toString());
+               }
+               if (log.isTraceEnabled())
+                       log.trace("'To' message processed in " + (System.currentTimeMillis() - begin)
+                                       + " ms");
+               return msg;
+       }
+
+       public void setMarshaller(Marshaller marshaller) {
+               this.marshaller = marshaller;
+       }
+
+       public void setUnmarshaller(Unmarshaller unmarshaller) {
+               this.unmarshaller = unmarshaller;
+       }
+
+       public void setDisableMarshalling(Boolean disableMarshalling) {
+               this.disableMarshalling = disableMarshalling;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/ServiceMessageListenerAdapter.java b/legacy/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/ServiceMessageListenerAdapter.java
new file mode 100644 (file)
index 0000000..b350340
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.jms;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Session;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.msg.ExecutionAnswer;
+import org.springframework.jms.listener.adapter.MessageListenerAdapter;
+
+public class ServiceMessageListenerAdapter extends MessageListenerAdapter {
+       public final static String DEFAULT_METHOD_NAME_PARAMETER = "action";
+       public final static String BODY_ARGUMENT = "BODY";
+
+       private Map<String, List<String>> methodArguments = new HashMap<String, List<String>>();
+
+       private static String methodNameParameter = DEFAULT_METHOD_NAME_PARAMETER;
+
+       @Override
+       protected Object extractMessage(Message message) throws JMSException {
+               return new ExtractedMessage(message);
+       }
+
+       @Override
+       protected String getListenerMethodName(Message originalMessage,
+                       Object extractedMessage) throws JMSException {
+               return ((ExtractedMessage) extractedMessage).methodName;
+       }
+
+       @Override
+       protected Object[] buildListenerArguments(Object extractedMessage) {
+               return ((ExtractedMessage) extractedMessage).arguments;
+       }
+
+       @Override
+       public void onMessage(Message message, Session session) throws JMSException {
+               try {// hacked and simplified from parent class
+                       // Regular case: find a handler method reflectively.
+                       Object convertedMessage = extractMessage(message);
+                       String methodName = getListenerMethodName(message, convertedMessage);
+
+                       // Invoke the handler method with appropriate arguments.
+                       Object[] listenerArguments = buildListenerArguments(convertedMessage);
+                       Object result = invokeListenerMethod(methodName, listenerArguments);
+                       if (result != null) {
+                               handleResult(result, message, session);
+                       } else {
+                               ExecutionAnswer answer = ExecutionAnswer.ok("Execution of "
+                                               + methodName + " on " + getDelegate() + " succeeeded.");
+                               Message okMessage = getMessageConverter().toMessage(answer,
+                                               session);
+                               sendResponse(session, getResponseDestination(message,
+                                               okMessage, session), okMessage);
+                       }
+               } catch (Exception e) {
+                       if (session == null)
+                               return;
+
+                       StringWriter writer = new StringWriter();
+                       e.printStackTrace(new PrintWriter(writer));
+                       ExecutionAnswer answer = ExecutionAnswer.error(writer.toString());
+                       Message errorMessage = getMessageConverter().toMessage(answer,
+                                       session);
+                       sendResponse(session, getResponseDestination(message, errorMessage,
+                                       session), errorMessage);
+               }
+       }
+
+       protected class ExtractedMessage {
+               private final String methodName;
+               private final Object[] arguments;
+//             private final Message originalMessage;
+
+               public ExtractedMessage(Message originalMessage) throws JMSException {
+//                     this.originalMessage = originalMessage;
+
+                       if (!originalMessage.propertyExists(methodNameParameter))
+                               throw new SlcException("No property " + methodNameParameter
+                                               + " in incoming message,"
+                                               + " cannot determine service method");
+
+                       methodName = originalMessage.getStringProperty(methodNameParameter);
+
+                       if (!methodArguments.containsKey(methodName)) {// no arg specified
+                               arguments = new Object[0];
+                       } else {
+                               List<String> parameterNames = methodArguments.get(methodName);
+                               List<Object> arguments = new ArrayList<Object>();
+                               int count = 0;
+                               for (String name : parameterNames) {
+                                       if (name.equals(BODY_ARGUMENT)) {
+                                               Object body = getMessageConverter().fromMessage(
+                                                               originalMessage);
+                                               arguments.add(body);
+                                       } else {
+                                               if (!originalMessage.propertyExists(name))
+                                                       throw new SlcException("No property " + name
+                                                                       + " in incoming message,"
+                                                                       + " cannot determine argument #" + count);
+                                               arguments.add(originalMessage.getObjectProperty(name));
+                                       }
+                                       count++;
+                               }
+                               this.arguments = arguments.toArray();
+                       }
+               }
+       }
+
+       public void setMethodArguments(Map<String, List<String>> methodArguments) {
+               this.methodArguments = methodArguments;
+       }
+
+       public static void setMethodNameParameter(String methodNameParameter) {
+               ServiceMessageListenerAdapter.methodNameParameter = methodNameParameter;
+       }
+       
+       
+}
diff --git a/legacy/runtime/org.argeo.slc.support.activemq/src/main/resources/org/argeo/slc/activemq/destinations.xml b/legacy/runtime/org.argeo.slc.support.activemq/src/main/resources/org/argeo/slc/activemq/destinations.xml
new file mode 100644 (file)
index 0000000..4a27b63
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="false">
+
+       <!-- Events -->
+       <bean id="slcJms.destination.events" p:physicalName="events"
+               parent="slcJms.amTopic" />
+
+       <!-- Attachments -->
+       <bean id="slcJms.destination.attachment.add" p:physicalName="attachment.add"
+               parent="slcJms.amQueue" />
+
+       <!-- Agent service -->
+       <bean id="slcJms.destination.agent.register" p:physicalName="agent.register"
+               parent="slcJms.amTopic" />
+       <bean id="slcJms.destination.agent.unregister" p:physicalName="agent.unregister"
+               parent="slcJms.amTopic" />
+       <bean id="slcJms.destination.agent.request" p:physicalName="agent.request"
+               parent="slcJms.amQueue" />
+       <bean id="slcJms.destination.agent.response" p:physicalName="agent.response"
+               parent="slcJms.amQueue" />
+       <bean id="slcJms.destination.agent.pingAll" p:physicalName="agent.pingAll"
+               parent="slcJms.amTopic" />
+
+       <bean id="slcJms.destination.execution.event" p:physicalName="execution.event"
+               parent="slcJms.amQueue" />
+
+       <!-- Templates -->
+       <bean id="slcJms.amQueue" class="org.apache.activemq.command.ActiveMQQueue"
+               abstract="true" />
+       <bean id="slcJms.amTopic" class="org.apache.activemq.command.ActiveMQTopic"
+               abstract="true" />
+
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/.classpath b/legacy/runtime/org.argeo.slc.support.castor/.classpath
new file mode 100644 (file)
index 0000000..2389826
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+       <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/legacy/runtime/org.argeo.slc.support.castor/.project b/legacy/runtime/org.argeo.slc.support.castor/.project
new file mode 100644 (file)
index 0000000..c0bc103
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.support.castor</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs b/legacy/runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..93d3174
--- /dev/null
@@ -0,0 +1,12 @@
+#Fri Aug 29 11:10:18 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/legacy/runtime/org.argeo.slc.support.castor/build.properties b/legacy/runtime/org.argeo.slc.support.castor/build.properties
new file mode 100644 (file)
index 0000000..a3d6266
--- /dev/null
@@ -0,0 +1,8 @@
+additional.bundles = org.argeo.slc.unit,\
+                     junit,\
+                     org.apache.xml.serializer,\
+                     org.apache.xerces
+source.. = src/main/java/,\
+           src/main/resources/,\
+           src/test/java/,\
+           src/test/resources/
diff --git a/legacy/runtime/org.argeo.slc.support.castor/pom.xml b/legacy/runtime/org.argeo.slc.support.castor/pom.xml
new file mode 100644 (file)
index 0000000..9ba9f6b
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><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>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>runtime</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <groupId>org.argeo.slc.runtime</groupId>
+       <artifactId>org.argeo.slc.support.castor</artifactId>
+       <name>SLC Support Castor</name>
+       <description>Implementations of SLC Specs using Castor</description>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+
+                               <configuration>
+                                       <instructions>
+                                               <Export-Package>
+                                                       org.argeo.slc.*
+                                               </Export-Package>
+                                               <Import-Package>
+                                                       org.argeo.slc.*;resolution:=optional,
+                                                       org.argeo.slc.deploy;resolution:=optional,
+                                                       org.argeo.slc.build;resolution:=optional,
+                                                       org.argeo.slc.execution;resolution:=optional,
+                                                       org.argeo.slc.core.attachment;resolution:=optional,
+                                                       org.argeo.slc.core.structure;resolution:=optional,
+                                                       org.argeo.slc.core.structure.tree;resolution:=optional,
+                                                       org.argeo.slc.core.test;resolution:=optional,
+                                                       org.argeo.slc.core.test.tree;resolution:=optional,
+                                                       org.argeo.slc.runtime;resolution:=optional,
+                                                       org.argeo.slc.core.execution;resolution:=optional,
+                                                       org.argeo.slc.msg;resolution:=optional,
+                                                       org.argeo.slc.msg.build;resolution:=optional,
+                                                       org.argeo.slc.msg.process;resolution:=optional,
+                                                       org.argeo.slc.msg.event;resolution:=optional,
+                                                       org.argeo.slc.msg.test.tree;resolution:=optional,
+                                                       org.argeo.slc.detached;resolution:=optional,
+                                                       org.apache.xml.serialize;resolution:=optional,
+                                                       org.apache.xerces.jaxp;resolution:=optional,
+                                                       org.w3c.dom.*;version="0.0.0";resolution:=optional,
+                                                       org.xml.sax.*;version="0.0.0";resolution:=optional,
+                                                       javax.xml.transform.*;version="0.0.0";resolution:=optional,
+                                                       javax.xml.parsers.*;version="0.0.0";resolution:=optional,
+                                                       org.springframework.xml.validation;resolution:=optional,
+                                                       org.apache.commons.io,
+                                                       org.springframework.oxm,
+                                                       org.springframework.core,
+                                                       org.springframework.xml.transform,
+                                                       org.springframework.core.io,
+                                                       *
+                                               </Import-Package>
+                                               <Fragment-Host>org.castor</Fragment-Host>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.core</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.oxm</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.castor</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.apache.xerces</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.apache.xalan</artifactId>
+               </dependency>
+
+               <!-- Unit Tests -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.unit</artifactId>
+                       <scope>test</scope>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java b/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java
new file mode 100644 (file)
index 0000000..4a250e4
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.castor.execution;
+
+import org.argeo.slc.core.execution.PrimitiveAccessor;
+import org.argeo.slc.core.execution.PrimitiveUtils;
+import org.exolab.castor.mapping.AbstractFieldHandler;
+
+public class PrimitiveFieldHandler extends AbstractFieldHandler {
+
+       @Override
+       public Object getValue(Object object) throws IllegalStateException {
+               if (object == null)
+                       return null;
+
+               Object value = ((PrimitiveAccessor) object).getValue();
+               return value != null ? value.toString() : null;
+       }
+
+       @Override
+       public Object newInstance(Object parent, Object[] args)
+                       throws IllegalStateException {
+               return null;
+       }
+
+       @Override
+       public Object newInstance(Object parent) throws IllegalStateException {
+               return null;
+       }
+
+       @Override
+       public void resetValue(Object object) throws IllegalStateException,
+                       IllegalArgumentException {
+       }
+
+       @Override
+       public void setValue(Object object, Object value)
+                       throws IllegalStateException, IllegalArgumentException {
+               PrimitiveAccessor primitiveAccessor = (PrimitiveAccessor) object;
+               String type = primitiveAccessor.getType();
+               String str = value.toString();
+               primitiveAccessor.setValue(PrimitiveUtils.convert(type, str));
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java b/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java
new file mode 100644 (file)
index 0000000..5d56fb9
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.castor.structure.tree;
+
+import org.exolab.castor.mapping.AbstractFieldHandler;
+import org.exolab.castor.mapping.MapItem;
+
+import org.argeo.slc.core.structure.tree.TreeSPath;
+
+public class TreeSPathFieldHandler extends AbstractFieldHandler {
+
+       @Override
+       public Object getValue(Object object) throws IllegalStateException {
+               MapItem part = (MapItem) object;
+               return ((TreeSPath) part.getKey()).getAsUniqueString();
+       }
+
+       @Override
+       public Object newInstance(Object parent) throws IllegalStateException {
+               return null;
+       }
+
+       @Override
+       public Object newInstance(Object parent, Object[] args)
+                       throws IllegalStateException {
+               return null;
+       }
+
+       @Override
+       public void resetValue(Object object) throws IllegalStateException,
+                       IllegalArgumentException {
+               MapItem part = (MapItem) object;
+               part.setKey(null);
+       }
+
+       @Override
+       public void setValue(Object object, Object value)
+                       throws IllegalStateException, IllegalArgumentException {
+               MapItem part = (MapItem) object;
+               part.setKey(new TreeSPath(value.toString()));
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java b/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java
new file mode 100644 (file)
index 0000000..a69eb87
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.castor.test.tree;
+
+import org.argeo.slc.core.test.SimpleResultPart;
+import org.argeo.slc.core.test.SlcTestUtils;
+import org.argeo.slc.test.TestStatus;
+import org.exolab.castor.mapping.AbstractFieldHandler;
+
+public class StatusFieldHandler extends AbstractFieldHandler {
+
+       @Override
+       public Object getValue(Object object) throws IllegalStateException {
+               SimpleResultPart part = (SimpleResultPart) object;
+               return SlcTestUtils.statusToString(part.getStatus());
+       }
+
+       @Override
+       public Object newInstance(Object parent) throws IllegalStateException {
+               return null;
+       }
+
+       @Override
+       public Object newInstance(Object parent, Object[] args)
+                       throws IllegalStateException {
+               return null;
+       }
+
+       @Override
+       public void resetValue(Object object) throws IllegalStateException,
+                       IllegalArgumentException {
+               SimpleResultPart part = (SimpleResultPart) object;
+               // ERROR by default since it should be explicitely set
+               part.setStatus(TestStatus.ERROR);
+       }
+
+       @Override
+       public void setValue(Object object, Object value)
+                       throws IllegalStateException, IllegalArgumentException {
+               SimpleResultPart part = (SimpleResultPart) object;
+               Integer status = SlcTestUtils.stringToStatus((String) value);
+               part.setStatus(status);
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java b/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java
new file mode 100644 (file)
index 0000000..ad6bcdc
--- /dev/null
@@ -0,0 +1,90 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.xml.process;\r
+\r
+import java.io.File;\r
+import java.io.FileWriter;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import javax.xml.transform.stream.StreamResult;\r
+\r
+import org.apache.commons.io.IOUtils;\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.execution.ExecutionProcess;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.process.SlcExecutionNotifier;\r
+import org.argeo.slc.execution.ExecutionStep;\r
+import org.argeo.slc.process.SlcExecutionStep;\r
+import org.springframework.oxm.Marshaller;\r
+\r
+/** @deprecated Probably not even working anymore */\r
+public class FileSlcExecutionNotifier implements SlcExecutionNotifier {\r
+       // private final static SimpleDateFormat sdf = new SimpleDateFormat(\r
+       // "yyyyMMdd-HHmmss");\r
+       //\r
+       // private String basePath;\r
+       private Marshaller marshaller;\r
+\r
+       private Map<String, String> uuidToDir = new HashMap<String, String>();\r
+\r
+       public void addSteps(ExecutionProcess slcExecution,\r
+                       List<ExecutionStep> additionalSteps) {\r
+               writeSlcExecution(slcExecution);\r
+       }\r
+\r
+       public void updateStatus(ExecutionProcess slcExecution, String oldStatus,\r
+                       String newStatus) {\r
+               writeSlcExecution(slcExecution);\r
+       }\r
+\r
+       protected void writeSlcExecution(ExecutionProcess process) {\r
+               if (!(process instanceof SlcExecution))\r
+                       throw new SlcException("Unsupported process type "\r
+                                       + process.getClass());\r
+               SlcExecution slcExecution = (SlcExecution) process;\r
+               FileWriter out = null;\r
+               try {\r
+                       out = new FileWriter(getFilePath(slcExecution));\r
+                       marshaller.marshal(slcExecution, new StreamResult(out));\r
+               } catch (Exception e) {\r
+                       throw new SlcException("Cannot marshall SlcExecution to "\r
+                                       + getFilePath(slcExecution), e);\r
+               } finally {\r
+                       IOUtils.closeQuietly(out);\r
+               }\r
+       }\r
+\r
+       protected String getFileName(SlcExecution slcExecution) {\r
+               return "SlcExecution-" + slcExecution.getUuid() + ".xml";\r
+       }\r
+\r
+       protected String getFilePath(SlcExecution slcExecution) {\r
+               String dirPath = uuidToDir.get(slcExecution.getUuid());\r
+               return dirPath + File.separator + "SlcExecution-"\r
+                               + slcExecution.getUuid() + ".xml";\r
+       }\r
+\r
+       public void setBasePath(String basePath) {\r
+               // this.basePath = basePath;\r
+       }\r
+\r
+       public void setMarshaller(Marshaller marshaller) {\r
+               this.marshaller = marshaller;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java b/legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java
new file mode 100644 (file)
index 0000000..0a99356
--- /dev/null
@@ -0,0 +1,188 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.xml.test.tree;\r
+\r
+import java.io.File;\r
+import java.io.FileOutputStream;\r
+import java.io.InputStream;\r
+import java.io.OutputStream;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import javax.xml.parsers.DocumentBuilder;\r
+import javax.xml.parsers.DocumentBuilderFactory;\r
+import javax.xml.transform.Templates;\r
+import javax.xml.transform.Transformer;\r
+import javax.xml.transform.TransformerFactory;\r
+import javax.xml.transform.dom.DOMResult;\r
+import javax.xml.transform.dom.DOMSource;\r
+import javax.xml.transform.stream.StreamResult;\r
+import javax.xml.transform.stream.StreamSource;\r
+\r
+import org.springframework.core.io.Resource;\r
+import org.springframework.oxm.Marshaller;\r
+import org.springframework.xml.transform.StringResult;\r
+import org.w3c.dom.Document;\r
+\r
+import org.apache.commons.io.IOUtils;\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.test.TestResultListener;\r
+import org.argeo.slc.test.TestResultPart;\r
+\r
+/** Build a report based on a tree test result using an XSLT stylesheet. */\r
+public class XsltReportGenerator implements TestResultListener<TreeTestResult> {\r
+       private final static Log log = LogFactory.getLog(XsltReportGenerator.class);\r
+\r
+       private DocumentBuilder documentBuilder = null;\r
+\r
+       private Resource xsltStyleSheet;\r
+\r
+       private Templates templates;\r
+\r
+       private Marshaller marshaller;\r
+\r
+       private String outputDir;\r
+       private String outputFileExtension = "html";\r
+\r
+       private Boolean logXml = false;\r
+\r
+       private Map<String, String> xsltParameters = new HashMap<String, String>();\r
+\r
+       public void init() {\r
+               if (templates != null)\r
+                       return;\r
+\r
+               if (xsltStyleSheet == null)\r
+                       throw new SlcException("XSLT style sheet not specified.");\r
+\r
+               InputStream in = null;\r
+               try {\r
+                       TransformerFactory transformerFactory = TransformerFactory\r
+                                       .newInstance();\r
+                       in = xsltStyleSheet.getInputStream();\r
+                       StreamSource xsltSource = new StreamSource(in);\r
+                       templates = transformerFactory.newTemplates(xsltSource);\r
+               } catch (Exception e) {\r
+                       throw new SlcException("Could not initialize templates", e);\r
+               } finally {\r
+                       IOUtils.closeQuietly(in);\r
+               }\r
+       }\r
+\r
+       public void resultPartAdded(TreeTestResult testResult,\r
+                       TestResultPart testResultPart) {\r
+\r
+       }\r
+\r
+       public void close(TreeTestResult testResult) {\r
+               if (templates == null)\r
+                       throw new SlcException("XSLT template not initialized");\r
+\r
+               File file = getFile(testResult);\r
+               OutputStream out = null;\r
+\r
+               try {\r
+                       Transformer transformer = templates.newTransformer();\r
+                       for (String paramKey : xsltParameters.keySet()) {\r
+                               transformer\r
+                                               .setParameter(paramKey, xsltParameters.get(paramKey));\r
+                               if (log.isTraceEnabled())\r
+                                       log.trace("Set XSLT parameter " + paramKey + " to "\r
+                                                       + xsltParameters.get(paramKey));\r
+                       }\r
+\r
+                       if (documentBuilder == null)\r
+                               documentBuilder = DocumentBuilderFactory.newInstance()\r
+                                               .newDocumentBuilder();\r
+\r
+                       Document document = documentBuilder.newDocument();\r
+                       DOMResult marshallResult = new DOMResult(document);\r
+                       marshaller.marshal(testResult, marshallResult);\r
+\r
+                       if (logXml) {\r
+                               Transformer identityTransformer = TransformerFactory\r
+                                               .newInstance().newTransformer();\r
+                               StringResult xmlResult = new StringResult();\r
+                               identityTransformer.transform(new DOMSource(marshallResult\r
+                                               .getNode()), xmlResult);\r
+                               log.info("Marshalled XML:\n" + xmlResult);\r
+                       }\r
+\r
+                       DOMSource transfoSource = new DOMSource(marshallResult.getNode());\r
+\r
+                       if (outputDir != null) {\r
+                               File dir = new File(outputDir);\r
+                               dir.mkdirs();\r
+                               out = new FileOutputStream(file);\r
+                               StreamResult outputResult = new StreamResult(out);\r
+                               transformer.transform(transfoSource, outputResult);\r
+                       } else {\r
+                               // print on console if no output dir\r
+                               StringResult result = new StringResult();\r
+                               transformer.transform(transfoSource, result);\r
+                               log.info("Generated report:\n" + result);\r
+                       }\r
+               } catch (Exception e) {\r
+                       throw new SlcException(\r
+                                       "Could not transform test result to " + file, e);\r
+               } finally {\r
+                       IOUtils.closeQuietly(out);\r
+               }\r
+       }\r
+\r
+       public Resource getXsltStyleSheet() {\r
+               return xsltStyleSheet;\r
+       }\r
+\r
+       public void setXsltStyleSheet(Resource xsltStyleSheet) {\r
+               this.xsltStyleSheet = xsltStyleSheet;\r
+       }\r
+\r
+       public void setTemplates(Templates templates) {\r
+               this.templates = templates;\r
+       }\r
+\r
+       public void setMarshaller(Marshaller marshaller) {\r
+               this.marshaller = marshaller;\r
+       }\r
+\r
+       public void setOutputDir(String outputDir) {\r
+               this.outputDir = outputDir;\r
+       }\r
+\r
+       public void setOutputFileExtension(String outputFileExtension) {\r
+               this.outputFileExtension = outputFileExtension;\r
+       }\r
+\r
+       protected File getFile(TreeTestResult result) {\r
+               Long time = System.currentTimeMillis();\r
+               return new File(outputDir + File.separator + time + "-"\r
+                               + result.getUuid() + "." + outputFileExtension);\r
+       }\r
+\r
+       public void setLogXml(Boolean logXml) {\r
+               this.logXml = logXml;\r
+       }\r
+\r
+       public void setXsltParameters(Map<String, String> xsltParameters) {\r
+               this.xsltParameters = xsltParameters;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml
new file mode 100644 (file)
index 0000000..774e1bf
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
+\r
+<mapping>\r
+       <description>Attachment objects XML mapping</description>\r
+\r
+       <class name="org.argeo.slc.core.attachment.SimpleAttachment">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="uuid" type="string" />\r
+               <field name="name" type="string" />\r
+               <field name="contentType" type="string" />\r
+       </class>\r
+\r
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml
new file mode 100644 (file)
index 0000000..ae97e34
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<mapping>
+       <description>Build objects XML mapping</description>
+
+       <class name="org.argeo.slc.BasicNameVersion">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="name">
+                       <bind-xml name="name" node="attribute" />
+               </field>
+               <field name="version">
+                       <bind-xml name="version" node="attribute" />
+               </field>
+       </class>
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml
new file mode 100644 (file)
index 0000000..662cbe6
--- /dev/null
@@ -0,0 +1,172 @@
+<?xml version="1.0"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
+\r
+<mapping>\r
+       <description>Execution objects XML mapping</description>\r
+\r
+       <class name="org.argeo.slc.execution.ExecutionModuleDescriptor">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="name" />\r
+               <field name="version" />\r
+               <field name="label" />\r
+               <field name="description" />\r
+               <field name="executionFlows" collection="arraylist"\r
+                       type="org.argeo.slc.execution.ExecutionFlowDescriptor">\r
+                       <bind-xml auto-naming="deriveByClass" location="execution-flows" />\r
+               </field>\r
+               <field name="executionSpecs" collection="arraylist"\r
+                       type="org.argeo.slc.execution.ExecutionSpec">\r
+                       <bind-xml auto-naming="deriveByClass" location="execution-specs" />\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.execution.ExecutionFlowDescriptor">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="name" identity="true">\r
+                       <bind-xml name="name" node="attribute" />\r
+               </field>\r
+               <field name="path">\r
+                       <bind-xml name="path" node="attribute" />\r
+               </field>\r
+               <field name="executionSpec">\r
+                       <bind-xml name="executionSpec" node="attribute" reference="true" />\r
+               </field>\r
+               <field name="values" collection="map">\r
+                       <bind-xml name="value" location="values">\r
+                               <class name="org.exolab.castor.mapping.MapItem">\r
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                                               ns-prefix="slc" />\r
+                                       <field name="key" type="string">\r
+                                               <bind-xml name="key" node="attribute" />\r
+                                       </field>\r
+                                       <field name="value"\r
+                                               type="org.argeo.slc.core.execution.AbstractExecutionValue">\r
+                                               <bind-xml auto-naming="deriveByClass" />\r
+                                       </field>\r
+                               </class>\r
+                       </bind-xml>\r
+               </field>\r
+       </class>\r
+\r
+       <!-- Specs -->\r
+       <class name="org.argeo.slc.core.execution.DefaultExecutionSpec">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="name" identity="true">\r
+                       <bind-xml name="name" node="attribute" />\r
+               </field>\r
+               <field name="attributes" collection="map">\r
+                       <bind-xml name="value" location="values">\r
+                               <class name="org.exolab.castor.mapping.MapItem">\r
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                                               ns-prefix="slc" />\r
+                                       <field name="key" type="string">\r
+                                               <bind-xml name="key" node="attribute" />\r
+                                       </field>\r
+                                       <field name="value"\r
+                                               type="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
+                                               <bind-xml auto-naming="deriveByClass" />\r
+                                       </field>\r
+                               </class>\r
+                       </bind-xml>\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="isParameter">\r
+                       <bind-xml name="isParameter" node="attribute" />\r
+               </field>\r
+               <field name="isFrozen">\r
+                       <bind-xml name="isFrozen" node="attribute" />\r
+               </field>\r
+               <field name="isHidden">\r
+                       <bind-xml name="isHidden" node="attribute" />\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.core.execution.PrimitiveSpecAttribute"\r
+               extends="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="type">\r
+                       <bind-xml name="type" node="attribute" />\r
+               </field>\r
+               <field name="value" type="string"\r
+                       handler="org.argeo.slc.castor.execution.PrimitiveFieldHandler">\r
+                       <bind-xml node="text" />\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.core.execution.RefSpecAttribute"\r
+               extends="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="targetClassName">\r
+                       <bind-xml name="targetClassName" node="attribute" />\r
+               </field>\r
+               <field name="choices" collection="arraylist"\r
+                       type="org.argeo.slc.core.execution.RefValueChoice">\r
+                       <bind-xml auto-naming="deriveByClass" location="choices" />\r
+               </field>\r
+       </class>\r
+\r
+       <!-- Values -->\r
+       <class name="org.argeo.slc.core.execution.AbstractExecutionValue">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.core.execution.PrimitiveValue"\r
+               extends="org.argeo.slc.core.execution.AbstractExecutionValue">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="type">\r
+                       <bind-xml name="type" node="attribute" />\r
+               </field>\r
+               <field name="value" type="string"\r
+                       handler="org.argeo.slc.castor.execution.PrimitiveFieldHandler">\r
+                       <bind-xml node="text" />\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.core.execution.RefValue" extends="org.argeo.slc.core.execution.AbstractExecutionValue">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="ref">\r
+                       <bind-xml name="ref" node="attribute" />\r
+               </field>\r
+               <field name="type">\r
+                       <bind-xml name="type" node="attribute" />\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.core.execution.RefValueChoice">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="name">\r
+                       <bind-xml name="name" node="attribute" />\r
+               </field>\r
+               <field name="description" />\r
+       </class>\r
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml
new file mode 100644 (file)
index 0000000..2699031
--- /dev/null
@@ -0,0 +1,217 @@
+<?xml version="1.0"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under 
+       the Apache License, Version 2.0 (the "License"); you may not use this file 
+       except in compliance with the License. You may obtain a copy of the License 
+       at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 
+       law or agreed to in writing, software distributed under the License is distributed 
+       on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
+       express or implied. See the License for the specific language governing permissions 
+       and limitations under the License. -->
+
+
+<mapping>
+       <description>Message objects XML mapping</description>
+
+       <!-- TODO: use XML entities to factorize patterns -->
+
+       <!-- BASIC -->
+       <class name="org.argeo.slc.msg.ExecutionAnswer">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="status" />
+               <field name="message" />
+       </class>
+
+       <class name="org.argeo.slc.msg.ReferenceList">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="references" collection="arraylist" type="string">
+                       <bind-xml name="ref" />
+               </field>
+       </class>
+
+       <class name="org.argeo.slc.msg.ObjectList">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="objects" collection="arraylist" type="java.io.Serializable">
+                       <bind-xml auto-naming="deriveByClass" />
+               </field>
+       </class>
+
+       <!-- BUILD -->
+       <class name="org.argeo.slc.msg.build.ModularDistributionDescriptor"
+               extends="org.argeo.slc.BasicNameVersion">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="modulesDescriptors" collection="map">
+                       <bind-xml name="modulesDescriptor" location="modulesDescriptors">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="string">
+                                               <bind-xml name="type" node="attribute" />
+                                       </field>
+                                       <field name="value" type="string">
+                                               <bind-xml name="url" node="attribute" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+       </class>
+
+       <!-- TESTS -->
+       <class name="org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="treeTestResult" type="org.argeo.slc.core.test.tree.TreeTestResult" />
+               <field name="testRunDescriptor" />
+       </class>
+
+       <class name="org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="resultUuid" />
+               <field name="closeDate" />
+       </class>
+
+       <class name="org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="resultUuid" />
+               <field name="attachment" type="org.argeo.slc.core.attachment.SimpleAttachment">
+                       <bind-xml auto-naming="deriveByClass" />
+               </field>
+       </class>
+
+       <class name="org.argeo.slc.msg.test.tree.ResultPartRequest">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="resultUuid" />
+               <field name="resultPart" type="org.argeo.slc.core.test.SimpleResultPart">
+                       <bind-xml auto-naming="deriveByClass" />
+               </field>
+
+               <field name="relatedElements" collection="map">
+                       <bind-xml name="element" location="related-elements">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="org.argeo.slc.core.structure.tree.TreeSPath"
+                                               handler="org.argeo.slc.castor.structure.tree.TreeSPathFieldHandler">
+                                               <bind-xml name="path" node="attribute" />
+                                       </field>
+                                       <field name="value" type="org.argeo.slc.core.structure.SimpleSElement">
+                                               <bind-xml auto-naming="deriveByClass" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+               <field name="path">
+                       <bind-xml auto-naming="deriveByClass" />
+               </field>
+               <field name="testRunDescriptor" />
+               <field name="attributes" collection="hashtable">
+                       <bind-xml name="attribute" location="attributes">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="string">
+                                               <bind-xml name="name" node="attribute" />
+                                       </field>
+                                       <field name="value" type="string">
+                                               <bind-xml node="text" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+       </class>
+
+       <class name="org.argeo.slc.core.test.tree.ResultAttributes">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="uuid" />
+               <field name="closeDate" />
+               <field name="attributes" collection="hashtable">
+                       <bind-xml name="attribute" location="attributes">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="string">
+                                               <bind-xml name="name" node="attribute" />
+                                       </field>
+                                       <field name="value" type="string">
+                                               <bind-xml node="text" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+               <field name="attachments" collection="arraylist"
+                       type="org.argeo.slc.core.attachment.SimpleAttachment">
+                       <bind-xml auto-naming="deriveByClass" location="attachments" />
+               </field>
+       </class>
+
+
+       <!-- PROCESS -->
+       <class name="org.argeo.slc.msg.process.SlcExecutionStepsRequest">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="slcExecutionUuid" />
+               <field name="steps" collection="arraylist"
+                       type="org.argeo.slc.process.SlcExecutionStep">
+                       <bind-xml auto-naming="deriveByClass" location="steps" />
+               </field>
+       </class>
+
+       <class name="org.argeo.slc.msg.process.SlcExecutionStatusRequest">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="slcExecutionUuid" />
+               <field name="newStatus" />
+       </class>
+
+       <class name="org.argeo.slc.msg.process.SlcExecutionRequest">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="slcExecution" type="org.argeo.slc.process.SlcExecution" />
+       </class>
+
+       <!-- EVENTS -->
+
+       <class name="org.argeo.slc.msg.event.SlcEvent">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="headers" collection="map">
+                       <bind-xml name="header" location="headers">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="string">
+                                               <bind-xml name="name" node="attribute" />
+                                       </field>
+                                       <field name="value" type="string">
+                                               <bind-xml node="text" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+       </class>
+
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml
new file mode 100644 (file)
index 0000000..67bba27
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
+\r
+<mapping>\r
+       <description>Process objects XML mapping</description>\r
+\r
+       <class name="org.argeo.slc.process.SlcExecution">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="uuid" identity="true">\r
+                       <bind-xml node="attribute" />\r
+               </field>\r
+               <field name="status" />\r
+               <field name="type" />\r
+               <field name="host" />\r
+               <field name="user" />\r
+               <field name="realizedFlows" collection="arraylist"\r
+                       type="org.argeo.slc.process.RealizedFlow">\r
+                       <bind-xml auto-naming="deriveByClass" location="realized-flows" />\r
+               </field>\r
+               <field name="steps" collection="arraylist"\r
+                       type="org.argeo.slc.process.SlcExecutionStep">\r
+                       <bind-xml auto-naming="deriveByClass" location="steps" />\r
+               </field>\r
+               <field name="attributes" collection="map">\r
+                       <bind-xml name="attribute" location="attributes">\r
+                               <class name="org.exolab.castor.mapping.MapItem">\r
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                                               ns-prefix="slc" />\r
+                                       <field name="key" type="string">\r
+                                               <bind-xml name="name" node="attribute" />\r
+                                       </field>\r
+                                       <field name="value" type="string">\r
+                                               <bind-xml node="text" />\r
+                                       </field>\r
+                               </class>\r
+                       </bind-xml>\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.process.RealizedFlow">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="moduleName"/>\r
+               <field name="moduleVersion" />\r
+               <field name="flowDescriptor">\r
+                       <bind-xml auto-naming="deriveByClass" />\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.process.SlcExecutionStep">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="uuid" identity="true">\r
+                       <bind-xml node="attribute" />\r
+               </field>\r
+               <field name="type" />\r
+               <field name="thread" />\r
+               <field name="timestamp" />\r
+               <field name="logLines" collection="arraylist" type="string">\r
+                       <bind-xml name="log-line" location="log-lines" />\r
+               </field>\r
+       </class>\r
+\r
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml
new file mode 100644 (file)
index 0000000..9b1a1c0
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
+\r
+<mapping>\r
+       <description>Runtime objects XML mapping</description>\r
+\r
+       <class name="org.argeo.slc.runtime.SlcAgentDescriptor">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="uuid" identity="true">\r
+                       <bind-xml node="attribute" />\r
+               </field>\r
+               <field name="host" />\r
+               <field name="moduleDescriptors" collection="arraylist"\r
+                       type="org.argeo.slc.execution.ExecutionModuleDescriptor">\r
+                       <bind-xml auto-naming="deriveByClass" />\r
+               </field>\r
+       </class>\r
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml
new file mode 100644 (file)
index 0000000..0b73dee
--- /dev/null
@@ -0,0 +1,64 @@
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under 
+       the Apache License, Version 2.0 (the "License"); you may not use this file 
+       except in compliance with the License. You may obtain a copy of the License 
+       at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 
+       law or agreed to in writing, software distributed under the License is distributed 
+       on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
+       express or implied. See the License for the specific language governing permissions 
+       and limitations under the License. -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="true">
+
+       <bean id="slcDefault.castor.marshaller" class="org.springframework.oxm.castor.CastorMarshaller">
+               <property name="mappingLocations">
+                       <list>
+                               <value>classpath:org/argeo/slc/castor/common.xml</value>
+                               <value>classpath:org/argeo/slc/castor/msg.xml</value>
+                               <value>classpath:org/argeo/slc/castor/process.xml</value>
+                               <value>classpath:org/argeo/slc/castor/runtime.xml</value>
+                               <value>classpath:org/argeo/slc/castor/structure.xml</value>
+                               <value>classpath:org/argeo/slc/castor/test.xml</value>
+                               <value>classpath:org/argeo/slc/castor/execution.xml</value>
+                               <value>classpath:org/argeo/slc/castor/attachment.xml</value>
+                       </list>
+               </property>
+               <property name="whitespacePreserve" value="true" />
+               <property name="encoding" value="UTF-8" />
+       </bean>
+
+       <bean id="slcDefault.castor.xsltReportGenerator" class="org.argeo.slc.xml.test.tree.XsltReportGenerator"
+               init-method="init">
+               <property name="xsltStyleSheet"
+                       value="classpath:/org/argeo/slc/core/test/tree/basicReport.xslt" />
+               <property name="marshaller" ref="slcDefault.castor.marshaller" />
+               <property name="logXml" value="false" />
+               <property name="outputDir" value="${user.dir}/results/html" />
+       </bean>
+
+       <bean name="slcDefault.castor.fileSlcExecutionNotifier" class="org.argeo.slc.xml.process.FileSlcExecutionNotifier">
+               <property name="basePath" value="${user.dir}/process" />
+               <property name="marshaller" ref="slcDefault.castor.marshaller" />
+       </bean>
+
+</beans>
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml
new file mode 100644 (file)
index 0000000..ad63a7a
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<mapping>\r
+       <description>Structure related objects XML mapping</description>\r
+\r
+       <class name="org.argeo.slc.core.structure.tree.TreeSPath"\r
+               auto-complete="false">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="asUniqueString" type="string">\r
+                       <bind-xml node="attribute" />\r
+               </field>\r
+       </class>\r
+\r
+       <class name="org.argeo.slc.core.structure.SimpleSElement"\r
+               auto-complete="false">\r
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
+                       ns-prefix="slc" />\r
+               <field name="label" type="string" />\r
+               <field name="tags" collection="map">\r
+                       <bind-xml name="tag" location="tags">\r
+                               <class name="org.exolab.castor.mapping.MapItem">\r
+                                       <map-to\r
+                                               ns-uri="http://argeo.org/projects/slc/schemas" ns-prefix="slc" />\r
+                                       <field name="key" type="string">\r
+                                               <bind-xml name="name" node="attribute" />\r
+                                       </field>\r
+                                       <field name="value" type="string">\r
+                                               <bind-xml name="tag-value" />\r
+                                       </field>\r
+                               </class>\r
+                       </bind-xml>\r
+               </field>\r
+       </class>\r
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml b/legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml
new file mode 100644 (file)
index 0000000..45b9bbe
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<mapping>
+       <description>Test objects XML mapping</description>
+
+       <class name="org.argeo.slc.test.TestRunDescriptor" auto-complete="false">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="testRunUuid" />
+               <field name="slcExecutionUuid" />
+               <field name="slcExecutionStepUuid" />
+               <field name="testResultUuid" />
+               <field name="deployedSytemId" />
+       </class>
+
+       <class name="org.argeo.slc.core.test.tree.TreeTestResult"
+               auto-complete="false">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="uuid" type="string">
+                       <bind-xml name="uuid" node="attribute" />
+               </field>
+               <field name="closeDate" />
+               <field name="attributes" collection="map">
+                       <bind-xml name="attribute" location="attributes">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="string">
+                                               <bind-xml name="name" node="attribute" />
+                                       </field>
+                                       <field name="value" type="string">
+                                               <bind-xml node="text" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+               <field name="resultParts" collection="sortedmap">
+                       <bind-xml name="result-part" location="result-parts">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="org.argeo.slc.core.structure.tree.TreeSPath"
+                                               handler="org.argeo.slc.castor.structure.tree.TreeSPathFieldHandler">
+                                               <bind-xml name="path" node="attribute" />
+                                       </field>
+                                       <field name="value" type="org.argeo.slc.core.test.tree.PartSubList">
+                                               <bind-xml name="part-sub-list" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+               <field name="elements" collection="sortedmap">
+                       <bind-xml name="element" location="elements">
+                               <class name="org.exolab.castor.mapping.MapItem">
+                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                                               ns-prefix="slc" />
+                                       <field name="key" type="org.argeo.slc.core.structure.tree.TreeSPath"
+                                               handler="org.argeo.slc.castor.structure.tree.TreeSPathFieldHandler">
+                                               <bind-xml name="path" node="attribute" />
+                                       </field>
+                                       <field name="value" type="org.argeo.slc.core.structure.SimpleSElement">
+                                               <bind-xml auto-naming="deriveByClass" />
+                                       </field>
+                               </class>
+                       </bind-xml>
+               </field>
+               <field name="attachments" collection="arraylist"
+                       type="org.argeo.slc.core.attachment.SimpleAttachment">
+                       <bind-xml auto-naming="deriveByClass" location="attachments" />
+               </field>
+       </class>
+
+       <class name="org.argeo.slc.core.test.tree.PartSubList"
+               auto-complete="false">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="parts" collection="arraylist"
+                       type="org.argeo.slc.core.test.SimpleResultPart">
+                       <bind-xml auto-naming="deriveByClass" location="parts" />
+               </field>
+       </class>
+
+       <class name="org.argeo.slc.core.test.SimpleResultPart"
+               auto-complete="false">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="testRunUuid" type="string" />
+               <field name="message" type="string" />
+               <field name="status" type="string"
+                       handler="org.argeo.slc.castor.test.tree.StatusFieldHandler" />
+               <field name="exceptionMessage" type="string" />
+       </class>
+
+       <class name="org.argeo.slc.core.test.tree.TreeTestResultCollection"
+               auto-complete="false">
+               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
+                       ns-prefix="slc" />
+               <field name="id" type="string">
+                       <bind-xml name="id" node="attribute" />
+               </field>
+               <field name="results" collection="set"
+                       type="org.argeo.slc.core.test.tree.TreeTestResult">
+                       <bind-xml auto-naming="deriveByClass" location="results" />
+               </field>
+       </class>
+</mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/site/apt/index.apt b/legacy/runtime/org.argeo.slc.support.castor/src/site/apt/index.apt
new file mode 100644 (file)
index 0000000..f414460
--- /dev/null
@@ -0,0 +1 @@
+Argeo SLC Site
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java
new file mode 100644 (file)
index 0000000..f91ad0b
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.castor;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.unit.AbstractSpringTestCase;
+import org.argeo.slc.unit.UnitXmlUtils;
+import org.springframework.oxm.Marshaller;
+import org.springframework.oxm.Unmarshaller;
+import org.springframework.xml.transform.StringResult;
+import org.springframework.xml.transform.StringSource;
+import org.springframework.xml.validation.XmlValidator;
+
+public abstract class AbstractCastorTestCase extends AbstractSpringTestCase {
+       protected Log log = LogFactory.getLog(getClass());
+
+       private Marshaller marshaller;
+       private Unmarshaller unmarshaller;
+
+       @Override
+       public void setUp() {
+               marshaller = getBean(Marshaller.class);
+               unmarshaller = getBean(Unmarshaller.class);
+       }
+
+       protected StringResult marshal(Object obj) throws Exception {
+               return marshal(obj, false);
+       }
+
+       protected StringResult marshalAndValidate(Object obj) throws Exception {
+               return marshal(obj, true);
+       }
+
+       protected StringResult marshal(Object obj, boolean validate)
+                       throws Exception {
+               StringResult xml = new StringResult();
+               marshaller.marshal(obj, xml);
+
+               log.info("Marshalled " + obj.getClass() + ": " + xml + "\n");
+
+               if (validate)
+                       UnitXmlUtils.assertXmlValidation(getBean(XmlValidator.class),
+                                       new StringSource(xml.toString()));
+               return xml;
+       }
+
+       @SuppressWarnings("unchecked")
+       protected <T> T unmarshal(StringResult xml) throws Exception {
+               return (T) unmarshaller.unmarshal(new StringSource(xml.toString()));
+       }
+
+       @SuppressWarnings("unchecked")
+       protected <T> T marshUnmarsh(Object obj, boolean validate) throws Exception {
+               StringResult xml = marshal(obj, validate);
+               return (T) unmarshal(xml);
+       }
+
+       @SuppressWarnings("unchecked")
+       protected <T> T marshUnmarsh(Object obj) throws Exception {
+               return (T) marshUnmarsh(obj, true);
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java
new file mode 100644 (file)
index 0000000..ea3b550
--- /dev/null
@@ -0,0 +1,40 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.castor;\r
+\r
+import org.argeo.slc.msg.ExecutionAnswer;\r
+\r
+public class ExecutionAnswerCastorTest extends AbstractCastorTestCase {\r
+       public void testMarshUnmarshOk() throws Exception {\r
+               ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.OK,\r
+                               "No problem!");\r
+               ExecutionAnswer answerUnm = marshUnmarsh(answer);\r
+               assertExecutionAnswer(answer, answerUnm);\r
+       }\r
+\r
+       public void testMarshUnmarshError() throws Exception {\r
+               ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.ERROR,\r
+                               "Oooops...");\r
+               ExecutionAnswer answerUnm = marshUnmarsh(answer);\r
+               assertExecutionAnswer(answer, answerUnm);\r
+       }\r
+\r
+       public static void assertExecutionAnswer(ExecutionAnswer expected,\r
+                       ExecutionAnswer reached) {\r
+               assertEquals(expected.getStatus(), reached.getStatus());\r
+               assertEquals(expected.getMessage(), reached.getMessage());\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java
new file mode 100644 (file)
index 0000000..b25f52b
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.castor;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.argeo.slc.execution.ExecutionFlowDescriptor;\r
+import org.argeo.slc.execution.ExecutionModuleDescriptor;\r
+import org.argeo.slc.execution.ExecutionSpec;\r
+import org.argeo.slc.unit.execution.ExecutionFlowDescriptorTestUtils;\r
+\r
+public class ExecutionModuleDescriptorCastorTest extends AbstractCastorTestCase {\r
+       public void testMarshUnmarsh() throws Exception {\r
+               ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();\r
+               moduleDescriptor.setName("test.module");\r
+               moduleDescriptor.setVersion("1.0.0");\r
+               moduleDescriptor.setLabel("Test Module");\r
+               moduleDescriptor.setDescription("module descriptor");\r
+\r
+               ExecutionFlowDescriptor flowDescriptor = ExecutionFlowDescriptorTestUtils\r
+                               .createSimpleExecutionFlowDescriptor();\r
+\r
+               List<ExecutionFlowDescriptor> flows = new ArrayList<ExecutionFlowDescriptor>();\r
+               flows.add(flowDescriptor);\r
+               moduleDescriptor.setExecutionFlows(flows);\r
+\r
+               List<ExecutionSpec> specs = new ArrayList<ExecutionSpec>();\r
+               specs.add(flowDescriptor.getExecutionSpec());\r
+               moduleDescriptor.setExecutionSpecs(specs);\r
+\r
+               marshUnmarsh(moduleDescriptor, false);\r
+       }\r
+\r
+       public void testMarshUnmarshMini() throws Exception {\r
+               ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();\r
+               moduleDescriptor.setName("test.moodule");\r
+               moduleDescriptor.setVersion("1.0.0");\r
+               marshUnmarsh(moduleDescriptor, false);\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java
new file mode 100644 (file)
index 0000000..317d019
--- /dev/null
@@ -0,0 +1,58 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.castor;\r
+\r
+import org.argeo.slc.msg.ObjectList;\r
+import org.argeo.slc.msg.build.ModularDistributionDescriptor;\r
+\r
+public class ModularDistributionCastorTest extends AbstractCastorTestCase {\r
+       public void testModularDistributionDescriptor() throws Exception {\r
+               ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();\r
+               mdd.setName("name");\r
+               mdd.setVersion("0.1.0");\r
+               mdd.getModulesDescriptors().put("eclipse",\r
+                               "http://localhost/updateSite");\r
+               mdd.getModulesDescriptors().put("modularDistribution",\r
+                               "http://localhost/modularDistribution");\r
+\r
+               marshUnmarsh(mdd, false);\r
+       }\r
+\r
+       public void testModularDistributionDescriptorList() throws Exception {\r
+               ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();\r
+               mdd.setName("name");\r
+               mdd.setVersion("0.1.0");\r
+               mdd.getModulesDescriptors().put("eclipse",\r
+                               "http://localhost/updateSite");\r
+               mdd.getModulesDescriptors().put("modularDistribution",\r
+                               "http://localhost/modularDistribution");\r
+\r
+               ModularDistributionDescriptor mdd2 = new ModularDistributionDescriptor();\r
+               mdd2.setName("name2");\r
+               mdd2.setVersion("0.1.1");\r
+               mdd2.getModulesDescriptors().put("eclipse",\r
+                               "http://localhost/updateSite2");\r
+               mdd2.getModulesDescriptors().put("modularDistribution",\r
+                               "http://localhost/modularDistribution2");\r
+\r
+               ObjectList ol = new ObjectList();\r
+               ol.getObjects().add(mdd);\r
+               ol.getObjects().add(mdd2);\r
+\r
+               marshUnmarsh(ol, false);\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java
new file mode 100644 (file)
index 0000000..b01d9a7
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.castor;
+
+import org.argeo.slc.msg.ObjectList;
+import org.argeo.slc.runtime.SlcAgentDescriptor;
+
+public class ObjectListCastorTest extends AbstractCastorTestCase {
+
+       public void testAgentDescriptorList() throws Exception {
+               SlcAgentDescriptor agentDescriptor = SlcAgentDescriptorCastorTest
+                               .createMiniAgentDescriptor();
+               ObjectList lst = new ObjectList();
+               lst.getObjects().add(agentDescriptor);
+               ObjectList lstUnm = (ObjectList) marshUnmarsh(lst, false);
+               assertEquals(1, lstUnm.getObjects().size());
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java
new file mode 100644 (file)
index 0000000..0367da7
--- /dev/null
@@ -0,0 +1,62 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.castor;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.argeo.slc.execution.ExecutionModuleDescriptor;\r
+import org.argeo.slc.runtime.SlcAgentDescriptor;\r
+\r
+public class SlcAgentDescriptorCastorTest extends AbstractCastorTestCase {\r
+       public void testMarshUnmarshMini() throws Exception {\r
+               SlcAgentDescriptor agentDescriptor = createMiniAgentDescriptor();\r
+               SlcAgentDescriptor agentDescriptorUnm = marshUnmarsh(agentDescriptor,\r
+                               false);\r
+               assertSlcAgentDescriptor(agentDescriptor, agentDescriptorUnm);\r
+       }\r
+\r
+       public void testMarshUnmarshWithModuleDescriptor() throws Exception {\r
+               SlcAgentDescriptor agentDescriptor = createMiniAgentDescriptor();\r
+\r
+               List<ExecutionModuleDescriptor> lst = new ArrayList<ExecutionModuleDescriptor>();\r
+               ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();\r
+               moduleDescriptor.setName("test.moodule");\r
+               moduleDescriptor.setVersion("1.0.0");\r
+               lst.add(moduleDescriptor);\r
+               agentDescriptor.setModuleDescriptors(lst);\r
+\r
+               SlcAgentDescriptor agentDescriptorUnm = marshUnmarsh(agentDescriptor,\r
+                               false);\r
+               assertSlcAgentDescriptor(agentDescriptor, agentDescriptorUnm);\r
+       }\r
+\r
+       protected static SlcAgentDescriptor createMiniAgentDescriptor() {\r
+               SlcAgentDescriptor agentDescriptor = new SlcAgentDescriptor();\r
+               agentDescriptor.setHost("localhost");\r
+               agentDescriptor.setUuid("555");\r
+               return agentDescriptor;\r
+       }\r
+\r
+       protected static void assertSlcAgentDescriptor(SlcAgentDescriptor expected,\r
+                       SlcAgentDescriptor reached) {\r
+               assertNotNull(reached);\r
+               assertEquals(expected.getHost(), reached.getHost());\r
+               assertEquals(expected.getUuid(), expected.getUuid());\r
+               assertEquals(expected.getModuleDescriptors().size(), reached\r
+                               .getModuleDescriptors().size());\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java
new file mode 100644 (file)
index 0000000..44794e1
--- /dev/null
@@ -0,0 +1,87 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.castor;\r
+\r
+import java.text.SimpleDateFormat;\r
+import java.util.UUID;\r
+\r
+import org.argeo.slc.msg.process.SlcExecutionRequest;\r
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.process.SlcExecutionStep;\r
+import org.argeo.slc.unit.process.SlcExecutionTestUtils;\r
+import org.springframework.xml.transform.StringResult;\r
+\r
+public class SlcExecutionCastorTest extends AbstractCastorTestCase {\r
+       public void testMarshalling() throws Exception {\r
+               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
+\r
+               SlcExecutionRequest msgSave = new SlcExecutionRequest();\r
+               msgSave.setSlcExecution(slcExec);\r
+\r
+               StringResult msgSaveXml = marshalAndValidate(msgSave);\r
+\r
+               SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");\r
+               SlcExecutionStep step0 = new SlcExecutionStep();\r
+               step0.setUuid(UUID.randomUUID().toString());\r
+               step0.setTimestamp(sdf.parse("2008-04-17 18:21"));\r
+               step0.setType("LOG");\r
+               step0.addLog("A log message\nand another line");\r
+\r
+               SlcExecutionStep step1 = new SlcExecutionStep();\r
+               step1.setUuid(UUID.randomUUID().toString());\r
+               step1.setTimestamp(sdf.parse("2008-04-17 18:25"));\r
+               step1.setType("LOG");\r
+               step1.addLog("A nother log message");\r
+\r
+               SlcExecutionStepsRequest msgNotif = new SlcExecutionStepsRequest();\r
+               msgNotif.addStep(step0);\r
+               msgNotif.addStep(step1);\r
+               msgNotif.setSlcExecutionUuid(slcExec.getUuid());\r
+\r
+               StringResult msgNotifXml = marshalAndValidate(msgNotif);\r
+\r
+               SlcExecutionRequest msgSaveUnm = unmarshal(msgSaveXml);\r
+               assertNotNull(msgSaveUnm);\r
+               SlcExecutionTestUtils.assertSlcExecution(slcExec, msgSaveUnm\r
+                               .getSlcExecution());\r
+\r
+               SlcExecutionStepsRequest msgNotifUnm = unmarshal(msgNotifXml);\r
+               assertNotNull(msgNotifUnm);\r
+               assertEquals(slcExec.getUuid(), msgNotifUnm.getSlcExecutionUuid());\r
+               assertEquals(2, msgNotifUnm.getSteps().size());\r
+               SlcExecutionTestUtils.assertSlcExecutionStep(step0, msgNotifUnm\r
+                               .getSteps().get(0));\r
+               SlcExecutionTestUtils.assertSlcExecutionStep(step1, msgNotifUnm\r
+                               .getSteps().get(1));\r
+\r
+               SlcExecution slcExecUnm = msgSaveUnm.getSlcExecution();\r
+               slcExecUnm.getSteps().addAll(msgNotifUnm.getSteps());\r
+\r
+               SlcExecutionRequest msgUpdate = new SlcExecutionRequest();\r
+               msgUpdate.setSlcExecution(slcExecUnm);\r
+               StringResult msgUpdateXml = marshalAndValidate(msgUpdate);\r
+\r
+               SlcExecutionRequest msgUpdateUnm = unmarshal(msgUpdateXml);\r
+               assertNotNull(msgUpdateUnm);\r
+       }\r
+\r
+       public void testMarshUnmarsh() throws Exception {\r
+               SlcExecution slcExec = SlcExecutionTestUtils\r
+                               .createSlcExecutionWithRealizedFlows();\r
+               marshUnmarsh(slcExec, false);\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java
new file mode 100644 (file)
index 0000000..7d6d6e9
--- /dev/null
@@ -0,0 +1,78 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.castor;\r
+\r
+import static org.argeo.slc.unit.UnitUtils.assertDateSec;\r
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createCompleteTreeTestResult;\r
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartRequest;\r
+\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
+import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
+import org.springframework.xml.transform.StringResult;\r
+\r
+public class TreeTestResultCastorTest extends AbstractCastorTestCase {\r
+       public void testMarshUnmarsh() throws Exception {\r
+               TreeTestResult ttr = createCompleteTreeTestResult();\r
+\r
+               StringResult xml = marshalAndValidate(ttr);\r
+\r
+               TreeTestResult ttrUnm = unmarshal(xml);\r
+\r
+               UnitTestTreeUtil.assertTreeTestResult(ttr, ttrUnm);\r
+       }\r
+\r
+       public void testCreateTreeTestResultRequest() throws Exception {\r
+               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest();\r
+               req.setTreeTestResult(createCompleteTreeTestResult());\r
+\r
+               StringResult xml = marshalAndValidate(req);\r
+\r
+               CreateTreeTestResultRequest reqUnm = unmarshal(xml);\r
+\r
+               UnitTestTreeUtil.assertTreeTestResult(req.getTreeTestResult(), reqUnm\r
+                               .getTreeTestResult());\r
+       }\r
+\r
+       public void testResultPartRequest() throws Exception {\r
+               TreeTestResult ttr = createCompleteTreeTestResult();\r
+               ResultPartRequest req = createSimpleResultPartRequest(ttr);\r
+\r
+               StringResult xml = marshalAndValidate(req);\r
+\r
+               ResultPartRequest reqUnm = unmarshal(xml);\r
+\r
+               UnitTestTreeUtil\r
+                               .assertPart(req.getResultPart(), reqUnm.getResultPart());\r
+       }\r
+\r
+       public void testCloseTreeTestResultRequest() throws Exception {\r
+               TreeTestResult ttr = createCompleteTreeTestResult();\r
+               ttr.close();\r
+\r
+               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(ttr\r
+                               .getUuid(), ttr.getCloseDate());\r
+\r
+               StringResult xml = marshalAndValidate(req);\r
+\r
+               CloseTreeTestResultRequest reqUnm = unmarshal(xml);\r
+\r
+               assertEquals(ttr.getUuid(), reqUnm.getResultUuid());\r
+               assertDateSec(ttr.getCloseDate(), ttr.getCloseDate());\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java b/legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java
new file mode 100644 (file)
index 0000000..46fc836
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.castor;\r
+\r
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createCompleteTreeTestResult;\r
+\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
+import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
+import org.springframework.xml.transform.StringResult;\r
+\r
+public class TreeTestResultCollectionCastorTest extends AbstractCastorTestCase {\r
+       public void testMarshUnmarsh() throws Exception {\r
+               TreeTestResult ttr = createCompleteTreeTestResult();\r
+               TreeTestResult ttr2 = createCompleteTreeTestResult();\r
+\r
+               TreeTestResultCollection ttrc = new TreeTestResultCollection();\r
+               ttrc.setId("testCollection");\r
+               ttrc.getResults().add(ttr);\r
+               ttrc.getResults().add(ttr2);\r
+\r
+               StringResult xml = marshalAndValidate(ttrc);\r
+\r
+               TreeTestResultCollection ttrcUnm = unmarshal(xml);\r
+\r
+               assertEquals(ttrc.getId(), ttrcUnm.getId());\r
+               assertEquals(ttrc.getResults().size(), ttrcUnm.getResults().size());\r
+               for (TreeTestResult ttrT : ttrc.getResults()) {\r
+                       if (ttrT.getUuid().equals(ttr.getUuid()))\r
+                               UnitTestTreeUtil.assertTreeTestResult(ttr, ttrT);\r
+                       else\r
+                               UnitTestTreeUtil.assertTreeTestResult(ttr2, ttrT);\r
+               }\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties b/legacy/runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties
new file mode 100644 (file)
index 0000000..0133bab
--- /dev/null
@@ -0,0 +1,22 @@
+# Set root logger level to DEBUG and its only appender to A1.\r
+log4j.rootLogger=WARN, console\r
+\r
+## Levels\r
+# Slc\r
+log4j.logger.org.argeo=DEBUG\r
+\r
+# Castor\r
+log4j.logger.org.exolab.castor=WARN\r
+\r
+# Spring\r
+log4j.logger.org.springframework=WARN\r
+\r
+\r
+## Appenders\r
+# A1 is set to be a ConsoleAppender.\r
+log4j.appender.console=org.apache.log4j.ConsoleAppender\r
+\r
+# A1 uses PatternLayout.\r
+log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
+log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
+\r
diff --git a/legacy/runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml b/legacy/runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml
new file mode 100644 (file)
index 0000000..c479075
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <import resource="classpath:/org/argeo/slc/xml/spring.xml" />\r
+       <import resource="classpath:/org/argeo/slc/castor/spring.xml" />\r
+\r
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/.classpath b/legacy/runtime/org.argeo.slc.support.hibernate/.classpath
new file mode 100644 (file)
index 0000000..26b3494
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry kind="src" output="target/classes" path="src/main/java"/>\r
+       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>\r
+       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>\r
+       <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+       <classpathentry kind="output" path="target/classes"/>\r
+</classpath>\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/.project b/legacy/runtime/org.argeo.slc.support.hibernate/.project
new file mode 100644 (file)
index 0000000..0805101
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.support.hibernate</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.jdt.core.prefs b/legacy/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..b5feaf2
--- /dev/null
@@ -0,0 +1,12 @@
+#Fri Aug 29 11:24:23 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.pde.core.prefs b/legacy/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..0572a4a
--- /dev/null
@@ -0,0 +1,3 @@
+#Mon Feb 14 20:13:33 CET 2011
+eclipse.preferences.version=1
+selfhosting.binExcludes=/org.argeo.slc.support.hibernate/target/test-classes,/org.argeo.slc.support.hibernate/target/test-classes
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/build.properties b/legacy/runtime/org.argeo.slc.support.hibernate/build.properties
new file mode 100644 (file)
index 0000000..0f69dad
--- /dev/null
@@ -0,0 +1,21 @@
+additional.bundles = org.springframework.transaction,\
+                     org.argeo.slc.unit,\
+                     junit,\
+                     org.springframework.oxm,\
+                     org.springframework.xml,\
+                     org.dom4j,\
+                     org.springframework.jdbc,\
+                     org.springframework.context.support,\
+                     net.sf.ehcache,\
+                     org.hsqldb,\
+                     org.apache.commons.collections,\
+                     antlr,\
+                     org.argeo.slc.support.castor,\
+                     org.castor,\
+                     org.apache.xml.serializer,\
+                     org.apache.xerces,\
+                     org.h2
+source.. = src/main/java/,\
+           src/main/resources/,\
+           src/test/java/,\
+           src/test/resources/
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/pom.xml b/legacy/runtime/org.argeo.slc.support.hibernate/pom.xml
new file mode 100644 (file)
index 0000000..d996e2f
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>runtime</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <groupId>org.argeo.slc.runtime</groupId>
+       <artifactId>org.argeo.slc.support.hibernate</artifactId>
+       <name>SLC Support Hibernate</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Fragment-Host>org.argeo.slc.core</Fragment-Host>
+                                               <Import-Package>!org.argeo.slc.core.*,org.hibernate.proxy,javassist.util.proxy,*</Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <configuration>
+                                       <!-- FIXME java.lang.NoClassDefFoundError: javax/transaction/TransactionManager -->
+                                       <skipTests>true</skipTests>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.core</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.hibernate</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>net.sf.ehcache</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>edu.emory.mathcs.backport</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.orm</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.jdbc</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.context.support</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.transaction</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.apache.commons.dbcp</artifactId>
+               </dependency>
+
+               <!-- Unit Tests -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.unit</artifactId>
+                       <scope>test</scope>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.support.castor</artifactId>
+                       <scope>test</scope>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.hsqldb</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.h2</artifactId>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/assembly/base.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/assembly/base.xml
new file mode 100644 (file)
index 0000000..c135b91
--- /dev/null
@@ -0,0 +1,32 @@
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<assembly xmlns="http://maven.apache.org/POM/4.0.0"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">\r
+       <id>base</id>\r
+       <includeBaseDirectory>false</includeBaseDirectory>\r
+       <formats>\r
+               <format>zip</format>\r
+       </formats>\r
+       <fileSets>\r
+               <fileSet>\r
+                       <directory>src/base</directory>\r
+                       <outputDirectory></outputDirectory>\r
+               </fileSet>\r
+       </fileSets>\r
+</assembly>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc b/legacy/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc
new file mode 100644 (file)
index 0000000..bcc63c8
--- /dev/null
@@ -0,0 +1,326 @@
+#! /bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Extract launch and ant arguments, (see details below).
+ant_exec_args=
+no_config=false
+use_jikes_default=false
+ant_exec_debug=false
+show_help=false
+for arg in "$@" ; do
+  if [ "$arg" = "--noconfig" ] ; then
+    no_config=true
+  elif [ "$arg" = "--usejikes" ] ; then
+    use_jikes_default=true
+  elif [ "$arg" = "--execdebug" ] ; then
+    ant_exec_debug=true
+  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
+    show_help=true
+    ant_exec_args="$ant_exec_args -h"
+  else
+    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
+      show_help=true
+    fi
+    ant_exec_args="$ant_exec_args \"$arg\""
+  fi
+done
+
+# Source/default ant configuration
+if $no_config ; then
+  rpm_mode=false
+  usejikes=$use_jikes_default
+else
+  # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
+  if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then
+      if [ -f "/etc/ant.conf" ] ; then
+          . /etc/ant.conf
+      fi
+  fi
+
+  # load user ant configuration
+  if [ -f "$HOME/.ant/ant.conf" ] ; then
+    . $HOME/.ant/ant.conf
+  fi
+  if [ -f "$HOME/.antrc" ] ; then
+    . "$HOME/.antrc"
+  fi
+
+  # provide default configuration values
+  if [ -z "$rpm_mode" ] ; then
+    rpm_mode=false
+  fi
+  if [ -z "$usejikes" ] ; then
+    usejikes=$use_jikes_default
+  fi
+fi
+
+# Setup Java environment in rpm mode
+if $rpm_mode ; then
+  if [ -f /usr/share/java-utils/java-functions ] ; then
+    . /usr/share/java-utils/java-functions
+    set_jvm
+    set_javacmd
+  fi
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  Darwin*) darwin=true
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+           fi
+           ;;
+esac
+
+if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
+  ## resolve links - $0 may be a link to ant's home
+  PRG="$0"
+  progname=`basename "$0"`
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+    else
+    PRG=`dirname "$PRG"`"/$link"
+    fi
+  done
+
+  ANT_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  ANT_HOME=`cd "$ANT_HOME" && pwd`
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$ANT_HOME" ] &&
+    ANT_HOME=`cygpath --unix "$ANT_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# set ANT_LIB location
+ANT_LIB="${ANT_HOME}/lib"
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    # IBM's JDK on AIX uses strange locations for the executables
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    elif [ -x "$JAVA_HOME/jre/bin/java" ] ; then
+      JAVACMD="$JAVA_HOME/jre/bin/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=`which java 2> /dev/null `
+    if [ -z "$JAVACMD" ] ; then
+        JAVACMD=java
+    fi
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+# Build local classpath using just the launcher in non-rpm mode or
+# use the Jpackage helper in rpm mode with basic and default jars
+# specified in the ant.conf configuration. Because the launcher is
+# used, libraries linked in ANT_HOME/lib will also be included, but this
+# is discouraged as it is not java-version safe. A user should
+# request optional jars and their dependencies via the OPT_JAR_LIST
+# variable
+if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
+  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
+
+  # If no optional jars have been specified then build the default list
+  if [ -z "$OPT_JAR_LIST" ] ; then
+    for file in /etc/ant.d/*; do
+      if [ -f "$file" ]; then
+        case "$file" in
+        *~) ;;
+        *#*) ;;
+        *.rpmsave) ;;
+        *.rpmnew) ;;
+        *)
+          for dep in `cat "$file"`; do
+            case "$OPT_JAR_LIST" in
+            *"$dep"*) ;;
+            *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
+            esac
+          done
+        esac
+      fi
+    done
+  fi
+
+  # If the user requested to try to add some other jars to the classpath
+  if [ -n "$OPT_JAR_LIST" ] ; then
+    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
+    if [ -n "$_OPTCLASSPATH" ] ; then 
+      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
+    fi
+  fi
+
+  # Explicitly add javac path to classpath, assume JAVA_HOME set
+  # properly in rpm mode
+  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
+    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
+  fi
+  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
+    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
+  fi
+
+  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
+  # user CLASSPATH first and ant-found jars after.
+  # In that case, the user CLASSPATH will override ant-found jars
+  #
+  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
+  # with ant-found jars first and user CLASSPATH after
+  if [ -n "$CLASSPATH" ] ; then
+    # merge local and specified classpath 
+    if [ -z "$LOCALCLASSPATH" ] ; then 
+      LOCALCLASSPATH="$CLASSPATH"
+    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
+      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
+    else
+      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
+    fi
+
+    # remove class path from launcher -cp option
+    CLASSPATH=""
+  fi
+else
+  # not using rpm_mode; use launcher to determine classpaths
+  if [ -z "$LOCALCLASSPATH" ] ; then
+      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
+  else
+      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
+  fi
+fi
+
+if [ -n "$JAVA_HOME" ] ; then
+  # OSX hack to make Ant work with jikes
+  if $darwin ; then
+    OSXHACK="${JAVA_HOME}/../Classes"
+    if [ -d "${OSXHACK}" ] ; then
+      for i in "${OSXHACK}"/*.jar
+      do
+        JIKESPATH="$JIKESPATH:$i"
+      done
+    fi
+  fi
+fi
+
+# Allow Jikes support (off by default)
+if $usejikes; then
+  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
+fi
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+    format=mixed
+  else
+    format=windows
+  fi
+  ANT_HOME=`cygpath --$format "$ANT_HOME"`
+  ANT_LIB=`cygpath --$format "$ANT_LIB"`
+  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
+  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
+  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+  if [ -n "$CLASSPATH" ] ; then
+    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
+    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+  fi
+  CYGHOME=`cygpath --$format "$HOME"`
+fi
+
+# Show script help if requested
+if $show_help ; then
+  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
+  echo 'Script Options:'
+  echo '  --help, --h            print this message and ant help'
+  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
+  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
+  echo '                         configuration files'
+  echo '  --usejikes             enable use of jikes by default, unless'
+  echo '                         set explicitly in configuration files'
+  echo '  --execdebug            print ant exec line generated by this'
+  echo '                         launch script'
+  echo '  '
+fi
+# add a second backslash to variables terminated by a backslash under cygwin
+if $cygwin; then
+  case "$ANT_HOME" in
+    *\\ )
+    ANT_HOME="$ANT_HOME\\"
+    ;;
+  esac
+  case "$CYGHOME" in
+    *\\ )
+    CYGHOME="$CYGHOME\\"
+    ;;
+  esac
+  case "$JIKESPATH" in
+    *\\ )
+    JIKESPATH="$JIKESPATH\\"
+    ;;
+  esac
+  case "$LOCALCLASSPATH" in
+    *\\ )
+    LOCALCLASSPATH="$LOCALCLASSPATH\\"
+    ;;
+  esac
+  case "$CLASSPATH" in
+    *\\ )
+    CLASSPATH="$CLASSPATH\\"
+    ;;
+  esac
+fi
+# Execute ant using eval/exec to preserve spaces in paths,
+# java options, and ant args
+ant_sys_opts=
+if [ -n "$CYGHOME" ]; then
+  if [ -n "$JIKESPATH" ]; then
+    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
+  else
+    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
+  fi
+else
+  if [ -n "$JIKESPATH" ]; then
+    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
+  fi
+fi
+ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
+if $ant_exec_debug ; then
+    echo $ant_exec_command
+fi
+eval $ant_exec_command
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc.bat b/legacy/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc.bat
new file mode 100644 (file)
index 0000000..f8fb7d5
--- /dev/null
@@ -0,0 +1,226 @@
+@echo off\r
+\r
+REM  Licensed to the Apache Software Foundation (ASF) under one or more\r
+REM  contributor license agreements.  See the NOTICE file distributed with\r
+REM  this work for additional information regarding copyright ownership.\r
+REM  The ASF licenses this file to You under the Apache License, Version 2.0\r
+REM  (the "License"); you may not use this file except in compliance with\r
+REM  the License.  You may obtain a copy of the License at\r
+REM \r
+REM      http://www.apache.org/licenses/LICENSE-2.0\r
+REM \r
+REM  Unless required by applicable law or agreed to in writing, software\r
+REM  distributed under the License is distributed on an "AS IS" BASIS,\r
+REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+REM  See the License for the specific language governing permissions and\r
+REM  limitations under the License.\r
+\r
+REM This is an inordinately troublesome piece of code, particularly because it\r
+REM tries to work on both Win9x and WinNT-based systems. If we could abandon '9x\r
+REM support, things would be much easier, but sadly, it is not yet time.\r
+REM Be cautious about editing this, and only add WinNT specific stuff in code that\r
+REM only runs on WinNT.\r
+\r
+if "%HOME%"=="" goto homeDrivePathPre\r
+if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"\r
+\r
+:homeDrivePathPre\r
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre\r
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre\r
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"\r
+\r
+:userProfilePre\r
+if "%USERPROFILE%"=="" goto alpha\r
+if "%USERPROFILE%"=="%HOME%" goto alpha\r
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha\r
+if exist "%USERPROFILE%\antrc_pre.bat" call "%USERPROFILE%\antrc_pre.bat"\r
+\r
+:alpha\r
+\r
+if "%OS%"=="Windows_NT" @setlocal\r
+if "%OS%"=="WINNT" @setlocal\r
+\r
+if "%ANT_HOME%"=="" goto setDefaultAntHome\r
+\r
+:stripAntHome\r
+if not _%ANT_HOME:~-1%==_\ goto checkClasspath\r
+set ANT_HOME=%ANT_HOME:~0,-1%\r
+goto stripAntHome\r
+\r
+:setDefaultAntHome\r
+rem %~dp0 is expanded pathname of the current script under NT\r
+set ANT_HOME=%~dp0..\r
+\r
+:checkClasspath\r
+set _USE_CLASSPATH=yes\r
+rem CLASSPATH must not be used if it is equal to ""\r
+if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no\r
+if "%CLASSPATH%"=="" set _USE_CLASSPATH=no\r
+\r
+rem Slurp the command line arguments. This loop allows for an unlimited number\r
+rem of arguments (up to the command line limit, anyway).\r
+set ANT_CMD_LINE_ARGS=%1\r
+if ""%1""=="""" goto doneStart\r
+shift\r
+:setupArgs\r
+if ""%1""=="""" goto doneStart\r
+if ""%1""==""-noclasspath"" goto clearclasspath\r
+set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1\r
+shift\r
+goto setupArgs\r
+\r
+rem here is there is a -noclasspath in the options\r
+:clearclasspath\r
+set _USE_CLASSPATH=no\r
+shift\r
+goto setupArgs\r
+\r
+rem This label provides a place for the argument list loop to break out\r
+rem and for NT handling to skip to.\r
+\r
+:doneStart\r
+\r
+if _USE_CLASSPATH==no goto findAntHome\r
+\r
+:stripClasspath\r
+if not _%CLASSPATH:~-1%==_\ goto findAntHome\r
+set CLASSPATH=%CLASSPATH:~0,-1%\r
+goto stripClasspath\r
+\r
+:findAntHome\r
+rem find ANT_HOME if it does not exist due to either an invalid value passed\r
+rem by the user or the %0 problem on Windows 9x\r
+if exist "%ANT_HOME%\lib\ant.jar" goto checkJava\r
+\r
+rem check for ant in Program Files\r
+if not exist "%ProgramFiles%\ant" goto checkSystemDrive\r
+set ANT_HOME=%ProgramFiles%\ant\r
+goto checkJava\r
+\r
+:checkSystemDrive\r
+rem check for ant in root directory of system drive\r
+if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive\r
+set ANT_HOME=%SystemDrive%\ant\r
+goto checkJava\r
+\r
+:checkCDrive\r
+rem check for ant in C:\ant for Win9X users\r
+if not exist C:\ant\lib\ant.jar goto noAntHome\r
+set ANT_HOME=C:\ant\r
+goto checkJava\r
+\r
+:noAntHome\r
+echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.\r
+goto end\r
+\r
+:checkJava\r
+set _JAVACMD=%JAVACMD%\r
+\r
+if "%JAVA_HOME%" == "" goto noJavaHome\r
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome\r
+if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe\r
+goto checkJikes\r
+\r
+:noJavaHome\r
+if "%_JAVACMD%" == "" set _JAVACMD=java.exe\r
+\r
+:checkJikes\r
+if not "%JIKESPATH%"=="" goto runAntWithJikes\r
+\r
+:runAnt\r
+if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath\r
+:runAntWithClasspath\r
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%\r
+rem Check the error code of the Ant build\r
+if not "%OS%"=="Windows_NT" goto onError\r
+set ANT_ERROR=%ERRORLEVEL%\r
+goto end\r
+\r
+:runAntNoClasspath\r
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%\r
+rem Check the error code of the Ant build\r
+if not "%OS%"=="Windows_NT" goto onError\r
+set ANT_ERROR=%ERRORLEVEL%\r
+goto end\r
+\r
+:runAntWithJikes\r
+\r
+if not _%JIKESPATH:~-1%==_\ goto checkJikesAndClasspath\r
+set JIKESPATH=%JIKESPATH:~0,-1%\r
+goto runAntWithJikes\r
+\r
+:checkJikesAndClasspath\r
+\r
+if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath\r
+\r
+:runAntWithJikesAndClasspath\r
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%\r
+rem Check the error code of the Ant build\r
+if not "%OS%"=="Windows_NT" goto onError\r
+set ANT_ERROR=%ERRORLEVEL%\r
+goto end\r
+\r
+:runAntWithJikesNoClasspath\r
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%\r
+rem Check the error code of the Ant build\r
+if not "%OS%"=="Windows_NT" goto onError\r
+set ANT_ERROR=%ERRORLEVEL%\r
+goto end\r
+\r
+:onError\r
+rem Windows 9x way of checking the error code.  It matches via brute force.\r
+for %%i in (1 10 100) do set err%%i=\r
+for %%i in (0 1 2) do if errorlevel %%i00 set err100=%%i\r
+if %err100%==2 goto onError200\r
+if %err100%==0 set err100=\r
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%%i0 set err10=%%i\r
+if "%err100%"=="" if %err10%==0 set err10=\r
+:onError1\r
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%err10%%%i set err1=%%i\r
+goto onErrorEnd\r
+:onError200\r
+for %%i in (0 1 2 3 4 5) do if errorlevel 2%%i0 set err10=%%i\r
+if err10==5 for %%i in (0 1 2 3 4 5) do if errorlevel 25%%i set err1=%%i\r
+if not err10==5 goto onError1\r
+:onErrorEnd\r
+set ANT_ERROR=%err100%%err10%%err1%\r
+for %%i in (1 10 100) do set err%%i=\r
+\r
+:end\r
+rem bug ID 32069: resetting an undefined env variable changes the errorlevel.\r
+if not "%_JAVACMD%"=="" set _JAVACMD=\r
+if not "%_ANT_CMD_LINE_ARGS%"=="" set ANT_CMD_LINE_ARGS=\r
+\r
+if "%ANT_ERROR%"=="0" goto mainEnd\r
+\r
+rem Set the return code if we are not in NT.  We can only set\r
+rem a value of 1, but it's better than nothing.\r
+if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1\r
+\r
+rem Set the ERRORLEVEL if we are running NT.\r
+if "%OS%"=="Windows_NT" color 00\r
+\r
+goto omega\r
+\r
+:mainEnd\r
+\r
+rem If there were no errors, we run the post script.\r
+if "%OS%"=="Windows_NT" @endlocal\r
+if "%OS%"=="WINNT" @endlocal\r
+\r
+if "%HOME%"=="" goto homeDrivePathPost\r
+if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"\r
+\r
+:homeDrivePathPost\r
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost\r
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost\r
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"\r
+\r
+:userProfilePost\r
+if "%USERPROFILE%"=="" goto omega\r
+if "%USERPROFILE%"=="%HOME%" goto omega\r
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega\r
+if exist "%USERPROFILE%\antrc_post.bat" call "%USERPROFILE%\antrc_post.bat"\r
+\r
+:omega\r
+\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/process/SlcExecutionDaoHibernate.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/process/SlcExecutionDaoHibernate.java
new file mode 100644 (file)
index 0000000..f581f92
--- /dev/null
@@ -0,0 +1,130 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.process;\r
+\r
+import java.sql.SQLException;\r
+import java.util.List;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.dao.process.SlcExecutionDao;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.process.SlcExecutionStep;\r
+import org.hibernate.HibernateException;\r
+import org.hibernate.Session;\r
+import org.springframework.orm.hibernate3.HibernateCallback;\r
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
+\r
+public class SlcExecutionDaoHibernate extends HibernateDaoSupport implements\r
+               SlcExecutionDao {\r
+       private final static Log log = LogFactory\r
+                       .getLog(SlcExecutionDaoHibernate.class);\r
+\r
+       public void create(SlcExecution slcExecution) {\r
+               getHibernateTemplate().save(slcExecution);\r
+       }\r
+\r
+       public void update(final SlcExecution slcExecution) {\r
+               getHibernateTemplate().update(slcExecution);\r
+       }\r
+\r
+       public void merge(final SlcExecution slcExecution) {\r
+               getHibernateTemplate().merge(slcExecution);\r
+       }\r
+\r
+       public SlcExecution getSlcExecution(String uuid) {\r
+               return (SlcExecution) getHibernateTemplate().get(SlcExecution.class,\r
+                               uuid);\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<SlcExecution> listSlcExecutions() {\r
+               return (List<SlcExecution>) getHibernateTemplate().loadAll(\r
+                               SlcExecution.class);\r
+       }\r
+\r
+       public void addSteps(final String slcExecutionId,\r
+                       final List<SlcExecutionStep> additionalSteps) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               SlcExecution slcExecution = getSlcExecution(session,\r
+                                               slcExecutionId);\r
+                               slcExecution.getSteps().addAll(additionalSteps);\r
+                               session.update(slcExecution);\r
+                               return slcExecution;\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<SlcExecutionStep> tailSteps(final String slcExecutionId,\r
+                       final Integer nbrOfSteps) {\r
+               return (List<SlcExecutionStep>) getHibernateTemplate().execute(\r
+                               new HibernateCallback() {\r
+\r
+                                       public Object doInHibernate(Session session)\r
+                                                       throws HibernateException, SQLException {\r
+                                               SlcExecution slcExecution = getSlcExecution(session,\r
+                                                               slcExecutionId);\r
+                                               // TODO: do a query count() instead?\r
+                                               int stepCount = slcExecution.getSteps().size();\r
+                                               if (stepCount > nbrOfSteps) {\r
+                                                       return session.createFilter(\r
+                                                                       slcExecution.getSteps(), "")\r
+                                                                       .setFirstResult(stepCount - nbrOfSteps)\r
+                                                                       .setMaxResults(nbrOfSteps).list();\r
+                                               } else {\r
+                                                       return slcExecution.getSteps();\r
+                                               }\r
+                                       }\r
+                               });\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<SlcExecutionStep> tailSteps(final String slcExecutionId,\r
+                       final String slcExecutionStepId) {\r
+               Object[] values = { slcExecutionStepId, slcExecutionId };\r
+               List<Integer> indexes = getHibernateTemplate().findByNamedQuery(\r
+                               SlcExecutionStep.class.getName() + ".stepIndex", values);\r
+\r
+               Integer index = indexes.get(0);\r
+               if (log.isTraceEnabled()){\r
+                       log.trace(indexes.size());\r
+                       log.trace("Index " + index + " for step " + slcExecutionStepId\r
+                                       + " in process " + slcExecutionId);\r
+               }\r
+               Object[] values2 = { slcExecutionId, index };\r
+               return getHibernateTemplate().findByNamedQuery(\r
+                               SlcExecutionStep.class.getName() + ".stepsAfter", values2);\r
+       }\r
+\r
+       protected SlcExecution getSlcExecution(Session session,\r
+                       String slcExecutionId) {\r
+               SlcExecution slcExecution = (SlcExecution) session.get(\r
+                               SlcExecution.class, slcExecutionId);\r
+\r
+               if (slcExecution == null)\r
+                       throw new SlcException("Could not find SLC execution "\r
+                                       + slcExecutionId);\r
+\r
+               return slcExecution;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/runtime/SlcAgentDescriptorDaoHibernate.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/runtime/SlcAgentDescriptorDaoHibernate.java
new file mode 100644 (file)
index 0000000..5e09059
--- /dev/null
@@ -0,0 +1,54 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.runtime;\r
+\r
+import java.util.List;\r
+\r
+import org.argeo.slc.dao.runtime.SlcAgentDescriptorDao;\r
+import org.argeo.slc.runtime.SlcAgentDescriptor;\r
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
+\r
+public class SlcAgentDescriptorDaoHibernate extends HibernateDaoSupport\r
+               implements SlcAgentDescriptorDao {\r
+\r
+       public void create(SlcAgentDescriptor slcAgentDescriptor) {\r
+               getHibernateTemplate().save(slcAgentDescriptor);\r
+       }\r
+\r
+       public void delete(SlcAgentDescriptor slcAgentDescriptor) {\r
+               getHibernateTemplate().delete(slcAgentDescriptor);\r
+       }\r
+\r
+       public void delete(String agentId) {\r
+               Object obj = getHibernateTemplate().get(SlcAgentDescriptor.class,\r
+                               agentId);\r
+               if (obj != null)\r
+                       getHibernateTemplate().delete(obj);\r
+       }\r
+\r
+       public SlcAgentDescriptor getAgentDescriptor(String agentId) {\r
+\r
+               return (SlcAgentDescriptor) getHibernateTemplate().get(\r
+                               SlcAgentDescriptor.class, agentId);\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<SlcAgentDescriptor> listSlcAgentDescriptors() {\r
+               return (List<SlcAgentDescriptor>) getHibernateTemplate().loadAll(\r
+                               SlcAgentDescriptor.class);\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/TestRunDescriptorDaoHibernate.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/TestRunDescriptorDaoHibernate.java
new file mode 100644 (file)
index 0000000..3ddf0e1
--- /dev/null
@@ -0,0 +1,35 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.test;\r
+\r
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
+\r
+import org.argeo.slc.dao.test.TestRunDescriptorDao;\r
+import org.argeo.slc.test.TestRunDescriptor;\r
+\r
+public class TestRunDescriptorDaoHibernate extends HibernateDaoSupport\r
+               implements TestRunDescriptorDao {\r
+\r
+       public TestRunDescriptor getTestRunDescriptor(String id) {\r
+               return (TestRunDescriptor) getHibernateTemplate().get(\r
+                               TestRunDescriptor.class, id);\r
+       }\r
+\r
+       public void saveOrUpdate(TestRunDescriptor testRunDescriptor) {\r
+               getHibernateTemplate().saveOrUpdate(testRunDescriptor);\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernate.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernate.java
new file mode 100644 (file)
index 0000000..dc99dee
--- /dev/null
@@ -0,0 +1,154 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.test.tree;\r
+\r
+import java.sql.SQLException;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.SortedSet;\r
+import java.util.TreeSet;\r
+\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.core.test.tree.ResultAttributes;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
+import org.hibernate.HibernateException;\r
+import org.hibernate.LockMode;\r
+import org.hibernate.Session;\r
+import org.springframework.orm.hibernate3.HibernateCallback;\r
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
+\r
+/** Hibernate implementation of collections DAO. */\r
+public class TreeTestResultCollectionDaoHibernate extends HibernateDaoSupport\r
+               implements TreeTestResultCollectionDao {\r
+\r
+       public void create(TreeTestResultCollection ttrCollection) {\r
+               getHibernateTemplate().save(ttrCollection);\r
+       }\r
+\r
+       public TreeTestResultCollection getTestResultCollection(String id) {\r
+               return (TreeTestResultCollection) getHibernateTemplate().get(\r
+                               TreeTestResultCollection.class, id);\r
+       }\r
+\r
+       public void update(TreeTestResultCollection ttrCollection) {\r
+               getHibernateTemplate().update(ttrCollection);\r
+       }\r
+\r
+       public void delete(TreeTestResultCollection ttrCollection) {\r
+               getHibernateTemplate().delete(ttrCollection);\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public SortedSet<TreeTestResultCollection> listCollections() {\r
+               return new TreeSet<TreeTestResultCollection>(getHibernateTemplate()\r
+                               .find("from TreeTestResultCollection"));\r
+       }\r
+\r
+       public void addResultToCollection(final TreeTestResultCollection ttrc,\r
+                       final String resultUuid) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.lock(ttrc, LockMode.NONE);\r
+                               TreeTestResult ttr = (TreeTestResult) session.get(\r
+                                               TreeTestResult.class, resultUuid);\r
+                               ttrc.getResults().add(ttr);\r
+                               session.update(ttrc);\r
+                               return ttrc;\r
+                       }\r
+               });\r
+       }\r
+\r
+       public void removeResultFromCollection(final TreeTestResultCollection ttrc,\r
+                       final String resultUuid) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.lock(ttrc, LockMode.NONE);\r
+                               TreeTestResult ttr = (TreeTestResult) session.get(\r
+                                               TreeTestResult.class, resultUuid);\r
+                               if (ttrc.getResults().remove(ttr))\r
+                                       session.update(ttrc);\r
+                               return ttrc;\r
+                       }\r
+               });\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<ResultAttributes> listResultAttributes(String collectionId) {\r
+               List<ResultAttributes> list;\r
+               if (collectionId == null)\r
+                       list = getHibernateTemplate().find(\r
+                                       "select new org.argeo.slc.core.test.tree.ResultAttributes(ttr)"\r
+                                                       + " from TreeTestResult ttr");\r
+               else\r
+                       list = getHibernateTemplate()\r
+                                       .find(\r
+                                                       "select new org.argeo.slc.core.test.tree.ResultAttributes(ttr) "\r
+                                                                       + " from TreeTestResult ttr, TreeTestResultCollection ttrc "\r
+                                                                       + " where ttr in elements(ttrc.results) and ttrc.id=?",\r
+                                                       collectionId);\r
+\r
+               return list;\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<TreeTestResult> listResults(String collectionId,\r
+                       Map<String, String> attributes) {\r
+               List<TreeTestResult> list;\r
+\r
+               if (collectionId == null) {\r
+                       if (attributes == null || attributes.size() == 0)\r
+                               list = getHibernateTemplate().find("from TreeTestResult");\r
+                       else if (attributes.size() == 1) {\r
+                               Map.Entry<String, String> entry = attributes.entrySet()\r
+                                               .iterator().next();\r
+                               Object[] args = { entry.getKey(), entry.getValue() };\r
+                               list = getHibernateTemplate().find(\r
+                                               "select ttr from TreeTestResult ttr"\r
+                                                               + " where attributes[?]=?", args);\r
+                       } else {\r
+                               throw new SlcException(\r
+                                               "Multiple attributes filter are currently not supported.");\r
+                       }\r
+               } else {\r
+                       if (attributes == null || attributes.size() == 0)\r
+                               list = getHibernateTemplate()\r
+                                               .find(\r
+                                                               "select ttr "\r
+                                                                               + " from TreeTestResult ttr, TreeTestResultCollection ttrc "\r
+                                                                               + " where ttr in elements(ttrc.results) and ttrc.id=?",\r
+                                                               collectionId);\r
+                       else if (attributes.size() == 1) {\r
+                               Map.Entry<String, String> entry = attributes.entrySet()\r
+                                               .iterator().next();\r
+                               Object[] args = { collectionId, entry.getKey(),\r
+                                               entry.getValue() };\r
+                               list = getHibernateTemplate()\r
+                                               .find(\r
+                                                               "select ttr from TreeTestResult ttr, TreeTestResultCollection ttrc "\r
+                                                                               + " where ttr in elements(ttrc.results) and ttrc.id=?"\r
+                                                                               + " and attributes[?]=?", args);\r
+                       } else {\r
+                               throw new SlcException(\r
+                                               "Multiple attributes filter are currently not supported.");\r
+                       }\r
+               }\r
+               return list;\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernate.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernate.java
new file mode 100644 (file)
index 0000000..c25a156
--- /dev/null
@@ -0,0 +1,172 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.test.tree;\r
+\r
+import java.sql.SQLException;\r
+import java.util.Date;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.SortedMap;\r
+\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.core.attachment.SimpleAttachment;\r
+import org.argeo.slc.core.structure.tree.TreeSPath;\r
+import org.argeo.slc.core.test.SimpleResultPart;\r
+import org.argeo.slc.core.test.tree.PartSubList;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
+import org.argeo.slc.structure.StructureElement;\r
+import org.argeo.slc.test.TestResult;\r
+import org.hibernate.HibernateException;\r
+import org.hibernate.Session;\r
+import org.springframework.orm.hibernate3.HibernateCallback;\r
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
+import org.springframework.util.Assert;\r
+\r
+/**\r
+ * The Hibernate implementation for tree-based result of the test result dao.\r
+ * \r
+ * @see TreeTestResult\r
+ */\r
+public class TreeTestResultDaoHibernate extends HibernateDaoSupport implements\r
+               TreeTestResultDao {\r
+\r
+       public void create(TestResult testResult) {\r
+               getHibernateTemplate().save(testResult);\r
+       }\r
+\r
+       public void update(TestResult testResult) {\r
+               getHibernateTemplate().saveOrUpdate(testResult);\r
+       }\r
+\r
+       public TreeTestResult getTestResult(String uuid) {\r
+               List<?> list = getHibernateTemplate().find(\r
+                               "from TreeTestResult where uuid=?", uuid);\r
+               if (list.size() == 0) {\r
+                       return null;\r
+               } else {\r
+                       return (TreeTestResult) list.get(0);\r
+               }\r
+\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<TreeTestResult> listTestResults() {\r
+               return (List<TreeTestResult>) getHibernateTemplate().find(\r
+                               "from TreeTestResult");\r
+       }\r
+\r
+       @SuppressWarnings("unchecked")\r
+       public List<TreeTestResult> listResults(TreeSPath path) {\r
+               List<TreeTestResult> list = getHibernateTemplate().find(\r
+                               "from TreeTestResult res where ? in indices(res.resultParts)",\r
+                               path.getAsUniqueString());\r
+               return list;\r
+       }\r
+\r
+       public void close(final String testResultId, final Date closeDate) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
+                                               testResultId);\r
+                               treeTestResult.setCloseDate(closeDate);\r
+                               session.update(treeTestResult);\r
+                               return treeTestResult;\r
+                       }\r
+               });\r
+       }\r
+\r
+       public void addResultPart(final String testResultId, final TreeSPath path,\r
+                       final SimpleResultPart resultPart,\r
+                       final Map<TreeSPath, StructureElement> relatedElements) {\r
+\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
+                                               testResultId);\r
+                               PartSubList lst = treeTestResult.getResultParts().get(path);\r
+                               if (lst == null) {\r
+                                       lst = new PartSubList();\r
+                                       treeTestResult.getResultParts().put(path, lst);\r
+                               }\r
+                               lst.getParts().add(resultPart);\r
+                               if (relatedElements != null)\r
+                                       treeTestResult.getElements().putAll(relatedElements);\r
+\r
+                               session.update(treeTestResult);\r
+                               return treeTestResult;\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       public void addAttachment(final String testResultId,\r
+                       final SimpleAttachment attachment) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
+                                               testResultId);\r
+\r
+                               // Check is there is already such an attachment\r
+                               Assert.notNull(attachment, "attachment is null");\r
+                               Assert.notNull(session, "session is null");\r
+                               SimpleAttachment att = (SimpleAttachment) session.get(\r
+                                               attachment.getClass(), attachment.getUuid());\r
+                               if (att != null)\r
+                                       throw new SlcException(\r
+                                                       "There is already an attachement with id "\r
+                                                                       + attachment.getUuid());\r
+\r
+                               treeTestResult.getAttachments().add(attachment);\r
+                               session.update(treeTestResult);\r
+                               return treeTestResult;\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       protected TreeTestResult getTreeTestResult(Session session,\r
+                       String testResultId) {\r
+               TreeTestResult treeTestResult = (TreeTestResult) session.get(\r
+                               TreeTestResult.class, testResultId);\r
+               if (treeTestResult == null)\r
+                       throw new SlcException("No result with id " + testResultId);\r
+               return treeTestResult;\r
+       }\r
+\r
+       public void updateAttributes(final String testResultId,\r
+                       final SortedMap<String, String> attributes) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
+                                               testResultId);\r
+                               treeTestResult.setAttributes(attributes);\r
+\r
+                               session.update(treeTestResult);\r
+                               return treeTestResult;\r
+                       }\r
+               });\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/package.html b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/package.html
new file mode 100644 (file)
index 0000000..6042b07
--- /dev/null
@@ -0,0 +1,6 @@
+<html>\r
+<head></head>\r
+<body>\r
+Hibernate based DAO implementations for tree-based SLC Test.\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml
new file mode 100644 (file)
index 0000000..d35d9ff
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.core.attachment">\r
+       <class name="SimpleAttachment" table="SIMPLE_ATTACHMENT">\r
+               <cache usage="nonstrict-read-write" />\r
+               <id name="uuid" column="UUID" />
+               <property name="name" column="NAME" not-null="true" />\r
+               <property name="contentType" column="CONTENT_TYPE" not-null="true" />\r
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/dao.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/dao.xml
new file mode 100644 (file)
index 0000000..baac403
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="true">
+
+       <bean id="slcTemplates.dao.testResultDao"
+               class="org.argeo.slc.hibernate.test.tree.TreeTestResultDaoHibernate"
+               abstract="true">
+       </bean>
+
+       <bean id="slcTemplates.dao.testResultCollectionDao"
+               class="org.argeo.slc.hibernate.test.tree.TreeTestResultCollectionDaoHibernate"
+               abstract="true">
+       </bean>
+
+       <bean id="slcTemplates.dao.testRunDescriptorDao"
+               class="org.argeo.slc.hibernate.test.TestRunDescriptorDaoHibernate"
+               abstract="true">
+       </bean>
+
+       <bean id="slcTemplates.dao.slcExecutionDao"
+               class="org.argeo.slc.hibernate.process.SlcExecutionDaoHibernate"
+               abstract="true">
+       </bean>
+
+       <bean id="slcTemplates.dao.slcAgentDescriptorDao"
+               class="org.argeo.slc.hibernate.runtime.SlcAgentDescriptorDaoHibernate"
+               abstract="true">
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/ehcache.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/ehcache.xml
new file mode 100644 (file)
index 0000000..b097477
--- /dev/null
@@ -0,0 +1,71 @@
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:noNamespaceSchemaLocation="ehcache.xsd">
+
+       <diskStore path="java.io.tmpdir" />
+
+       <defaultCache maxElementsInMemory="10000" overflowToDisk="false" />
+
+       <cache name="org.argeo.slc.core.test.tree.TreeTestResult"
+               maxElementsInMemory="1000" />
+       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.attributes"
+               maxElementsInMemory="1000" />
+       <cache name="org.argeo.slc.core.test.tree.PartSubList"
+               maxElementsInMemory="5000" />
+       <cache name="org.argeo.slc.core.test.tree.PartSubList.parts"
+               maxElementsInMemory="10000" />
+       <cache name="org.argeo.slc.core.test.SimpleResultPart"
+               maxElementsInMemory="10000" />
+       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.resultParts"
+               maxElementsInMemory="10000" />
+       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.elements"
+               maxElementsInMemory="10000" />
+       <cache name="org.argeo.slc.core.structure.SimpleSElement"
+               maxElementsInMemory="10000" />
+       <cache name="org.argeo.slc.core.structure.SimpleSElement.tags"
+               maxElementsInMemory="20000" />
+
+       <cache name="org.argeo.slc.core.test.tree.TreeTestResultCollection"
+               maxElementsInMemory="100" />
+       <cache name="org.argeo.slc.core.test.tree.TreeTestResultCollection.results"
+               maxElementsInMemory="1000" />
+
+       <cache name="org.argeo.slc.process.SlcExecution"
+               maxElementsInMemory="1000" />
+       <cache name="org.argeo.slc.process.SlcExecution.attributes"
+               maxElementsInMemory="5000" />
+       <cache name="org.argeo.slc.process.SlcExecution.steps"
+               maxElementsInMemory="10000" />
+       <cache name="org.argeo.slc.process.SlcExecutionStep"
+               maxElementsInMemory="10000" />
+       <cache name="org.argeo.slc.process.SlcExecutionStep.logLines"
+               maxElementsInMemory="100000" />
+
+       <cache name="org.argeo.slc.test.TestRunDescriptor"
+               maxElementsInMemory="1000" />
+
+       <cache name="org.argeo.slc.runtime.SlcAgentDescriptor"
+               maxElementsInMemory="100" />
+
+       <cache name="org.argeo.slc.core.attachment.SimpleAttachment"
+               maxElementsInMemory="100000" />
+       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.attachments"
+               maxElementsInMemory="100000" />
+
+</ehcache>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/RealizedFlow.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/RealizedFlow.hbm.xml
new file mode 100644 (file)
index 0000000..c56231d
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.process">\r
+       <class name="RealizedFlow" table="REALIZED_FLOW">\r
+               <cache usage="read-write" />\r
+\r
+               <id column="ID" />\r
+               <property name="moduleName" column="MODULE_NAME" />\r
+               <property name="moduleVersion" column="MODULE_VERSION" />\r
+\r
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml
new file mode 100644 (file)
index 0000000..526d6bf
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.process">\r
+       <class name="SlcExecution" table="SLC_EXECUTION">\r
+               <cache usage="read-write" />\r
+\r
+               <id name="uuid" column="UUID" />\r
+               <property name="host" column="HOST" />\r
+               <property name="user" column="USER" />\r
+               <property name="type" column="TYPE" />\r
+               <property name="status" column="STATUS" />
+               <property name="realizedFlowsXml" column="REALIZED_FLOWS_XML"
+                       type="text" />\r
+               <list name="steps" cascade="all" table="SLC_EXECUTIONS_STEPS"\r
+                       lazy="true">\r
+                       <cache usage="read-write" />\r
+                       <key column="SLC_EXECUTION_ID" />\r
+                       <list-index column="INDX" />\r
+                       <one-to-many class="org.argeo.slc.process.SlcExecutionStep" />
+               </list>
+
+               <map name="attributes" table="SLC_EXEC_ATTRS_MAP" cascade="all"
+                       lazy="false" sort="natural">
+                       <cache usage="read-write" />
+
+                       <key column="PARENT_ID" />
+                       <map-key column="ATTR_NAME" type="string" />
+                       <element column="NAME" type="string" />
+               </map>
+
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml
new file mode 100644 (file)
index 0000000..0a1ce76
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.process">\r
+       <class name="SlcExecutionStep" table="SLC_EXECUTION_STEP">\r
+               <cache usage="nonstrict-read-write" />\r
+\r
+               <id name="uuid" column="UUID" />\r
+               <property name="type" column="TYPE" />
+               <property name="thread" column="THREAD" />
+               <property name="timestamp" column="TSTAMP" type="imm_timestamp" />\r
+\r
+               <list name="logLines" cascade="all" lazy="false"\r
+                       table="SLC_EXECUTION_STEP_LOG_LINE">
+                       <cache usage="nonstrict-read-write" />
+                       <key column="SLC_EXECUTION_STEP_ID" />
+                       <list-index column="INDX" />
+                       <element column="LOG_LINE" type="text" />
+               </list>
+
+               <query name="stepIndex"><![CDATA[
+select index(step)
+ from SlcExecution process
+  join process.steps step
+       with step.uuid = ?
+ where process.uuid = ? 
+               ]]></query>
+               <query name="stepsAfter"><![CDATA[
+select step
+ from SlcExecution process
+  join process.steps step
+ where process.uuid = ? 
+       and index(step) > ?
+               ]]></query>
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml
new file mode 100644 (file)
index 0000000..90ada75
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.runtime">\r
+       <class name="SlcAgentDescriptor" table="SLC_AGENT_DESCRIPTOR">\r
+               <cache usage="read-write" />\r
+\r
+               <id name="uuid" column="UUID" />\r
+               <property name="host" column="HOST" />
+<!-- 
+               <map name="executionSpecs" table="AGENT_EXEC_SPEC_MAP" cascade="all"
+                       sort="natural">
+                       <cache usage="nonstrict-read-write" />
+                       <key column="PARENT_ID" />
+                       <map-key column="KEY" type="string" />
+                       <many-to-many class="org.argeo.slc.process.SlcExecutionSpec"
+                               column="ELEMENT_ID" unique="true" />
+               </map>
+                -->\r
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/sessionFactories.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/sessionFactories.xml
new file mode 100644 (file)
index 0000000..48544ec
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="true">
+
+       <bean id="slcTemplates.sessionFactory.hibernateBasic" abstract="true"
+               class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
+               <property name="mappingResources">
+                       <list>
+                               <value>
+                                       org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/process/SlcExecution.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml
+                               </value>
+                               <value>
+                                       org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml
+                               </value>
+                       </list>
+               </property>
+               <property name="cacheProvider" ref="slcDefault.cacheProvider.ehCache" />
+       </bean>
+
+       <bean id="slcDefault.cacheProvider.ehCache" class="net.sf.ehcache.hibernate.SingletonEhCacheProvider"
+               depends-on="slcDefault.cacheProvider.ehCacheManager">
+       </bean>
+
+       <bean id="slcDefault.cacheProvider.ehCacheManager"
+               class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
+               <property name="shared" value="true" />
+               <property name="configLocation"
+                       value="classpath:/org/argeo/slc/hibernate/ehcache.xml" />
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/spring.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/spring.xml
new file mode 100644 (file)
index 0000000..240aa92
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="true">
+
+       <import resource="dao.xml" />
+       <import resource="sessionFactories.xml" />
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml
new file mode 100644 (file)
index 0000000..2244d49
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.core.structure">\r
+       <class name="SimpleSElement" table="SIMPLE_SELEMENT">\r
+               <cache usage="nonstrict-read-write" />\r
+               <id name="tid" column="T_ID">\r
+                       <generator class="native" />\r
+               </id>\r
+               <property name="label" column="LABEL" not-null="true" />\r
+               <map name="tags" table="SIMPLE_SELEMENT_TAGS" cascade="all"
+                       lazy="false" sort="natural">
+                       <cache usage="nonstrict-read-write" />
+                       <key column="PARENT_ID" />
+                       <map-key type="string" column="NAME" />
+                       <element type="string" column="VALUE" />
+               </map>
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml
new file mode 100644 (file)
index 0000000..b84cfd6
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.core.test">\r
+       <class name="SimpleResultPart" table="SIMPLE_RESULT_PART">\r
+               <cache usage="nonstrict-read-write" />\r
+               <id name="tid" column="T_ID">\r
+                       <generator class="native" />\r
+               </id>\r
+               <property name="status" column="STATUS" not-null="true" />\r
+               <property name="message" column="MESSAGE" not-null="true" />\r
+               <property name="exceptionMessage" column="EXCEPTION_MESSAGE"
+                       type="text" not-null="false" lazy="true" />
+               <property name="testRunUuid" column="TEST_RUN_UUID"
+                       not-null="false" />
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml
new file mode 100644 (file)
index 0000000..a0ba08c
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.test">\r
+       <class name="TestRunDescriptor" table="TEST_RUN_DESCRIPTOR">\r
+               <cache usage="nonstrict-read-write" />
+               <id name="testRunUuid" column="TEST_RUN_UUID" />\r
+               <property name="slcExecutionUuid" column="SLC_EXEC_UUID"\r
+                       not-null="false" />\r
+               <property name="slcExecutionStepUuid"\r
+                       column="SLC_EXEC_STEP_UUID" not-null="false" />\r
+               <property name="testResultUuid" column="TEST_RESULT_UUID"\r
+                       not-null="false" />\r
+               <property name="deployedSytemId" column="DEPLOYED_SYSTEM_ID"\r
+                       not-null="false" />\r
+       </class>\r
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml
new file mode 100644 (file)
index 0000000..08fc992
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.core.test.tree">\r
+       <class name="PartSubList" table="PART_SUB_LIST">\r
+               <cache usage="nonstrict-read-write" />\r
+               <id name="tid" column="T_ID">\r
+                       <generator class="native" />\r
+               </id>\r
+               <list name="parts" cascade="all" table="PARTS_LIST">\r
+                       <cache usage="nonstrict-read-write" />\r
+                       <key column="PART_SUBLIST_ID" />\r
+                       <list-index column="INDX" />\r
+                       <many-to-many
+                               class="org.argeo.slc.core.test.SimpleResultPart" column="PART_ID"
+                               unique="true" />
+               </list>
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml
new file mode 100644 (file)
index 0000000..6144656
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.core.test.tree">\r
+       <class name="TreeTestResult" table="TREE_TEST_RESULT">\r
+               <cache usage="read-write" />\r
+               <id name="uuid" column="UUID" />\r
+\r
+               <property name="closeDate" column="CLOSE_DATE" type="timestamp"\r
+                       not-null="false" />
+
+               <map name="attributes" table="TTR_ATTRS_MAP" cascade="all" lazy="false"
+                       sort="natural">
+                       <cache usage="read-write" />
+                       <key column="PARENT_ID" />
+                       <map-key column="ATTR_NAME" type="string" />
+                       <element column="NAME" type="string" />
+               </map>
+
+               <map name="resultParts" table="RESULT_PARTS_MAP" cascade="all"
+                       sort="natural">
+                       <cache usage="nonstrict-read-write" />
+                       <key column="PARENT_ID" />
+                       <composite-map-key class="org.argeo.slc.core.structure.tree.TreeSPath">
+                               <key-property name="asUniqueString" column="PATH" />
+                       </composite-map-key>
+                       <many-to-many class="PartSubList" column="PART_SUB_LIST_ID"
+                               unique="true" />
+               </map>
+
+               <map name="elements" table="RESULT_ELEMENTS_MAP" cascade="all"
+                       sort="natural">
+                       <cache usage="nonstrict-read-write" />
+                       <key column="PARENT_ID" />
+                       <composite-map-key class="org.argeo.slc.core.structure.tree.TreeSPath">
+                               <key-property name="asUniqueString" column="PATH" />
+                       </composite-map-key>
+                       <many-to-many class="org.argeo.slc.core.structure.SimpleSElement"
+                               column="ELEMENT_ID" unique="true" />
+               </map>
+
+               <list name="attachments" table="RESULTS_ATTACHMENTS" cascade="all">
+                       <cache usage="nonstrict-read-write" />
+                       <key column="RESULT_ATTACHMENT_ID" />
+                       <list-index column="INDX" />
+                       <many-to-many class="org.argeo.slc.core.attachment.SimpleAttachment"
+                               column="ATTACHMENT_ID" unique="true" />
+               </list>
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml
new file mode 100644 (file)
index 0000000..7988d2b
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!DOCTYPE hibernate-mapping PUBLIC\r
+       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
+       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
+<hibernate-mapping package="org.argeo.slc.core.test.tree">\r
+       <class name="TreeTestResultCollection"
+               table="TREE_TEST_RESULT_COLLECTION">
+               <cache usage="nonstrict-read-write" />
+               <id name="id" column="ID" />
+
+               <set name="results" table="TTR_COLLECTION_RESULTS"
+                       sort="natural">
+                       <cache usage="read-write" />
+                       <key column="PARENT_ID" />
+                       <many-to-many class="TreeTestResult" column="TTR"/>
+               </set>
+       </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/site/apt/index.apt b/legacy/runtime/org.argeo.slc.support.hibernate/src/site/apt/index.apt
new file mode 100644 (file)
index 0000000..f414460
--- /dev/null
@@ -0,0 +1 @@
+Argeo SLC Site
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java
new file mode 100644 (file)
index 0000000..d2698c2
--- /dev/null
@@ -0,0 +1,76 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.process;\r
+\r
+import java.sql.SQLException;\r
+\r
+import org.argeo.slc.dao.process.SlcExecutionDao;\r
+import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
+import org.argeo.slc.msg.ObjectList;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.unit.process.SlcExecutionTestUtils;\r
+import org.hibernate.HibernateException;\r
+import org.hibernate.Session;\r
+import org.springframework.orm.hibernate3.HibernateCallback;\r
+import org.springframework.oxm.Marshaller;\r
+import org.springframework.oxm.Unmarshaller;\r
+import org.springframework.xml.transform.StringResult;\r
+import org.springframework.xml.transform.StringSource;\r
+\r
+public class CastorSlcExecutionHibernateTest extends HibernateTestCase {\r
+\r
+       public void testSaveWithRealizedFlowsXml() throws Exception {\r
+               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
+\r
+               SlcExecution slcExec = SlcExecutionTestUtils\r
+                               .createSlcExecutionWithRealizedFlows();\r
+\r
+               ObjectList ol = new ObjectList(slcExec.getRealizedFlows());\r
+               StringResult result = new StringResult();\r
+               getBean(Marshaller.class).marshal(ol, result);\r
+               slcExec.setRealizedFlowsXml(result.toString());\r
+\r
+               dao.create(slcExec);\r
+\r
+               SlcExecution slcExecPersisted = dao.getSlcExecution(slcExec.getUuid());\r
+               assertSlcExecution(slcExec, slcExecPersisted);\r
+\r
+               StringSource source = new StringSource(slcExecPersisted\r
+                               .getRealizedFlowsXml());\r
+               ObjectList ol2 = (ObjectList) getBean(Unmarshaller.class).unmarshal(\r
+                               source);\r
+               ol2.fill(slcExec.getRealizedFlows());\r
+\r
+       }\r
+\r
+       public void assertSlcExecution(final SlcExecution expected,\r
+                       final SlcExecution persisted) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.refresh(persisted);\r
+                               SlcExecutionTestUtils.assertSlcExecution(expected, persisted);\r
+                               return null;\r
+                       }\r
+               });\r
+       }\r
+\r
+       @Override\r
+       protected String getApplicationContextLocation() {\r
+               return "org/argeo/slc/hibernate/withCastor.xml";\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/SlcExecutionHibernateTest.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/SlcExecutionHibernateTest.java
new file mode 100644 (file)
index 0000000..b4798ce
--- /dev/null
@@ -0,0 +1,133 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.process;\r
+\r
+import java.sql.SQLException;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.argeo.slc.dao.process.SlcExecutionDao;\r
+import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.process.SlcExecutionStep;\r
+import org.argeo.slc.unit.process.SlcExecutionTestUtils;\r
+import org.hibernate.HibernateException;\r
+import org.hibernate.Session;\r
+import org.springframework.orm.hibernate3.HibernateCallback;\r
+\r
+public class SlcExecutionHibernateTest extends HibernateTestCase {\r
+\r
+       public void testSave() {\r
+               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
+\r
+               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
+               slcExec.getSteps().add(new SlcExecutionStep("A log line"));\r
+               slcExec.getSteps().add(new SlcExecutionStep("Two log\nlines"));\r
+\r
+               dao.create(slcExec);\r
+\r
+               SlcExecution slcExecPersisted = dao.getSlcExecution(slcExec.getUuid());\r
+               assertSlcExecution(slcExec, slcExecPersisted);\r
+       }\r
+\r
+       public void testTailSteps() {\r
+               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
+\r
+               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
+               int totalStepCount = 20;\r
+               for (int i = 0; i < totalStepCount; i++) {\r
+                       slcExec.getSteps().add(new SlcExecutionStep("Log " + i));\r
+               }\r
+               dao.create(slcExec);\r
+\r
+               int lastStepsCount = 7;\r
+               List<SlcExecutionStep> firstSteps = dao.tailSteps(slcExec.getUuid(),\r
+                               lastStepsCount);\r
+               assertEquals(lastStepsCount, firstSteps.size());\r
+\r
+               SlcExecutionStep lastStep = firstSteps.get(lastStepsCount - 1);\r
+\r
+               List<SlcExecutionStep> additionalSteps = new ArrayList<SlcExecutionStep>();\r
+               int additionalStepsCount = 13;\r
+               for (int i = 0; i < additionalStepsCount; i++) {\r
+                       additionalSteps.add(new SlcExecutionStep("Additonal log " + i));\r
+               }\r
+               dao.addSteps(slcExec.getUuid(), additionalSteps);\r
+\r
+               List<SlcExecutionStep> lastSteps = dao.tailSteps(slcExec.getUuid(),\r
+                               lastStep.getUuid());\r
+               assertEquals(additionalStepsCount, lastSteps.size());\r
+       }\r
+\r
+       public void testModify() {\r
+               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
+\r
+               // slcExecution Creation\r
+               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
+               slcExec.getSteps().add(new SlcExecutionStep("A log line"));\r
+               slcExec.getSteps().add(new SlcExecutionStep("Two log\nlines"));\r
+\r
+               dao.create(slcExec);\r
+\r
+               // slcExecution retrieval and update\r
+               final SlcExecution slcExecRetrieved = dao.getSlcExecution(slcExec\r
+                               .getUuid());\r
+\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.refresh(slcExecRetrieved);\r
+                               List<String> logLineListStep0 = slcExecRetrieved.getSteps()\r
+                                               .get(0).getLogLines();\r
+                               for (String logLine : logLineListStep0)\r
+                                       logLine = logLine + "appended Log text";\r
+\r
+                               slcExecRetrieved.getSteps().get(0)\r
+                                               .setLogLines(logLineListStep0);\r
+                               slcExecRetrieved.getSteps().add(\r
+                                               new SlcExecutionStep("Three \n log \n lines"));\r
+                               return null;\r
+                       }\r
+               });\r
+\r
+               dao.update(slcExecRetrieved);\r
+\r
+               // updated slcExecution retrieval and comparison\r
+               SlcExecution slcExecUpdated = dao.getSlcExecution(slcExec.getUuid());\r
+\r
+               assertSlcExecution(slcExecRetrieved, slcExecUpdated);\r
+       }\r
+\r
+       public void assertSlcExecution(final SlcExecution expected,\r
+                       final SlcExecution persisted) {\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.refresh(persisted);\r
+                               SlcExecutionTestUtils.assertSlcExecution(expected, persisted);\r
+                               return null;\r
+                       }\r
+               });\r
+       }\r
+\r
+       @Override\r
+       protected String getApplicationContextLocation() {\r
+               return "org/argeo/slc/hibernate/applicationContext.xml";\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/CastorTestResultDaoHibernateTest.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/CastorTestResultDaoHibernateTest.java
new file mode 100644 (file)
index 0000000..c922809
--- /dev/null
@@ -0,0 +1,58 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.test.tree;\r
+\r
+import org.argeo.slc.core.structure.tree.TreeSPath;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
+import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
+import org.argeo.slc.unit.test.tree.TreeTestResultTestUtils;\r
+import org.springframework.oxm.Marshaller;\r
+import org.springframework.oxm.Unmarshaller;\r
+import org.springframework.xml.transform.StringResult;\r
+import org.springframework.xml.transform.StringSource;\r
+\r
+public class CastorTestResultDaoHibernateTest extends HibernateTestCase {\r
+\r
+       public void testUnmarshallAndCreate() throws Exception {\r
+               TreeTestResult ttr = TreeTestResultTestUtils\r
+                               .createCompleteTreeTestResult();\r
+\r
+               StringResult result = new StringResult();\r
+               getBean(Marshaller.class).marshal(ttr, result);\r
+\r
+               StringSource source = new StringSource(result.toString());\r
+               TreeTestResult ttrUnm = (TreeTestResult) getBean(Unmarshaller.class)\r
+                               .unmarshal(source);\r
+\r
+               for (TreeSPath path : ttrUnm.getResultParts().keySet()) {\r
+                       log.debug("Path: " + path.getClass() + ": " + path);\r
+               }\r
+\r
+               TreeTestResultDao ttrDao = getBean(TreeTestResultDao.class);\r
+               ttrDao.create(ttrUnm);\r
+               TreeTestResult ttrPersist = ttrDao.getTestResult(ttr.getUuid());\r
+\r
+               TreeTestResultDaoHibernateTest.assertInHibernate(\r
+                               getHibernateTemplate(), ttr, ttrPersist);\r
+       }\r
+\r
+       @Override\r
+       protected String getApplicationContextLocation() {\r
+               return "org/argeo/slc/hibernate/withCastor.xml";\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernateTest.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernateTest.java
new file mode 100644 (file)
index 0000000..de9aa16
--- /dev/null
@@ -0,0 +1,122 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.test.tree;\r
+\r
+import java.sql.SQLException;\r
+import java.util.Date;\r
+\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
+import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
+import org.argeo.slc.unit.test.tree.TreeTestResultTestUtils;\r
+import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
+import org.hibernate.HibernateException;\r
+import org.hibernate.Session;\r
+import org.springframework.orm.hibernate3.HibernateCallback;\r
+\r
+public class TreeTestResultCollectionDaoHibernateTest extends HibernateTestCase {\r
+\r
+       public void testScenario() {\r
+               TreeTestResultDao ttrDao = getBean(TreeTestResultDao.class);\r
+               TreeTestResultCollectionDao ttrcDao = getBean(TreeTestResultCollectionDao.class);\r
+\r
+               String ttrcName = "testCollection";\r
+\r
+               TreeTestResult ttr1 = TreeTestResultTestUtils\r
+                               .createCompleteTreeTestResult();\r
+               ttrDao.create(ttr1);\r
+\r
+               TreeTestResultCollection ttrc = new TreeTestResultCollection(ttrcName);\r
+               ttrcDao.create(ttrc);\r
+\r
+               ttrc.getResults().add(ttr1);\r
+               ttrcDao.update(ttrc);\r
+\r
+               final TreeTestResult ttr2 = TreeTestResultTestUtils\r
+                               .createCompleteTreeTestResult();\r
+               ttrDao.create(ttr2);\r
+\r
+               ttrc.getResults().add(ttr2);\r
+               ttrcDao.update(ttrc);\r
+\r
+               ttrc.getResults().remove(ttr1);\r
+               ttrcDao.update(ttrc);\r
+\r
+               final TreeTestResultCollection ttrcPersist = ttrcDao\r
+                               .getTestResultCollection(ttrcName);\r
+\r
+               // Because of lazy initialization\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.refresh(ttrcPersist);\r
+                               assertEquals(1, ttrcPersist.getResults().size());\r
+                               UnitTestTreeUtil.assertTreeTestResult(ttr2, ttrcPersist\r
+                                               .getResults().iterator().next());\r
+                               return null;\r
+                       }\r
+               });\r
+       }\r
+\r
+       public void testResultsWithSameCloseDate() {\r
+               TreeTestResultDao ttrDao = getBean(TreeTestResultDao.class);\r
+               TreeTestResultCollectionDao ttrcDao = getBean(TreeTestResultCollectionDao.class);\r
+\r
+               String ttrcName = "testCollection";\r
+\r
+               Date closeDate = new Date();\r
+\r
+               // TTR1\r
+               TreeTestResult ttr1 = TreeTestResultTestUtils\r
+                               .createCompleteTreeTestResult();\r
+               ttr1.setCloseDate(closeDate);\r
+               ttrDao.create(ttr1);\r
+\r
+               // TTR2\r
+               TreeTestResult ttr2 = TreeTestResultTestUtils\r
+                               .createCompleteTreeTestResult();\r
+               ttr2.setCloseDate(closeDate);\r
+               ttrDao.create(ttr2);\r
+\r
+               // TTRC\r
+               TreeTestResultCollection ttrc = new TreeTestResultCollection(ttrcName);\r
+               ttrc.getResults().add(ttr1);\r
+               ttrc.getResults().add(ttr2);\r
+               ttrcDao.create(ttrc);\r
+\r
+               final TreeTestResultCollection ttrcPersist = ttrcDao\r
+                               .getTestResultCollection(ttrcName);\r
+               // Because of lazy initialization\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.refresh(ttrcPersist);\r
+                               assertEquals(2, ttrcPersist.getResults().size());\r
+                               return null;\r
+                       }\r
+               });\r
+       }\r
+\r
+       @Override\r
+       protected String getApplicationContextLocation() {\r
+               return "org/argeo/slc/hibernate/applicationContext.xml";\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernateTest.java b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernateTest.java
new file mode 100644 (file)
index 0000000..4c5baa6
--- /dev/null
@@ -0,0 +1,175 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.hibernate.test.tree;\r
+\r
+import java.sql.SQLException;\r
+\r
+import org.argeo.slc.core.structure.SimpleSElement;\r
+import org.argeo.slc.core.structure.tree.TreeSPath;\r
+import org.argeo.slc.core.structure.tree.TreeSRegistry;\r
+import org.argeo.slc.core.test.SimpleResultPart;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
+import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
+import org.argeo.slc.test.TestStatus;\r
+import org.argeo.slc.unit.test.tree.TreeTestResultTestUtils;\r
+import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
+import org.hibernate.HibernateException;\r
+import org.hibernate.Session;\r
+import org.springframework.orm.hibernate3.HibernateCallback;\r
+import org.springframework.orm.hibernate3.HibernateTemplate;\r
+\r
+public class TreeTestResultDaoHibernateTest extends HibernateTestCase {\r
+       private TreeTestResultDao testResultDao = null;\r
+\r
+       @Override\r
+       public void setUp() {\r
+               testResultDao = getBean(TreeTestResultDao.class);\r
+       }\r
+\r
+       public void testCreate() {\r
+\r
+               TreeTestResult ttr = TreeTestResultTestUtils\r
+                               .createCompleteTreeTestResult();\r
+               testResultDao.create(ttr);\r
+\r
+               TreeTestResult ttrPersisted = (TreeTestResult) testResultDao\r
+                               .getTestResult(ttr.getUuid());\r
+\r
+               assertInHibernate(ttr, ttrPersisted);\r
+       }\r
+\r
+       public void testUpdate() {\r
+               TreeTestResult ttr = TreeTestResultTestUtils\r
+                               .createCompleteTreeTestResult();\r
+               testResultDao.create(ttr);\r
+\r
+               final TreeTestResult ttrUpdated = (TreeTestResult) testResultDao\r
+                               .getTestResult(ttr.getUuid());\r
+\r
+               // Modifying ttrUpdated\r
+\r
+               /**\r
+                * this closeDate update commented because the assertTreeTestResult will\r
+                * find a unexpected discrepancy in the date.\r
+                * ttrUpdated.setCloseDate(new Date());\r
+                */\r
+\r
+               String pathStr = "/test";\r
+               final TreeSPath path = new TreeSPath(pathStr);\r
+\r
+               final TreeSRegistry registry = new TreeSRegistry();\r
+               SimpleSElement elem = new SimpleSElement("Unit Test");\r
+               elem.getTags().put("myTag", "myTagValue");\r
+               registry.register(path, elem);\r
+\r
+               getHibernateTemplate().execute(new HibernateCallback() {\r
+\r
+                       public Object doInHibernate(Session session)\r
+                                       throws HibernateException, SQLException {\r
+                               session.refresh(ttrUpdated);\r
+                               ttrUpdated.notifyCurrentPath(registry, path);\r
+\r
+                               ttrUpdated.addResultPart(TreeTestResultTestUtils\r
+                                               .createSimpleResultPartPassed());\r
+                               ttrUpdated.addResultPart(TreeTestResultTestUtils\r
+                                               .createSimpleResultPartFailed());\r
+                               ttrUpdated.addResultPart(TreeTestResultTestUtils\r
+                                               .createSimpleResultPartError());\r
+                               return null;\r
+                       }\r
+               });\r
+\r
+               testResultDao.update(ttrUpdated);\r
+\r
+               // comparison of ttrUpdated and ttrRetrieved\r
+               TreeTestResult ttrRetrieved = (TreeTestResult) testResultDao\r
+                               .getTestResult(ttr.getUuid());\r
+\r
+               assertInHibernate(ttrUpdated, ttrRetrieved);\r
+       }\r
+\r
+       public void testMultipleUpdateScenario() throws Exception {\r
+               TreeSRegistry registry = new TreeSRegistry();\r
+\r
+               TreeSPath path = new TreeSPath("/root/test");\r
+               SimpleSElement elem = new SimpleSElement("Unit Test");\r
+               elem.getTags().put("myTag", "myTagValue");\r
+               registry.register(path, elem);\r
+\r
+               TreeTestResult ttr = TreeTestResultTestUtils\r
+                               .createSimpleTreeTestResult();\r
+               ttr.notifyCurrentPath(registry, path);\r
+               ttr\r
+                               .addResultPart(new SimpleResultPart(TestStatus.PASSED,\r
+                                               "First test"));\r
+\r
+               testResultDao.create(ttr);\r
+\r
+               path = new TreeSPath("/root/test2/subtest");\r
+               elem = new SimpleSElement("Sub Test");\r
+               elem.getTags().put("myTag", "myTagValue");\r
+               registry.register(path, elem);\r
+\r
+               ttr.notifyCurrentPath(registry, path);\r
+               ttr\r
+                               .addResultPart(new SimpleResultPart(TestStatus.PASSED,\r
+                                               "Second test"));\r
+\r
+               testResultDao.update(ttr);\r
+\r
+               ttr.notifyCurrentPath(registry, path);\r
+               ttr.addResultPart(new SimpleResultPart(TestStatus.PASSED,\r
+                               "Third test with same path"));\r
+\r
+               testResultDao.update(ttr);\r
+\r
+               ttr.close();\r
+\r
+               testResultDao.close(ttr.getUuid(), ttr.getCloseDate());\r
+\r
+               TreeTestResult ttrRetrieved = (TreeTestResult) testResultDao\r
+                               .getTestResult(ttr.getUuid());\r
+\r
+               assertInHibernate(ttr, ttrRetrieved);\r
+\r
+       }\r
+\r
+       @Override\r
+       protected String getApplicationContextLocation() {\r
+               return "org/argeo/slc/hibernate/applicationContext.xml";\r
+       }\r
+\r
+       public static void assertInHibernate(HibernateTemplate template,\r
+                       final TreeTestResult ttrExpected, final TreeTestResult ttrPersisted) {\r
+               template.execute(new HibernateCallback() {\r
+                       public Object doInHibernate(Session session) {\r
+                               session.refresh(ttrPersisted);\r
+                               UnitTestTreeUtil\r
+                                               .assertTreeTestResult(ttrExpected, ttrPersisted);\r
+                               return null;\r
+                       }\r
+\r
+               });\r
+\r
+       }\r
+\r
+       public void assertInHibernate(final TreeTestResult ttrExpected,\r
+                       final TreeTestResult ttrPersisted) {\r
+               assertInHibernate(getHibernateTemplate(), ttrExpected, ttrPersisted);\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/log4j.properties b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/log4j.properties
new file mode 100644 (file)
index 0000000..4a97ea6
--- /dev/null
@@ -0,0 +1,28 @@
+# Set root logger level to DEBUG and its only appender to A1.\r
+log4j.rootLogger=WARN, console\r
+\r
+## Levels\r
+# Slc\r
+log4j.logger.org.argeo=DEBUG\r
+log4j.logger.org.argeo.slc.hibernate.process=TRACE\r
+\r
+# Castor\r
+log4j.logger.org.exolab.castor=WARN\r
+\r
+# Spring\r
+#log4j.logger.org.springframework=INFO\r
+# Hibernate\r
+log4j.logger.org.hibernate=WARN\r
+#log4j.logger.org.hibernate.SQL=TRACE\r
+#log4j.logger.org.hibernate.tool.hbm2ddl=TRACE\r
+#log4j.logger.org.hibernate.type=TRACE\r
+\r
+\r
+## Appenders\r
+# A1 is set to be a ConsoleAppender.\r
+log4j.appender.console=org.apache.log4j.ConsoleAppender\r
+\r
+# A1 uses PatternLayout.\r
+log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
+log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
+\r
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml
new file mode 100644 (file)
index 0000000..739eb09
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <import resource="classpath:/org/argeo/slc/hibernate/spring.xml" />\r
+       <!--\r
+\r
+               <bean id="sessionFactory"\r
+               parent="slcTemplates.sessionFactory.hibernateBasic"> <property\r
+               name="dataSource" ref="dataSource" /> <property\r
+               name="hibernateProperties"> <value><![CDATA[\r
+               hibernate.dialect=org.hibernate.dialect.HSQLDialect\r
+               hibernate.hbm2ddl.auto=create\r
+               hibernate.current_session_context_class=thread ]]></value> </property>\r
+               </bean> <bean id="dataSource"\r
+               class="org.springframework.jdbc.datasource.SingleConnectionDataSource"\r
+               destroy-method="destroy" lazy-init="true"> <property\r
+               name="driverClassName" value="org.hsqldb.jdbcDriver" /> <property\r
+               name="url" value="jdbc:hsqldb:mem:test" /> <property name="username"\r
+               value="sa" /> <property name="password" value="" /> <property\r
+               name="suppressClose" value="true" /> </bean>\r
+       -->\r
+\r
+       <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">\r
+               <property name="dataSource" ref="dataSource" />\r
+               <property name="hibernateProperties">\r
+                       <value><![CDATA[\r
+hibernate.dialect=org.hibernate.dialect.H2Dialect\r
+hibernate.hbm2ddl.auto=create\r
+hibernate.current_session_context_class=thread\r
+hibernate.jdbc.batch_size=20\r
+               ]]></value>\r
+               </property>\r
+       </bean>\r
+       \r
+       <bean id="dataSource"\r
+               class="org.springframework.jdbc.datasource.SingleConnectionDataSource"\r
+               destroy-method="destroy" lazy-init="true">\r
+               <property name="driverClassName" value="org.h2.Driver" />\r
+               <property name="url" value="jdbc:h2:mem:test" />\r
+               <property name="username" value="sa" />\r
+               <property name="password" value="" />\r
+               <property name="suppressClose" value="true" />\r
+       </bean>\r
+       \r
+       <bean id="testResultDao" parent="slcTemplates.dao.testResultDao">\r
+               <property name="sessionFactory" ref="sessionFactory" />\r
+       </bean>\r
+       <bean id="testResultCollectionDao" parent="slcTemplates.dao.testResultCollectionDao">\r
+               <property name="sessionFactory" ref="sessionFactory" />\r
+       </bean>\r
+\r
+       <bean id="slcExecutionDao" parent="slcTemplates.dao.slcExecutionDao">\r
+               <property name="sessionFactory" ref="sessionFactory" />\r
+       </bean>\r
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/withCastor.xml b/legacy/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/withCastor.xml
new file mode 100644 (file)
index 0000000..48bc9dc
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <import resource="applicationContext.xml" />\r
+       <import resource="classpath:/org/argeo/slc/castor/spring.xml" />\r
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/.classpath b/legacy/runtime/org.argeo.slc.support.ws.client/.classpath
new file mode 100644 (file)
index 0000000..a002fff
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/.project b/legacy/runtime/org.argeo.slc.support.ws.client/.project
new file mode 100644 (file)
index 0000000..142bb4a
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.support.ws.client</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/.settings/org.eclipse.jdt.core.prefs b/legacy/runtime/org.argeo.slc.support.ws.client/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..964778b
--- /dev/null
@@ -0,0 +1,12 @@
+#Fri Aug 29 11:31:46 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/pom.xml b/legacy/runtime/org.argeo.slc.support.ws.client/pom.xml
new file mode 100644 (file)
index 0000000..db1b5b6
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><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>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>runtime</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <groupId>org.argeo.slc.runtime</groupId>
+       <artifactId>org.argeo.slc.support.ws.client</artifactId>
+       <packaging>jar</packaging>
+       <name>SLC Support Web Services Client (deprecated)</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+
+                               <configuration>
+                                       <instructions>
+                                               <Export-Package>
+                                                       org.argeo.slc.ws.*
+                                               </Export-Package>
+                                               <Import-Package>org.w3c.dom;version="0.0.0",
+                                                       javax.xml.*;version="0.0.0",
+                                                       org.xml.*;version="0.0.0",
+                                                       org.springframework.ws.*;resolution:="optional",
+                                                       org.springframework.core;resolution:="optional",
+                                                       *
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.support.simple</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.support.castor</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.ws</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>com.sun.xml.messaging.saaj</artifactId>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/ValidatingClientInterceptor.java b/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/ValidatingClientInterceptor.java
new file mode 100644 (file)
index 0000000..84c4b19
--- /dev/null
@@ -0,0 +1,103 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.ws.client;\r
+\r
+import java.io.IOException;\r
+\r
+import javax.xml.transform.Source;\r
+\r
+import org.springframework.ws.client.WebServiceClientException;\r
+import org.springframework.ws.client.WebServiceIOException;\r
+import org.springframework.ws.client.support.interceptor.ClientInterceptor;\r
+import org.springframework.ws.context.MessageContext;\r
+import org.springframework.xml.validation.XmlValidator;\r
+import org.xml.sax.SAXParseException;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+\r
+public class ValidatingClientInterceptor implements ClientInterceptor {\r
+       private final static Log log = LogFactory\r
+                       .getLog(ValidatingClientInterceptor.class);\r
+\r
+       private Boolean validateRequest = true;\r
+       private Boolean validateResponse = false;\r
+       private XmlValidator validator = null;\r
+\r
+       public boolean handleFault(MessageContext messageContext)\r
+                       throws WebServiceClientException {\r
+               return true;\r
+       }\r
+\r
+       public boolean handleRequest(MessageContext messageContext)\r
+                       throws WebServiceClientException {\r
+               if (validateRequest) {\r
+                       if (messageContext.getRequest() == null)\r
+                               return true;\r
+\r
+                       Source source = messageContext.getRequest().getPayloadSource();\r
+                       try {\r
+                               return validate(source);\r
+                       } catch (IOException e) {\r
+                               throw new WebServiceIOException("Cannot validate request", e);\r
+                       }\r
+               } else {\r
+                       return true;\r
+               }\r
+       }\r
+\r
+       public boolean handleResponse(MessageContext messageContext)\r
+                       throws WebServiceClientException {\r
+               if (validateResponse) {\r
+                       if (messageContext.getResponse() == null)\r
+                               return true;\r
+\r
+                       Source source = messageContext.getResponse().getPayloadSource();\r
+                       try {\r
+                               return validate(source);\r
+                       } catch (IOException e) {\r
+                               throw new WebServiceIOException("Cannot validate response", e);\r
+                       }\r
+               } else {\r
+                       return true;\r
+               }\r
+       }\r
+\r
+       protected boolean validate(Source source) throws IOException {\r
+               SAXParseException[] exceptions = validator.validate(source);\r
+               if (exceptions.length != 0) {\r
+                       for (SAXParseException ex : exceptions) {\r
+                               log.error(ex.getMessage());\r
+                       }\r
+                       return false;\r
+               } else {\r
+                       return true;\r
+               }\r
+       }\r
+\r
+       public void setValidateRequest(Boolean validateRequest) {\r
+               this.validateRequest = validateRequest;\r
+       }\r
+\r
+       public void setValidateResponse(Boolean validateResponse) {\r
+               this.validateResponse = validateResponse;\r
+       }\r
+\r
+       public void setValidator(XmlValidator validator) {\r
+               this.validator = validator;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/WebServiceUtils.java b/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/WebServiceUtils.java
new file mode 100644 (file)
index 0000000..0250230
--- /dev/null
@@ -0,0 +1,99 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.ws.client;\r
+\r
+import java.util.Iterator;\r
+\r
+import javax.xml.transform.Source;\r
+import javax.xml.transform.dom.DOMSource;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.springframework.ws.client.core.WebServiceTemplate;\r
+import org.springframework.ws.soap.SoapFaultDetail;\r
+import org.springframework.ws.soap.SoapFaultDetailElement;\r
+import org.springframework.ws.soap.client.SoapFaultClientException;\r
+import org.springframework.xml.transform.StringResult;\r
+import org.w3c.dom.Node;\r
+\r
+public abstract class WebServiceUtils {\r
+       private final static Log log = LogFactory.getLog(WebServiceUtils.class);\r
+\r
+       public static Object marshalSendAndReceiveSafe(WebServiceTemplate template,\r
+                       Object req) {\r
+               try {\r
+                       Object resp = marshalSendAndReceive(template, req);\r
+                       return resp;\r
+               } catch (Exception e) {\r
+                       log.error("Cannot send web servicerequest: " + e.getMessage());\r
+                       if (log.isDebugEnabled()) {\r
+                               log.debug("Webservice exception details: ", e);\r
+                       }\r
+                       return null;\r
+               }\r
+       }\r
+\r
+       public static Object marshalSendAndReceive(WebServiceTemplate template,\r
+                       Object req) {\r
+               if (log.isTraceEnabled()) {\r
+                       try {\r
+                               StringResult result = new StringResult();\r
+                               template.getMarshaller().marshal(req, result);\r
+                               log.trace("About to send " + result);\r
+                       } catch (Exception e) {\r
+                               log.error("Cannot marshall " + req + " for logging", e);\r
+                       }\r
+               }\r
+               Object resp = template.marshalSendAndReceive(req);\r
+               return resp;\r
+       }\r
+\r
+       public static void manageSoapException(SoapFaultClientException e) {\r
+               log\r
+                               .error("WS root cause: "\r
+                                               + e.getSoapFault().getFaultStringOrReason());\r
+               if (log.isTraceEnabled()) {\r
+                       StringBuffer stack = new StringBuffer("");\r
+                       SoapFaultDetail detail = e.getSoapFault().getFaultDetail();\r
+                       if (detail != null) {\r
+                               Iterator<SoapFaultDetailElement> it = (Iterator<SoapFaultDetailElement>) detail\r
+                                               .getDetailEntries();\r
+                               while (it.hasNext()) {\r
+                                       SoapFaultDetailElement elem = it.next();\r
+                                       if (elem.getName().getLocalPart().equals("StackElement")) {\r
+                                               Source source = elem.getSource();\r
+                                               if (source instanceof DOMSource) {\r
+                                                       Node node = ((DOMSource) source).getNode();\r
+                                                       // stack.append(node.getTextContent()).append('\n');\r
+                                                       stack\r
+                                                                       .append(\r
+                                                                                       node.getChildNodes().item(0)\r
+                                                                                                       .getNodeValue()).append(\r
+                                                                                       '\n');\r
+                                               }\r
+                                       }\r
+                               }\r
+\r
+                               if (stack.length() > 0)\r
+                                       log.error("WS root cause stack: " + stack);\r
+                       }\r
+               }\r
+       }\r
+\r
+       private WebServiceUtils() {\r
+\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/process/WebServiceSlcExecutionNotifier.java b/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/process/WebServiceSlcExecutionNotifier.java
new file mode 100644 (file)
index 0000000..d341a63
--- /dev/null
@@ -0,0 +1,131 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.ws.process;\r
+\r
+import java.util.List;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.msg.process.SlcExecutionRequest;\r
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;\r
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;\r
+import org.argeo.slc.execution.ExecutionStep;\r
+import org.argeo.slc.execution.ExecutionProcess;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.process.SlcExecutionNotifier;\r
+import org.argeo.slc.process.SlcExecutionStep;\r
+import org.argeo.slc.ws.client.WebServiceUtils;\r
+import org.springframework.ws.client.WebServiceIOException;\r
+import org.springframework.ws.client.core.WebServiceTemplate;\r
+import org.springframework.ws.soap.client.SoapFaultClientException;\r
+\r
+public class WebServiceSlcExecutionNotifier implements SlcExecutionNotifier {\r
+       private WebServiceTemplate template;\r
+\r
+       private Log log = LogFactory.getLog(getClass());\r
+\r
+       private Boolean cannotConnect = false;\r
+\r
+       public void newExecution(ExecutionProcess process) {\r
+               SlcExecution slcExecution = (SlcExecution) process;\r
+               if (cannotConnect)\r
+                       return;\r
+\r
+               SlcExecutionRequest req = new SlcExecutionRequest();\r
+               req.setSlcExecution(slcExecution);\r
+               try {\r
+                       WebServiceUtils.marshalSendAndReceive(template, req);\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("Notified creation of slc execution "\r
+                                               + slcExecution.getUuid());\r
+               } catch (SoapFaultClientException e) {\r
+                       WebServiceUtils.manageSoapException(e);\r
+               } catch (WebServiceIOException e) {\r
+                       manageIoException(e);\r
+               }\r
+       }\r
+\r
+       public void updateExecution(SlcExecution slcExecution) {\r
+               if (cannotConnect)\r
+                       return;\r
+\r
+               SlcExecutionRequest req = new SlcExecutionRequest();\r
+               req.setSlcExecution(slcExecution);\r
+               try {\r
+                       WebServiceUtils.marshalSendAndReceive(template, req);\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("Notified update of slc execution "\r
+                                               + slcExecution.getUuid());\r
+               } catch (SoapFaultClientException e) {\r
+                       WebServiceUtils.manageSoapException(e);\r
+               } catch (WebServiceIOException e) {\r
+                       manageIoException(e);\r
+               }\r
+       }\r
+\r
+       public void updateStatus(ExecutionProcess process, String oldStatus,\r
+                       String newStatus) {\r
+               SlcExecution slcExecution = (SlcExecution) process;\r
+               if (cannotConnect)\r
+                       return;\r
+\r
+               SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(\r
+                               slcExecution.getUuid(), newStatus);\r
+               try {\r
+                       WebServiceUtils.marshalSendAndReceive(template, req);\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("Notified status update of slc execution "\r
+                                               + slcExecution.getUuid());\r
+               } catch (SoapFaultClientException e) {\r
+                       WebServiceUtils.manageSoapException(e);\r
+               } catch (WebServiceIOException e) {\r
+                       manageIoException(e);\r
+               }\r
+       }\r
+\r
+       public void addSteps(ExecutionProcess process,\r
+                       List<ExecutionStep> additionalSteps) {\r
+               SlcExecution slcExecution = (SlcExecution) process;\r
+               if (cannotConnect)\r
+                       return;\r
+\r
+               SlcExecutionStepsRequest req = new SlcExecutionStepsRequest(\r
+                               slcExecution.getUuid(), additionalSteps);\r
+               try {\r
+                       WebServiceUtils.marshalSendAndReceive(template, req);\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("Added steps to slc execution "\r
+                                               + slcExecution.getUuid());\r
+               } catch (SoapFaultClientException e) {\r
+                       WebServiceUtils.manageSoapException(e);\r
+               } catch (WebServiceIOException e) {\r
+                       manageIoException(e);\r
+               }\r
+       }\r
+\r
+       public void setTemplate(WebServiceTemplate template) {\r
+               this.template = template;\r
+       }\r
+\r
+       protected void manageIoException(WebServiceIOException e) {\r
+               if (!cannotConnect) {\r
+                       log.error("Cannot connect to " + template.getDefaultUri()\r
+                                       + ". Won't try again.", e);\r
+                       cannotConnect = true;\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/test/tree/WebServiceTreeTestResultNotifier.java b/legacy/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/test/tree/WebServiceTreeTestResultNotifier.java
new file mode 100644 (file)
index 0000000..cefbcd1
--- /dev/null
@@ -0,0 +1,124 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.ws.test.tree;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
+import org.argeo.slc.test.TestResultListener;\r
+import org.argeo.slc.test.TestResultPart;\r
+import org.argeo.slc.ws.client.WebServiceUtils;\r
+import org.springframework.ws.client.WebServiceIOException;\r
+import org.springframework.ws.client.core.WebServiceTemplate;\r
+import org.springframework.ws.soap.client.SoapFaultClientException;\r
+\r
+public class WebServiceTreeTestResultNotifier implements\r
+               TestResultListener<TreeTestResult> {\r
+       private WebServiceTemplate template;\r
+       private Boolean onlyOnClose = false;\r
+\r
+       private Log log = LogFactory.getLog(getClass());\r
+\r
+       private Boolean cannotConnect = false;\r
+\r
+       public void resultPartAdded(TreeTestResult testResult,\r
+                       TestResultPart testResultPart) {\r
+               if (onlyOnClose)\r
+                       return;\r
+\r
+               if (cannotConnect)\r
+                       return;\r
+\r
+               try {\r
+                       if (testResult.getResultParts().size() == 1\r
+                                       && testResult.getResultParts().values().iterator().next()\r
+                                                       .getParts().size() == 1) {\r
+                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(\r
+                                               testResult);\r
+\r
+                               if (log.isDebugEnabled())\r
+                                       log.debug("Send create result request for result "\r
+                                                       + testResult.getUuid());\r
+\r
+                               WebServiceUtils.marshalSendAndReceive(template, req);\r
+                       } else {\r
+                               ResultPartRequest req = new ResultPartRequest(testResult);\r
+\r
+                               if (log.isDebugEnabled())\r
+                                       log.debug("Send result parts for result "\r
+                                                       + testResult.getUuid());\r
+\r
+                               WebServiceUtils.marshalSendAndReceive(template, req);\r
+                       }\r
+               } catch (SoapFaultClientException e) {\r
+                       WebServiceUtils.manageSoapException(e);\r
+\r
+               } catch (WebServiceIOException e) {\r
+                       manageIoException(e);\r
+               }\r
+       }\r
+\r
+       public void close(TreeTestResult testResult) {\r
+               if (cannotConnect)\r
+                       return;\r
+\r
+               try {\r
+                       if (onlyOnClose) {\r
+                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(\r
+                                               testResult);\r
+\r
+                               if (log.isDebugEnabled())\r
+                                       log.debug("Send create result request for result "\r
+                                                       + testResult.getUuid());\r
+\r
+                               WebServiceUtils.marshalSendAndReceive(template, req);\r
+                       } else {\r
+                               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(\r
+                                               testResult);\r
+\r
+                               if (log.isDebugEnabled())\r
+                                       log.debug("Send close result request for result "\r
+                                                       + testResult.getUuid());\r
+\r
+                               WebServiceUtils.marshalSendAndReceive(template, req);\r
+\r
+                       }\r
+               } catch (SoapFaultClientException e) {\r
+                       WebServiceUtils.manageSoapException(e);\r
+               } catch (WebServiceIOException e) {\r
+                       manageIoException(e);\r
+               }\r
+       }\r
+\r
+       public void setTemplate(WebServiceTemplate template) {\r
+               this.template = template;\r
+       }\r
+\r
+       public void setOnlyOnClose(Boolean onlyOnClose) {\r
+               this.onlyOnClose = onlyOnClose;\r
+       }\r
+\r
+       protected void manageIoException(WebServiceIOException e) {\r
+               if (!cannotConnect) {\r
+                       log.error("Cannot connect to " + template.getDefaultUri()\r
+                                       + ". Won't try again.", e);\r
+                       cannotConnect = true;\r
+               }\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.support.ws.client/src/main/resources/org/argeo/slc/ws/client/spring/applicationContext.xml b/legacy/runtime/org.argeo.slc.support.ws.client/src/main/resources/org/argeo/slc/ws/client/spring/applicationContext.xml
new file mode 100644 (file)
index 0000000..2cf78df
--- /dev/null
@@ -0,0 +1,82 @@
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="true">
+
+       <import
+               resource="classpath:/org/argeo/slc/castor/spring/applicationContext.xml" />
+       <import
+               resource="classpath:/org/argeo/slc/xml/spring/applicationContext.xml" />
+
+       <bean id="slcDefault.ws.client.webServiceTemplate"
+               parent="slcTemplate.ws.client.webServiceTemplate">
+               <constructor-arg ref="slcDefault.ws.client.messageFactory" />
+               <property name="defaultUri" value="${slc.ws.uri}" />
+       </bean>
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
+               lazy-init="false">
+               <property name="systemPropertiesModeName"
+                       value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="ignoreUnresolvablePlaceholders" value="true" />
+               <property name="properties">
+                       <props>
+                               <prop key="slc.ws.uri">
+                                       http://localhost:9090/org.argeo.slc.webapp/slcService/
+                               </prop>
+                       </props>
+               </property>
+       </bean>
+
+       <bean id="slcTemplate.ws.client.webServiceTemplate"
+               class="org.springframework.ws.client.core.WebServiceTemplate"
+               abstract="true">
+               <property name="marshaller" ref="slcDefault.castor.marshaller" />
+               <property name="unmarshaller"
+                       ref="slcDefault.castor.marshaller" />
+               <property name="interceptors">
+                       <list>
+                               <bean
+                                       class="org.argeo.slc.ws.client.ValidatingClientInterceptor">
+                                       <property name="validator"
+                                               ref="slcDefault.xml.xsdValidator" />
+                               </bean>
+                       </list>
+               </property>
+       </bean>
+
+       <bean id="slcDefault.ws.client.messageFactory"
+               class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory" />
+
+       <bean name="slcDefault.ws.client.treeTestResultWsNotfier"
+               class="org.argeo.slc.ws.test.tree.WebServiceTreeTestResultNotifier">
+               <property name="template"
+                       ref="slcDefault.ws.client.webServiceTemplate" />
+               <property name="onlyOnClose" value="false" />
+       </bean>
+
+       <bean name="slcDefault.ws.client.slcExecutionNotifier"
+               class="org.argeo.slc.ws.process.WebServiceSlcExecutionNotifier">
+               <property name="template"
+                       ref="slcDefault.ws.client.webServiceTemplate" />
+       </bean>
+
+</beans>
diff --git a/modules/agent/org.argeo.slc.agent.ext.bsf/pom.xml b/modules/agent/org.argeo.slc.agent.ext.bsf/pom.xml
deleted file mode 100644 (file)
index 280c1ec..0000000
+++ /dev/null
@@ -1,29 +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>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>agent</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.agent.ext.bsf</artifactId>
-       <name>SLC Agent BSF Extension</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Fragment-Host>org.apache.bsf</Fragment-Host>
-                                               <Import-Package>
-                                                       *,
-                                                       bsh.util;resolution:=optional,
-                                                       org.codehaus.groovy.bsf;resolution:=optional
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.ext.jdbc/pom.xml b/modules/agent/org.argeo.slc.agent.ext.jdbc/pom.xml
deleted file mode 100644 (file)
index 929dc59..0000000
+++ /dev/null
@@ -1,30 +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>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>agent</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.agent.ext.jdbc</artifactId>
-       <name>SLC Agent JDBC Extension</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Fragment-Host>org.springframework.jdbc</Fragment-Host>
-                                               <Import-Package>
-                                                       *,
-                                                       com.mysql.jdbc;resolution:=optional,
-                                                       net.sourceforge.jtds.jdbc;resolution:=optional,
-                                                       org.hsqldb;resolution:=optional
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.ext.xalan/pom.xml b/modules/agent/org.argeo.slc.agent.ext.xalan/pom.xml
deleted file mode 100644 (file)
index cb8bf1e..0000000
+++ /dev/null
@@ -1,29 +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>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>agent</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.agent.ext.xalan</artifactId>
-       <name>SLC Agent Xalan Extension</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Fragment-Host>org.argeo.slc.agent.ext.xalan</Fragment-Host>
-                                               <Import-Package>
-                                                       *,
-                                                       com.sun.org.apache.xml.internal.dtm;resolution:=optional,
-                                                       org.w3c.dom.traversal;resolution:=optional
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.jms/.project b/modules/agent/org.argeo.slc.agent.jms/.project
deleted file mode 100644 (file)
index f9cc4f0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.agent.jms</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/agent/org.argeo.slc.agent.jms/META-INF/spring/common.xml b/modules/agent/org.argeo.slc.agent.jms/META-INF/spring/common.xml
deleted file mode 100644 (file)
index c0ce5e0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="false">
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:agent.properties</value>
-               </property>
-       </bean>
-
-       <bean id="treeTestResultLogger" class="org.argeo.slc.core.test.tree.TreeTestResultLogger" />
-
-</beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.jms/META-INF/spring/jms.xml b/modules/agent/org.argeo.slc.agent.jms/META-INF/spring/jms.xml
deleted file mode 100644 (file)
index 7924dfe..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="false">
-
-       <import resource="classpath:org/argeo/slc/castor/spring.xml" />
-       <import resource="classpath:org/argeo/slc/activemq/destinations.xml" />
-
-       <!-- Agent implementation -->
-       <bean id="jmsAgent" class="org.argeo.slc.jms.JmsAgent"
-               init-method="init" destroy-method="dispose">
-               <property name="agentRegister" ref="slcJms.destination.agent.register" />
-               <property name="agentUnregister" ref="slcJms.destination.agent.unregister" />
-               <property name="modulesManager" ref="modulesManager" />
-               <property name="responseDestination" ref="slcJms.destination.agent.response" />
-               <property name="jmsTemplate" ref="jmsTemplate" />
-       </bean>
-
-       <!-- Listeners -->
-       <bean id="jmsAgent.listener.request" parent="listenerTemplate">
-               <property name="destination" ref="slcJms.destination.agent.request" />
-               <property name="messageSelector">
-                       <bean factory-bean="jmsAgent" factory-method="getMessageSelector" />
-               </property>
-       </bean>
-
-       <bean id="jmsAgent.listener.pingAll" parent="listenerTemplate">
-               <property name="destination" ref="slcJms.destination.agent.pingAll" />
-               <property name="messageListener" ref="jmsAgent" />
-       </bean>
-
-       <!-- Services -->
-       <bean id="resultListener" class="org.argeo.slc.jms.JmsTreeTestResultListener">
-               <property name="executionEventDestination" ref="slcJms.destination.execution.event" />
-               <property name="onlyOnClose" value="${slc.agent.jms.resultListener.onlyOnClose}" />
-               <property name="jmsTemplate" ref="jmsTemplate" />
-       </bean>
-       <bean id="attachmentUploader" class="org.argeo.slc.jms.JmsAttachmentUploader">
-               <property name="destination" ref="slcJms.destination.attachment.add" />
-               <property name="jmsTemplate" ref="jmsTemplate" />
-       </bean>
-       <bean id="slcExecutionListener" class="org.argeo.slc.jms.JmsSlcExecutionNotifier">
-               <property name="executionEventDestination" ref="slcJms.destination.execution.event" />
-               <property name="jmsTemplate" ref="jmsTemplate" />
-       </bean>
-
-       <!-- JMS -->
-       <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-               <property name="messageConverter">
-                       <bean class="org.argeo.slc.jms.MarshallerMessageConverter">
-                               <property name="disableMarshalling" value="${slc.agent.jms.disableMarshalling}" />
-                               <property name="marshaller" ref="slcDefault.castor.marshaller" />
-                               <property name="unmarshaller" ref="slcDefault.castor.marshaller" />
-                       </bean>
-               </property>
-               <property name="connectionFactory" ref="jmsConnectionFactory" />
-       </bean>
-
-       <bean id="jmsConnectionFactory"
-               class="org.springframework.jms.connection.CachingConnectionFactory">
-               <property name="targetConnectionFactory">
-                       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-                               <property name="brokerURL">
-                                       <value>${slc.server.jms.url}</value>
-                               </property>
-                       </bean>
-               </property>
-       </bean>
-
-       <bean id="jmsTransactionManager"
-               class="org.springframework.jms.connection.JmsTransactionManager">
-               <property name="connectionFactory" ref="jmsConnectionFactory" />
-       </bean>
-
-       <!-- Templates -->
-       <bean id="listenerTemplate"
-               class="org.springframework.jms.listener.DefaultMessageListenerContainer"
-               abstract="true">
-               <property name="connectionFactory" ref="jmsConnectionFactory" />
-               <property name="messageListener" ref="jmsAgent" />
-               <property name="transactionManager" ref="jmsTransactionManager" />
-       </bean>
-
-
-</beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.jms/META-INF/spring/osgi.xml b/modules/agent/org.argeo.slc.agent.jms/META-INF/spring/osgi.xml
deleted file mode 100644 (file)
index 6020ed8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <bundle id="agent" action="start" symbolic-name="org.argeo.slc.agent" />\r
-\r
-       <!-- REFERENCES -->\r
-       <reference id="modulesManager"\r
-               interface="org.argeo.slc.execution.ExecutionModulesManager"\r
-               context-class-loader="service-provider" />\r
-\r
-       <!-- SERVICES -->\r
-       <!-- Deprecated -->\r
-       <service ref="resultListener"\r
-               interface="org.argeo.slc.core.test.tree.TreeTestResultListener" />\r
-       <service ref="resultListener" interface="org.argeo.slc.test.TestResultListener" />\r
-\r
-       <service ref="slcExecutionListener" interface="org.argeo.slc.process.SlcExecutionNotifier" />\r
-\r
-       <service ref="attachmentUploader" interface="org.argeo.slc.core.attachment.AttachmentUploader" />\r
-\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.jms/agent.properties b/modules/agent/org.argeo.slc.agent.jms/agent.properties
deleted file mode 100644 (file)
index d688a74..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-slc.server.jms.url=tcp://localhost:61616
-
-# Customization
-slc.agent.jms.disableMarshalling=false
-slc.agent.jms.resultListener.onlyOnClose=false
diff --git a/modules/agent/org.argeo.slc.agent.jms/build.properties b/modules/agent/org.argeo.slc.agent.jms/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/agent/org.argeo.slc.agent.jms/pom.xml b/modules/agent/org.argeo.slc.agent.jms/pom.xml
deleted file mode 100644 (file)
index d6d154f..0000000
+++ /dev/null
@@ -1,26 +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>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>agent</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.agent.jms</artifactId>
-       <name>SLC Agent JMS</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Import-Package>
-                                                       *,
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.ext.activemq/.project b/modules/agent/org.argeo.slc.ext.activemq/.project
deleted file mode 100644 (file)
index c8e5c7d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.ext.activemq</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/agent/org.argeo.slc.ext.activemq/pom.xml b/modules/agent/org.argeo.slc.ext.activemq/pom.xml
deleted file mode 100644 (file)
index b124192..0000000
+++ /dev/null
@@ -1,51 +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>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>agent</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.ext.activemq</artifactId>
-       <name>SLC ActiveMQ Extension</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Fragment-Host>org.apache.activemq</Fragment-Host>
-                                               <Import-Package>
-                                                       *,
-                                                       org.argeo.slc.runtime,
-                                                       org.argeo.slc.execution,
-                                                       org.argeo.slc.msg,
-                                                       org.argeo.slc.build,
-                                                       org.argeo.slc.core.execution,
-                                                       org.argeo.slc.core.attachment,
-                                                       org.argeo.slc.core.structure,
-                                                       org.argeo.slc.core.structure.tree,
-                                                       org.argeo.slc.core.test,
-                                                       org.argeo.slc.core.test.tree,
-                                                       org.argeo.slc.deploy,
-                                                       org.argeo.slc.detached;resolution:=optional,
-                                                       org.argeo.slc.execution,
-                                                       org.argeo.slc.msg,
-                                                       org.argeo.slc.msg.build,
-                                                       org.argeo.slc.msg.event,
-                                                       org.argeo.slc.msg.process,
-                                                       org.argeo.slc.msg.test.tree,
-                                                       org.argeo.slc.process,
-                                                       org.argeo.slc.runtime,
-                                                       org.argeo.slc.test,
-                                                       org.argeo.slc.xml.process;resolution:=optional,
-                                                       org.argeo.slc.xml.test.tree;resolution:=optional,
-                                                       org.hibernate.collection;resolution:=optional
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.lib.build/.project b/modules/agent/org.argeo.slc.lib.build/.project
deleted file mode 100644 (file)
index 6e7c038..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.lib.build</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/agent/org.argeo.slc.lib.build/META-INF/MANIFEST.MF b/modules/agent/org.argeo.slc.lib.build/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index ba036e5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SLC Build
-Bundle-SymbolicName: org.argeo.slc.lib.build
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Vendor: Argeo
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/modules/agent/org.argeo.slc.lib.build/build.properties b/modules/agent/org.argeo.slc.lib.build/build.properties
deleted file mode 100644 (file)
index 5fc538b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes/
-bin.includes = META-INF/,\
-               .
diff --git a/modules/server/org.argeo.slc.server.activemq/.project b/modules/server/org.argeo.slc.server.activemq/.project
deleted file mode 100644 (file)
index 872d152..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.activemq</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.activemq/.settings/org.eclipse.pde.core.prefs b/modules/server/org.argeo.slc.server.activemq/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index f0ef2f9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sun Feb 14 20:09:09 CET 2010
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/modules/server/org.argeo.slc.server.activemq/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.activemq/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 4f2283f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-SymbolicName: org.argeo.slc.server.activemq
-Import-Package: javax.jms,
- org.apache.activemq,
- org.argeo.slc.jms,
- org.springframework.beans.factory.config,
- org.springframework.jms.connection,
- org.springframework.jms.support.converter,
- org.springframework.oxm
-Bundle-Name: Active MQ Server
diff --git a/modules/server/org.argeo.slc.server.activemq/META-INF/spring/activemq-osgi.xml b/modules/server/org.argeo.slc.server.activemq/META-INF/spring/activemq-osgi.xml
deleted file mode 100644 (file)
index 1c63302..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <!-- SERVICES -->\r
-       <service ref="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" />\r
-\r
-       <service ref="jmsCastorMessageConverter"\r
-               interface="org.springframework.jms.support.converter.MessageConverter" />\r
-\r
-       <reference id="marshaller" interface="org.springframework.oxm.Marshaller" />\r
-       <reference id="unmarshaller" interface="org.springframework.oxm.Unmarshaller" />\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.activemq/META-INF/spring/activemq.xml b/modules/server/org.argeo.slc.server.activemq/META-INF/spring/activemq.xml
deleted file mode 100644 (file)
index ef5f43c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:activemq.properties</value>
-               </property>
-       </bean>
-
-       <!-- Connection Factory -->
-       <bean id="jmsConnectionFactory"
-               class="org.springframework.jms.connection.CachingConnectionFactory">
-               <property name="targetConnectionFactory">
-                       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-                               <property name="brokerURL">
-                                       <value>${slc.server.jms.url}</value>
-                               </property>
-                       </bean>
-               </property>
-       </bean>
-
-       <bean id="jmsCastorMessageConverter" class="org.argeo.slc.jms.MarshallerMessageConverter">
-               <property name="disableMarshalling" value="${slc.server.jms.disableMarshalling}" />
-               <property name="marshaller" ref="marshaller" />
-               <property name="unmarshaller" ref="unmarshaller" />
-       </bean>
-
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.activemq/activemq.properties b/modules/server/org.argeo.slc.server.activemq/activemq.properties
deleted file mode 100644 (file)
index 0e524d4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-slc.server.jms.url=tcp://localhost:61616
-
-slc.server.jms.disableMarshalling=false
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.activemq/build.properties b/modules/server/org.argeo.slc.server.activemq/build.properties
deleted file mode 100644 (file)
index 5f22cdd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = META-INF/
diff --git a/modules/server/org.argeo.slc.server.agentproxy/.project b/modules/server/org.argeo.slc.server.agentproxy/.project
deleted file mode 100644 (file)
index b2a0bb1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.agentproxy</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.agentproxy/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.agentproxy/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 599022d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-SymbolicName: org.argeo.slc.server.agentproxy
-Import-Package: javax.jms,
- org.apache.activemq.command,
- org.argeo.slc.activemq,
- org.argeo.slc.jms,
- org.argeo.slc.runtime,
- org.springframework.beans.factory.config,
- org.springframework.jms.core,
- org.springframework.jms.support.converter
-Bundle-Name: Agent Proxy
diff --git a/modules/server/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy-osgi.xml b/modules/server/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy-osgi.xml
deleted file mode 100644 (file)
index 874a92a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
-       http://www.springframework.org/schema/beans   
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <!-- REFERENCES -->
-       <reference id="jmsMessageConverter"
-               interface="org.springframework.jms.support.converter.MessageConverter" />
-       <reference id="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" />
-
-       <!-- SERVICES -->
-       <service ref="agentFactory" interface="org.argeo.slc.runtime.SlcAgentFactory" />
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy.xml b/modules/server/org.argeo.slc.server.agentproxy/META-INF/spring/agentProxy.xml
deleted file mode 100644 (file)
index e67283c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <import resource="classpath:org/argeo/slc/activemq/destinations.xml" />
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:agentproxy.properties</value>
-               </property>
-       </bean>
-
-       <!-- Agent Factory -->
-       <bean id="agentFactory" class="org.argeo.slc.jms.JmsAgentProxyFactory">
-               <property name="jmsTemplate">
-                       <bean class="org.springframework.jms.core.JmsTemplate">
-                               <property name="connectionFactory" ref="jmsConnectionFactory" />
-                               <property name="messageConverter" ref="jmsMessageConverter" />
-                               <property name="receiveTimeout" value="${slc.server.jms.agentProxy.timeout}" />
-                       </bean>
-               </property>
-               <property name="requestDestination" ref="slcJms.destination.agent.request" />
-               <property name="responseDestination" ref="slcJms.destination.agent.response" />
-               <property name="pingAllDestination" ref="slcJms.destination.agent.pingAll" />
-       </bean>
-
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.agentproxy/agentproxy.properties b/modules/server/org.argeo.slc.server.agentproxy/agentproxy.properties
deleted file mode 100644 (file)
index b003c43..0000000
+++ /dev/null
@@ -1 +0,0 @@
-slc.server.jms.agentProxy.timeout=20000
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.agentproxy/build.properties b/modules/server/org.argeo.slc.server.agentproxy/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/server/org.argeo.slc.server.castor/.project b/modules/server/org.argeo.slc.server.castor/.project
deleted file mode 100644 (file)
index f40b286..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.castor</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.castor/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.castor/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index b11b449..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-SymbolicName: org.argeo.slc.server.castor
-Import-Package: org.springframework.oxm,
- org.argeo.slc.castor,
- org.springframework.oxm.castor
-Bundle-Name: Server Castor
diff --git a/modules/server/org.argeo.slc.server.castor/META-INF/spring/castor-osgi.xml b/modules/server/org.argeo.slc.server.castor/META-INF/spring/castor-osgi.xml
deleted file mode 100644 (file)
index aaacff8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
-       http://www.springframework.org/schema/beans   
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <import resource="classpath:org/argeo/slc/castor/spring.xml" />
-
-       <osgi:service ref="slcDefault.castor.marshaller">
-               <osgi:interfaces>
-                       <value>org.springframework.oxm.Marshaller
-                       </value>
-                       <value>org.springframework.oxm.Unmarshaller
-                       </value>
-               </osgi:interfaces>
-       </osgi:service>
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.h2/.project b/modules/server/org.argeo.slc.server.h2/.project
deleted file mode 100644 (file)
index 431324b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.h2</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.h2/.settings/org.eclipse.pde.core.prefs b/modules/server/org.argeo.slc.server.h2/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index eb0a4dc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Jul 13 15:43:47 CEST 2010
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/modules/server/org.argeo.slc.server.h2/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.h2/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index a84864a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Server H2
-Bundle-SymbolicName: org.argeo.slc.server.h2
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Vendor: Argeo
-Import-Package: net.sf.ehcache.hibernate,
- org.aopalliance.aop,
- org.argeo.slc.core.attachment,
- org.argeo.slc.core.structure,
- org.argeo.slc.core.structure.tree,
- org.argeo.slc.core.test,
- org.argeo.slc.core.test.tree,
- org.argeo.slc.hibernate,
- org.argeo.slc.hibernate.attachment,
- org.argeo.slc.hibernate.process,
- org.argeo.slc.hibernate.runtime,
- org.argeo.slc.hibernate.structure,
- org.argeo.slc.hibernate.test,
- org.argeo.slc.hibernate.test.tree,
- org.argeo.slc.process,
- org.argeo.slc.runtime,
- org.argeo.slc.test,
- org.h2,
- org.h2.jdbcx,
- org.hibernate,
- org.hibernate.hql.ast,
- org.springframework.beans.factory.config,
- org.springframework.cache.ehcache,
- org.springframework.jdbc.datasource,
- org.springframework.orm.hibernate3
diff --git a/modules/server/org.argeo.slc.server.h2/META-INF/spring/h2-osgi.xml b/modules/server/org.argeo.slc.server.h2/META-INF/spring/h2-osgi.xml
deleted file mode 100644 (file)
index 6d7b0e6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <service ref="sessionFactory" interface="org.hibernate.SessionFactory" />\r
-\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.h2/META-INF/spring/h2.xml b/modules/server/org.argeo.slc.server.h2/META-INF/spring/h2.xml
deleted file mode 100644 (file)
index fa26f33..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
-       default-lazy-init="false">
-
-       <import resource="classpath:/org/argeo/slc/hibernate/sessionFactories.xml" />
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="ignoreUnresolvablePlaceholders" value="true" />
-               <property name="locations">
-                       <value>osgibundle:h2.properties
-                       </value>
-               </property>
-       </bean>
-
-       <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
-               <property name="dataSource" ref="dataSource" />
-               <property name="hibernateProperties">
-                       <value><![CDATA[
-hibernate.dialect=org.hibernate.dialect.H2Dialect
-hibernate.hbm2ddl.auto=create
-hibernate.current_session_context_class=thread
-               ]]></value>
-               </property>
-       </bean>
-
-       <bean id="dataSource"
-               class="org.springframework.jdbc.datasource.DriverManagerDataSource">
-               <property name="driverClassName" value="org.h2.Driver" />
-               <property name="url" value="${slc.server.h2.url}" />
-               <property name="username" value="sa" />
-               <property name="password" value="" />
-       </bean>
-
-
-       <!--<bean id="dataSource" class="org.h2.jdbcx.JdbcDataSource">
-               <property name="URL" value="${slc.server.h2.url}" />
-               <property name="user" value="sa" />
-               <property name="password" value="" />
-       </bean>
-       
---></beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.h2/build.properties b/modules/server/org.argeo.slc.server.h2/build.properties
deleted file mode 100644 (file)
index 5f22cdd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = META-INF/
diff --git a/modules/server/org.argeo.slc.server.h2/h2.properties b/modules/server/org.argeo.slc.server.h2/h2.properties
deleted file mode 100644 (file)
index 0877043..0000000
+++ /dev/null
@@ -1 +0,0 @@
-slc.server.h2.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.hibernate/.project b/modules/server/org.argeo.slc.server.hibernate/.project
deleted file mode 100644 (file)
index cade579..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.hibernate</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.hibernate/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.hibernate/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index f9dc2f0..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-SymbolicName: org.argeo.slc.server.hibernate
-Import-Package: org.aopalliance.aop,
- org.argeo.slc.core.attachment,
- org.argeo.slc.core.structure,
- org.argeo.slc.core.structure.tree,
- org.argeo.slc.core.test,
- org.argeo.slc.core.test.tree,
- org.argeo.slc.dao.process,
- org.argeo.slc.dao.runtime,
- org.argeo.slc.dao.test,
- org.argeo.slc.dao.test.tree,
- org.argeo.slc.hibernate,
- org.argeo.slc.hibernate.process,
- org.argeo.slc.hibernate.runtime,
- org.argeo.slc.hibernate.test,
- org.argeo.slc.hibernate.test.tree,
- org.argeo.slc.process,
- org.argeo.slc.runtime,
- org.argeo.slc.test,
- org.hibernate,
- org.hibernate.hql.ast,
- org.hibernate.jdbc,
- org.springframework.aop,
- org.springframework.aop.framework,
- org.springframework.orm.hibernate3,
- org.springframework.orm.hibernate3.support,
- org.springframework.transaction,
- org.springframework.web.context.request
-Bundle-Name: Server Hibernate
diff --git a/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/db-osgi.xml b/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/db-osgi.xml
deleted file mode 100644 (file)
index c85ccd5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <service interface="org.argeo.slc.dao.process.SlcExecutionDao"\r
-               ref="slcExecutionDao" />\r
-\r
-       <service interface="org.argeo.slc.dao.test.tree.TreeTestResultDao"\r
-               ref="testResultDao" />\r
-       <service interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao"\r
-               ref="testResultCollectionDao" />\r
-       <service interface="org.argeo.slc.dao.test.TestRunDescriptorDao"\r
-               ref="testRunDescriptorDao" />\r
-       <service interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao"\r
-               ref="slcAgentDescriptorDao" />\r
-\r
-       <service\r
-               interface="org.springframework.web.context.request.WebRequestInterceptor"\r
-               ref="osivInterceptor" />\r
-\r
-       <reference id="sessionFactory" interface="org.hibernate.SessionFactory" />\r
-\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/db.xml b/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/db.xml
deleted file mode 100644 (file)
index a5d4329..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
-       default-lazy-init="false">
-
-       <import resource="classpath:/org/argeo/slc/hibernate/dao.xml" />
-
-       <!-- DAOs -->
-       <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
-               <property name="sessionFactory" ref="sessionFactory" />
-               <property name="allowCreate" value="false" />
-       </bean>
-
-       <bean id="testResultDao" parent="slcTemplates.dao.testResultDao">
-               <property name="hibernateTemplate" ref="hibernateTemplate" />
-       </bean>
-
-       <bean id="testResultCollectionDao" parent="slcTemplates.dao.testResultCollectionDao">
-               <property name="hibernateTemplate" ref="hibernateTemplate" />
-       </bean>
-
-       <bean id="testRunDescriptorDao" parent="slcTemplates.dao.testRunDescriptorDao">
-               <property name="hibernateTemplate" ref="hibernateTemplate" />
-       </bean>
-
-       <bean id="slcExecutionDao" parent="slcTemplates.dao.slcExecutionDao">
-               <property name="hibernateTemplate" ref="hibernateTemplate" />
-       </bean>
-
-       <bean id="slcAgentDescriptorDao" parent="slcTemplates.dao.slcAgentDescriptorDao">
-               <property name="hibernateTemplate" ref="hibernateTemplate" />
-       </bean>
-
-       <bean id="osivInterceptor"
-               class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
-               <property name="sessionFactory" ref="sessionFactory" />
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/transaction-osgi.xml b/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/transaction-osgi.xml
deleted file mode 100644 (file)
index f951380..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
-       http://www.springframework.org/schema/beans   
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-
-       <service ref="hibernateTransactionManager"
-               interface="org.springframework.transaction.PlatformTransactionManager" />
-
-
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/transaction.xml b/modules/server/org.argeo.slc.server.hibernate/META-INF/spring/transaction.xml
deleted file mode 100644 (file)
index 7d03b64..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-       <!-- Transaction -->
-       <bean id="hibernateTransactionManager"
-               class="org.springframework.orm.hibernate3.HibernateTransactionManager"
-               lazy-init="false">
-               <property name="sessionFactory" ref="sessionFactory" />
-       </bean>
-
-       <!-- DAO transactions -->
-       <aop:config>
-               <aop:pointcut id="daoProcessMethods"
-                       expression="execution(* org.argeo.slc.dao.process.*.*(..))" />
-               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoProcessMethods" />
-       </aop:config>
-
-       <aop:config>
-               <aop:pointcut id="daoRuntimeMethods"
-                       expression="execution(* org.argeo.slc.dao.runtime.*.*(..))" />
-               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoRuntimeMethods" />
-       </aop:config>
-
-       <aop:config>
-               <aop:pointcut id="daoTestMethods"
-                       expression="execution(* org.argeo.slc.dao.test.*.*(..))" />
-               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestMethods" />
-       </aop:config>
-
-       <aop:config>
-               <aop:pointcut id="daoTestTreeMethods"
-                       expression="execution(* org.argeo.slc.dao.test.tree.*.*(..))" />
-               <aop:advisor advice-ref="daoAdvice" pointcut-ref="daoTestTreeMethods" />
-       </aop:config>
-
-       <tx:advice id="daoAdvice" transaction-manager="hibernateTransactionManager">
-               <tx:attributes>
-                       <tx:method name="get*" propagation="REQUIRED" read-only="true" />
-                       <tx:method name="list*" propagation="REQUIRED" read-only="true" />
-                       <tx:method name="*" propagation="REQUIRED" />
-               </tx:attributes>
-       </tx:advice>
-
-       <aop:config>
-               <aop:pointcut id="pointcut.services.allMethods"
-                       expression="execution(* org.argeo.slc.services.*.*.*(..))" />
-               <aop:advisor advice-ref="advice.allMethodsRequired"
-                       pointcut-ref="pointcut.services.allMethods" />
-       </aop:config>
-
-       <tx:advice id="advice.allMethodsRequired"
-               transaction-manager="hibernateTransactionManager">
-               <tx:attributes>
-                       <tx:method name="*" propagation="REQUIRED" />
-               </tx:attributes>
-       </tx:advice>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.jcr/.project b/modules/server/org.argeo.slc.server.jcr/.project
deleted file mode 100644 (file)
index f2310ab..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.jcr</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.jcr/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.jcr/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index a3de4b2..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-SymbolicName: org.argeo.slc.server.jcr
-Bundle-Name: Server JCR
-Import-Package: javax.jcr,
- org.argeo.jcr,
- org.argeo.jcr.mvc,
- org.argeo.jcr.spring,
- org.argeo.security,
- org.argeo.security.core,
- org.argeo.security.jcr,
- org.argeo.slc.core.attachment,
- org.argeo.slc.core.execution,
- org.argeo.slc.core.structure,
- org.argeo.slc.core.structure.tree,
- org.argeo.slc.core.test,
- org.argeo.slc.core.test.tree,
- org.argeo.slc.dao.process,
- org.argeo.slc.dao.runtime,
- org.argeo.slc.dao.test,
- org.argeo.slc.dao.test.tree,
- org.argeo.slc.execution,
- org.argeo.slc.jcr,
- org.argeo.slc.jcr.dao,
- org.argeo.slc.jcr.execution,
- org.argeo.slc.process,
- org.argeo.slc.runtime,
- org.argeo.slc.test,
- org.springframework.beans.factory.config,
- org.springframework.osgi.util,
- org.springframework.security;specification-version="2.0.6.RELEASE",
- org.springframework.web.context.request
diff --git a/modules/server/org.argeo.slc.server.jcr/META-INF/spring/jcr-osgi.xml b/modules/server/org.argeo.slc.server.jcr/META-INF/spring/jcr-osgi.xml
deleted file mode 100644 (file)
index 1bf1809..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xmlns:util="http://www.springframework.org/schema/util"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
-       http://www.springframework.org/schema/util\r
-       http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
-\r
-       <!-- REFERENCES -->\r
-       <reference id="repository" interface="javax.jcr.Repository"\r
-               filter="(argeo.jcr.repository.alias=slc)" />\r
-\r
-       <reference id="modulesManager"\r
-               interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
-       <reference id="authenticationManager"\r
-               interface="org.springframework.security.AuthenticationManager" />\r
-\r
-       <!-- SERVICES -->\r
-       <service interface="org.argeo.slc.execution.ExecutionModulesListener"\r
-               ref="executionModulesListener" />\r
-       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgentFactory">\r
-               <service-properties>\r
-                       <beans:entry>\r
-                               <beans:key>\r
-                                       <util:constant static-field="org.argeo.slc.jcr.SlcJcrConstants.PROPERTY_PATH" />\r
-                               </beans:key>\r
-                               <util:constant\r
-                                       static-field="org.argeo.slc.jcr.SlcJcrConstants.VM_AGENT_FACTORY_PATH" />\r
-                       </beans:entry>\r
-               </service-properties>\r
-       </service>\r
-       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgent" />\r
-\r
-       <!-- <service interface="org.argeo.slc.dao.process.SlcExecutionDao" -->\r
-       <!-- ref="slcExecutionDao" /> -->\r
-       <!-- <service interface="org.argeo.slc.dao.test.tree.TreeTestResultDao" -->\r
-       <!-- ref="testResultDao" /> -->\r
-       <!-- <service interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao" -->\r
-       <!-- ref="testResultCollectionDao" /> -->\r
-       <!-- <service interface="org.argeo.slc.dao.test.TestRunDescriptorDao" -->\r
-       <!-- ref="testRunDescriptorDao" /> -->\r
-       <!-- <service interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao" -->\r
-       <!-- ref="slcAgentDescriptorDao" /> -->\r
-\r
-       <!-- <service -->\r
-       <!-- interface="org.springframework.web.context.request.WebRequestInterceptor" -->\r
-       <!-- ref="osivInterceptor" /> -->\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.jcr/META-INF/spring/jcr.xml b/modules/server/org.argeo.slc.server.jcr/META-INF/spring/jcr.xml
deleted file mode 100644 (file)
index ba5e1e1..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <!-- <bean -->\r
-       <!-- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> -->\r
-       <!-- <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" \r
-               /> -->\r
-       <!-- <property name="locations"> -->\r
-       <!-- <value>osgibundle:jcr.properties</value> -->\r
-       <!-- </property> -->\r
-       <!-- </bean> -->\r
-\r
-       <bean id="agent" class="org.argeo.slc.jcr.execution.JcrAgent"\r
-               init-method="init" destroy-method="dispose">\r
-               <property name="session" ref="session" />\r
-               <property name="modulesManager" ref="modulesManager" />\r
-       </bean>\r
-\r
-       <bean id="executionModulesListener" class="org.argeo.slc.jcr.execution.JcrExecutionModulesListener"\r
-               init-method="init" destroy-method="dispose">\r
-               <property name="agent" ref="agent" />\r
-               <property name="session" ref="session" />\r
-       </bean>\r
-\r
-       <bean id="session" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
-               <property name="repository" ref="repository" />\r
-       </bean>\r
-\r
-       <bean class="org.argeo.security.core.SystemExecutionBeanPostProcessor">\r
-               <property name="authenticationManager" ref="authenticationManager" />\r
-       </bean>\r
-\r
-       <!-- <bean id="slcAgentDescriptorDao" class="org.argeo.slc.jcr.dao.SlcAgentDescriptorDaoJcr" -->\r
-       <!-- init-method="init"> -->\r
-       <!-- <property name="session" ref="jcrSession" /> -->\r
-       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="testRunDescriptorDao" class="org.argeo.slc.jcr.dao.TestRunDescriptorDaoJcr" -->\r
-       <!-- init-method="init"> -->\r
-       <!-- <property name="session" ref="jcrSession" /> -->\r
-       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="slcExecutionDao" class="org.argeo.slc.jcr.dao.SlcExecutionDaoJcr" -->\r
-       <!-- init-method="init"> -->\r
-       <!-- <property name="session" ref="jcrSession" /> -->\r
-       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="nodeMapperProvider" class="org.argeo.slc.jcr.dao.SlcNodeMapperProvider" -->\r
-       <!-- init-method="init"> -->\r
-       <!-- <property name="defaultNodeMapper" ref="nodeMapper" /> -->\r
-       <!-- <property name="treeTestResultNodeMapper" ref="treeTestResultNodeMapper" \r
-               /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="testResultDao" class="org.argeo.slc.jcr.dao.TreeTestResultDaoJcr" -->\r
-       <!-- init-method="init"> -->\r
-       <!-- <property name="session" ref="jcrSession" /> -->\r
-       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="testResultCollectionDao" class="org.argeo.slc.jcr.dao.TreeTestResultCollectionDaoJcr" -->\r
-       <!-- init-method="init"> -->\r
-       <!-- <property name="session" ref="jcrSession" /> -->\r
-       <!-- <property name="nodeMapperProvider" ref="nodeMapperProvider" /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="osivInterceptor" -->\r
-       <!-- class="org.argeo.server.jcr.mvc.OpenSessionInViewJcrInterceptor"> -->\r
-       <!-- <property name="session" ref="jcrSession" /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="bundleClassLoader" -->\r
-       <!-- class="org.springframework.osgi.util.BundleDelegatingClassLoader" -->\r
-       <!-- factory-method="createBundleClassLoaderFor"> -->\r
-       <!-- <constructor-arg> -->\r
-       <!-- <bean factory-bean="bundleContext" factory-method="getBundle" /> -->\r
-       <!-- </constructor-arg> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="nodeMapper" class="org.argeo.jcr.BeanNodeMapper"> -->\r
-       <!-- <property name="classLoader" ref="bundleClassLoader" /> -->\r
-       <!-- </bean> -->\r
-\r
-       <!-- <bean id="treeTestResultNodeMapper" class="org.argeo.slc.jcr.dao.TreeTestResultNodeMapper"> -->\r
-       <!-- <property name="classLoader" ref="bundleClassLoader" /> -->\r
-       <!-- </bean> -->\r
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.jcr/build.properties b/modules/server/org.argeo.slc.server.jcr/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/server/org.argeo.slc.server.jms/.project b/modules/server/org.argeo.slc.server.jms/.project
deleted file mode 100644 (file)
index 34ade02..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.jms</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.jms/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.jms/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index a7a76c1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-SymbolicName: org.argeo.slc.server.jms
-Import-Package: javax.jms,
- javax.management.j2ee.statistics,
- org.apache.activemq,
- org.apache.activemq.command,
- org.apache.commons.logging,
- org.argeo.security,
- org.argeo.security.core,
- org.argeo.slc.activemq,
- org.argeo.slc.core.attachment,
- org.argeo.slc.jms,
- org.argeo.slc.msg.event,
- org.argeo.slc.services,
- org.springframework.beans.factory.config,
- org.springframework.jms.core,
- org.springframework.jms.listener,
- org.springframework.jms.listener.adapter,
- org.springframework.jms.support.converter,
- org.springframework.transaction
-Bundle-Name: Server JMS
diff --git a/modules/server/org.argeo.slc.server.jms/META-INF/spring/jms-osgi.xml b/modules/server/org.argeo.slc.server.jms/META-INF/spring/jms-osgi.xml
deleted file mode 100644 (file)
index 0f900ba..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"
-       xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:beans="http://www.springframework.org/schema/beans"
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
-       http://www.springframework.org/schema/beans   
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       osgi:default-timeout="5000">
-
-       <!-- REFERENCES -->
-       <reference id="agentService" interface="org.argeo.slc.services.AgentService" />
-       <reference id="testManagerService" interface="org.argeo.slc.services.TestManagerService" />
-       <reference id="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" />
-
-       <reference id="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" />
-       <reference id="jmsMessageConverter"
-               interface="org.springframework.jms.support.converter.MessageConverter" />
-
-       <reference id="attachmentsStorage"
-               interface="org.argeo.slc.core.attachment.AttachmentsStorage" />
-       <reference id="systemExecutionService" interface="org.argeo.security.SystemExecutionService" />
-
-       <!-- SERVICES -->
-       <service ref="jmsEventListener" interface="org.argeo.slc.msg.event.SlcEventListener" />
-       <service ref="jmsEventPublisher" interface="org.argeo.slc.msg.event.SlcEventPublisher" />
-
-
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.jms/META-INF/spring/jms.xml b/modules/server/org.argeo.slc.server.jms/META-INF/spring/jms.xml
deleted file mode 100644 (file)
index b7e3791..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <import resource="classpath:org/argeo/slc/activemq/destinations.xml" />
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:jms.properties</value>
-               </property>
-       </bean>
-
-       <!-- Attachments -->
-       <bean id="attachmentStorage.jmsContainer.add" parent="listenerContainer">
-               <property name="destination" ref="slcJms.destination.attachment.add" />
-               <property name="messageListener">
-                       <bean class="org.argeo.slc.jms.JmsAttachmentListener">
-                               <property name="attachmentsStorage" ref="attachmentsStorage" />
-                       </bean>
-               </property>
-       </bean>
-
-       <!-- Events -->
-       <bean id="jmsEventListener" class="org.argeo.slc.jms.JmsSlcEventListener"
-               init-method="init" destroy-method="close">
-               <property name="jmsConnectionFactory">
-                       <!-- Need its own connection factory in order to set client ids (not possible 
-                               on pool) -->
-                       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-                               <property name="brokerURL">
-                                       <value>${slc.server.jms.url}</value>
-                                       <!--<value>vm://localhost</value> -->
-                               </property>
-                       </bean>
-               </property>
-               <property name="eventsDestination" ref="slcJms.destination.events" />
-               <property name="messageConverter" ref="jmsMessageConverter" />
-       </bean>
-
-       <bean id="jmsEventPublisher" class="org.argeo.slc.jms.JmsSlcEventPublisher">
-               <property name="jmsTemplate" ref="jmsTemplate" />
-               <property name="eventsDestination" ref="slcJms.destination.events" />
-       </bean>
-
-       <!-- Agent Service -->
-       <bean id="agentService.jmsContainer.register" parent="listenerContainer">
-               <property name="destination" ref="slcJms.destination.agent.register" />
-               <property name="messageListener">
-                       <bean parent="listenerAdapterCastor">
-                               <constructor-arg ref="agentService" />
-                               <property name="defaultListenerMethod" value="register" />
-                       </bean>
-               </property>
-       </bean>
-
-       <bean id="agentService.jmsContainer.unregister" parent="listenerContainer">
-               <property name="destination" ref="slcJms.destination.agent.unregister" />
-               <property name="messageListener">
-                       <bean parent="listenerAdapterCastor">
-                               <constructor-arg ref="agentService" />
-                               <property name="defaultListenerMethod" value="unregister" />
-                       </bean>
-               </property>
-       </bean>
-
-       <bean parent="listenerContainer">
-               <property name="destination" ref="slcJms.destination.execution.event" />
-               <property name="messageListener">
-                       <bean class="org.argeo.slc.jms.JmsExecutionHandler">
-                               <property name="messageConverter" ref="jmsMessageConverter" />
-                               <property name="serviceMsgHandler">
-                                       <bean class="org.argeo.slc.services.ServiceMsgHandler">
-                                               <property name="slcExecutionService" ref="slcExecutionService" />
-                                               <property name="testManagerService" ref="testManagerService" />
-                                       </bean>
-                               </property>
-                       </bean>
-               </property>
-       </bean>
-
-       <!-- Common -->
-       <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-               <property name="messageConverter" ref="jmsMessageConverter" />
-               <property name="connectionFactory" ref="jmsConnectionFactory" />
-       </bean>
-
-       <!-- Templates -->
-       <bean id="listenerContainer"
-               class="org.springframework.jms.listener.DefaultMessageListenerContainer"
-               abstract="true">
-               <property name="connectionFactory" ref="jmsConnectionFactory" />
-               <!-- <property name="transactionManager" ref="jmsTransactionManager" /> -->
-               <property name="taskExecutor">
-                       <bean class="org.argeo.security.core.AsyncSystemTaskExecutor">
-                               <property name="systemExecutionService" ref="systemExecutionService" />
-                       </bean>
-               </property>
-       </bean>
-
-       <bean id="listenerAdapterCastor"
-               class="org.springframework.jms.listener.adapter.MessageListenerAdapter"
-               abstract="true">
-               <property name="messageConverter" ref="jmsMessageConverter" />
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.jms/build.properties b/modules/server/org.argeo.slc.server.jms/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/server/org.argeo.slc.server.jms/jms.properties b/modules/server/org.argeo.slc.server.jms/jms.properties
deleted file mode 100644 (file)
index 8244f4b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# TODO: duplicated with activemq bundle!
-slc.server.jms.url=tcp://localhost:61616
diff --git a/modules/server/org.argeo.slc.server.main/.project b/modules/server/org.argeo.slc.server.main/.project
deleted file mode 100644 (file)
index 9b86d44..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.main</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.main/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.main/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 4dc489f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.argeo.slc.specs,org.argeo.slc.support.equinox
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Name: SLC Server Main
-Bundle-SymbolicName: org.argeo.slc.server.main
-Import-Package: org.argeo.slc.build,org.argeo.slc.osgi.build
diff --git a/modules/server/org.argeo.slc.server.main/META-INF/spring/eclipseUpdateSite.xml b/modules/server/org.argeo.slc.server.main/META-INF/spring/eclipseUpdateSite.xml
deleted file mode 100644 (file)
index 6e8775c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-       <bean id="eclipseUpdateSite" class="org.argeo.slc.osgi.build.EclipseUpdateSite">
-               <property name="features">
-                       <list>
-                               <bean class="org.argeo.slc.osgi.build.EclipseUpdateSiteFeature">
-                                       <property name="name" value="org.argeo.slc.dep.agent" />
-                               </bean>
-                               <bean class="org.argeo.slc.osgi.build.EclipseUpdateSiteFeature">
-                                       <property name="name" value="org.argeo.slc.dep.detached" />
-                               </bean>
-                       </list>
-               </property>
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.main/META-INF/spring/main.xml b/modules/server/org.argeo.slc.server.main/META-INF/spring/main.xml
deleted file mode 100644 (file)
index 5a763ad..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
-       http://www.springframework.org/schema/beans   
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <!-- Security -->
-       <bundle id="security.ldap" symbolic-name="org.argeo.security.dao.ldap"
-               action="start" />
-       <bundle id="security.services" symbolic-name="org.argeo.security.services"
-               action="start" />
-
-       <!-- Servers -->
-       <bundle id="activemq.broker" symbolic-name="org.argeo.server.activemq.broker"
-               action="start" />
-
-       <!-- SLC Middleware -->
-       <bundle id="castor" symbolic-name="org.argeo.slc.server.castor"
-               action="start" />
-       <bundle id="activemq" symbolic-name="org.argeo.slc.server.activemq"
-               action="start" />
-       <bundle id="agentProxy" symbolic-name="org.argeo.slc.server.agentproxy"
-               action="start" />
-       <bundle id="services" symbolic-name="org.argeo.slc.server.services"
-               action="start" />
-       <bundle id="jms" symbolic-name="org.argeo.slc.server.jms"
-               action="start" />
-
-       <!-- Web -->
-       <bundle id="spring.osgi.web.extender" symbolic-name="org.springframework.osgi.web.extender"
-               action="start" />
-       <bundle id="catalina" symbolic-name="org.argeo.dep.osgi.catalina.start"
-               action="start" />
-
-       <!-- Web app start order is important! Security should be first -->
-       <!-- <bundle id="security.webapp" symbolic-name="org.argeo.security.webapp" -->
-       <!-- action="start" /> -->
-       <bundle id="slc.webapp" symbolic-name="org.argeo.slc.webapp"
-               action="start" />
-
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.main/META-INF/spring/manager.xml b/modules/server/org.argeo.slc.server.main/META-INF/spring/manager.xml
deleted file mode 100644 (file)
index bf342bb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <bean id="dynamicRuntime" class="org.argeo.slc.equinox.EquinoxRuntime" />
-       <bean id="modularDistribution" class="org.argeo.slc.osgi.build.OsgiRuntimeModularDistribution">
-               <property name="eclipseUpdateSite" ref="eclipseUpdateSite" />
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.main/META-INF/spring/osgi.xml b/modules/server/org.argeo.slc.server.main/META-INF/spring/osgi.xml
deleted file mode 100644 (file)
index 50237f4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
-       http://www.springframework.org/schema/beans   
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <service ref="dynamicRuntime" interface="org.argeo.slc.deploy.DynamicRuntime" />
-       <service ref="modularDistribution" interface="org.argeo.slc.build.ModularDistribution" />
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.main/build.properties b/modules/server/org.argeo.slc.server.main/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/server/org.argeo.slc.server.mysql/.project b/modules/server/org.argeo.slc.server.mysql/.project
deleted file mode 100644 (file)
index a45bb02..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.mysql</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.mysql/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.mysql/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 29ddc60..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.argeo.slc.specs,org.argeo.slc.core
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Name: Argeo SLC MySQL
-Bundle-SymbolicName: org.argeo.slc.server.mysql
-Import-Package: com.mysql.jdbc,
- net.sf.ehcache.hibernate,
- org.apache.commons.dbcp,
- org.hibernate,
- org.hibernate.hql.ast,
- org.springframework.beans.factory.config,
- org.springframework.cache.ehcache,
- org.springframework.jdbc.datasource,
- org.springframework.orm.hibernate3
diff --git a/modules/server/org.argeo.slc.server.mysql/META-INF/spring/mysql.xml b/modules/server/org.argeo.slc.server.mysql/META-INF/spring/mysql.xml
deleted file mode 100644 (file)
index 4f85f56..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
-       default-lazy-init="false">
-
-       <import resource="classpath:/org/argeo/slc/hibernate/spring.xml" />
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:mysql.properties
-                       </value>
-               </property>
-       </bean>
-
-       <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
-               <property name="dataSource" ref="dataSource" />
-               <property name="hibernateProperties">
-                       <value><![CDATA[
-                hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
-                hibernate.hbm2ddl.auto=update
-                hibernate.connection.autocommit=false
-            ]]></value>
-               </property>
-       </bean>
-       <!--
-               <bean id="dataSource"
-               class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
-               <property name="targetDataSource"> <bean
-               class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
-               destroy-method="destroy"> <property name="driverClassName"
-               value="com.mysql.jdbc.Driver" /> <property name="url"
-               value="jdbc:mysql://localhost/sparta_prod" /> <property
-               name="username" value="root" /> <property name="password" value="" />
-               <property name="suppressClose" value="true" /> <property
-               name="autoCommit" value="false" /> </bean> </property> </bean>
-       -->
-       <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
-               destroy-method="close">
-               <property name="driverClassName" value="com.mysql.jdbc.Driver" />
-               <property name="url" value="${jdbc.url}" />
-               <property name="username" value="${jdbc.username}" />
-               <property name="password" value="${jdbc.password}" />
-               <property name="testOnBorrow" value="true" />
-               <property name="validationQuery" value="SELECT 1" />
-               <property name="maxActive" value="10" />
-               <property name="maxIdle" value="2" />
-       </bean>
-
-
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.mysql/META-INF/spring/osgi.xml b/modules/server/org.argeo.slc.server.mysql/META-INF/spring/osgi.xml
deleted file mode 100644 (file)
index 6d7b0e6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <service ref="sessionFactory" interface="org.hibernate.SessionFactory" />\r
-\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.mysql/mysql.properties b/modules/server/org.argeo.slc.server.mysql/mysql.properties
deleted file mode 100644 (file)
index 11a0d55..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-jdbc.url=jdbc:mysql://localhost/slc
-jdbc.username=root
-jdbc.password=
diff --git a/modules/server/org.argeo.slc.server.services/.project b/modules/server/org.argeo.slc.server.services/.project
deleted file mode 100644 (file)
index 21e00d8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.services</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.services/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.services/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 54cab2c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Name: SLC Server Services
-Bundle-SymbolicName: org.argeo.slc.server.services
-Import-Package: org.aopalliance.aop,
- org.argeo.security,
- org.argeo.slc.core.attachment,
- org.argeo.slc.dao.process,
- org.argeo.slc.dao.runtime,
- org.argeo.slc.dao.test,
- org.argeo.slc.dao.test.tree,
- org.argeo.slc.msg.event,
- org.argeo.slc.msg.process,
- org.argeo.slc.process,
- org.argeo.slc.runtime,
- org.argeo.slc.services,
- org.argeo.slc.services.impl,
- org.hibernate.jdbc,
- org.springframework.aop,
- org.springframework.aop.framework,
- org.springframework.beans.factory.config
diff --git a/modules/server/org.argeo.slc.server.services/META-INF/spring/services-osgi.xml b/modules/server/org.argeo.slc.server.services/META-INF/spring/services-osgi.xml
deleted file mode 100644 (file)
index 0b80c6e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
-       http://www.springframework.org/schema/beans   
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <!-- REFERENCES -->
-       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultDao"
-               id="testResultDao" />
-       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao"
-               id="testResultCollectionDao" />
-       <reference interface="org.argeo.slc.dao.test.TestRunDescriptorDao"
-               id="testRunDescriptorDao" />
-       <reference interface="org.argeo.slc.dao.process.SlcExecutionDao"
-               id="slcExecutionDao" />
-       <reference interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao"
-               id="slcAgentDescriptorDao" />
-
-       <reference id="agentFactory" interface="org.argeo.slc.runtime.SlcAgentFactory" />
-
-       <list id="eventPublishers" interface="org.argeo.slc.msg.event.SlcEventPublisher"
-               cardinality="0..N" />
-
-       <reference id="systemExecutor" interface="org.argeo.security.SystemExecutionService" />
-
-       <!-- SERVICES -->
-       <service ref="testManagerService" interface="org.argeo.slc.services.TestManagerService" />
-       <service ref="agentService" interface="org.argeo.slc.services.AgentService" />
-       <service ref="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" />
-       <service ref="attachmentsStorage">
-               <interfaces>
-                       <beans:value>org.argeo.slc.core.attachment.AttachmentsStorage
-                       </beans:value>
-                       <beans:value>org.argeo.slc.core.attachment.AttachmentUploader
-                       </beans:value>
-               </interfaces>
-       </service>
-
-
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.services/META-INF/spring/services.xml b/modules/server/org.argeo.slc.server.services/META-INF/spring/services.xml
deleted file mode 100644 (file)
index 39f318f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="ignoreUnresolvablePlaceholders" value="true" />
-               <property name="locations">
-                       <value>osgibundle:services.properties
-                       </value>
-               </property>
-       </bean>
-
-       <!-- Attachments -->
-       <bean id="attachmentsStorage" class="org.argeo.slc.core.attachment.FileAttachmentsStorage"></bean>
-
-       <!-- Events -->
-       <aop:aspectj-autoproxy />
-
-       <bean id="eventPublisherAspect" class="org.argeo.slc.services.EventPublisherAspect">
-               <property name="eventPublishers" ref="eventPublishers" />
-       </bean>
-
-       <!-- Services -->
-       <bean id="testManagerService" class="org.argeo.slc.services.impl.TestManagerServiceImpl">
-               <constructor-arg ref="testResultDao" />
-               <constructor-arg ref="testRunDescriptorDao" />
-               <constructor-arg ref="slcExecutionDao" />
-               <constructor-arg ref="testResultCollectionDao" />
-       </bean>
-
-       <bean id="agentService" class="org.argeo.slc.services.impl.AgentServiceImpl">
-               <constructor-arg ref="slcAgentDescriptorDao" />
-               <constructor-arg ref="agentFactory" />
-               <property name="pingCycle" value="${slc.server.services.pingCycle}" />
-               <property name="systemExecutor" ref="systemExecutor" />
-       </bean>
-
-       <bean id="slcExecutionService" class="org.argeo.slc.services.impl.SlcExecutionServiceImpl">
-               <constructor-arg ref="slcExecutionDao" />
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.services/build.properties b/modules/server/org.argeo.slc.server.services/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/server/org.argeo.slc.server.services/services.properties b/modules/server/org.argeo.slc.server.services/services.properties
deleted file mode 100644 (file)
index 2814c6d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-slc.server.services.pingCycle=60000
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/.project b/modules/server/org.argeo.slc.webapp/.project
deleted file mode 100644 (file)
index edfa86a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.webapp.war</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.webapp/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.webapp/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index ce1a34d..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ClassPath: WEB-INF/classes
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Name: SLC Webapp
-Web-ContextPath: org.argeo.slc.webapp
-Bundle-SymbolicName: org.argeo.slc.webapp
-Import-Package: javax.jcr,
- net.sf.cglib.core,
- net.sf.cglib.proxy,
- net.sf.cglib.reflect,
- org.aopalliance.aop,
- org.argeo.jackrabbit.remote,
- org.argeo.security.mvc,
- org.argeo.server,
- org.argeo.jcr.mvc,
- org.argeo.server.json,
- org.argeo.server.mvc,
- org.argeo.slc.build,
- org.argeo.slc.core.attachment,
- org.argeo.slc.core.test.tree,
- org.argeo.slc.dao.process,
- org.argeo.slc.dao.runtime,
- org.argeo.slc.dao.test,
- org.argeo.slc.dao.test.tree,
- org.argeo.slc.deploy,
- org.argeo.slc.msg.event,
- org.argeo.slc.runtime,
- org.argeo.slc.services,
- org.argeo.slc.web.ajaxplorer.file,
- org.argeo.slc.web.ajaxplorer.mvc,
- org.argeo.slc.web.mvc,
- org.argeo.slc.web.mvc.controllers,
- org.argeo.slc.web.mvc.provisioning,
- org.hibernate.hql.ast;resolution:=optional,
- org.hibernate.jdbc;resolution:=optional,
- org.springframework.aop,
- org.springframework.aop.framework,
- org.springframework.aop.scope,
- org.springframework.beans.factory.support,
- org.springframework.osgi.web.context.support,
- org.springframework.oxm,
- org.springframework.security,
- org.springframework.security.config,
- org.springframework.security.context,
- org.springframework.security.providers,
- org.springframework.security.ui,
- org.springframework.security.ui.webapp,
- org.springframework.security.userdetails,
- org.springframework.security.userdetails.memory,
- org.springframework.transaction,
- org.springframework.web.context,
- org.springframework.web.context.request,
- org.springframework.web.context.support,
- org.springframework.web.filter,
- org.springframework.web.servlet,
- org.springframework.web.servlet.handler,
- org.springframework.web.servlet.mvc,
- org.springframework.web.servlet.mvc.annotation,
- org.springframework.web.servlet.view
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/ajaxplorer-servlet.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/ajaxplorer-servlet.xml
deleted file mode 100644 (file)
index a706606..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-
-       <import resource="classpath:/org/argeo/slc/web/ajaxplorer/file/spring.xml" />
-
-       <bean id="ajxpDriverHandler"
-               class="org.argeo.slc.web.ajaxplorer.mvc.AjxpDriverRequestHandler">
-               <property name="driver" ref="ajxpDriver" />
-       </bean>
-
-       <bean id="ajxpDriver" parent="driver.file.template">
-               <property name="basePath" value="/home/mbaudier/dev/work/dcrawTests" />
-       </bean>
-
-       <bean id="urlMapping"
-               class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-               <property name="mappings">
-                       <props>
-                               <prop key="**">ajxpDriverHandler</prop>
-                       </props>
-               </property>
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/applicationContext.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/applicationContext.xml
deleted file mode 100644 (file)
index 1b9c095..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-       <!--
-               <import resource="classpath:/org/argeo/slc/server/spring/jmx.xml" />
-       -->
-
-       <!--
-               security.xml has to be before osgi.xml, otherwise namespace parsing
-               fails
-       -->
-<!--   <import resource="security.xml" /> -->
-       <import resource="osgi.xml" />
-
-       <!--
-               Hibernate instrumentation <bean id="osivInterceptor"
-               class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
-               <property name="sessionFactory" ref="sessionFactory" /> </bean>
-       -->
-
-
-       <!--  Properties -->
-       <bean
-               class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer"
-               lazy-init="false">
-               <property name="contextOverride" value="true" />
-       </bean>
-
-       <!--
-               Web Services transactions <aop:config> <aop:pointcut id="epMethods"
-               expression="execution(*
-               org.springframework.web.servlet.mvc.Controller.handleRequest(..))" />
-               <aop:advisor advice-ref="epAdvice" pointcut-ref="epMethods" />
-               </aop:config> <tx:advice id="epAdvice"
-               transaction-manager="hibernateTransactionManager"> <tx:attributes>
-               <tx:method name="*" propagation="REQUIRED" /> </tx:attributes>
-               </tx:advice>
-       -->
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/doc-servlet.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/doc-servlet.xml
deleted file mode 100644 (file)
index 0576d0c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-
-       <bean class="org.argeo.slc.web.mvc.controllers.RenderingResultController">
-               <property name="treeTestResultDao" ref="testResultDao" />
-       </bean>
-
-       <!--
-               Bean views for pdf & xls, resolved by the BeanNameViewResolver
-       -->
-       <bean name="resultExcelView" class="org.argeo.slc.web.mvc.ResultExcelView" />
-       <bean name="resultPdfView" class="org.argeo.slc.web.mvc.ResultPdfView" />
-
-       <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
-
-       <!--
-               .xml & .xslt URI files doesn't have a bean : the
-               XsltMarshallerViewResolver handle the views
-       -->
-       <bean id="viewResolverXslt" class="org.argeo.slc.web.mvc.XsltMarshallerViewResolver">
-               <property name="viewClass">
-                       <value>org.argeo.slc.web.mvc.XsltMarshallerView
-                       </value>
-               </property>
-               <property name="prefix">
-                       <value>WEB-INF/xslt/</value>
-               </property>
-               <property name="suffix">
-                       <value>.xsl</value>
-               </property>
-               <property name="marshaller" ref="marshaller" />
-       </bean>
-
-       <bean
-               class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                               <ref bean="osivInterceptor" />
-                       </list>
-               </property>
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/jcr-manager-servlet.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/jcr-manager-servlet.xml
deleted file mode 100644 (file)
index 78670a6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-       <context:component-scan base-package="org.argeo.jcr.mvc" />
-
-       <bean name="**" class="org.argeo.jcr.mvc.JcrManagerController">
-       </bean>
-
-       <bean id="viewResolver" class="org.argeo.server.mvc.SerializingViewResolver">
-               <property name="serializer" ref="serverMapper" />
-       </bean>
-
-       <bean id="serverMapper" class="org.argeo.server.json.JsonServerMapper">
-       </bean>
-
-       <bean class="org.argeo.server.mvc.DefaultHandlerExceptionResolver" />
-
-       <bean id="handlerMapping"
-               class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                               <ref bean="osivInterceptor" />
-                       </list>
-               </property>
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/jcr-servlet.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/jcr-servlet.xml
deleted file mode 100644 (file)
index 61c8867..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="
-               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
-               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-               http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-       <context:component-scan base-package="org.argeo.jcr.mvc" />
-
-       <bean name="/*.jcr" class="org.argeo.jcr.mvc.JcrBrowserController" />
-
-       <!-- Views -->
-       <bean name="getJcrItem" class="org.argeo.server.mvc.SerializingView">
-               <property name="serializer">
-                       <bean class="org.argeo.jcr.mvc.JcrXmlServerSerializer" />
-               </property>
-       </bean>
-
-       <bean name="queryJcrNodes" class="org.argeo.server.mvc.SerializingView">
-               <property name="serializer" ref="jsonSerializer" />
-       </bean>
-
-       <bean name="queryJcrTable" class="org.argeo.server.mvc.SerializingView">
-               <property name="serializer" ref="jsonSerializer" />
-       </bean>
-
-       <bean name="500" class="org.argeo.server.mvc.SerializingView">
-               <property name="serializer" ref="jsonSerializer" />
-       </bean>
-
-       <!-- Serializers -->
-       <bean id="jsonSerializer" class="org.argeo.server.json.JsonServerSerializer" />
-
-       <!-- MVC -->
-       <bean id="handlerMapping"
-               class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                               <ref bean="osivInterceptor" />
-                       </list>
-               </property>
-       </bean>
-
-       <bean id="viewResolver"
-               class="org.springframework.web.servlet.view.BeanNameViewResolver" />
-
-       <bean class="org.argeo.server.mvc.DefaultHandlerExceptionResolver" />
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/osgi.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/osgi.xml
deleted file mode 100644 (file)
index 25dee67..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <reference id="marshaller" interface="org.springframework.oxm.Marshaller" />\r
-       <reference id="unmarshaller" interface="org.springframework.oxm.Unmarshaller" />\r
-\r
-       <!-- DAO -->\r
-       <reference id="testResultDao" interface="org.argeo.slc.dao.test.tree.TreeTestResultDao" />\r
-       <reference id="testResultCollectionDao"\r
-               interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao" />\r
-       <reference id="testRunDescriptorDao" interface="org.argeo.slc.dao.test.TestRunDescriptorDao" />\r
-       <reference id="slcExecutionDao" interface="org.argeo.slc.dao.process.SlcExecutionDao" />\r
-       <reference id="slcAgentDescriptorDao"\r
-               interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao" />\r
-\r
-       <!-- Services -->\r
-       <reference id="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" />\r
-       <reference id="testManagerService" interface="org.argeo.slc.services.TestManagerService" />\r
-       <reference id="agentFactory" interface="org.argeo.slc.runtime.SlcAgentFactory" />\r
-       <reference id="attachmentsStorage"\r
-               interface="org.argeo.slc.core.attachment.AttachmentsStorage" />\r
-\r
-       <!-- Events -->\r
-       <reference id="eventListener" interface="org.argeo.slc.msg.event.SlcEventListener" />\r
-\r
-       <!-- Runtime -->\r
-       <reference id="dynamicRuntime" interface="org.argeo.slc.deploy.DynamicRuntime" />\r
-\r
-       <!-- Provisioning -->\r
-       <set id="modularDistributions" interface="org.argeo.slc.build.ModularDistribution"\r
-               cardinality="0..N" />\r
-\r
-       <!-- Security -->\r
-       <reference id="_authenticationManager"\r
-               interface="org.springframework.security.AuthenticationManager" />\r
-       <!-- <reference id="userDetailsService" -->\r
-       <!-- interface="org.springframework.security.userdetails.UserDetailsService" \r
-               /> -->\r
-\r
-       <!-- Optional reference to JCR repository -->\r
-       <reference id="jcrRepository" interface="javax.jcr.Repository"\r
-               cardinality="0..1" />\r
-\r
-       <reference id="osivInterceptor"\r
-               interface="org.springframework.web.context.request.WebRequestInterceptor" />\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/provisioning-servlet.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/provisioning-servlet.xml
deleted file mode 100644 (file)
index bc2df74..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-       <bean name="getBundleHandler" class="org.argeo.slc.web.mvc.provisioning.BundleHandler">
-       </bean>
-
-       <bean name="updateSiteHandler"
-               class="org.argeo.slc.web.mvc.provisioning.EclipseUpdateSiteHandler">
-       </bean>
-
-       <bean name="availableDistributions"
-               class="org.argeo.slc.web.mvc.provisioning.AvailableDistributions">
-               <property name="modularDistributions" ref="modularDistributions" />
-       </bean>
-
-       <bean name="availableModulesHtml"
-               class="org.argeo.slc.web.mvc.provisioning.AvailableModulesHtml" />
-       <bean name="availableModulesPlain"
-               class="org.argeo.slc.web.mvc.provisioning.AvailableModulesPlain" />
-       <bean name="availableModulesOsgiBoot"
-               class="org.argeo.slc.web.mvc.provisioning.AvailableModulesOsgiBoot" />
-
-       <!-- MVC -->
-       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                               <ref local="modularDistributionInterceptor" />
-                       </list>
-               </property>
-               <property name="mappings">
-                       <value>
-                               /*/*/modules.html=availableModulesHtml
-                               /*/*/modules=availableModulesPlain
-                               /*/*/modularDistribution=availableModulesOsgiBoot
-                               /*/*/site.xml=updateSiteHandler
-                       </value>
-               </property>
-       </bean>
-
-       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                               <ref local="modularDistributionInterceptor" />
-                               <ref local="eclipseUpdateSiteInterceptor" />
-                       </list>
-               </property>
-               <property name="mappings">
-                       <value>
-                               /*/*/plugins/*=getBundleHandler
-                               /*/*/features/*=getBundleHandler
-                       </value>
-               </property>
-       </bean>
-
-       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                               <ref local="modularDistributionInterceptor" />
-                               <ref local="bundleJarInterceptor" />
-                       </list>
-               </property>
-               <property name="mappings">
-                       <value>
-                               /*/*/*.jar=getBundleHandler
-                       </value>
-               </property>
-       </bean>
-
-       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                       </list>
-               </property>
-               <property name="mappings">
-                       <value>
-                               /distributions=availableDistributions
-                       </value>
-               </property>
-       </bean>
-
-       <bean id="modularDistributionInterceptor"
-               class="org.argeo.slc.web.mvc.provisioning.ModularDistributionInterceptor">
-               <property name="modularDistributions" ref="modularDistributions" />
-       </bean>
-
-       <bean id="eclipseUpdateSiteInterceptor"
-               class="org.argeo.slc.web.mvc.provisioning.EclipseUpdateSiteInterceptor" />
-
-       <bean id="bundleJarInterceptor" class="org.argeo.slc.web.mvc.provisioning.BundleJarInterceptor" />
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/security.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/security.xml
deleted file mode 100644 (file)
index 9ae3de4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:security="http://www.springframework.org/schema/security"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
-
-       <bean id="authenticationEntryPoint"
-               class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint">
-               <property name="loginFormUrl"
-                       value="http://localhost/org.argeo.security.webapp/getCredentials.ria" />
-               <property name="forceHttps" value="false" />
-       </bean>
-
-       <security:http entry-point-ref="authenticationEntryPoint">
-               <security:intercept-url pattern="/*.service"
-                       access="ROLE_USER,ROLE_ADMIN,ROLE_ANONYMOUS" />
-               <security:anonymous username="anonymous"
-                       granted-authority="ROLE_ANONYMOUS" />
-               <security:remember-me key="argeo" services-ref="rememberMeServices" />
-       </security:http>
-
-       <bean id="rememberMeServices" class="org.argeo.security.mvc.ArgeoRememberMeServices">
-               <property name="alwaysRemember" value="true" />
-               <property name="userDetailsService" ref="userDetailsService" />
-               <property name="key" value="${argeo.security.systemKey}" />
-       </bean>
-
-       <!--
-
-
-               <bean id="authenticationProcessingFilter"
-               class="org.springframework.security.ui.webapp.AuthenticationProcessingFilter">
-               <security:custom-filter position="AUTHENTICATION_PROCESSING_FILTER" />
-               <property name="authenticationManager" ref="_authenticationManager" />
-               <property name="authenticationFailureUrl" value="/getCredentials.ria"
-               /> <property name="defaultTargetUrl" value="/getCredentials.ria" />
-               <property name="filterProcessesUrl" value="/login.ria" /> <property
-               name="usernameParameter" value="username" /> <property
-               name="passwordParameter" value="password" /> </bean>
-       -->
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/slc-service-servlet.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/slc-service-servlet.xml
deleted file mode 100644 (file)
index 73d854d..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="
-               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
-               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-               http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-       <!--<context:component-scan base-package="org.argeo.slc.web.mvc.controllers" />
-
-       --><!-- Server Handling -->
-       <bean class="org.argeo.slc.web.mvc.controllers.ServerController">
-               <property name="dynamicRuntime" ref="dynamicRuntime" />
-       </bean>
-
-       <!-- Agent Handling -->
-       <bean class="org.argeo.slc.web.mvc.controllers.AgentController">
-               <property name="slcAgentDescriptorDao" ref="slcAgentDescriptorDao" />
-       </bean>
-
-       <!--  Events  -->
-       <bean class="org.argeo.slc.web.mvc.controllers.EventController">
-               <property name="eventListenerRegister" ref="eventListenerRegister" />
-               <property name="eventListener" ref="eventListener" />
-       </bean>
-
-       <bean name="eventListenerRegister" class="org.argeo.slc.web.mvc.WebSlcEventListenerRegister"
-               scope="session">
-               <aop:scoped-proxy />
-       </bean>
-
-       <!--  Execution  -->
-       <bean class="org.argeo.slc.web.mvc.controllers.ProcessController">
-               <property name="agentFactory" ref="agentFactory" />
-               <property name="slcExecutionDao" ref="slcExecutionDao" />
-               <property name="slcExecutionService" ref="slcExecutionService" />
-               <property name="marshaller" ref="marshaller" />
-               <property name="unmarshaller" ref="unmarshaller" />
-               <property name="attachmentsStorage" ref="attachmentsStorage" />
-       </bean>
-
-       <!--  Results Handling -->
-       <bean class="org.argeo.slc.web.mvc.controllers.ResultController">
-               <property name="treeTestResultDao" ref="testResultDao" />
-               <property name="treeTestResultCollectionDao" ref="testResultCollectionDao" />
-               <property name="testManagerService" ref="testManagerService" />
-               <property name="attachmentsStorage" ref="attachmentsStorage" />
-       </bean>
-
-       <!-- Provisioning -->
-       <bean name="/listModularDistributions.service"
-               class="org.argeo.slc.web.mvc.provisioning.ListModularDistributions">
-               <property name="modularDistributions" ref="modularDistributions" />
-       </bean>
-
-       <!-- MVC -->
-       <bean
-               class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
-               <property name="interceptors">
-                       <list>
-                               <ref bean="osivInterceptor" />
-                       </list>
-               </property>
-       </bean>
-
-       <bean id="viewResolver" class="org.argeo.server.mvc.SerializingViewResolver">
-               <property name="serializer">
-                       <bean class="org.argeo.server.MarshallerServerSerializer">
-                               <property name="marshaller" ref="marshaller" />
-                       </bean>
-               </property>
-       </bean>
-
-       <bean class="org.argeo.server.mvc.DefaultHandlerExceptionResolver" />
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/web.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/web.xml
deleted file mode 100644 (file)
index a8a4042..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-       version="2.5">
-
-       <display-name>SLC Web Application</display-name>
-
-       <!-- SERVICE servlet -->
-       <servlet>
-               <servlet-name>slc-service</servlet-name>
-               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-               <init-param>
-                       <param-name>contextClass</param-name>
-                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-               </init-param>
-               <load-on-startup>1</load-on-startup>
-       </servlet>
-       <servlet-mapping>
-               <servlet-name>slc-service</servlet-name>
-               <url-pattern>*.service</url-pattern>
-       </servlet-mapping>
-
-       <!-- DOC servlet : Rendering result view  -->
-       <servlet>
-               <servlet-name>doc</servlet-name>
-               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-               <init-param>
-                       <param-name>contextClass</param-name>
-                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-               </init-param>
-       </servlet>
-
-       <servlet-mapping>
-               <servlet-name>doc</servlet-name>
-               <url-pattern>*.xls</url-pattern>
-       </servlet-mapping>
-       <servlet-mapping>
-               <servlet-name>doc</servlet-name>
-               <url-pattern>*.pdf</url-pattern>
-       </servlet-mapping>
-       <servlet-mapping>
-               <servlet-name>doc</servlet-name>
-               <url-pattern>*.xslt</url-pattern>
-       </servlet-mapping>
-       <servlet-mapping>
-               <servlet-name>doc</servlet-name>
-               <url-pattern>*.xml</url-pattern>
-       </servlet-mapping>
-
-       <!-- PROVISIONING servlet -->
-       <servlet>
-               <servlet-name>provisioning</servlet-name>
-               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-               <init-param>
-                       <param-name>contextClass</param-name>
-                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-               </init-param>
-               <load-on-startup>1</load-on-startup>
-       </servlet>
-       <servlet-mapping>
-               <servlet-name>provisioning</servlet-name>
-               <url-pattern>/dist/*</url-pattern>
-       </servlet-mapping>
-
-       <!-- JCR servlet -->
-       <servlet>
-               <servlet-name>jcr</servlet-name>
-               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-               <init-param>
-                       <param-name>contextClass</param-name>
-                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-               </init-param>
-               <load-on-startup>1</load-on-startup>
-       </servlet>
-       <servlet-mapping>
-               <servlet-name>jcr</servlet-name>
-               <url-pattern>*.jcr</url-pattern>
-       </servlet-mapping>
-
-       <!-- JCR-MANAGER servlet -->
-       <servlet>
-               <servlet-name>jcr-manager</servlet-name>
-               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-               <init-param>
-                       <param-name>contextClass</param-name>
-                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-               </init-param>
-               <load-on-startup>1</load-on-startup>
-       </servlet>
-
-       <servlet-mapping>
-               <servlet-name>jcr-manager</servlet-name>
-               <url-pattern>/jcr-manager/*</url-pattern>
-       </servlet-mapping>
-
-       <!-- AjaXplorer servlet -->
-       <servlet>
-               <servlet-name>ajaxplorer</servlet-name>
-               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-               <init-param>
-                       <param-name>contextClass</param-name>
-                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-               </init-param>
-               <load-on-startup>1</load-on-startup>
-       </servlet>
-
-       <servlet-mapping>
-               <servlet-name>ajaxplorer</servlet-name>
-               <url-pattern>/ajaxplorer/*</url-pattern>
-       </servlet-mapping>
-
-       <!-- General -->
-       <context-param>
-               <param-name>contextConfigLocation</param-name>
-               <param-value>/WEB-INF/applicationContext.xml</param-value>
-       </context-param>
-
-       <listener>
-               <display-name>Spring Context</display-name>
-               <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
-       </listener>
-       <context-param>
-               <param-name>contextClass</param-name>
-               <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-       </context-param>
-
-       <!--  Security
-       <filter>
-               <filter-name>springSecurityFilterChain</filter-name>
-               <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
-       </filter>
-
-       <filter-mapping>
-               <filter-name>springSecurityFilterChain</filter-name>
-               <url-pattern>/*</url-pattern>
-       </filter-mapping>
-
-       <context-param>
-               <param-name>argeo.security.systemKey</param-name>
-               <param-value>argeo</param-value>
-       </context-param> 
-       -->
-</web-app>
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/webdav-config.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/webdav-config.xml
deleted file mode 100644 (file)
index f562d76..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-  -->
-<!--
-<!DOCTYPE config [
-        <!ELEMENT config (iomanager , propertymanager, (collection | noncollection)? , filter?, mimetypeproperties?) >
-
-        <!ELEMENT iomanager (class, iohandler*) >
-        <!ELEMENT iohandler (class) >
-
-        <!ELEMENT propertymanager (class, propertyhandler*) >
-        <!ELEMENT propertyhandler (class) >
-
-        <!ELEMENT collection (nodetypes) >
-        <!ELEMENT noncollection (nodetypes) >
-
-        <!ELEMENT filter (class, namespaces?, nodetypes?) >
-
-        <!ELEMENT class >
-        <!ATTLIST class
-            name  CDATA #REQUIRED
-        >
-        <!ELEMENT namespaces (prefix | uri)* >
-        <!ELEMENT prefix (CDATA) >
-        <!ELEMENT uri (CDATA) >
-
-        <!ELEMENT nodetypes (nodetype)* >
-        <!ELEMENT nodetype (CDATA) >
-
-        <!ELEMENT mimetypeproperties (mimemapping*, defaultmimetype) >
-
-        <!ELEMENT mimemapping >
-        <!ATTLIST mimemapping
-            extension  CDATA #REQUIRED
-            mimetype  CDATA #REQUIRED
-        >
-
-        <!ELEMENT defaultmimetype (CDATA) >
-]>
--->
-
-<config>
-    <!--
-     Defines the IOManager implementation that is responsible for passing
-     import/export request to the individual IO-handlers.
-    -->
-    <iomanager>
-        <!-- class element defines the manager to be used. The specified class
-             must implement the IOManager interface.
-             Note, that the handlers are being added and called in the order
-             they appear in the configuration.
-        -->
-        <class name="org.apache.jackrabbit.server.io.IOManagerImpl" />
-        <iohandler>
-            <class name="org.apache.jackrabbit.server.io.VersionHandler" />
-        </iohandler>
-        <iohandler>
-            <class name="org.apache.jackrabbit.server.io.VersionHistoryHandler" />
-        </iohandler>
-        <iohandler>
-            <class name="org.apache.jackrabbit.server.io.ZipHandler" />
-        </iohandler>
-        <iohandler>
-            <class name="org.apache.jackrabbit.server.io.XmlHandler" />
-        </iohandler>
-        <iohandler>
-            <class name="org.apache.jackrabbit.server.io.DirListingExportHandler" />
-        </iohandler>
-        <iohandler>
-            <class name="org.apache.jackrabbit.server.io.DefaultHandler" />
-        </iohandler>
-    </iomanager>
-    <!--
-     Example config for iomanager that populates its list of handlers with
-     default values. Therefore the 'iohandler' elements are omited.
-    -->
-    <!--
-    <iomanager>
-        <class name="org.apache.jackrabbit.server.io.DefaultIOManager" />
-    </iomanager>
-    -->
-    <!--
-     Defines the PropertyManager implementation that is responsible for export
-     and import of resource properties.
-    -->
-    <propertymanager>
-        <!-- class element defines the manager to be used. The specified class
-             must implement the PropertyManager interface.
-             Note, that the handlers are being added and called in the order
-             they appear in the configuration.
-        -->
-        <class name="org.apache.jackrabbit.server.io.PropertyManagerImpl" />
-        <propertyhandler>
-            <class name="org.apache.jackrabbit.server.io.VersionHandler" />
-        </propertyhandler>
-        <propertyhandler>
-            <class name="org.apache.jackrabbit.server.io.VersionHistoryHandler" />
-        </propertyhandler>
-        <propertyhandler>
-            <class name="org.apache.jackrabbit.server.io.ZipHandler" />
-        </propertyhandler>
-        <propertyhandler>
-            <class name="org.apache.jackrabbit.server.io.XmlHandler" />
-        </propertyhandler>
-        <propertyhandler>
-            <class name="org.apache.jackrabbit.server.io.DefaultHandler" />
-        </propertyhandler>
-    </propertymanager>
-    <!--
-     Define nodetypes, that should never by displayed as 'collection'
-    -->
-    <noncollection>
-        <nodetypes>
-            <nodetype>nt:file</nodetype>
-            <nodetype>nt:resource</nodetype>
-        </nodetypes>
-    </noncollection>
-    <!--
-     Example: Defines nodetypes, that should always be displayed as 'collection'.
-    -->
-    <!--
-    <collection>
-        <nodetypes>
-            <nodetype>nt:folder</nodetype>
-            <nodetype>rep:root</nodetype>
-        </nodetypes>
-    </collection>
-    -->
-    <!--
-     Filter that allows to prevent certain items from being displayed.
-     Please note, that this has an effect on PROPFIND calls only and does not
-     provide limited access to those items matching any of the filters.
-
-     However specifying a filter may cause problems with PUT or MKCOL if the
-     resource to be created is being filtered out, thus resulting in inconsistent
-     responses (e.g. PUT followed by PROPFIND on parent).
-     -->
-    <filter>
-        <!-- class element defines the resource filter to be used. The specified class
-             must implement the ItemFilter interface -->
-        <class name="org.apache.jackrabbit.webdav.simple.DefaultItemFilter" />
-        <!--
-         Nodetype names to be used to filter child nodes.
-         A child node can be filtered if the declaring nodetype of its definition
-         is one of the nodetype names specified in the nodetypes Element.
-         E.g. defining 'rep:root' as filtered nodetype whould result in jcr:system
-         being hidden but no other child node of the root node, since those
-         are defined by the nodetype nt:unstructered.
-        -->
-        <!--
-        <nodetypes>
-            <nodetype>rep:root</nodetype>
-        </nodetypes>
-        -->
-        <!--
-         Namespace prefixes or uris. Items having a name that matches any of the
-         entries will be filtered.
-        -->
-        <namespaces>
-            <prefix>rep</prefix>
-            <prefix>jcr</prefix>
-            <!--
-            <uri>internal</uri>
-            <uri>http://www.jcp.org/jcr/1.0</uri>
-            -->
-        </namespaces>
-    </filter>
-    
-    <!--
-     Optional 'mimetypeproperties' element.
-     It defines additional or replaces existing mappings for the MimeResolver
-     instance created by the ResourceConfig.
-     The default mappings are defined in org.apache.jackrabbit.server.io.mimetypes.properties.
-     If the default mime type defined by MimeResolver is 'application/octet-stream'.
-    -->
-    <!--
-    <mimetypeproperties>
-        <mimemapping extension="rtf" mimetype="application/rtf" />
-        <mimemapping extension="ott" mimetype="application/vnd.oasis.opendocument.text-template" />
-        <defaultmimetype>text/html</defaultmimetype>
-    </mimetypeproperties>
-    -->
-</config>
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/webdav-servlet.xml b/modules/server/org.argeo.slc.webapp/WEB-INF/webdav-servlet.xml
deleted file mode 100644 (file)
index 4aa3181..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-       <bean id="webdavServlet" class="org.argeo.server.jackrabbit.webdav.WebDavServlet">
-               <property name="repository" ref="jcrRepository" />
-               <property name="resourceConfiguration" value="osgibundle:/WEB-INF/webdav-config.xml" />
-       </bean>
-
-       <bean
-               class="org.springframework.web.servlet.handler.SimpleServletPostProcessor" />
-
-       <bean id="servletHandler"
-               class="org.springframework.web.servlet.handler.SimpleServletHandlerAdapter" />
-
-       <bean id="urlMapping"
-               class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-               <property name="mappings">
-                       <props>
-                               <prop key="**">webdavServlet</prop>
-                       </props>
-               </property>
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultView.xsl b/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultView.xsl
deleted file mode 100644 (file)
index e9989bd..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<xsl:stylesheet version="1.0"\r
-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
-       exclude-result-prefixes="slc">\r
-\r
-       <xsl:output method="html" omit-xml-declaration="yes" />
-       
-\r
-       <xsl:template match="/">\r
-               <html>\r
-                       <head>\r
-                               <title>Result</title>\r
-                       </head>\r
-                       <body style="font-family: sans-serif">\r
-                               <h1>\r
-                                       Result\r
-                                       <xsl:value-of select="slc:tree-test-result/@uuid" />\r
-                               </h1>\r
-                               <xsl:for-each\r
-                                       select="slc:tree-test-result/slc:result-parts/slc:result-part">\r
-                                       <h2>\r
-                                               <xsl:value-of select="@path" />\r
-                                       </h2>\r
-                                       <table>\r
-                                               <xsl:for-each\r
-                                                       select="slc:part-sub-list/slc:parts/slc:simple-result-part">\r
-                                                       <tr>\r
-                                                               <xsl:choose>\r
-                                                                       <xsl:when\r
-                                                                               test="slc:status = 'PASSED' ">\r
-                                                                               <td style="color:green">\r
-                                                                                       <xsl:value-of\r
-                                                                                               select="slc:message" />\r
-                                                                               </td>\r
-                                                                       </xsl:when>\r
-                                                                       <xsl:otherwise>\r
-                                                                               <td style="color:red">\r
-                                                                                       <xsl:value-of\r
-                                                                                               select="slc:message" />\r
-                                                                               </td>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                       </tr>\r
-                                               </xsl:for-each>\r
-                                       </table>\r
-                               </xsl:for-each>\r
-                       </body>\r
-               </html>\r
-       </xsl:template>\r
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultXmlView.xsl b/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultXmlView.xsl
deleted file mode 100644 (file)
index 87d6371..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<xsl:stylesheet version="1.0"\r
-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
-       exclude-result-prefixes="slc">\r
-\r
-       <xsl:template match="/">
-               <xsl:copy-of select="*"/>\r
-       </xsl:template>\r
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultXsltView.xsl b/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/resultXsltView.xsl
deleted file mode 100644 (file)
index e9989bd..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<xsl:stylesheet version="1.0"\r
-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
-       exclude-result-prefixes="slc">\r
-\r
-       <xsl:output method="html" omit-xml-declaration="yes" />
-       
-\r
-       <xsl:template match="/">\r
-               <html>\r
-                       <head>\r
-                               <title>Result</title>\r
-                       </head>\r
-                       <body style="font-family: sans-serif">\r
-                               <h1>\r
-                                       Result\r
-                                       <xsl:value-of select="slc:tree-test-result/@uuid" />\r
-                               </h1>\r
-                               <xsl:for-each\r
-                                       select="slc:tree-test-result/slc:result-parts/slc:result-part">\r
-                                       <h2>\r
-                                               <xsl:value-of select="@path" />\r
-                                       </h2>\r
-                                       <table>\r
-                                               <xsl:for-each\r
-                                                       select="slc:part-sub-list/slc:parts/slc:simple-result-part">\r
-                                                       <tr>\r
-                                                               <xsl:choose>\r
-                                                                       <xsl:when\r
-                                                                               test="slc:status = 'PASSED' ">\r
-                                                                               <td style="color:green">\r
-                                                                                       <xsl:value-of\r
-                                                                                               select="slc:message" />\r
-                                                                               </td>\r
-                                                                       </xsl:when>\r
-                                                                       <xsl:otherwise>\r
-                                                                               <td style="color:red">\r
-                                                                                       <xsl:value-of\r
-                                                                                               select="slc:message" />\r
-                                                                               </td>\r
-                                                                       </xsl:otherwise>\r
-                                                               </xsl:choose>\r
-                                                       </tr>\r
-                                               </xsl:for-each>\r
-                                       </table>\r
-                               </xsl:for-each>\r
-                       </body>\r
-               </html>\r
-       </xsl:template>\r
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/viewXml.xsl b/modules/server/org.argeo.slc.webapp/WEB-INF/xslt/viewXml.xsl
deleted file mode 100644 (file)
index 87d6371..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<xsl:stylesheet version="1.0"\r
-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
-       exclude-result-prefixes="slc">\r
-\r
-       <xsl:template match="/">
-               <xsl:copy-of select="*"/>\r
-       </xsl:template>\r
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.activemq/.classpath b/runtime/org.argeo.slc.support.activemq/.classpath
deleted file mode 100644 (file)
index 5815983..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" output="target/classes" path="src/main/java"/>
-       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/runtime/org.argeo.slc.support.activemq/.project b/runtime/org.argeo.slc.support.activemq/.project
deleted file mode 100644 (file)
index c1292c0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.support.activemq</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/runtime/org.argeo.slc.support.activemq/.settings/org.eclipse.jdt.core.prefs b/runtime/org.argeo.slc.support.activemq/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 8bd7b10..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Sat Jan 10 17:12:41 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/runtime/org.argeo.slc.support.activemq/.settings/org.maven.ide.eclipse.prefs b/runtime/org.argeo.slc.support.activemq/.settings/org.maven.ide.eclipse.prefs
deleted file mode 100644 (file)
index 9b6b74e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#Sat Jan 10 17:11:12 CET 2009
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-version=1
diff --git a/runtime/org.argeo.slc.support.activemq/build.properties b/runtime/org.argeo.slc.support.activemq/build.properties
deleted file mode 100644 (file)
index f0cc4f1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-source.. = src/main/java/,\
-           src/main/resources/
diff --git a/runtime/org.argeo.slc.support.activemq/pom.xml b/runtime/org.argeo.slc.support.activemq/pom.xml
deleted file mode 100644 (file)
index 6b3c1db..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>runtime</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <groupId>org.argeo.slc.runtime</groupId>
-       <artifactId>org.argeo.slc.support.activemq</artifactId>
-       <name>SLC Support ActiveMQ</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-
-                               <configuration>
-                                       <instructions>
-                                               <Export-Package>
-                                                       org.argeo.slc.jms.*,org.argeo.slc.activemq
-                                               </Export-Package>
-                                               <Import-Package>
-                                                       javax.xml.transform;version="0.0.0",
-                                                       *
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-       <dependencies>
-               <!-- SLC -->
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.core</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <!-- Spring -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.jms</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.oxm</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.transaction</artifactId>
-               </dependency>
-
-               <!-- AOP -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.aspectj.weaver</artifactId>
-               </dependency>
-
-               <!-- JMS -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>javax.jms</artifactId>
-               </dependency>
-
-               <!-- ActiveMQ -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.apache.activemq</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.apache.commons.pool</artifactId>
-               </dependency>
-
-               <!-- JEE required by ActiveMQ Core -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>javax.management.j2ee</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>javax.ejb</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>javax.xml.rpc</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>javax.servlet</artifactId>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgent.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgent.java
deleted file mode 100644 (file)
index 3851a2a..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.util.List;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.core.runtime.DefaultAgent;
-import org.argeo.slc.execution.ExecutionModuleDescriptor;
-import org.argeo.slc.msg.ExecutionAnswer;
-import org.argeo.slc.msg.MsgConstants;
-import org.argeo.slc.msg.ReferenceList;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.runtime.SlcAgentDescriptor;
-import org.springframework.jms.JmsException;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessagePostProcessor;
-
-/** JMS based implementation of an SLC Agent. */
-public class JmsAgent extends DefaultAgent implements MessageListener {
-       public final static String PROPERTY_QUERY = "query";
-       public final static String QUERY_PING_ALL = "pingAll";
-
-       private final static Log log = LogFactory.getLog(JmsAgent.class);
-
-       private JmsTemplate jmsTemplate;
-       private Destination agentRegister;
-       private Destination agentUnregister;
-
-       private Destination responseDestination;
-
-       public void init() {
-               super.init();
-               try {
-                       jmsTemplate.convertAndSend(agentRegister, getAgentDescriptor());
-                       log.info("Agent #" + getAgentUuid() + " registered to "
-                                       + agentRegister);
-               } catch (JmsException e) {
-                       log.warn("Could not register agent "
-                                       + getAgentDescriptor().getUuid()
-                                       + " to server: "
-                                       + e.getMessage()
-                                       + ". The agent will stay offline but will keep listening for a ping all sent by server.");
-                       if (log.isTraceEnabled())
-                               log.debug("Original error.", e);
-               }
-       }
-
-       @Override
-       public void destroy() {
-               try {
-                       jmsTemplate.convertAndSend(agentUnregister, getAgentDescriptor());
-                       log.info("Agent #" + getAgentUuid() + " unregistered from "
-                                       + agentUnregister);
-               } catch (JmsException e) {
-                       log.warn("Could not unregister agent " + getAgentUuid() + ": "
-                                       + e.getMessage());
-                       if (log.isTraceEnabled())
-                               log.debug("Original error.", e);
-               }
-               super.destroy();
-       }
-
-       public void setAgentRegister(Destination agentRegister) {
-               this.agentRegister = agentRegister;
-       }
-
-       public void setAgentUnregister(Destination agentUnregister) {
-               this.agentUnregister = agentUnregister;
-       }
-
-       public String getMessageSelector() {
-               String messageSelector = "slc_agentId='" + getAgentUuid() + "'";
-               // if (log.isDebugEnabled())
-               // log.debug("Message selector: " + messageSelector);
-               return messageSelector;
-       }
-
-       public void onMessage(final Message message) {
-               final String query;
-               final String correlationId;
-               try {
-                       query = message.getStringProperty(PROPERTY_QUERY);
-                       correlationId = message.getJMSCorrelationID();
-               } catch (JMSException e1) {
-                       throw new SlcException("Cannot analyze incoming message " + message);
-               }
-
-               final Object response;
-               final Destination destinationSend;
-               if (QUERY_PING_ALL.equals(query)) {
-                       ReferenceList refList = (ReferenceList) convertFrom(message);
-                       if (!refList.getReferences().contains(getAgentUuid())) {
-                               response = getAgentDescriptor();
-                               destinationSend = agentRegister;
-                               log.info("Agent #" + getAgentUuid() + " registering to "
-                                               + agentRegister + " in reply to a " + QUERY_PING_ALL
-                                               + " query");
-                       } else {
-                               return;
-                       }
-               } else {
-                       response = process(query, message);
-                       destinationSend = responseDestination;
-               }
-
-               // Send response
-               if (log.isTraceEnabled())
-                       log.trace("About to send response " + response.getClass());
-               jmsTemplate.convertAndSend(destinationSend, response,
-                               new MessagePostProcessor() {
-                                       public Message postProcessMessage(Message messageToSend)
-                                                       throws JMSException {
-                                               messageToSend.setStringProperty(PROPERTY_QUERY, query);
-                                               messageToSend.setStringProperty(
-                                                               MsgConstants.PROPERTY_SLC_AGENT_ID,
-                                                               getAgentUuid());
-                                               messageToSend.setJMSCorrelationID(correlationId);
-                                               return messageToSend;
-                                       }
-                               });
-               if (log.isTraceEnabled())
-                       log.debug("Sent response to query '" + query
-                                       + "' with correlationId " + correlationId);
-       }
-
-       /** @return response */
-       public Object process(String query, Message message) {
-               try {
-                       if ("getExecutionModuleDescriptor".equals(query)) {
-                               String moduleName = message.getStringProperty("moduleName");
-                               String version = message.getStringProperty("version");
-                               return getExecutionModuleDescriptor(moduleName, version);
-                       } else if ("listExecutionModuleDescriptors".equals(query)) {
-
-                               List<ExecutionModuleDescriptor> lst = listExecutionModuleDescriptors();
-                               SlcAgentDescriptor agentDescriptorToSend = new SlcAgentDescriptor(
-                                               getAgentDescriptor());
-                               agentDescriptorToSend.setModuleDescriptors(lst);
-                               return agentDescriptorToSend;
-                       } else if ("runSlcExecution".equals(query)) {
-                               final SlcExecution slcExecution = (SlcExecution) convertFrom(message);
-                               new Thread() {
-                                       public void run() {
-                                               process(slcExecution);
-                                       }
-                               }.start();
-                               return ExecutionAnswer.ok("Execution started on agent "
-                                               + getAgentUuid());
-                       } else if ("ping".equals(query)) {
-                               return ExecutionAnswer.ok("Agent " + getAgentUuid()
-                                               + " is alive.");
-                       } else {
-                               throw new SlcException("Unsupported query " + query);
-                       }
-               } catch (Exception e) {
-                       log.error("Processing of query " + query + " failed", e);
-                       return ExecutionAnswer.error(e);
-               }
-       }
-
-       protected Object convertFrom(Message message) {
-               try {
-                       return jmsTemplate.getMessageConverter().fromMessage(message);
-               } catch (JMSException e) {
-                       throw new SlcException("Cannot convert message", e);
-               }
-       }
-
-       public void setResponseDestination(Destination responseDestination) {
-               this.responseDestination = responseDestination;
-       }
-
-       public void setJmsTemplate(JmsTemplate jmsTemplate) {
-               this.jmsTemplate = jmsTemplate;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxy.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxy.java
deleted file mode 100644 (file)
index 3b0129f..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.util.List;
-import java.util.UUID;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionModuleDescriptor;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.msg.ExecutionAnswer;
-import org.argeo.slc.msg.MsgConstants;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.runtime.SlcAgent;
-import org.argeo.slc.runtime.SlcAgentDescriptor;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-
-public class JmsAgentProxy implements SlcAgent {
-       private final static Log log = LogFactory.getLog(JmsAgentProxy.class);
-
-       private final String agentUuid;
-       private final Destination requestDestination;
-       private final Destination responseDestination;
-       private final JmsTemplate jmsTemplate;
-
-       public JmsAgentProxy(String agentUuid, Destination requestDestination,
-                       Destination responseDestination, JmsTemplate jmsTemplate) {
-               this.agentUuid = agentUuid;
-               this.requestDestination = requestDestination;
-               this.responseDestination = responseDestination;
-               this.jmsTemplate = jmsTemplate;
-       }
-
-       public String getAgentUuid() {
-               return agentUuid;
-       }
-
-       public ExecutionModuleDescriptor getExecutionModuleDescriptor(
-                       final String moduleName, final String version) {
-               return (ExecutionModuleDescriptor) sendReceive(new AgentMC(
-                               "getExecutionModuleDescriptor") {
-                       public void setArguments(Message message) throws JMSException {
-                               message.setStringProperty("moduleName", moduleName);
-                               message.setStringProperty("version", version);
-                       }
-               });
-       }
-
-       public List<ExecutionModuleDescriptor> listExecutionModuleDescriptors() {
-               return ((SlcAgentDescriptor) sendReceive(new AgentMC(
-                               "listExecutionModuleDescriptors"))).getModuleDescriptors();
-       }
-
-       public void runSlcExecution(SlcExecution slcExecution) {
-               process(slcExecution);
-       }
-
-       public void process(ExecutionProcess executionProcess) {
-               if (!(executionProcess instanceof SlcExecution))
-                       throw new SlcException("Unsupported process type "
-                                       + executionProcess.getClass());
-               sendReceive(new AgentMC("runSlcExecution",
-                               (SlcExecution) executionProcess));
-       }
-
-       public boolean ping() {
-               Object response = sendReceive(new AgentMC("ping"), false);
-               if (response == null)
-                       return false;
-               else {
-                       ExecutionAnswer answer = (ExecutionAnswer) response;
-                       return ExecutionAnswer.OK.equals(answer.getStatus());
-               }
-       }
-
-       public void kill(ExecutionProcess process) {
-               throw new UnsupportedOperationException();
-       }
-
-       protected Object sendReceive(AgentMC messageCreator) {
-               long begin = System.currentTimeMillis();
-               Object res;
-               try {
-                       res = sendReceive(messageCreator, true);
-               } finally {
-                       if (log.isTraceEnabled())
-                               log.trace("To agent #" + agentUuid + " in "
-                                               + (System.currentTimeMillis() - begin) + " ms, query '"
-                                               + messageCreator.getQuery() + "', correlationId "
-                                               + messageCreator.getCorrelationId());
-               }
-               return res;
-       }
-
-       /**
-        * @param timeoutException
-        *            if true throws an exception if reception timeouted, else
-        *            return null
-        */
-       protected Object sendReceive(AgentMC messageCreator,
-                       boolean timeoutException) {
-               String correlationId = UUID.randomUUID().toString();
-               messageCreator.setCorrelationId(correlationId);
-               send(messageCreator);
-
-               Object response = processResponse(messageCreator, timeoutException);
-
-               if (response instanceof ExecutionAnswer) {
-                       ExecutionAnswer answer = (ExecutionAnswer) response;
-                       if (ExecutionAnswer.ERROR.equals(answer.getStatus()))
-                               throw new SlcException("Execution of '"
-                                               + messageCreator.getQuery() + "' failed on the agent "
-                                               + agentUuid + ": " + answer.getMessage()
-                                               + " (correlationId=" + correlationId + ")");
-                       else
-                               return answer;
-               } else {
-                       return response;
-               }
-       }
-
-       protected void send(AgentMC messageCreator) {
-               jmsTemplate.send(requestDestination, messageCreator);
-       }
-
-       protected Object processResponse(AgentMC messageCreator,
-                       boolean timeoutException) {
-               String correlationId = messageCreator.getCorrelationId();
-               String query = messageCreator.getQuery();
-               Message responseMsg = null;
-               try {
-                       responseMsg = jmsTemplate.receiveSelected(responseDestination,
-                                       "JMSCorrelationID='" + correlationId + "'");
-               } catch (Exception e) {
-                       throw new SlcException("Could not receive response from agent "
-                                       + agentUuid + " with correlationId " + correlationId
-                                       + " (query '" + query + "')", e);
-               }
-
-               if (responseMsg == null) {// timeout
-                       if (timeoutException)
-                               throw new SlcException("TIMEOUT: Query '" + query + "'"
-                                               + " with correlationId " + correlationId
-                                               + " sent to agent " + agentUuid + " timed out.");
-                       else
-                               return null;
-               }
-
-               try {
-                       return fromMessage(responseMsg);
-               } catch (Exception e) {
-                       throw new SlcException("Could not convert response from agent "
-                                       + agentUuid + " with correlationId " + correlationId
-                                       + " (query '" + query + "')", e);
-               }
-       }
-
-       protected Object fromMessage(Message message) throws JMSException {
-               return jmsTemplate.getMessageConverter().fromMessage(message);
-       }
-
-       protected Message toMessage(Object obj, Session session)
-                       throws JMSException {
-               return jmsTemplate.getMessageConverter().toMessage(obj, session);
-       }
-
-       protected class AgentMC implements MessageCreator {
-               private final String query;
-               private Object body = null;
-               private String correlationId;
-
-               public AgentMC(String query) {
-                       this.query = query;
-               }
-
-               public AgentMC(String query, Object body) {
-                       this.query = query;
-                       this.body = body;
-               }
-
-               public final Message createMessage(Session session) throws JMSException {
-                       if (agentUuid == null)
-                               throw new SlcException("Agent UUID not set");
-                       if (correlationId == null)
-                               throw new SlcException("JMSCorrelationID not set");
-                       final Message msg;
-                       if (body == null)
-                               msg = session.createTextMessage();
-                       else
-                               msg = toMessage(body, session);
-                       msg.setStringProperty(MsgConstants.PROPERTY_SLC_AGENT_ID, agentUuid);
-                       msg.setStringProperty(JmsAgent.PROPERTY_QUERY, query);
-                       msg.setJMSCorrelationID(correlationId);
-                       setArguments(msg);
-                       if (msg instanceof TextMessage) {
-                               TextMessage textMessage = (TextMessage) msg;
-                               if (textMessage.getText() == null) {
-                                       // TODO: remove workaround when upgrading to ActiveMQ 5.3
-                                       // Workaround for
-                                       // https://issues.apache.org/activemq/browse/AMQ-2046
-                                       textMessage.setText("");
-                               }
-                       }
-                       return msg;
-               }
-
-               protected void setArguments(Message message) throws JMSException {
-               }
-
-               public String getQuery() {
-                       return query;
-               }
-
-               public String getCorrelationId() {
-                       return correlationId;
-               }
-
-               public void setCorrelationId(String correlationId) {
-                       this.correlationId = correlationId;
-               }
-
-       }
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxyFactory.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAgentProxyFactory.java
deleted file mode 100644 (file)
index 6830772..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.util.List;
-import java.util.UUID;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.argeo.slc.msg.ReferenceList;
-import org.argeo.slc.runtime.SlcAgent;
-import org.argeo.slc.runtime.SlcAgentFactory;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessagePostProcessor;
-
-public class JmsAgentProxyFactory implements SlcAgentFactory {
-       private Destination requestDestination;
-       private Destination responseDestination;
-       private Destination pingAllDestination;
-       private JmsTemplate jmsTemplate;
-
-       public SlcAgent getAgent(String uuid) {
-               return new JmsAgentProxy(uuid, requestDestination, responseDestination,
-                               jmsTemplate);
-       }
-
-       public void pingAll(List<String> activeAgentIds) {
-               ReferenceList referenceList = new ReferenceList(activeAgentIds);
-               jmsTemplate.convertAndSend(pingAllDestination, referenceList,
-                               new MessagePostProcessor() {
-
-                                       public Message postProcessMessage(Message message)
-                                                       throws JMSException {
-                                               message.setJMSCorrelationID(UUID.randomUUID()
-                                                               .toString());
-                                               message.setStringProperty(JmsAgent.PROPERTY_QUERY,
-                                                               JmsAgent.QUERY_PING_ALL);
-                                               return message;
-                                       }
-                               });
-       }
-
-       public void setRequestDestination(Destination requestDestination) {
-               this.requestDestination = requestDestination;
-       }
-
-       public void setResponseDestination(Destination responseDestination) {
-               this.responseDestination = responseDestination;
-       }
-
-       public void setJmsTemplate(JmsTemplate jmsTemplate) {
-               this.jmsTemplate = jmsTemplate;
-       }
-
-       public void setPingAllDestination(Destination pingAllDestination) {
-               this.pingAllDestination = pingAllDestination;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentListener.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentListener.java
deleted file mode 100644 (file)
index 57725fc..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import org.apache.commons.io.IOUtils;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.core.attachment.AttachmentsStorage;
-import org.argeo.slc.core.attachment.SimpleAttachment;
-
-public class JmsAttachmentListener implements MessageListener {
-       private AttachmentsStorage attachmentsStorage;
-
-       public void onMessage(Message msg) {
-               BytesMessage message = (BytesMessage) msg;
-
-               InputStream in = null;
-               try {
-                       SimpleAttachment attachment = new SimpleAttachment();
-                       attachment.setUuid(msg
-                                       .getStringProperty(JmsAttachmentUploader.ATTACHMENT_ID));
-                       attachment.setName(msg
-                                       .getStringProperty(JmsAttachmentUploader.ATTACHMENT_NAME));
-                       attachment
-                                       .setContentType(msg
-                                                       .getStringProperty(JmsAttachmentUploader.ATTACHMENT_CONTENT_TYPE));
-
-                       // Check body length
-                       Long bodyLength = message.getBodyLength();
-                       if (bodyLength > Integer.MAX_VALUE)
-                               throw new SlcException("Attachment cannot be bigger than "
-                                               + Integer.MAX_VALUE
-                                               + " bytes with this transport. Use another transport.");
-
-                       byte[] buffer = new byte[bodyLength.intValue()];
-                       message.readBytes(buffer);
-                       in = new ByteArrayInputStream(buffer);
-                       attachmentsStorage.storeAttachment(attachment, in);
-               } catch (JMSException e) {
-                       throw new SlcException("Could not process attachment message "
-                                       + msg, e);
-               } finally {
-                       IOUtils.closeQuietly(in);
-               }
-       }
-
-       public void setAttachmentsStorage(AttachmentsStorage attachmentsStorage) {
-               this.attachmentsStorage = attachmentsStorage;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentUploader.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsAttachmentUploader.java
deleted file mode 100644 (file)
index 7408266..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.core.attachment.Attachment;
-import org.argeo.slc.core.attachment.AttachmentUploader;
-import org.springframework.core.io.Resource;
-import org.springframework.jms.JmsException;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-
-public class JmsAttachmentUploader implements AttachmentUploader {
-       private final static Log log = LogFactory
-                       .getLog(JmsAttachmentUploader.class);
-
-       public final static String ATTACHMENT_ID = "slc_attachmentId";
-       public final static String ATTACHMENT_NAME = "slc_attachmentName";
-       public final static String ATTACHMENT_CONTENT_TYPE = "slc_attachmentContentType";
-
-       private JmsTemplate jmsTemplate;
-       private Destination destination;
-
-       public void upload(final Attachment attachment, final Resource resource) {
-               try {
-                       jmsTemplate.send(destination, new MessageCreator() {
-
-                               public Message createMessage(Session session)
-                                               throws JMSException {
-                                       BytesMessage message = session.createBytesMessage();
-                                       message.setStringProperty(ATTACHMENT_ID, attachment
-                                                       .getUuid());
-                                       message.setStringProperty(ATTACHMENT_NAME, attachment
-                                                       .getName());
-                                       message.setStringProperty(ATTACHMENT_CONTENT_TYPE,
-                                                       attachment.getContentType());
-
-                                       InputStream in = null;
-                                       try {
-                                               in = resource.getInputStream();
-                                               byte[] buffer = new byte[1024 * 1024];
-                                               int read = -1;
-                                               while ((read = in.read(buffer)) > 0) {
-                                                       message.writeBytes(buffer, 0, read);
-                                               }
-                                       } catch (IOException e) {
-                                               throw new SlcException(
-                                                               "Cannot write into byte message for attachment "
-                                                                               + attachment + " and resource "
-                                                                               + resource, e);
-                                       } finally {
-                                               IOUtils.closeQuietly(in);
-                                       }
-                                       return message;
-                               }
-                       });
-               } catch (JmsException e) {
-                       if (log.isTraceEnabled())
-                               log.debug("Cannot upload", e);
-                       else if (log.isDebugEnabled())
-                               log.debug("Cannot upload: " + e.getMessage());
-               }
-
-       }
-
-       public void setJmsTemplate(JmsTemplate jmsTemplate) {
-               this.jmsTemplate = jmsTemplate;
-       }
-
-       public void setDestination(Destination destination) {
-               this.destination = destination;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsExecutionHandler.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsExecutionHandler.java
deleted file mode 100644 (file)
index 9239c7a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.msg.MsgHandler;
-import org.springframework.jms.support.converter.MessageConverter;
-
-public class JmsExecutionHandler implements MessageListener {
-
-       private MessageConverter messageConverter;
-       private MsgHandler serviceMsgHandler;
-
-       public void onMessage(Message message) {
-               try {
-                       serviceMsgHandler.handleMsg(messageConverter.fromMessage(message));
-               } catch (JMSException e) {
-                       throw new SlcException("Could not interpret message " + message, e);
-               }
-       }
-
-       public void setMessageConverter(MessageConverter messageConverter) {
-               this.messageConverter = messageConverter;
-       }
-
-       public void setServiceMsgHandler(MsgHandler serviceMsgHandler) {
-               this.serviceMsgHandler = serviceMsgHandler;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventListener.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventListener.java
deleted file mode 100644 (file)
index 35cbc70..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.msg.event.SlcEvent;
-import org.argeo.slc.msg.event.SlcEventListener;
-import org.argeo.slc.msg.event.SlcEventListenerDescriptor;
-import org.springframework.jms.connection.ConnectionFactoryUtils;
-import org.springframework.jms.support.JmsUtils;
-import org.springframework.jms.support.converter.MessageConverter;
-
-public class JmsSlcEventListener implements SlcEventListener {
-       private final static Log log = LogFactory.getLog(JmsSlcEventListener.class);
-
-       // IoC
-       private Topic eventsDestination;
-       private ConnectionFactory jmsConnectionFactory;
-       private MessageConverter messageConverter;
-
-       // Initialized with init() method, released with close()
-       private Connection connection = null;
-
-       // One by instance
-       private String connectionClientId = getClass() + "#"
-                       + UUID.randomUUID().toString();
-       private Boolean isClosed = false;
-
-       private List<String> subscriberIds = new ArrayList<String>();
-
-       // private Map<String, ListeningClient> clients = Collections
-       // .synchronizedMap(new HashMap<String, ListeningClient>());
-
-       public SlcEvent listen(String subscriberId,
-                       List<SlcEventListenerDescriptor> descriptors, Long timeout) {
-               if (descriptors.size() == 0) {
-                       // No listener, just waiting
-                       try {
-                               if (log.isTraceEnabled())
-                                       log.trace("No event listener registered, sleeping...");
-                               Thread.sleep(timeout);
-                       } catch (InterruptedException e) {
-                               // silent
-                       }
-                       return null;
-               } else {
-                       Object obj = null;
-                       synchronized (subscriberIds) {
-                               while (subscriberIds.contains(subscriberId)) {
-                                       try {
-                                               subscriberIds.wait(500);
-                                               if (isClosed)
-                                                       return null;
-                                       } catch (InterruptedException e) {
-                                               // silent
-                                       }
-                               }
-                               subscriberIds.add(subscriberId);
-                               Session session = null;
-                               TopicSubscriber topicSubscriber = null;
-                               try {
-                                       // ListeningClient client = (ListeningClient)
-                                       // getClient(clientId);
-                                       session = connection.createSession(false,
-                                                       Session.AUTO_ACKNOWLEDGE);
-                                       topicSubscriber = session.createDurableSubscriber(
-                                                       eventsDestination, subscriberId,
-                                                       createSelector(descriptors), true);
-                                       Message message = topicSubscriber.receive(timeout);
-                                       obj = messageConverter.fromMessage(message);
-                               } catch (JMSException e) {
-                                       throw new SlcException("Cannot poll events for subscriber "
-                                                       + subscriberId, e);
-                               } finally {
-                                       JmsUtils.closeMessageConsumer(topicSubscriber);
-                                       JmsUtils.closeSession(session);
-                                       subscriberIds.remove(subscriberId);
-                                       subscriberIds.notifyAll();
-                               }
-
-                       }
-
-                       if (obj == null)
-                               return null;
-                       else
-                               return (SlcEvent) obj;
-               }
-       }
-
-       /** Returns null if no filter */
-       protected String createSelector(List<SlcEventListenerDescriptor> descriptors) {
-               if (descriptors.size() == 0)
-                       throw new SlcException("No listeners, cannot generate JMS selector");
-
-               StringBuffer buf = new StringBuffer(256);
-               Boolean first = true;
-               for (SlcEventListenerDescriptor descriptor : descriptors) {
-                       if (first)
-                               first = false;
-                       else
-                               buf.append(" OR ");
-
-                       buf.append('(');
-                       buf.append(SlcEvent.EVENT_TYPE).append("=").append('\'').append(
-                                       descriptor.getEventType()).append('\'');
-                       if (descriptor.getFilter() != null) {
-                               buf.append(" AND ");
-                               buf.append('(').append(descriptor.getFilter()).append(')');
-                       }
-                       buf.append(')');
-               }
-               if (log.isTraceEnabled())
-                       log.trace("selector created : " + buf.toString());
-               return buf.toString();
-       }
-
-       public boolean isClosed() {
-               return isClosed;
-       }
-
-       // Ioc
-       public void setEventsDestination(Topic eventsDestination) {
-               this.eventsDestination = eventsDestination;
-       }
-
-       public void setJmsConnectionFactory(ConnectionFactory jmsConnectionFactory) {
-               this.jmsConnectionFactory = jmsConnectionFactory;
-       }
-
-       public void setMessageConverter(MessageConverter messageConverter) {
-               this.messageConverter = messageConverter;
-       }
-
-       // Life Cycle
-       public void init() {
-               try {
-                       connection = jmsConnectionFactory.createConnection();
-                       connection.setClientID(connectionClientId);
-                       connection.start();
-               } catch (JMSException e) {
-                       throw new SlcException("Could not init connection", e);
-               }
-       }
-
-       public void close() {
-               ConnectionFactoryUtils.releaseConnection(connection,
-                               jmsConnectionFactory, true);
-               isClosed = true;
-               synchronized (subscriberIds) {
-                       subscriberIds.notifyAll();
-               }
-       }
-
-       // public void close(String clientId) {
-       // // Session session = null;
-       // // // ListeningClient client = getClient(clientId);
-       // // // Connection connection = client.getConnection();
-       // // try {
-       // // session = client.getSession();
-       // // session.unsubscribe(clientId);
-       // // } catch (JMSException e) {
-       // // log.warn("Could not unsubscribe client " + clientId, e);
-       // // } finally {
-       // // JmsUtils.closeSession(session);
-       // // }
-       // //
-       // // // synchronized (client) {
-       // // // clients.remove(clientId);
-       // // // client.notify();
-       // // // }
-       // }
-
-       // protected ListeningClient getClient(String clientId) {
-       // ListeningClient client = clients.get(clientId);
-       // if (client == null) {
-       // // Lazy init
-       // client = new ListeningClient(connection);
-       // clients.put(clientId, client);
-       // }
-       // return client;
-       // }
-
-       // protected class ListeningClient {
-       // private final Connection connection;
-       // private final Session session;
-       //
-       // public ListeningClient(Connection connection) {
-       // super();
-       // this.connection = connection;
-       // try {
-       // session = connection.createSession(false,
-       // Session.AUTO_ACKNOWLEDGE);
-       // } catch (JMSException e) {
-       // throw new SlcException("Cannot create session");
-       // }
-       // }
-       //
-       // public Connection getConnection() {
-       // return connection;
-       // }
-       //
-       // public Session getSession() {
-       // return session;
-       // }
-       //
-       // }
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventPublisher.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcEventPublisher.java
deleted file mode 100644 (file)
index a95ffc8..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.util.Map;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.msg.event.SlcEvent;
-import org.argeo.slc.msg.event.SlcEventPublisher;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessagePostProcessor;
-
-public class JmsSlcEventPublisher implements SlcEventPublisher {
-       private static final Log log = LogFactory
-                       .getLog(JmsSlcEventPublisher.class);
-       private Destination eventsDestination;
-       private JmsTemplate jmsTemplate;
-
-       public void publish(final SlcEvent event) {
-               if (jmsTemplate.getDeliveryMode() != DeliveryMode.PERSISTENT)
-                       throw new SlcException(
-                                       "Delivery mode has to be persistent in order to have durable subscription");
-
-               jmsTemplate.convertAndSend(eventsDestination, event,
-                               new MessagePostProcessor() {
-
-                                       public Message postProcessMessage(Message message)
-                                                       throws JMSException {
-                                               Map<String, String> headers = event.getHeaders();
-                                               for (String key : headers.keySet()) {
-                                                       message.setStringProperty(key, headers.get(key));
-                                               }
-                                               return message;
-                                       }
-                               });
-               if (log.isTraceEnabled()) {
-                       log.trace("Event " + event.toString() + " sent to "
-                                       + eventsDestination.toString());
-               }
-
-       }
-
-       public void setEventsDestination(Destination eventsDestination) {
-               this.eventsDestination = eventsDestination;
-       }
-
-       public void setJmsTemplate(JmsTemplate jmsTemplate) {
-               this.jmsTemplate = jmsTemplate;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java
deleted file mode 100644 (file)
index 4e68db3..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.util.List;
-
-import javax.jms.Destination;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.UnsupportedException;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.process.SlcExecutionNotifier;
-import org.argeo.slc.process.SlcExecutionStep;
-import org.springframework.jms.JmsException;
-import org.springframework.jms.core.JmsTemplate;
-
-@SuppressWarnings("deprecation")
-public class JmsSlcExecutionNotifier implements SlcExecutionNotifier {
-       private final static Log log = LogFactory
-                       .getLog(JmsSlcExecutionNotifier.class);
-
-       private JmsTemplate jmsTemplate;
-
-       private Destination executionEventDestination;
-
-       // private Destination updateStatusDestination;
-
-       public void updateStatus(ExecutionProcess slcExecution, String oldStatus,
-                       String newStatus) {
-               SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(
-                               slcExecution.getUuid(), newStatus);
-               convertAndSend(req);
-       }
-
-       public void addSteps(ExecutionProcess slcExecution,
-                       List<ExecutionStep> additionalSteps) {
-               SlcExecutionStepsRequest req = new SlcExecutionStepsRequest(
-                               slcExecution.getUuid(), additionalSteps);
-               convertAndSend(req);
-       }
-
-       public void newExecution(SlcExecution slcExecution) {
-               throw new UnsupportedException();
-       }
-
-       public void updateExecution(SlcExecution slcExecution) {
-               throw new UnsupportedException();
-       }
-
-       public void setJmsTemplate(JmsTemplate jmsTemplate) {
-               this.jmsTemplate = jmsTemplate;
-       }
-
-       public void setExecutionEventDestination(
-                       Destination executionEventDestination) {
-               this.executionEventDestination = executionEventDestination;
-       }
-
-       protected void convertAndSend(Object req) {
-               try {
-                       jmsTemplate.convertAndSend(executionEventDestination, req);
-               } catch (JmsException e) {
-                       log.warn("Send request " + req.getClass() + " to server: "
-                                       + e.getMessage());
-                       if (log.isTraceEnabled())
-                               log.debug("Original error.", e);
-               }
-       }
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsTreeTestResultListener.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsTreeTestResultListener.java
deleted file mode 100644 (file)
index 2cd88c4..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import javax.jms.Destination;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.core.attachment.Attachment;
-import org.argeo.slc.core.attachment.SimpleAttachment;
-import org.argeo.slc.core.test.tree.TreeTestResult;
-import org.argeo.slc.core.test.tree.TreeTestResultListener;
-import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.ResultPartRequest;
-import org.argeo.slc.test.TestResultPart;
-import org.springframework.jms.JmsException;
-import org.springframework.jms.core.JmsTemplate;
-
-/** JMS based tree test result listener implementation. */
-public class JmsTreeTestResultListener implements TreeTestResultListener {
-       private final Log log = LogFactory.getLog(getClass());
-
-       private Boolean onlyOnClose = false;
-       private JmsTemplate jmsTemplate;
-
-       private Destination executionEventDestination;
-
-       public void resultPartAdded(TreeTestResult testResult,
-                       TestResultPart testResultPart) {
-               if (onlyOnClose)
-                       return;
-
-               try {
-                       if (testResult.getResultParts().size() == 1
-                                       && testResult.getResultParts().values().iterator().next()
-                                                       .getParts().size() == 1) {
-                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
-                                               testResult);
-
-                               if (log.isTraceEnabled())
-                                       log.trace("Send create result request for result "
-                                                       + testResult.getUuid());
-
-                               jmsTemplate.convertAndSend(executionEventDestination, req);
-                       } else {
-                               ResultPartRequest req = new ResultPartRequest(testResult);
-
-                               if (log.isTraceEnabled())
-                                       log.trace("Send result parts for result "
-                                                       + testResult.getUuid());
-
-                               jmsTemplate.convertAndSend(executionEventDestination, req);
-                       }
-               } catch (JmsException e) {
-                       log.warn("Could not notify result part to server: "
-                                       + e.getMessage());
-                       if (log.isTraceEnabled())
-                               log.debug("Original error.", e);
-               } catch (Exception e) {
-                       throw new SlcException("Could not notify to JMS", e);
-               }
-       }
-
-       public void close(TreeTestResult testResult) {
-               try {
-                       if (onlyOnClose) {
-                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
-                                               testResult);
-
-                               if (log.isTraceEnabled())
-                                       log.trace("Send onClose create result request for result "
-                                                       + testResult.getUuid());
-
-                               jmsTemplate.convertAndSend(executionEventDestination, req);
-                       } else {
-                               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(
-                                               testResult);
-
-                               if (log.isTraceEnabled())
-                                       log.trace("Send close result request for result "
-                                                       + testResult.getUuid());
-
-                               jmsTemplate.convertAndSend(executionEventDestination, req);
-
-                       }
-               } catch (JmsException e) {
-                       log.warn("Could not notify result close to server: "
-                                       + e.getMessage());
-                       if (log.isTraceEnabled())
-                               log.debug("Original error.", e);
-               } catch (Exception e) {
-                       throw new SlcException("Could not notify to JMS", e);
-               }
-       }
-
-       public void addAttachment(TreeTestResult testResult, Attachment attachment) {
-               if (onlyOnClose)
-                       return;
-
-               try {
-                       AddTreeTestResultAttachmentRequest req = new AddTreeTestResultAttachmentRequest();
-                       req.setResultUuid(testResult.getUuid());
-                       req.setAttachment((SimpleAttachment) attachment);
-                       jmsTemplate.convertAndSend(executionEventDestination, req);
-
-               } catch (JmsException e) {
-                       log
-                                       .warn("Could not notify attachment to server: "
-                                                       + e.getMessage());
-                       if (log.isTraceEnabled())
-                               log.debug("Original error.", e);
-               } catch (Exception e) {
-                       throw new SlcException("Could not notify to JMS", e);
-               }
-
-       }
-
-       /** Publishes the test result only when it gets closed. */
-       public void setOnlyOnClose(Boolean onlyOnClose) {
-               this.onlyOnClose = onlyOnClose;
-       }
-
-       public void setJmsTemplate(JmsTemplate jmsTemplate) {
-               this.jmsTemplate = jmsTemplate;
-       }
-
-       public void setExecutionEventDestination(
-                       Destination executionEventDestination) {
-               this.executionEventDestination = executionEventDestination;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/MarshallerMessageConverter.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/MarshallerMessageConverter.java
deleted file mode 100644 (file)
index 797abb9..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.io.Serializable;
-import java.util.Enumeration;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.springframework.jms.support.converter.MessageConversionException;
-import org.springframework.jms.support.converter.MessageConverter;
-import org.springframework.oxm.Marshaller;
-import org.springframework.oxm.Unmarshaller;
-import org.springframework.xml.transform.StringResult;
-import org.springframework.xml.transform.StringSource;
-
-public class MarshallerMessageConverter implements MessageConverter {
-       private final static Log log = LogFactory
-                       .getLog(MarshallerMessageConverter.class);
-
-       private Marshaller marshaller;
-       private Unmarshaller unmarshaller;
-
-       /** Use unmarshalled ObjectMessages instead of TextMessages */
-       private Boolean disableMarshalling = false;
-
-       /** @return the converted message or null if the message itself is null */
-       @SuppressWarnings("unchecked")
-       public Object fromMessage(Message message) throws JMSException,
-                       MessageConversionException {
-               long begin = System.currentTimeMillis();
-               if (message == null)
-                       return null;
-               if (log.isTraceEnabled()) {
-                       Enumeration<String> names = message.getPropertyNames();
-                       while (names.hasMoreElements()) {
-                               String name = names.nextElement();
-                               log.trace("JMS Property: " + name + "="
-                                               + message.getObjectProperty(name));
-                       }
-               }
-
-               Object res;
-               if (message instanceof TextMessage) {
-                       String text = ((TextMessage) message).getText();
-                       if (text == null)
-                               throw new SlcException(
-                                               "Cannot unmarshall message without body: " + message);
-                       try {
-                               res = unmarshaller.unmarshal(new StringSource(text));
-                       } catch (Exception e) {
-                               throw new SlcException("Could not unmarshall " + text, e);
-                       }
-               } else if (message instanceof ObjectMessage) {
-                       res = ((ObjectMessage) message).getObject();
-                       if (res == null)
-                               throw new SlcException("Message without body: " + message);
-               } else {
-                       throw new SlcException("This type of messages is not supported: "
-                                       + message);
-               }
-               if (log.isTraceEnabled())
-                       log.trace("'From' message processed in " + (System.currentTimeMillis() - begin)
-                                       + " ms");
-               return res;
-       }
-
-       public Message toMessage(Object object, Session session)
-                       throws JMSException, MessageConversionException {
-               long begin = System.currentTimeMillis();
-               Message msg;
-               if (disableMarshalling) {
-                       msg = session.createObjectMessage();
-                       ((ObjectMessage) msg).setObject((Serializable) object);
-               } else {
-                       StringResult result = new StringResult();
-                       try {
-                               marshaller.marshal(object, result);
-                       } catch (Exception e) {
-                               throw new SlcException("Could not marshall " + object, e);
-                       }
-                       msg = session.createTextMessage();
-                       ((TextMessage) msg).setText(result.toString());
-               }
-               if (log.isTraceEnabled())
-                       log.trace("'To' message processed in " + (System.currentTimeMillis() - begin)
-                                       + " ms");
-               return msg;
-       }
-
-       public void setMarshaller(Marshaller marshaller) {
-               this.marshaller = marshaller;
-       }
-
-       public void setUnmarshaller(Unmarshaller unmarshaller) {
-               this.unmarshaller = unmarshaller;
-       }
-
-       public void setDisableMarshalling(Boolean disableMarshalling) {
-               this.disableMarshalling = disableMarshalling;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/ServiceMessageListenerAdapter.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/ServiceMessageListenerAdapter.java
deleted file mode 100644 (file)
index b350340..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.jms;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.msg.ExecutionAnswer;
-import org.springframework.jms.listener.adapter.MessageListenerAdapter;
-
-public class ServiceMessageListenerAdapter extends MessageListenerAdapter {
-       public final static String DEFAULT_METHOD_NAME_PARAMETER = "action";
-       public final static String BODY_ARGUMENT = "BODY";
-
-       private Map<String, List<String>> methodArguments = new HashMap<String, List<String>>();
-
-       private static String methodNameParameter = DEFAULT_METHOD_NAME_PARAMETER;
-
-       @Override
-       protected Object extractMessage(Message message) throws JMSException {
-               return new ExtractedMessage(message);
-       }
-
-       @Override
-       protected String getListenerMethodName(Message originalMessage,
-                       Object extractedMessage) throws JMSException {
-               return ((ExtractedMessage) extractedMessage).methodName;
-       }
-
-       @Override
-       protected Object[] buildListenerArguments(Object extractedMessage) {
-               return ((ExtractedMessage) extractedMessage).arguments;
-       }
-
-       @Override
-       public void onMessage(Message message, Session session) throws JMSException {
-               try {// hacked and simplified from parent class
-                       // Regular case: find a handler method reflectively.
-                       Object convertedMessage = extractMessage(message);
-                       String methodName = getListenerMethodName(message, convertedMessage);
-
-                       // Invoke the handler method with appropriate arguments.
-                       Object[] listenerArguments = buildListenerArguments(convertedMessage);
-                       Object result = invokeListenerMethod(methodName, listenerArguments);
-                       if (result != null) {
-                               handleResult(result, message, session);
-                       } else {
-                               ExecutionAnswer answer = ExecutionAnswer.ok("Execution of "
-                                               + methodName + " on " + getDelegate() + " succeeeded.");
-                               Message okMessage = getMessageConverter().toMessage(answer,
-                                               session);
-                               sendResponse(session, getResponseDestination(message,
-                                               okMessage, session), okMessage);
-                       }
-               } catch (Exception e) {
-                       if (session == null)
-                               return;
-
-                       StringWriter writer = new StringWriter();
-                       e.printStackTrace(new PrintWriter(writer));
-                       ExecutionAnswer answer = ExecutionAnswer.error(writer.toString());
-                       Message errorMessage = getMessageConverter().toMessage(answer,
-                                       session);
-                       sendResponse(session, getResponseDestination(message, errorMessage,
-                                       session), errorMessage);
-               }
-       }
-
-       protected class ExtractedMessage {
-               private final String methodName;
-               private final Object[] arguments;
-//             private final Message originalMessage;
-
-               public ExtractedMessage(Message originalMessage) throws JMSException {
-//                     this.originalMessage = originalMessage;
-
-                       if (!originalMessage.propertyExists(methodNameParameter))
-                               throw new SlcException("No property " + methodNameParameter
-                                               + " in incoming message,"
-                                               + " cannot determine service method");
-
-                       methodName = originalMessage.getStringProperty(methodNameParameter);
-
-                       if (!methodArguments.containsKey(methodName)) {// no arg specified
-                               arguments = new Object[0];
-                       } else {
-                               List<String> parameterNames = methodArguments.get(methodName);
-                               List<Object> arguments = new ArrayList<Object>();
-                               int count = 0;
-                               for (String name : parameterNames) {
-                                       if (name.equals(BODY_ARGUMENT)) {
-                                               Object body = getMessageConverter().fromMessage(
-                                                               originalMessage);
-                                               arguments.add(body);
-                                       } else {
-                                               if (!originalMessage.propertyExists(name))
-                                                       throw new SlcException("No property " + name
-                                                                       + " in incoming message,"
-                                                                       + " cannot determine argument #" + count);
-                                               arguments.add(originalMessage.getObjectProperty(name));
-                                       }
-                                       count++;
-                               }
-                               this.arguments = arguments.toArray();
-                       }
-               }
-       }
-
-       public void setMethodArguments(Map<String, List<String>> methodArguments) {
-               this.methodArguments = methodArguments;
-       }
-
-       public static void setMethodNameParameter(String methodNameParameter) {
-               ServiceMessageListenerAdapter.methodNameParameter = methodNameParameter;
-       }
-       
-       
-}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/resources/org/argeo/slc/activemq/destinations.xml b/runtime/org.argeo.slc.support.activemq/src/main/resources/org/argeo/slc/activemq/destinations.xml
deleted file mode 100644 (file)
index 4a27b63..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="false">
-
-       <!-- Events -->
-       <bean id="slcJms.destination.events" p:physicalName="events"
-               parent="slcJms.amTopic" />
-
-       <!-- Attachments -->
-       <bean id="slcJms.destination.attachment.add" p:physicalName="attachment.add"
-               parent="slcJms.amQueue" />
-
-       <!-- Agent service -->
-       <bean id="slcJms.destination.agent.register" p:physicalName="agent.register"
-               parent="slcJms.amTopic" />
-       <bean id="slcJms.destination.agent.unregister" p:physicalName="agent.unregister"
-               parent="slcJms.amTopic" />
-       <bean id="slcJms.destination.agent.request" p:physicalName="agent.request"
-               parent="slcJms.amQueue" />
-       <bean id="slcJms.destination.agent.response" p:physicalName="agent.response"
-               parent="slcJms.amQueue" />
-       <bean id="slcJms.destination.agent.pingAll" p:physicalName="agent.pingAll"
-               parent="slcJms.amTopic" />
-
-       <bean id="slcJms.destination.execution.event" p:physicalName="execution.event"
-               parent="slcJms.amQueue" />
-
-       <!-- Templates -->
-       <bean id="slcJms.amQueue" class="org.apache.activemq.command.ActiveMQQueue"
-               abstract="true" />
-       <bean id="slcJms.amTopic" class="org.apache.activemq.command.ActiveMQTopic"
-               abstract="true" />
-
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/.classpath b/runtime/org.argeo.slc.support.castor/.classpath
deleted file mode 100644 (file)
index 2389826..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" output="target/classes" path="src/main/java"/>
-       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
-       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-       <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/runtime/org.argeo.slc.support.castor/.project b/runtime/org.argeo.slc.support.castor/.project
deleted file mode 100644 (file)
index c0bc103..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.support.castor</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs b/runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 93d3174..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri Aug 29 11:10:18 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/runtime/org.argeo.slc.support.castor/build.properties b/runtime/org.argeo.slc.support.castor/build.properties
deleted file mode 100644 (file)
index a3d6266..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-additional.bundles = org.argeo.slc.unit,\
-                     junit,\
-                     org.apache.xml.serializer,\
-                     org.apache.xerces
-source.. = src/main/java/,\
-           src/main/resources/,\
-           src/test/java/,\
-           src/test/resources/
diff --git a/runtime/org.argeo.slc.support.castor/pom.xml b/runtime/org.argeo.slc.support.castor/pom.xml
deleted file mode 100644 (file)
index 9ba9f6b..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><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>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>runtime</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <groupId>org.argeo.slc.runtime</groupId>
-       <artifactId>org.argeo.slc.support.castor</artifactId>
-       <name>SLC Support Castor</name>
-       <description>Implementations of SLC Specs using Castor</description>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-
-                               <configuration>
-                                       <instructions>
-                                               <Export-Package>
-                                                       org.argeo.slc.*
-                                               </Export-Package>
-                                               <Import-Package>
-                                                       org.argeo.slc.*;resolution:=optional,
-                                                       org.argeo.slc.deploy;resolution:=optional,
-                                                       org.argeo.slc.build;resolution:=optional,
-                                                       org.argeo.slc.execution;resolution:=optional,
-                                                       org.argeo.slc.core.attachment;resolution:=optional,
-                                                       org.argeo.slc.core.structure;resolution:=optional,
-                                                       org.argeo.slc.core.structure.tree;resolution:=optional,
-                                                       org.argeo.slc.core.test;resolution:=optional,
-                                                       org.argeo.slc.core.test.tree;resolution:=optional,
-                                                       org.argeo.slc.runtime;resolution:=optional,
-                                                       org.argeo.slc.core.execution;resolution:=optional,
-                                                       org.argeo.slc.msg;resolution:=optional,
-                                                       org.argeo.slc.msg.build;resolution:=optional,
-                                                       org.argeo.slc.msg.process;resolution:=optional,
-                                                       org.argeo.slc.msg.event;resolution:=optional,
-                                                       org.argeo.slc.msg.test.tree;resolution:=optional,
-                                                       org.argeo.slc.detached;resolution:=optional,
-                                                       org.apache.xml.serialize;resolution:=optional,
-                                                       org.apache.xerces.jaxp;resolution:=optional,
-                                                       org.w3c.dom.*;version="0.0.0";resolution:=optional,
-                                                       org.xml.sax.*;version="0.0.0";resolution:=optional,
-                                                       javax.xml.transform.*;version="0.0.0";resolution:=optional,
-                                                       javax.xml.parsers.*;version="0.0.0";resolution:=optional,
-                                                       org.springframework.xml.validation;resolution:=optional,
-                                                       org.apache.commons.io,
-                                                       org.springframework.oxm,
-                                                       org.springframework.core,
-                                                       org.springframework.xml.transform,
-                                                       org.springframework.core.io,
-                                                       *
-                                               </Import-Package>
-                                               <Fragment-Host>org.castor</Fragment-Host>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-       <dependencies>
-
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.core</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.oxm</artifactId>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.castor</artifactId>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.apache.xerces</artifactId>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.apache.xalan</artifactId>
-               </dependency>
-
-               <!-- Unit Tests -->
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.unit</artifactId>
-                       <scope>test</scope>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java
deleted file mode 100644 (file)
index 4a250e4..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.castor.execution;
-
-import org.argeo.slc.core.execution.PrimitiveAccessor;
-import org.argeo.slc.core.execution.PrimitiveUtils;
-import org.exolab.castor.mapping.AbstractFieldHandler;
-
-public class PrimitiveFieldHandler extends AbstractFieldHandler {
-
-       @Override
-       public Object getValue(Object object) throws IllegalStateException {
-               if (object == null)
-                       return null;
-
-               Object value = ((PrimitiveAccessor) object).getValue();
-               return value != null ? value.toString() : null;
-       }
-
-       @Override
-       public Object newInstance(Object parent, Object[] args)
-                       throws IllegalStateException {
-               return null;
-       }
-
-       @Override
-       public Object newInstance(Object parent) throws IllegalStateException {
-               return null;
-       }
-
-       @Override
-       public void resetValue(Object object) throws IllegalStateException,
-                       IllegalArgumentException {
-       }
-
-       @Override
-       public void setValue(Object object, Object value)
-                       throws IllegalStateException, IllegalArgumentException {
-               PrimitiveAccessor primitiveAccessor = (PrimitiveAccessor) object;
-               String type = primitiveAccessor.getType();
-               String str = value.toString();
-               primitiveAccessor.setValue(PrimitiveUtils.convert(type, str));
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java
deleted file mode 100644 (file)
index 5d56fb9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.castor.structure.tree;
-
-import org.exolab.castor.mapping.AbstractFieldHandler;
-import org.exolab.castor.mapping.MapItem;
-
-import org.argeo.slc.core.structure.tree.TreeSPath;
-
-public class TreeSPathFieldHandler extends AbstractFieldHandler {
-
-       @Override
-       public Object getValue(Object object) throws IllegalStateException {
-               MapItem part = (MapItem) object;
-               return ((TreeSPath) part.getKey()).getAsUniqueString();
-       }
-
-       @Override
-       public Object newInstance(Object parent) throws IllegalStateException {
-               return null;
-       }
-
-       @Override
-       public Object newInstance(Object parent, Object[] args)
-                       throws IllegalStateException {
-               return null;
-       }
-
-       @Override
-       public void resetValue(Object object) throws IllegalStateException,
-                       IllegalArgumentException {
-               MapItem part = (MapItem) object;
-               part.setKey(null);
-       }
-
-       @Override
-       public void setValue(Object object, Object value)
-                       throws IllegalStateException, IllegalArgumentException {
-               MapItem part = (MapItem) object;
-               part.setKey(new TreeSPath(value.toString()));
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java
deleted file mode 100644 (file)
index a69eb87..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.castor.test.tree;
-
-import org.argeo.slc.core.test.SimpleResultPart;
-import org.argeo.slc.core.test.SlcTestUtils;
-import org.argeo.slc.test.TestStatus;
-import org.exolab.castor.mapping.AbstractFieldHandler;
-
-public class StatusFieldHandler extends AbstractFieldHandler {
-
-       @Override
-       public Object getValue(Object object) throws IllegalStateException {
-               SimpleResultPart part = (SimpleResultPart) object;
-               return SlcTestUtils.statusToString(part.getStatus());
-       }
-
-       @Override
-       public Object newInstance(Object parent) throws IllegalStateException {
-               return null;
-       }
-
-       @Override
-       public Object newInstance(Object parent, Object[] args)
-                       throws IllegalStateException {
-               return null;
-       }
-
-       @Override
-       public void resetValue(Object object) throws IllegalStateException,
-                       IllegalArgumentException {
-               SimpleResultPart part = (SimpleResultPart) object;
-               // ERROR by default since it should be explicitely set
-               part.setStatus(TestStatus.ERROR);
-       }
-
-       @Override
-       public void setValue(Object object, Object value)
-                       throws IllegalStateException, IllegalArgumentException {
-               SimpleResultPart part = (SimpleResultPart) object;
-               Integer status = SlcTestUtils.stringToStatus((String) value);
-               part.setStatus(status);
-       }
-
-}
diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java
deleted file mode 100644 (file)
index ad6bcdc..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.xml.process;\r
-\r
-import java.io.File;\r
-import java.io.FileWriter;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.xml.transform.stream.StreamResult;\r
-\r
-import org.apache.commons.io.IOUtils;\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.execution.ExecutionProcess;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.process.SlcExecutionNotifier;\r
-import org.argeo.slc.execution.ExecutionStep;\r
-import org.argeo.slc.process.SlcExecutionStep;\r
-import org.springframework.oxm.Marshaller;\r
-\r
-/** @deprecated Probably not even working anymore */\r
-public class FileSlcExecutionNotifier implements SlcExecutionNotifier {\r
-       // private final static SimpleDateFormat sdf = new SimpleDateFormat(\r
-       // "yyyyMMdd-HHmmss");\r
-       //\r
-       // private String basePath;\r
-       private Marshaller marshaller;\r
-\r
-       private Map<String, String> uuidToDir = new HashMap<String, String>();\r
-\r
-       public void addSteps(ExecutionProcess slcExecution,\r
-                       List<ExecutionStep> additionalSteps) {\r
-               writeSlcExecution(slcExecution);\r
-       }\r
-\r
-       public void updateStatus(ExecutionProcess slcExecution, String oldStatus,\r
-                       String newStatus) {\r
-               writeSlcExecution(slcExecution);\r
-       }\r
-\r
-       protected void writeSlcExecution(ExecutionProcess process) {\r
-               if (!(process instanceof SlcExecution))\r
-                       throw new SlcException("Unsupported process type "\r
-                                       + process.getClass());\r
-               SlcExecution slcExecution = (SlcExecution) process;\r
-               FileWriter out = null;\r
-               try {\r
-                       out = new FileWriter(getFilePath(slcExecution));\r
-                       marshaller.marshal(slcExecution, new StreamResult(out));\r
-               } catch (Exception e) {\r
-                       throw new SlcException("Cannot marshall SlcExecution to "\r
-                                       + getFilePath(slcExecution), e);\r
-               } finally {\r
-                       IOUtils.closeQuietly(out);\r
-               }\r
-       }\r
-\r
-       protected String getFileName(SlcExecution slcExecution) {\r
-               return "SlcExecution-" + slcExecution.getUuid() + ".xml";\r
-       }\r
-\r
-       protected String getFilePath(SlcExecution slcExecution) {\r
-               String dirPath = uuidToDir.get(slcExecution.getUuid());\r
-               return dirPath + File.separator + "SlcExecution-"\r
-                               + slcExecution.getUuid() + ".xml";\r
-       }\r
-\r
-       public void setBasePath(String basePath) {\r
-               // this.basePath = basePath;\r
-       }\r
-\r
-       public void setMarshaller(Marshaller marshaller) {\r
-               this.marshaller = marshaller;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java
deleted file mode 100644 (file)
index 0a99356..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.xml.test.tree;\r
-\r
-import java.io.File;\r
-import java.io.FileOutputStream;\r
-import java.io.InputStream;\r
-import java.io.OutputStream;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import javax.xml.parsers.DocumentBuilder;\r
-import javax.xml.parsers.DocumentBuilderFactory;\r
-import javax.xml.transform.Templates;\r
-import javax.xml.transform.Transformer;\r
-import javax.xml.transform.TransformerFactory;\r
-import javax.xml.transform.dom.DOMResult;\r
-import javax.xml.transform.dom.DOMSource;\r
-import javax.xml.transform.stream.StreamResult;\r
-import javax.xml.transform.stream.StreamSource;\r
-\r
-import org.springframework.core.io.Resource;\r
-import org.springframework.oxm.Marshaller;\r
-import org.springframework.xml.transform.StringResult;\r
-import org.w3c.dom.Document;\r
-\r
-import org.apache.commons.io.IOUtils;\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.test.TestResultListener;\r
-import org.argeo.slc.test.TestResultPart;\r
-\r
-/** Build a report based on a tree test result using an XSLT stylesheet. */\r
-public class XsltReportGenerator implements TestResultListener<TreeTestResult> {\r
-       private final static Log log = LogFactory.getLog(XsltReportGenerator.class);\r
-\r
-       private DocumentBuilder documentBuilder = null;\r
-\r
-       private Resource xsltStyleSheet;\r
-\r
-       private Templates templates;\r
-\r
-       private Marshaller marshaller;\r
-\r
-       private String outputDir;\r
-       private String outputFileExtension = "html";\r
-\r
-       private Boolean logXml = false;\r
-\r
-       private Map<String, String> xsltParameters = new HashMap<String, String>();\r
-\r
-       public void init() {\r
-               if (templates != null)\r
-                       return;\r
-\r
-               if (xsltStyleSheet == null)\r
-                       throw new SlcException("XSLT style sheet not specified.");\r
-\r
-               InputStream in = null;\r
-               try {\r
-                       TransformerFactory transformerFactory = TransformerFactory\r
-                                       .newInstance();\r
-                       in = xsltStyleSheet.getInputStream();\r
-                       StreamSource xsltSource = new StreamSource(in);\r
-                       templates = transformerFactory.newTemplates(xsltSource);\r
-               } catch (Exception e) {\r
-                       throw new SlcException("Could not initialize templates", e);\r
-               } finally {\r
-                       IOUtils.closeQuietly(in);\r
-               }\r
-       }\r
-\r
-       public void resultPartAdded(TreeTestResult testResult,\r
-                       TestResultPart testResultPart) {\r
-\r
-       }\r
-\r
-       public void close(TreeTestResult testResult) {\r
-               if (templates == null)\r
-                       throw new SlcException("XSLT template not initialized");\r
-\r
-               File file = getFile(testResult);\r
-               OutputStream out = null;\r
-\r
-               try {\r
-                       Transformer transformer = templates.newTransformer();\r
-                       for (String paramKey : xsltParameters.keySet()) {\r
-                               transformer\r
-                                               .setParameter(paramKey, xsltParameters.get(paramKey));\r
-                               if (log.isTraceEnabled())\r
-                                       log.trace("Set XSLT parameter " + paramKey + " to "\r
-                                                       + xsltParameters.get(paramKey));\r
-                       }\r
-\r
-                       if (documentBuilder == null)\r
-                               documentBuilder = DocumentBuilderFactory.newInstance()\r
-                                               .newDocumentBuilder();\r
-\r
-                       Document document = documentBuilder.newDocument();\r
-                       DOMResult marshallResult = new DOMResult(document);\r
-                       marshaller.marshal(testResult, marshallResult);\r
-\r
-                       if (logXml) {\r
-                               Transformer identityTransformer = TransformerFactory\r
-                                               .newInstance().newTransformer();\r
-                               StringResult xmlResult = new StringResult();\r
-                               identityTransformer.transform(new DOMSource(marshallResult\r
-                                               .getNode()), xmlResult);\r
-                               log.info("Marshalled XML:\n" + xmlResult);\r
-                       }\r
-\r
-                       DOMSource transfoSource = new DOMSource(marshallResult.getNode());\r
-\r
-                       if (outputDir != null) {\r
-                               File dir = new File(outputDir);\r
-                               dir.mkdirs();\r
-                               out = new FileOutputStream(file);\r
-                               StreamResult outputResult = new StreamResult(out);\r
-                               transformer.transform(transfoSource, outputResult);\r
-                       } else {\r
-                               // print on console if no output dir\r
-                               StringResult result = new StringResult();\r
-                               transformer.transform(transfoSource, result);\r
-                               log.info("Generated report:\n" + result);\r
-                       }\r
-               } catch (Exception e) {\r
-                       throw new SlcException(\r
-                                       "Could not transform test result to " + file, e);\r
-               } finally {\r
-                       IOUtils.closeQuietly(out);\r
-               }\r
-       }\r
-\r
-       public Resource getXsltStyleSheet() {\r
-               return xsltStyleSheet;\r
-       }\r
-\r
-       public void setXsltStyleSheet(Resource xsltStyleSheet) {\r
-               this.xsltStyleSheet = xsltStyleSheet;\r
-       }\r
-\r
-       public void setTemplates(Templates templates) {\r
-               this.templates = templates;\r
-       }\r
-\r
-       public void setMarshaller(Marshaller marshaller) {\r
-               this.marshaller = marshaller;\r
-       }\r
-\r
-       public void setOutputDir(String outputDir) {\r
-               this.outputDir = outputDir;\r
-       }\r
-\r
-       public void setOutputFileExtension(String outputFileExtension) {\r
-               this.outputFileExtension = outputFileExtension;\r
-       }\r
-\r
-       protected File getFile(TreeTestResult result) {\r
-               Long time = System.currentTimeMillis();\r
-               return new File(outputDir + File.separator + time + "-"\r
-                               + result.getUuid() + "." + outputFileExtension);\r
-       }\r
-\r
-       public void setLogXml(Boolean logXml) {\r
-               this.logXml = logXml;\r
-       }\r
-\r
-       public void setXsltParameters(Map<String, String> xsltParameters) {\r
-               this.xsltParameters = xsltParameters;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml
deleted file mode 100644 (file)
index 774e1bf..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
-\r
-<mapping>\r
-       <description>Attachment objects XML mapping</description>\r
-\r
-       <class name="org.argeo.slc.core.attachment.SimpleAttachment">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="uuid" type="string" />\r
-               <field name="name" type="string" />\r
-               <field name="contentType" type="string" />\r
-       </class>\r
-\r
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml
deleted file mode 100644 (file)
index ae97e34..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<mapping>
-       <description>Build objects XML mapping</description>
-
-       <class name="org.argeo.slc.BasicNameVersion">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="name">
-                       <bind-xml name="name" node="attribute" />
-               </field>
-               <field name="version">
-                       <bind-xml name="version" node="attribute" />
-               </field>
-       </class>
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml
deleted file mode 100644 (file)
index 662cbe6..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
-\r
-<mapping>\r
-       <description>Execution objects XML mapping</description>\r
-\r
-       <class name="org.argeo.slc.execution.ExecutionModuleDescriptor">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="name" />\r
-               <field name="version" />\r
-               <field name="label" />\r
-               <field name="description" />\r
-               <field name="executionFlows" collection="arraylist"\r
-                       type="org.argeo.slc.execution.ExecutionFlowDescriptor">\r
-                       <bind-xml auto-naming="deriveByClass" location="execution-flows" />\r
-               </field>\r
-               <field name="executionSpecs" collection="arraylist"\r
-                       type="org.argeo.slc.execution.ExecutionSpec">\r
-                       <bind-xml auto-naming="deriveByClass" location="execution-specs" />\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.execution.ExecutionFlowDescriptor">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="name" identity="true">\r
-                       <bind-xml name="name" node="attribute" />\r
-               </field>\r
-               <field name="path">\r
-                       <bind-xml name="path" node="attribute" />\r
-               </field>\r
-               <field name="executionSpec">\r
-                       <bind-xml name="executionSpec" node="attribute" reference="true" />\r
-               </field>\r
-               <field name="values" collection="map">\r
-                       <bind-xml name="value" location="values">\r
-                               <class name="org.exolab.castor.mapping.MapItem">\r
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                                               ns-prefix="slc" />\r
-                                       <field name="key" type="string">\r
-                                               <bind-xml name="key" node="attribute" />\r
-                                       </field>\r
-                                       <field name="value"\r
-                                               type="org.argeo.slc.core.execution.AbstractExecutionValue">\r
-                                               <bind-xml auto-naming="deriveByClass" />\r
-                                       </field>\r
-                               </class>\r
-                       </bind-xml>\r
-               </field>\r
-       </class>\r
-\r
-       <!-- Specs -->\r
-       <class name="org.argeo.slc.core.execution.DefaultExecutionSpec">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="name" identity="true">\r
-                       <bind-xml name="name" node="attribute" />\r
-               </field>\r
-               <field name="attributes" collection="map">\r
-                       <bind-xml name="value" location="values">\r
-                               <class name="org.exolab.castor.mapping.MapItem">\r
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                                               ns-prefix="slc" />\r
-                                       <field name="key" type="string">\r
-                                               <bind-xml name="key" node="attribute" />\r
-                                       </field>\r
-                                       <field name="value"\r
-                                               type="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
-                                               <bind-xml auto-naming="deriveByClass" />\r
-                                       </field>\r
-                               </class>\r
-                       </bind-xml>\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="isParameter">\r
-                       <bind-xml name="isParameter" node="attribute" />\r
-               </field>\r
-               <field name="isFrozen">\r
-                       <bind-xml name="isFrozen" node="attribute" />\r
-               </field>\r
-               <field name="isHidden">\r
-                       <bind-xml name="isHidden" node="attribute" />\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.core.execution.PrimitiveSpecAttribute"\r
-               extends="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="type">\r
-                       <bind-xml name="type" node="attribute" />\r
-               </field>\r
-               <field name="value" type="string"\r
-                       handler="org.argeo.slc.castor.execution.PrimitiveFieldHandler">\r
-                       <bind-xml node="text" />\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.core.execution.RefSpecAttribute"\r
-               extends="org.argeo.slc.core.execution.AbstractSpecAttribute">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="targetClassName">\r
-                       <bind-xml name="targetClassName" node="attribute" />\r
-               </field>\r
-               <field name="choices" collection="arraylist"\r
-                       type="org.argeo.slc.core.execution.RefValueChoice">\r
-                       <bind-xml auto-naming="deriveByClass" location="choices" />\r
-               </field>\r
-       </class>\r
-\r
-       <!-- Values -->\r
-       <class name="org.argeo.slc.core.execution.AbstractExecutionValue">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.core.execution.PrimitiveValue"\r
-               extends="org.argeo.slc.core.execution.AbstractExecutionValue">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="type">\r
-                       <bind-xml name="type" node="attribute" />\r
-               </field>\r
-               <field name="value" type="string"\r
-                       handler="org.argeo.slc.castor.execution.PrimitiveFieldHandler">\r
-                       <bind-xml node="text" />\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.core.execution.RefValue" extends="org.argeo.slc.core.execution.AbstractExecutionValue">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="ref">\r
-                       <bind-xml name="ref" node="attribute" />\r
-               </field>\r
-               <field name="type">\r
-                       <bind-xml name="type" node="attribute" />\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.core.execution.RefValueChoice">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="name">\r
-                       <bind-xml name="name" node="attribute" />\r
-               </field>\r
-               <field name="description" />\r
-       </class>\r
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml
deleted file mode 100644 (file)
index 2699031..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under 
-       the Apache License, Version 2.0 (the "License"); you may not use this file 
-       except in compliance with the License. You may obtain a copy of the License 
-       at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 
-       law or agreed to in writing, software distributed under the License is distributed 
-       on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
-       express or implied. See the License for the specific language governing permissions 
-       and limitations under the License. -->
-
-
-<mapping>
-       <description>Message objects XML mapping</description>
-
-       <!-- TODO: use XML entities to factorize patterns -->
-
-       <!-- BASIC -->
-       <class name="org.argeo.slc.msg.ExecutionAnswer">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="status" />
-               <field name="message" />
-       </class>
-
-       <class name="org.argeo.slc.msg.ReferenceList">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="references" collection="arraylist" type="string">
-                       <bind-xml name="ref" />
-               </field>
-       </class>
-
-       <class name="org.argeo.slc.msg.ObjectList">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="objects" collection="arraylist" type="java.io.Serializable">
-                       <bind-xml auto-naming="deriveByClass" />
-               </field>
-       </class>
-
-       <!-- BUILD -->
-       <class name="org.argeo.slc.msg.build.ModularDistributionDescriptor"
-               extends="org.argeo.slc.BasicNameVersion">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="modulesDescriptors" collection="map">
-                       <bind-xml name="modulesDescriptor" location="modulesDescriptors">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="string">
-                                               <bind-xml name="type" node="attribute" />
-                                       </field>
-                                       <field name="value" type="string">
-                                               <bind-xml name="url" node="attribute" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-       </class>
-
-       <!-- TESTS -->
-       <class name="org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="treeTestResult" type="org.argeo.slc.core.test.tree.TreeTestResult" />
-               <field name="testRunDescriptor" />
-       </class>
-
-       <class name="org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="resultUuid" />
-               <field name="closeDate" />
-       </class>
-
-       <class name="org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="resultUuid" />
-               <field name="attachment" type="org.argeo.slc.core.attachment.SimpleAttachment">
-                       <bind-xml auto-naming="deriveByClass" />
-               </field>
-       </class>
-
-       <class name="org.argeo.slc.msg.test.tree.ResultPartRequest">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="resultUuid" />
-               <field name="resultPart" type="org.argeo.slc.core.test.SimpleResultPart">
-                       <bind-xml auto-naming="deriveByClass" />
-               </field>
-
-               <field name="relatedElements" collection="map">
-                       <bind-xml name="element" location="related-elements">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="org.argeo.slc.core.structure.tree.TreeSPath"
-                                               handler="org.argeo.slc.castor.structure.tree.TreeSPathFieldHandler">
-                                               <bind-xml name="path" node="attribute" />
-                                       </field>
-                                       <field name="value" type="org.argeo.slc.core.structure.SimpleSElement">
-                                               <bind-xml auto-naming="deriveByClass" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-               <field name="path">
-                       <bind-xml auto-naming="deriveByClass" />
-               </field>
-               <field name="testRunDescriptor" />
-               <field name="attributes" collection="hashtable">
-                       <bind-xml name="attribute" location="attributes">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="string">
-                                               <bind-xml name="name" node="attribute" />
-                                       </field>
-                                       <field name="value" type="string">
-                                               <bind-xml node="text" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-       </class>
-
-       <class name="org.argeo.slc.core.test.tree.ResultAttributes">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="uuid" />
-               <field name="closeDate" />
-               <field name="attributes" collection="hashtable">
-                       <bind-xml name="attribute" location="attributes">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="string">
-                                               <bind-xml name="name" node="attribute" />
-                                       </field>
-                                       <field name="value" type="string">
-                                               <bind-xml node="text" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-               <field name="attachments" collection="arraylist"
-                       type="org.argeo.slc.core.attachment.SimpleAttachment">
-                       <bind-xml auto-naming="deriveByClass" location="attachments" />
-               </field>
-       </class>
-
-
-       <!-- PROCESS -->
-       <class name="org.argeo.slc.msg.process.SlcExecutionStepsRequest">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="slcExecutionUuid" />
-               <field name="steps" collection="arraylist"
-                       type="org.argeo.slc.process.SlcExecutionStep">
-                       <bind-xml auto-naming="deriveByClass" location="steps" />
-               </field>
-       </class>
-
-       <class name="org.argeo.slc.msg.process.SlcExecutionStatusRequest">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="slcExecutionUuid" />
-               <field name="newStatus" />
-       </class>
-
-       <class name="org.argeo.slc.msg.process.SlcExecutionRequest">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="slcExecution" type="org.argeo.slc.process.SlcExecution" />
-       </class>
-
-       <!-- EVENTS -->
-
-       <class name="org.argeo.slc.msg.event.SlcEvent">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="headers" collection="map">
-                       <bind-xml name="header" location="headers">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="string">
-                                               <bind-xml name="name" node="attribute" />
-                                       </field>
-                                       <field name="value" type="string">
-                                               <bind-xml node="text" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-       </class>
-
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml
deleted file mode 100644 (file)
index 67bba27..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
-\r
-<mapping>\r
-       <description>Process objects XML mapping</description>\r
-\r
-       <class name="org.argeo.slc.process.SlcExecution">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="uuid" identity="true">\r
-                       <bind-xml node="attribute" />\r
-               </field>\r
-               <field name="status" />\r
-               <field name="type" />\r
-               <field name="host" />\r
-               <field name="user" />\r
-               <field name="realizedFlows" collection="arraylist"\r
-                       type="org.argeo.slc.process.RealizedFlow">\r
-                       <bind-xml auto-naming="deriveByClass" location="realized-flows" />\r
-               </field>\r
-               <field name="steps" collection="arraylist"\r
-                       type="org.argeo.slc.process.SlcExecutionStep">\r
-                       <bind-xml auto-naming="deriveByClass" location="steps" />\r
-               </field>\r
-               <field name="attributes" collection="map">\r
-                       <bind-xml name="attribute" location="attributes">\r
-                               <class name="org.exolab.castor.mapping.MapItem">\r
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                                               ns-prefix="slc" />\r
-                                       <field name="key" type="string">\r
-                                               <bind-xml name="name" node="attribute" />\r
-                                       </field>\r
-                                       <field name="value" type="string">\r
-                                               <bind-xml node="text" />\r
-                                       </field>\r
-                               </class>\r
-                       </bind-xml>\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.process.RealizedFlow">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="moduleName"/>\r
-               <field name="moduleVersion" />\r
-               <field name="flowDescriptor">\r
-                       <bind-xml auto-naming="deriveByClass" />\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.process.SlcExecutionStep">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="uuid" identity="true">\r
-                       <bind-xml node="attribute" />\r
-               </field>\r
-               <field name="type" />\r
-               <field name="thread" />\r
-               <field name="timestamp" />\r
-               <field name="logLines" collection="arraylist" type="string">\r
-                       <bind-xml name="log-line" location="log-lines" />\r
-               </field>\r
-       </class>\r
-\r
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml
deleted file mode 100644 (file)
index 9b1a1c0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">\r
-\r
-<mapping>\r
-       <description>Runtime objects XML mapping</description>\r
-\r
-       <class name="org.argeo.slc.runtime.SlcAgentDescriptor">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="uuid" identity="true">\r
-                       <bind-xml node="attribute" />\r
-               </field>\r
-               <field name="host" />\r
-               <field name="moduleDescriptors" collection="arraylist"\r
-                       type="org.argeo.slc.execution.ExecutionModuleDescriptor">\r
-                       <bind-xml auto-naming="deriveByClass" />\r
-               </field>\r
-       </class>\r
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml
deleted file mode 100644 (file)
index 0b73dee..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-
-<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under 
-       the Apache License, Version 2.0 (the "License"); you may not use this file 
-       except in compliance with the License. You may obtain a copy of the License 
-       at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 
-       law or agreed to in writing, software distributed under the License is distributed 
-       on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
-       express or implied. See the License for the specific language governing permissions 
-       and limitations under the License. -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="true">
-
-       <bean id="slcDefault.castor.marshaller" class="org.springframework.oxm.castor.CastorMarshaller">
-               <property name="mappingLocations">
-                       <list>
-                               <value>classpath:org/argeo/slc/castor/common.xml</value>
-                               <value>classpath:org/argeo/slc/castor/msg.xml</value>
-                               <value>classpath:org/argeo/slc/castor/process.xml</value>
-                               <value>classpath:org/argeo/slc/castor/runtime.xml</value>
-                               <value>classpath:org/argeo/slc/castor/structure.xml</value>
-                               <value>classpath:org/argeo/slc/castor/test.xml</value>
-                               <value>classpath:org/argeo/slc/castor/execution.xml</value>
-                               <value>classpath:org/argeo/slc/castor/attachment.xml</value>
-                       </list>
-               </property>
-               <property name="whitespacePreserve" value="true" />
-               <property name="encoding" value="UTF-8" />
-       </bean>
-
-       <bean id="slcDefault.castor.xsltReportGenerator" class="org.argeo.slc.xml.test.tree.XsltReportGenerator"
-               init-method="init">
-               <property name="xsltStyleSheet"
-                       value="classpath:/org/argeo/slc/core/test/tree/basicReport.xslt" />
-               <property name="marshaller" ref="slcDefault.castor.marshaller" />
-               <property name="logXml" value="false" />
-               <property name="outputDir" value="${user.dir}/results/html" />
-       </bean>
-
-       <bean name="slcDefault.castor.fileSlcExecutionNotifier" class="org.argeo.slc.xml.process.FileSlcExecutionNotifier">
-               <property name="basePath" value="${user.dir}/process" />
-               <property name="marshaller" ref="slcDefault.castor.marshaller" />
-       </bean>
-
-</beans>
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml
deleted file mode 100644 (file)
index ad63a7a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<mapping>\r
-       <description>Structure related objects XML mapping</description>\r
-\r
-       <class name="org.argeo.slc.core.structure.tree.TreeSPath"\r
-               auto-complete="false">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="asUniqueString" type="string">\r
-                       <bind-xml node="attribute" />\r
-               </field>\r
-       </class>\r
-\r
-       <class name="org.argeo.slc.core.structure.SimpleSElement"\r
-               auto-complete="false">\r
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"\r
-                       ns-prefix="slc" />\r
-               <field name="label" type="string" />\r
-               <field name="tags" collection="map">\r
-                       <bind-xml name="tag" location="tags">\r
-                               <class name="org.exolab.castor.mapping.MapItem">\r
-                                       <map-to\r
-                                               ns-uri="http://argeo.org/projects/slc/schemas" ns-prefix="slc" />\r
-                                       <field name="key" type="string">\r
-                                               <bind-xml name="name" node="attribute" />\r
-                                       </field>\r
-                                       <field name="value" type="string">\r
-                                               <bind-xml name="tag-value" />\r
-                                       </field>\r
-                               </class>\r
-                       </bind-xml>\r
-               </field>\r
-       </class>\r
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml
deleted file mode 100644 (file)
index 45b9bbe..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<mapping>
-       <description>Test objects XML mapping</description>
-
-       <class name="org.argeo.slc.test.TestRunDescriptor" auto-complete="false">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="testRunUuid" />
-               <field name="slcExecutionUuid" />
-               <field name="slcExecutionStepUuid" />
-               <field name="testResultUuid" />
-               <field name="deployedSytemId" />
-       </class>
-
-       <class name="org.argeo.slc.core.test.tree.TreeTestResult"
-               auto-complete="false">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="uuid" type="string">
-                       <bind-xml name="uuid" node="attribute" />
-               </field>
-               <field name="closeDate" />
-               <field name="attributes" collection="map">
-                       <bind-xml name="attribute" location="attributes">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="string">
-                                               <bind-xml name="name" node="attribute" />
-                                       </field>
-                                       <field name="value" type="string">
-                                               <bind-xml node="text" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-               <field name="resultParts" collection="sortedmap">
-                       <bind-xml name="result-part" location="result-parts">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="org.argeo.slc.core.structure.tree.TreeSPath"
-                                               handler="org.argeo.slc.castor.structure.tree.TreeSPathFieldHandler">
-                                               <bind-xml name="path" node="attribute" />
-                                       </field>
-                                       <field name="value" type="org.argeo.slc.core.test.tree.PartSubList">
-                                               <bind-xml name="part-sub-list" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-               <field name="elements" collection="sortedmap">
-                       <bind-xml name="element" location="elements">
-                               <class name="org.exolab.castor.mapping.MapItem">
-                                       <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                                               ns-prefix="slc" />
-                                       <field name="key" type="org.argeo.slc.core.structure.tree.TreeSPath"
-                                               handler="org.argeo.slc.castor.structure.tree.TreeSPathFieldHandler">
-                                               <bind-xml name="path" node="attribute" />
-                                       </field>
-                                       <field name="value" type="org.argeo.slc.core.structure.SimpleSElement">
-                                               <bind-xml auto-naming="deriveByClass" />
-                                       </field>
-                               </class>
-                       </bind-xml>
-               </field>
-               <field name="attachments" collection="arraylist"
-                       type="org.argeo.slc.core.attachment.SimpleAttachment">
-                       <bind-xml auto-naming="deriveByClass" location="attachments" />
-               </field>
-       </class>
-
-       <class name="org.argeo.slc.core.test.tree.PartSubList"
-               auto-complete="false">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="parts" collection="arraylist"
-                       type="org.argeo.slc.core.test.SimpleResultPart">
-                       <bind-xml auto-naming="deriveByClass" location="parts" />
-               </field>
-       </class>
-
-       <class name="org.argeo.slc.core.test.SimpleResultPart"
-               auto-complete="false">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="testRunUuid" type="string" />
-               <field name="message" type="string" />
-               <field name="status" type="string"
-                       handler="org.argeo.slc.castor.test.tree.StatusFieldHandler" />
-               <field name="exceptionMessage" type="string" />
-       </class>
-
-       <class name="org.argeo.slc.core.test.tree.TreeTestResultCollection"
-               auto-complete="false">
-               <map-to ns-uri="http://argeo.org/projects/slc/schemas"
-                       ns-prefix="slc" />
-               <field name="id" type="string">
-                       <bind-xml name="id" node="attribute" />
-               </field>
-               <field name="results" collection="set"
-                       type="org.argeo.slc.core.test.tree.TreeTestResult">
-                       <bind-xml auto-naming="deriveByClass" location="results" />
-               </field>
-       </class>
-</mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/site/apt/index.apt b/runtime/org.argeo.slc.support.castor/src/site/apt/index.apt
deleted file mode 100644 (file)
index f414460..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Argeo SLC Site
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java
deleted file mode 100644 (file)
index f91ad0b..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.castor;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.unit.AbstractSpringTestCase;
-import org.argeo.slc.unit.UnitXmlUtils;
-import org.springframework.oxm.Marshaller;
-import org.springframework.oxm.Unmarshaller;
-import org.springframework.xml.transform.StringResult;
-import org.springframework.xml.transform.StringSource;
-import org.springframework.xml.validation.XmlValidator;
-
-public abstract class AbstractCastorTestCase extends AbstractSpringTestCase {
-       protected Log log = LogFactory.getLog(getClass());
-
-       private Marshaller marshaller;
-       private Unmarshaller unmarshaller;
-
-       @Override
-       public void setUp() {
-               marshaller = getBean(Marshaller.class);
-               unmarshaller = getBean(Unmarshaller.class);
-       }
-
-       protected StringResult marshal(Object obj) throws Exception {
-               return marshal(obj, false);
-       }
-
-       protected StringResult marshalAndValidate(Object obj) throws Exception {
-               return marshal(obj, true);
-       }
-
-       protected StringResult marshal(Object obj, boolean validate)
-                       throws Exception {
-               StringResult xml = new StringResult();
-               marshaller.marshal(obj, xml);
-
-               log.info("Marshalled " + obj.getClass() + ": " + xml + "\n");
-
-               if (validate)
-                       UnitXmlUtils.assertXmlValidation(getBean(XmlValidator.class),
-                                       new StringSource(xml.toString()));
-               return xml;
-       }
-
-       @SuppressWarnings("unchecked")
-       protected <T> T unmarshal(StringResult xml) throws Exception {
-               return (T) unmarshaller.unmarshal(new StringSource(xml.toString()));
-       }
-
-       @SuppressWarnings("unchecked")
-       protected <T> T marshUnmarsh(Object obj, boolean validate) throws Exception {
-               StringResult xml = marshal(obj, validate);
-               return (T) unmarshal(xml);
-       }
-
-       @SuppressWarnings("unchecked")
-       protected <T> T marshUnmarsh(Object obj) throws Exception {
-               return (T) marshUnmarsh(obj, true);
-       }
-}
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java
deleted file mode 100644 (file)
index ea3b550..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.castor;\r
-\r
-import org.argeo.slc.msg.ExecutionAnswer;\r
-\r
-public class ExecutionAnswerCastorTest extends AbstractCastorTestCase {\r
-       public void testMarshUnmarshOk() throws Exception {\r
-               ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.OK,\r
-                               "No problem!");\r
-               ExecutionAnswer answerUnm = marshUnmarsh(answer);\r
-               assertExecutionAnswer(answer, answerUnm);\r
-       }\r
-\r
-       public void testMarshUnmarshError() throws Exception {\r
-               ExecutionAnswer answer = new ExecutionAnswer(ExecutionAnswer.ERROR,\r
-                               "Oooops...");\r
-               ExecutionAnswer answerUnm = marshUnmarsh(answer);\r
-               assertExecutionAnswer(answer, answerUnm);\r
-       }\r
-\r
-       public static void assertExecutionAnswer(ExecutionAnswer expected,\r
-                       ExecutionAnswer reached) {\r
-               assertEquals(expected.getStatus(), reached.getStatus());\r
-               assertEquals(expected.getMessage(), reached.getMessage());\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java
deleted file mode 100644 (file)
index b25f52b..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.castor;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.argeo.slc.execution.ExecutionFlowDescriptor;\r
-import org.argeo.slc.execution.ExecutionModuleDescriptor;\r
-import org.argeo.slc.execution.ExecutionSpec;\r
-import org.argeo.slc.unit.execution.ExecutionFlowDescriptorTestUtils;\r
-\r
-public class ExecutionModuleDescriptorCastorTest extends AbstractCastorTestCase {\r
-       public void testMarshUnmarsh() throws Exception {\r
-               ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();\r
-               moduleDescriptor.setName("test.module");\r
-               moduleDescriptor.setVersion("1.0.0");\r
-               moduleDescriptor.setLabel("Test Module");\r
-               moduleDescriptor.setDescription("module descriptor");\r
-\r
-               ExecutionFlowDescriptor flowDescriptor = ExecutionFlowDescriptorTestUtils\r
-                               .createSimpleExecutionFlowDescriptor();\r
-\r
-               List<ExecutionFlowDescriptor> flows = new ArrayList<ExecutionFlowDescriptor>();\r
-               flows.add(flowDescriptor);\r
-               moduleDescriptor.setExecutionFlows(flows);\r
-\r
-               List<ExecutionSpec> specs = new ArrayList<ExecutionSpec>();\r
-               specs.add(flowDescriptor.getExecutionSpec());\r
-               moduleDescriptor.setExecutionSpecs(specs);\r
-\r
-               marshUnmarsh(moduleDescriptor, false);\r
-       }\r
-\r
-       public void testMarshUnmarshMini() throws Exception {\r
-               ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();\r
-               moduleDescriptor.setName("test.moodule");\r
-               moduleDescriptor.setVersion("1.0.0");\r
-               marshUnmarsh(moduleDescriptor, false);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java
deleted file mode 100644 (file)
index 317d019..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.castor;\r
-\r
-import org.argeo.slc.msg.ObjectList;\r
-import org.argeo.slc.msg.build.ModularDistributionDescriptor;\r
-\r
-public class ModularDistributionCastorTest extends AbstractCastorTestCase {\r
-       public void testModularDistributionDescriptor() throws Exception {\r
-               ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();\r
-               mdd.setName("name");\r
-               mdd.setVersion("0.1.0");\r
-               mdd.getModulesDescriptors().put("eclipse",\r
-                               "http://localhost/updateSite");\r
-               mdd.getModulesDescriptors().put("modularDistribution",\r
-                               "http://localhost/modularDistribution");\r
-\r
-               marshUnmarsh(mdd, false);\r
-       }\r
-\r
-       public void testModularDistributionDescriptorList() throws Exception {\r
-               ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();\r
-               mdd.setName("name");\r
-               mdd.setVersion("0.1.0");\r
-               mdd.getModulesDescriptors().put("eclipse",\r
-                               "http://localhost/updateSite");\r
-               mdd.getModulesDescriptors().put("modularDistribution",\r
-                               "http://localhost/modularDistribution");\r
-\r
-               ModularDistributionDescriptor mdd2 = new ModularDistributionDescriptor();\r
-               mdd2.setName("name2");\r
-               mdd2.setVersion("0.1.1");\r
-               mdd2.getModulesDescriptors().put("eclipse",\r
-                               "http://localhost/updateSite2");\r
-               mdd2.getModulesDescriptors().put("modularDistribution",\r
-                               "http://localhost/modularDistribution2");\r
-\r
-               ObjectList ol = new ObjectList();\r
-               ol.getObjects().add(mdd);\r
-               ol.getObjects().add(mdd2);\r
-\r
-               marshUnmarsh(ol, false);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java
deleted file mode 100644 (file)
index b01d9a7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.castor;
-
-import org.argeo.slc.msg.ObjectList;
-import org.argeo.slc.runtime.SlcAgentDescriptor;
-
-public class ObjectListCastorTest extends AbstractCastorTestCase {
-
-       public void testAgentDescriptorList() throws Exception {
-               SlcAgentDescriptor agentDescriptor = SlcAgentDescriptorCastorTest
-                               .createMiniAgentDescriptor();
-               ObjectList lst = new ObjectList();
-               lst.getObjects().add(agentDescriptor);
-               ObjectList lstUnm = (ObjectList) marshUnmarsh(lst, false);
-               assertEquals(1, lstUnm.getObjects().size());
-       }
-}
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java
deleted file mode 100644 (file)
index 0367da7..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.castor;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.argeo.slc.execution.ExecutionModuleDescriptor;\r
-import org.argeo.slc.runtime.SlcAgentDescriptor;\r
-\r
-public class SlcAgentDescriptorCastorTest extends AbstractCastorTestCase {\r
-       public void testMarshUnmarshMini() throws Exception {\r
-               SlcAgentDescriptor agentDescriptor = createMiniAgentDescriptor();\r
-               SlcAgentDescriptor agentDescriptorUnm = marshUnmarsh(agentDescriptor,\r
-                               false);\r
-               assertSlcAgentDescriptor(agentDescriptor, agentDescriptorUnm);\r
-       }\r
-\r
-       public void testMarshUnmarshWithModuleDescriptor() throws Exception {\r
-               SlcAgentDescriptor agentDescriptor = createMiniAgentDescriptor();\r
-\r
-               List<ExecutionModuleDescriptor> lst = new ArrayList<ExecutionModuleDescriptor>();\r
-               ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();\r
-               moduleDescriptor.setName("test.moodule");\r
-               moduleDescriptor.setVersion("1.0.0");\r
-               lst.add(moduleDescriptor);\r
-               agentDescriptor.setModuleDescriptors(lst);\r
-\r
-               SlcAgentDescriptor agentDescriptorUnm = marshUnmarsh(agentDescriptor,\r
-                               false);\r
-               assertSlcAgentDescriptor(agentDescriptor, agentDescriptorUnm);\r
-       }\r
-\r
-       protected static SlcAgentDescriptor createMiniAgentDescriptor() {\r
-               SlcAgentDescriptor agentDescriptor = new SlcAgentDescriptor();\r
-               agentDescriptor.setHost("localhost");\r
-               agentDescriptor.setUuid("555");\r
-               return agentDescriptor;\r
-       }\r
-\r
-       protected static void assertSlcAgentDescriptor(SlcAgentDescriptor expected,\r
-                       SlcAgentDescriptor reached) {\r
-               assertNotNull(reached);\r
-               assertEquals(expected.getHost(), reached.getHost());\r
-               assertEquals(expected.getUuid(), expected.getUuid());\r
-               assertEquals(expected.getModuleDescriptors().size(), reached\r
-                               .getModuleDescriptors().size());\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java
deleted file mode 100644 (file)
index 44794e1..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.castor;\r
-\r
-import java.text.SimpleDateFormat;\r
-import java.util.UUID;\r
-\r
-import org.argeo.slc.msg.process.SlcExecutionRequest;\r
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.process.SlcExecutionStep;\r
-import org.argeo.slc.unit.process.SlcExecutionTestUtils;\r
-import org.springframework.xml.transform.StringResult;\r
-\r
-public class SlcExecutionCastorTest extends AbstractCastorTestCase {\r
-       public void testMarshalling() throws Exception {\r
-               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
-\r
-               SlcExecutionRequest msgSave = new SlcExecutionRequest();\r
-               msgSave.setSlcExecution(slcExec);\r
-\r
-               StringResult msgSaveXml = marshalAndValidate(msgSave);\r
-\r
-               SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");\r
-               SlcExecutionStep step0 = new SlcExecutionStep();\r
-               step0.setUuid(UUID.randomUUID().toString());\r
-               step0.setTimestamp(sdf.parse("2008-04-17 18:21"));\r
-               step0.setType("LOG");\r
-               step0.addLog("A log message\nand another line");\r
-\r
-               SlcExecutionStep step1 = new SlcExecutionStep();\r
-               step1.setUuid(UUID.randomUUID().toString());\r
-               step1.setTimestamp(sdf.parse("2008-04-17 18:25"));\r
-               step1.setType("LOG");\r
-               step1.addLog("A nother log message");\r
-\r
-               SlcExecutionStepsRequest msgNotif = new SlcExecutionStepsRequest();\r
-               msgNotif.addStep(step0);\r
-               msgNotif.addStep(step1);\r
-               msgNotif.setSlcExecutionUuid(slcExec.getUuid());\r
-\r
-               StringResult msgNotifXml = marshalAndValidate(msgNotif);\r
-\r
-               SlcExecutionRequest msgSaveUnm = unmarshal(msgSaveXml);\r
-               assertNotNull(msgSaveUnm);\r
-               SlcExecutionTestUtils.assertSlcExecution(slcExec, msgSaveUnm\r
-                               .getSlcExecution());\r
-\r
-               SlcExecutionStepsRequest msgNotifUnm = unmarshal(msgNotifXml);\r
-               assertNotNull(msgNotifUnm);\r
-               assertEquals(slcExec.getUuid(), msgNotifUnm.getSlcExecutionUuid());\r
-               assertEquals(2, msgNotifUnm.getSteps().size());\r
-               SlcExecutionTestUtils.assertSlcExecutionStep(step0, msgNotifUnm\r
-                               .getSteps().get(0));\r
-               SlcExecutionTestUtils.assertSlcExecutionStep(step1, msgNotifUnm\r
-                               .getSteps().get(1));\r
-\r
-               SlcExecution slcExecUnm = msgSaveUnm.getSlcExecution();\r
-               slcExecUnm.getSteps().addAll(msgNotifUnm.getSteps());\r
-\r
-               SlcExecutionRequest msgUpdate = new SlcExecutionRequest();\r
-               msgUpdate.setSlcExecution(slcExecUnm);\r
-               StringResult msgUpdateXml = marshalAndValidate(msgUpdate);\r
-\r
-               SlcExecutionRequest msgUpdateUnm = unmarshal(msgUpdateXml);\r
-               assertNotNull(msgUpdateUnm);\r
-       }\r
-\r
-       public void testMarshUnmarsh() throws Exception {\r
-               SlcExecution slcExec = SlcExecutionTestUtils\r
-                               .createSlcExecutionWithRealizedFlows();\r
-               marshUnmarsh(slcExec, false);\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java
deleted file mode 100644 (file)
index 7d6d6e9..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.castor;\r
-\r
-import static org.argeo.slc.unit.UnitUtils.assertDateSec;\r
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createCompleteTreeTestResult;\r
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartRequest;\r
-\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
-import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
-import org.springframework.xml.transform.StringResult;\r
-\r
-public class TreeTestResultCastorTest extends AbstractCastorTestCase {\r
-       public void testMarshUnmarsh() throws Exception {\r
-               TreeTestResult ttr = createCompleteTreeTestResult();\r
-\r
-               StringResult xml = marshalAndValidate(ttr);\r
-\r
-               TreeTestResult ttrUnm = unmarshal(xml);\r
-\r
-               UnitTestTreeUtil.assertTreeTestResult(ttr, ttrUnm);\r
-       }\r
-\r
-       public void testCreateTreeTestResultRequest() throws Exception {\r
-               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest();\r
-               req.setTreeTestResult(createCompleteTreeTestResult());\r
-\r
-               StringResult xml = marshalAndValidate(req);\r
-\r
-               CreateTreeTestResultRequest reqUnm = unmarshal(xml);\r
-\r
-               UnitTestTreeUtil.assertTreeTestResult(req.getTreeTestResult(), reqUnm\r
-                               .getTreeTestResult());\r
-       }\r
-\r
-       public void testResultPartRequest() throws Exception {\r
-               TreeTestResult ttr = createCompleteTreeTestResult();\r
-               ResultPartRequest req = createSimpleResultPartRequest(ttr);\r
-\r
-               StringResult xml = marshalAndValidate(req);\r
-\r
-               ResultPartRequest reqUnm = unmarshal(xml);\r
-\r
-               UnitTestTreeUtil\r
-                               .assertPart(req.getResultPart(), reqUnm.getResultPart());\r
-       }\r
-\r
-       public void testCloseTreeTestResultRequest() throws Exception {\r
-               TreeTestResult ttr = createCompleteTreeTestResult();\r
-               ttr.close();\r
-\r
-               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(ttr\r
-                               .getUuid(), ttr.getCloseDate());\r
-\r
-               StringResult xml = marshalAndValidate(req);\r
-\r
-               CloseTreeTestResultRequest reqUnm = unmarshal(xml);\r
-\r
-               assertEquals(ttr.getUuid(), reqUnm.getResultUuid());\r
-               assertDateSec(ttr.getCloseDate(), ttr.getCloseDate());\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java
deleted file mode 100644 (file)
index 46fc836..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.castor;\r
-\r
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createCompleteTreeTestResult;\r
-\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
-import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
-import org.springframework.xml.transform.StringResult;\r
-\r
-public class TreeTestResultCollectionCastorTest extends AbstractCastorTestCase {\r
-       public void testMarshUnmarsh() throws Exception {\r
-               TreeTestResult ttr = createCompleteTreeTestResult();\r
-               TreeTestResult ttr2 = createCompleteTreeTestResult();\r
-\r
-               TreeTestResultCollection ttrc = new TreeTestResultCollection();\r
-               ttrc.setId("testCollection");\r
-               ttrc.getResults().add(ttr);\r
-               ttrc.getResults().add(ttr2);\r
-\r
-               StringResult xml = marshalAndValidate(ttrc);\r
-\r
-               TreeTestResultCollection ttrcUnm = unmarshal(xml);\r
-\r
-               assertEquals(ttrc.getId(), ttrcUnm.getId());\r
-               assertEquals(ttrc.getResults().size(), ttrcUnm.getResults().size());\r
-               for (TreeTestResult ttrT : ttrc.getResults()) {\r
-                       if (ttrT.getUuid().equals(ttr.getUuid()))\r
-                               UnitTestTreeUtil.assertTreeTestResult(ttr, ttrT);\r
-                       else\r
-                               UnitTestTreeUtil.assertTreeTestResult(ttr2, ttrT);\r
-               }\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties b/runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties
deleted file mode 100644 (file)
index 0133bab..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Set root logger level to DEBUG and its only appender to A1.\r
-log4j.rootLogger=WARN, console\r
-\r
-## Levels\r
-# Slc\r
-log4j.logger.org.argeo=DEBUG\r
-\r
-# Castor\r
-log4j.logger.org.exolab.castor=WARN\r
-\r
-# Spring\r
-log4j.logger.org.springframework=WARN\r
-\r
-\r
-## Appenders\r
-# A1 is set to be a ConsoleAppender.\r
-log4j.appender.console=org.apache.log4j.ConsoleAppender\r
-\r
-# A1 uses PatternLayout.\r
-log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
-\r
diff --git a/runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml b/runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml
deleted file mode 100644 (file)
index c479075..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <import resource="classpath:/org/argeo/slc/xml/spring.xml" />\r
-       <import resource="classpath:/org/argeo/slc/castor/spring.xml" />\r
-\r
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/.classpath b/runtime/org.argeo.slc.support.hibernate/.classpath
deleted file mode 100644 (file)
index 26b3494..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry kind="src" output="target/classes" path="src/main/java"/>\r
-       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>\r
-       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>\r
-       <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
diff --git a/runtime/org.argeo.slc.support.hibernate/.project b/runtime/org.argeo.slc.support.hibernate/.project
deleted file mode 100644 (file)
index 0805101..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.support.hibernate</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.jdt.core.prefs b/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index b5feaf2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri Aug 29 11:24:23 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.pde.core.prefs b/runtime/org.argeo.slc.support.hibernate/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index 0572a4a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Feb 14 20:13:33 CET 2011
-eclipse.preferences.version=1
-selfhosting.binExcludes=/org.argeo.slc.support.hibernate/target/test-classes,/org.argeo.slc.support.hibernate/target/test-classes
diff --git a/runtime/org.argeo.slc.support.hibernate/build.properties b/runtime/org.argeo.slc.support.hibernate/build.properties
deleted file mode 100644 (file)
index 0f69dad..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-additional.bundles = org.springframework.transaction,\
-                     org.argeo.slc.unit,\
-                     junit,\
-                     org.springframework.oxm,\
-                     org.springframework.xml,\
-                     org.dom4j,\
-                     org.springframework.jdbc,\
-                     org.springframework.context.support,\
-                     net.sf.ehcache,\
-                     org.hsqldb,\
-                     org.apache.commons.collections,\
-                     antlr,\
-                     org.argeo.slc.support.castor,\
-                     org.castor,\
-                     org.apache.xml.serializer,\
-                     org.apache.xerces,\
-                     org.h2
-source.. = src/main/java/,\
-           src/main/resources/,\
-           src/test/java/,\
-           src/test/resources/
diff --git a/runtime/org.argeo.slc.support.hibernate/pom.xml b/runtime/org.argeo.slc.support.hibernate/pom.xml
deleted file mode 100644 (file)
index d996e2f..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>runtime</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <groupId>org.argeo.slc.runtime</groupId>
-       <artifactId>org.argeo.slc.support.hibernate</artifactId>
-       <name>SLC Support Hibernate</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Fragment-Host>org.argeo.slc.core</Fragment-Host>
-                                               <Import-Package>!org.argeo.slc.core.*,org.hibernate.proxy,javassist.util.proxy,*</Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-surefire-plugin</artifactId>
-                               <configuration>
-                                       <!-- FIXME java.lang.NoClassDefFoundError: javax/transaction/TransactionManager -->
-                                       <skipTests>true</skipTests>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-       <dependencies>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.core</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.hibernate</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>net.sf.ehcache</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>edu.emory.mathcs.backport</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.orm</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.jdbc</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.context.support</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.transaction</artifactId>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.apache.commons.dbcp</artifactId>
-               </dependency>
-
-               <!-- Unit Tests -->
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.unit</artifactId>
-                       <scope>test</scope>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.castor</artifactId>
-                       <scope>test</scope>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.hsqldb</artifactId>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.h2</artifactId>
-                       <scope>test</scope>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/assembly/base.xml b/runtime/org.argeo.slc.support.hibernate/src/assembly/base.xml
deleted file mode 100644 (file)
index c135b91..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<assembly xmlns="http://maven.apache.org/POM/4.0.0"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">\r
-       <id>base</id>\r
-       <includeBaseDirectory>false</includeBaseDirectory>\r
-       <formats>\r
-               <format>zip</format>\r
-       </formats>\r
-       <fileSets>\r
-               <fileSet>\r
-                       <directory>src/base</directory>\r
-                       <outputDirectory></outputDirectory>\r
-               </fileSet>\r
-       </fileSets>\r
-</assembly>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc b/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc
deleted file mode 100644 (file)
index bcc63c8..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-#! /bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Extract launch and ant arguments, (see details below).
-ant_exec_args=
-no_config=false
-use_jikes_default=false
-ant_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--usejikes" ] ; then
-    use_jikes_default=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    ant_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    ant_exec_args="$ant_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    ant_exec_args="$ant_exec_args \"$arg\""
-  fi
-done
-
-# Source/default ant configuration
-if $no_config ; then
-  rpm_mode=false
-  usejikes=$use_jikes_default
-else
-  # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
-  if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then
-      if [ -f "/etc/ant.conf" ] ; then
-          . /etc/ant.conf
-      fi
-  fi
-
-  # load user ant configuration
-  if [ -f "$HOME/.ant/ant.conf" ] ; then
-    . $HOME/.ant/ant.conf
-  fi
-  if [ -f "$HOME/.antrc" ] ; then
-    . "$HOME/.antrc"
-  fi
-
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
-
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    # IBM's JDK on AIX uses strange locations for the executables
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    elif [ -x "$JAVA_HOME/jre/bin/java" ] ; then
-      JAVACMD="$JAVA_HOME/jre/bin/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# Build local classpath using just the launcher in non-rpm mode or
-# use the Jpackage helper in rpm mode with basic and default jars
-# specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME/lib will also be included, but this
-# is discouraged as it is not java-version safe. A user should
-# request optional jars and their dependencies via the OPT_JAR_LIST
-# variable
-if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-
-  # If no optional jars have been specified then build the default list
-  if [ -z "$OPT_JAR_LIST" ] ; then
-    for file in /etc/ant.d/*; do
-      if [ -f "$file" ]; then
-        case "$file" in
-        *~) ;;
-        *#*) ;;
-        *.rpmsave) ;;
-        *.rpmnew) ;;
-        *)
-          for dep in `cat "$file"`; do
-            case "$OPT_JAR_LIST" in
-            *"$dep"*) ;;
-            *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
-            esac
-          done
-        esac
-      fi
-    done
-  fi
-
-  # If the user requested to try to add some other jars to the classpath
-  if [ -n "$OPT_JAR_LIST" ] ; then
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
-    if [ -n "$_OPTCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
-    fi
-  fi
-
-  # Explicitly add javac path to classpath, assume JAVA_HOME set
-  # properly in rpm mode
-  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
-  fi
-  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
-  fi
-
-  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-  # user CLASSPATH first and ant-found jars after.
-  # In that case, the user CLASSPATH will override ant-found jars
-  #
-  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-  # with ant-found jars first and user CLASSPATH after
-  if [ -n "$CLASSPATH" ] ; then
-    # merge local and specified classpath 
-    if [ -z "$LOCALCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$CLASSPATH"
-    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-    else
-      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-    fi
-
-    # remove class path from launcher -cp option
-    CLASSPATH=""
-  fi
-else
-  # not using rpm_mode; use launcher to determine classpaths
-  if [ -z "$LOCALCLASSPATH" ] ; then
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
-  else
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
-  fi
-fi
-
-if [ -n "$JAVA_HOME" ] ; then
-  # OSX hack to make Ant work with jikes
-  if $darwin ; then
-    OSXHACK="${JAVA_HOME}/../Classes"
-    if [ -d "${OSXHACK}" ] ; then
-      for i in "${OSXHACK}"/*.jar
-      do
-        JIKESPATH="$JIKESPATH:$i"
-      done
-    fi
-  fi
-fi
-
-# Allow Jikes support (off by default)
-if $usejikes; then
-  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
-  echo 'Script Options:'
-  echo '  --help, --h            print this message and ant help'
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
-  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
-  echo '                         configuration files'
-  echo '  --usejikes             enable use of jikes by default, unless'
-  echo '                         set explicitly in configuration files'
-  echo '  --execdebug            print ant exec line generated by this'
-  echo '                         launch script'
-  echo '  '
-fi
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$ANT_HOME" in
-    *\\ )
-    ANT_HOME="$ANT_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$JIKESPATH" in
-    *\\ )
-    JIKESPATH="$JIKESPATH\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-# Execute ant using eval/exec to preserve spaces in paths,
-# java options, and ant args
-ant_sys_opts=
-if [ -n "$CYGHOME" ]; then
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
-  else
-    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-else
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
-  fi
-fi
-ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
-if $ant_exec_debug ; then
-    echo $ant_exec_command
-fi
-eval $ant_exec_command
diff --git a/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc.bat b/runtime/org.argeo.slc.support.hibernate/src/base/bin/slc.bat
deleted file mode 100644 (file)
index f8fb7d5..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-@echo off\r
-\r
-REM  Licensed to the Apache Software Foundation (ASF) under one or more\r
-REM  contributor license agreements.  See the NOTICE file distributed with\r
-REM  this work for additional information regarding copyright ownership.\r
-REM  The ASF licenses this file to You under the Apache License, Version 2.0\r
-REM  (the "License"); you may not use this file except in compliance with\r
-REM  the License.  You may obtain a copy of the License at\r
-REM \r
-REM      http://www.apache.org/licenses/LICENSE-2.0\r
-REM \r
-REM  Unless required by applicable law or agreed to in writing, software\r
-REM  distributed under the License is distributed on an "AS IS" BASIS,\r
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-REM  See the License for the specific language governing permissions and\r
-REM  limitations under the License.\r
-\r
-REM This is an inordinately troublesome piece of code, particularly because it\r
-REM tries to work on both Win9x and WinNT-based systems. If we could abandon '9x\r
-REM support, things would be much easier, but sadly, it is not yet time.\r
-REM Be cautious about editing this, and only add WinNT specific stuff in code that\r
-REM only runs on WinNT.\r
-\r
-if "%HOME%"=="" goto homeDrivePathPre\r
-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"\r
-\r
-:homeDrivePathPre\r
-if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre\r
-if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre\r
-if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"\r
-\r
-:userProfilePre\r
-if "%USERPROFILE%"=="" goto alpha\r
-if "%USERPROFILE%"=="%HOME%" goto alpha\r
-if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha\r
-if exist "%USERPROFILE%\antrc_pre.bat" call "%USERPROFILE%\antrc_pre.bat"\r
-\r
-:alpha\r
-\r
-if "%OS%"=="Windows_NT" @setlocal\r
-if "%OS%"=="WINNT" @setlocal\r
-\r
-if "%ANT_HOME%"=="" goto setDefaultAntHome\r
-\r
-:stripAntHome\r
-if not _%ANT_HOME:~-1%==_\ goto checkClasspath\r
-set ANT_HOME=%ANT_HOME:~0,-1%\r
-goto stripAntHome\r
-\r
-:setDefaultAntHome\r
-rem %~dp0 is expanded pathname of the current script under NT\r
-set ANT_HOME=%~dp0..\r
-\r
-:checkClasspath\r
-set _USE_CLASSPATH=yes\r
-rem CLASSPATH must not be used if it is equal to ""\r
-if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no\r
-if "%CLASSPATH%"=="" set _USE_CLASSPATH=no\r
-\r
-rem Slurp the command line arguments. This loop allows for an unlimited number\r
-rem of arguments (up to the command line limit, anyway).\r
-set ANT_CMD_LINE_ARGS=%1\r
-if ""%1""=="""" goto doneStart\r
-shift\r
-:setupArgs\r
-if ""%1""=="""" goto doneStart\r
-if ""%1""==""-noclasspath"" goto clearclasspath\r
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1\r
-shift\r
-goto setupArgs\r
-\r
-rem here is there is a -noclasspath in the options\r
-:clearclasspath\r
-set _USE_CLASSPATH=no\r
-shift\r
-goto setupArgs\r
-\r
-rem This label provides a place for the argument list loop to break out\r
-rem and for NT handling to skip to.\r
-\r
-:doneStart\r
-\r
-if _USE_CLASSPATH==no goto findAntHome\r
-\r
-:stripClasspath\r
-if not _%CLASSPATH:~-1%==_\ goto findAntHome\r
-set CLASSPATH=%CLASSPATH:~0,-1%\r
-goto stripClasspath\r
-\r
-:findAntHome\r
-rem find ANT_HOME if it does not exist due to either an invalid value passed\r
-rem by the user or the %0 problem on Windows 9x\r
-if exist "%ANT_HOME%\lib\ant.jar" goto checkJava\r
-\r
-rem check for ant in Program Files\r
-if not exist "%ProgramFiles%\ant" goto checkSystemDrive\r
-set ANT_HOME=%ProgramFiles%\ant\r
-goto checkJava\r
-\r
-:checkSystemDrive\r
-rem check for ant in root directory of system drive\r
-if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive\r
-set ANT_HOME=%SystemDrive%\ant\r
-goto checkJava\r
-\r
-:checkCDrive\r
-rem check for ant in C:\ant for Win9X users\r
-if not exist C:\ant\lib\ant.jar goto noAntHome\r
-set ANT_HOME=C:\ant\r
-goto checkJava\r
-\r
-:noAntHome\r
-echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.\r
-goto end\r
-\r
-:checkJava\r
-set _JAVACMD=%JAVACMD%\r
-\r
-if "%JAVA_HOME%" == "" goto noJavaHome\r
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome\r
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe\r
-goto checkJikes\r
-\r
-:noJavaHome\r
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe\r
-\r
-:checkJikes\r
-if not "%JIKESPATH%"=="" goto runAntWithJikes\r
-\r
-:runAnt\r
-if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath\r
-:runAntWithClasspath\r
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%\r
-rem Check the error code of the Ant build\r
-if not "%OS%"=="Windows_NT" goto onError\r
-set ANT_ERROR=%ERRORLEVEL%\r
-goto end\r
-\r
-:runAntNoClasspath\r
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%\r
-rem Check the error code of the Ant build\r
-if not "%OS%"=="Windows_NT" goto onError\r
-set ANT_ERROR=%ERRORLEVEL%\r
-goto end\r
-\r
-:runAntWithJikes\r
-\r
-if not _%JIKESPATH:~-1%==_\ goto checkJikesAndClasspath\r
-set JIKESPATH=%JIKESPATH:~0,-1%\r
-goto runAntWithJikes\r
-\r
-:checkJikesAndClasspath\r
-\r
-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath\r
-\r
-:runAntWithJikesAndClasspath\r
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%\r
-rem Check the error code of the Ant build\r
-if not "%OS%"=="Windows_NT" goto onError\r
-set ANT_ERROR=%ERRORLEVEL%\r
-goto end\r
-\r
-:runAntWithJikesNoClasspath\r
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%\r
-rem Check the error code of the Ant build\r
-if not "%OS%"=="Windows_NT" goto onError\r
-set ANT_ERROR=%ERRORLEVEL%\r
-goto end\r
-\r
-:onError\r
-rem Windows 9x way of checking the error code.  It matches via brute force.\r
-for %%i in (1 10 100) do set err%%i=\r
-for %%i in (0 1 2) do if errorlevel %%i00 set err100=%%i\r
-if %err100%==2 goto onError200\r
-if %err100%==0 set err100=\r
-for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%%i0 set err10=%%i\r
-if "%err100%"=="" if %err10%==0 set err10=\r
-:onError1\r
-for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%err10%%%i set err1=%%i\r
-goto onErrorEnd\r
-:onError200\r
-for %%i in (0 1 2 3 4 5) do if errorlevel 2%%i0 set err10=%%i\r
-if err10==5 for %%i in (0 1 2 3 4 5) do if errorlevel 25%%i set err1=%%i\r
-if not err10==5 goto onError1\r
-:onErrorEnd\r
-set ANT_ERROR=%err100%%err10%%err1%\r
-for %%i in (1 10 100) do set err%%i=\r
-\r
-:end\r
-rem bug ID 32069: resetting an undefined env variable changes the errorlevel.\r
-if not "%_JAVACMD%"=="" set _JAVACMD=\r
-if not "%_ANT_CMD_LINE_ARGS%"=="" set ANT_CMD_LINE_ARGS=\r
-\r
-if "%ANT_ERROR%"=="0" goto mainEnd\r
-\r
-rem Set the return code if we are not in NT.  We can only set\r
-rem a value of 1, but it's better than nothing.\r
-if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1\r
-\r
-rem Set the ERRORLEVEL if we are running NT.\r
-if "%OS%"=="Windows_NT" color 00\r
-\r
-goto omega\r
-\r
-:mainEnd\r
-\r
-rem If there were no errors, we run the post script.\r
-if "%OS%"=="Windows_NT" @endlocal\r
-if "%OS%"=="WINNT" @endlocal\r
-\r
-if "%HOME%"=="" goto homeDrivePathPost\r
-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"\r
-\r
-:homeDrivePathPost\r
-if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost\r
-if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost\r
-if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"\r
-\r
-:userProfilePost\r
-if "%USERPROFILE%"=="" goto omega\r
-if "%USERPROFILE%"=="%HOME%" goto omega\r
-if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega\r
-if exist "%USERPROFILE%\antrc_post.bat" call "%USERPROFILE%\antrc_post.bat"\r
-\r
-:omega\r
-\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/process/SlcExecutionDaoHibernate.java b/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/process/SlcExecutionDaoHibernate.java
deleted file mode 100644 (file)
index f581f92..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.process;\r
-\r
-import java.sql.SQLException;\r
-import java.util.List;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.dao.process.SlcExecutionDao;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.process.SlcExecutionStep;\r
-import org.hibernate.HibernateException;\r
-import org.hibernate.Session;\r
-import org.springframework.orm.hibernate3.HibernateCallback;\r
-import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
-\r
-public class SlcExecutionDaoHibernate extends HibernateDaoSupport implements\r
-               SlcExecutionDao {\r
-       private final static Log log = LogFactory\r
-                       .getLog(SlcExecutionDaoHibernate.class);\r
-\r
-       public void create(SlcExecution slcExecution) {\r
-               getHibernateTemplate().save(slcExecution);\r
-       }\r
-\r
-       public void update(final SlcExecution slcExecution) {\r
-               getHibernateTemplate().update(slcExecution);\r
-       }\r
-\r
-       public void merge(final SlcExecution slcExecution) {\r
-               getHibernateTemplate().merge(slcExecution);\r
-       }\r
-\r
-       public SlcExecution getSlcExecution(String uuid) {\r
-               return (SlcExecution) getHibernateTemplate().get(SlcExecution.class,\r
-                               uuid);\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<SlcExecution> listSlcExecutions() {\r
-               return (List<SlcExecution>) getHibernateTemplate().loadAll(\r
-                               SlcExecution.class);\r
-       }\r
-\r
-       public void addSteps(final String slcExecutionId,\r
-                       final List<SlcExecutionStep> additionalSteps) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               SlcExecution slcExecution = getSlcExecution(session,\r
-                                               slcExecutionId);\r
-                               slcExecution.getSteps().addAll(additionalSteps);\r
-                               session.update(slcExecution);\r
-                               return slcExecution;\r
-                       }\r
-               });\r
-\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<SlcExecutionStep> tailSteps(final String slcExecutionId,\r
-                       final Integer nbrOfSteps) {\r
-               return (List<SlcExecutionStep>) getHibernateTemplate().execute(\r
-                               new HibernateCallback() {\r
-\r
-                                       public Object doInHibernate(Session session)\r
-                                                       throws HibernateException, SQLException {\r
-                                               SlcExecution slcExecution = getSlcExecution(session,\r
-                                                               slcExecutionId);\r
-                                               // TODO: do a query count() instead?\r
-                                               int stepCount = slcExecution.getSteps().size();\r
-                                               if (stepCount > nbrOfSteps) {\r
-                                                       return session.createFilter(\r
-                                                                       slcExecution.getSteps(), "")\r
-                                                                       .setFirstResult(stepCount - nbrOfSteps)\r
-                                                                       .setMaxResults(nbrOfSteps).list();\r
-                                               } else {\r
-                                                       return slcExecution.getSteps();\r
-                                               }\r
-                                       }\r
-                               });\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<SlcExecutionStep> tailSteps(final String slcExecutionId,\r
-                       final String slcExecutionStepId) {\r
-               Object[] values = { slcExecutionStepId, slcExecutionId };\r
-               List<Integer> indexes = getHibernateTemplate().findByNamedQuery(\r
-                               SlcExecutionStep.class.getName() + ".stepIndex", values);\r
-\r
-               Integer index = indexes.get(0);\r
-               if (log.isTraceEnabled()){\r
-                       log.trace(indexes.size());\r
-                       log.trace("Index " + index + " for step " + slcExecutionStepId\r
-                                       + " in process " + slcExecutionId);\r
-               }\r
-               Object[] values2 = { slcExecutionId, index };\r
-               return getHibernateTemplate().findByNamedQuery(\r
-                               SlcExecutionStep.class.getName() + ".stepsAfter", values2);\r
-       }\r
-\r
-       protected SlcExecution getSlcExecution(Session session,\r
-                       String slcExecutionId) {\r
-               SlcExecution slcExecution = (SlcExecution) session.get(\r
-                               SlcExecution.class, slcExecutionId);\r
-\r
-               if (slcExecution == null)\r
-                       throw new SlcException("Could not find SLC execution "\r
-                                       + slcExecutionId);\r
-\r
-               return slcExecution;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/runtime/SlcAgentDescriptorDaoHibernate.java b/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/runtime/SlcAgentDescriptorDaoHibernate.java
deleted file mode 100644 (file)
index 5e09059..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.runtime;\r
-\r
-import java.util.List;\r
-\r
-import org.argeo.slc.dao.runtime.SlcAgentDescriptorDao;\r
-import org.argeo.slc.runtime.SlcAgentDescriptor;\r
-import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
-\r
-public class SlcAgentDescriptorDaoHibernate extends HibernateDaoSupport\r
-               implements SlcAgentDescriptorDao {\r
-\r
-       public void create(SlcAgentDescriptor slcAgentDescriptor) {\r
-               getHibernateTemplate().save(slcAgentDescriptor);\r
-       }\r
-\r
-       public void delete(SlcAgentDescriptor slcAgentDescriptor) {\r
-               getHibernateTemplate().delete(slcAgentDescriptor);\r
-       }\r
-\r
-       public void delete(String agentId) {\r
-               Object obj = getHibernateTemplate().get(SlcAgentDescriptor.class,\r
-                               agentId);\r
-               if (obj != null)\r
-                       getHibernateTemplate().delete(obj);\r
-       }\r
-\r
-       public SlcAgentDescriptor getAgentDescriptor(String agentId) {\r
-\r
-               return (SlcAgentDescriptor) getHibernateTemplate().get(\r
-                               SlcAgentDescriptor.class, agentId);\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<SlcAgentDescriptor> listSlcAgentDescriptors() {\r
-               return (List<SlcAgentDescriptor>) getHibernateTemplate().loadAll(\r
-                               SlcAgentDescriptor.class);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/TestRunDescriptorDaoHibernate.java b/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/TestRunDescriptorDaoHibernate.java
deleted file mode 100644 (file)
index 3ddf0e1..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.test;\r
-\r
-import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
-\r
-import org.argeo.slc.dao.test.TestRunDescriptorDao;\r
-import org.argeo.slc.test.TestRunDescriptor;\r
-\r
-public class TestRunDescriptorDaoHibernate extends HibernateDaoSupport\r
-               implements TestRunDescriptorDao {\r
-\r
-       public TestRunDescriptor getTestRunDescriptor(String id) {\r
-               return (TestRunDescriptor) getHibernateTemplate().get(\r
-                               TestRunDescriptor.class, id);\r
-       }\r
-\r
-       public void saveOrUpdate(TestRunDescriptor testRunDescriptor) {\r
-               getHibernateTemplate().saveOrUpdate(testRunDescriptor);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernate.java b/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernate.java
deleted file mode 100644 (file)
index dc99dee..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.test.tree;\r
-\r
-import java.sql.SQLException;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.SortedSet;\r
-import java.util.TreeSet;\r
-\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.core.test.tree.ResultAttributes;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
-import org.hibernate.HibernateException;\r
-import org.hibernate.LockMode;\r
-import org.hibernate.Session;\r
-import org.springframework.orm.hibernate3.HibernateCallback;\r
-import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
-\r
-/** Hibernate implementation of collections DAO. */\r
-public class TreeTestResultCollectionDaoHibernate extends HibernateDaoSupport\r
-               implements TreeTestResultCollectionDao {\r
-\r
-       public void create(TreeTestResultCollection ttrCollection) {\r
-               getHibernateTemplate().save(ttrCollection);\r
-       }\r
-\r
-       public TreeTestResultCollection getTestResultCollection(String id) {\r
-               return (TreeTestResultCollection) getHibernateTemplate().get(\r
-                               TreeTestResultCollection.class, id);\r
-       }\r
-\r
-       public void update(TreeTestResultCollection ttrCollection) {\r
-               getHibernateTemplate().update(ttrCollection);\r
-       }\r
-\r
-       public void delete(TreeTestResultCollection ttrCollection) {\r
-               getHibernateTemplate().delete(ttrCollection);\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public SortedSet<TreeTestResultCollection> listCollections() {\r
-               return new TreeSet<TreeTestResultCollection>(getHibernateTemplate()\r
-                               .find("from TreeTestResultCollection"));\r
-       }\r
-\r
-       public void addResultToCollection(final TreeTestResultCollection ttrc,\r
-                       final String resultUuid) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.lock(ttrc, LockMode.NONE);\r
-                               TreeTestResult ttr = (TreeTestResult) session.get(\r
-                                               TreeTestResult.class, resultUuid);\r
-                               ttrc.getResults().add(ttr);\r
-                               session.update(ttrc);\r
-                               return ttrc;\r
-                       }\r
-               });\r
-       }\r
-\r
-       public void removeResultFromCollection(final TreeTestResultCollection ttrc,\r
-                       final String resultUuid) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.lock(ttrc, LockMode.NONE);\r
-                               TreeTestResult ttr = (TreeTestResult) session.get(\r
-                                               TreeTestResult.class, resultUuid);\r
-                               if (ttrc.getResults().remove(ttr))\r
-                                       session.update(ttrc);\r
-                               return ttrc;\r
-                       }\r
-               });\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<ResultAttributes> listResultAttributes(String collectionId) {\r
-               List<ResultAttributes> list;\r
-               if (collectionId == null)\r
-                       list = getHibernateTemplate().find(\r
-                                       "select new org.argeo.slc.core.test.tree.ResultAttributes(ttr)"\r
-                                                       + " from TreeTestResult ttr");\r
-               else\r
-                       list = getHibernateTemplate()\r
-                                       .find(\r
-                                                       "select new org.argeo.slc.core.test.tree.ResultAttributes(ttr) "\r
-                                                                       + " from TreeTestResult ttr, TreeTestResultCollection ttrc "\r
-                                                                       + " where ttr in elements(ttrc.results) and ttrc.id=?",\r
-                                                       collectionId);\r
-\r
-               return list;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<TreeTestResult> listResults(String collectionId,\r
-                       Map<String, String> attributes) {\r
-               List<TreeTestResult> list;\r
-\r
-               if (collectionId == null) {\r
-                       if (attributes == null || attributes.size() == 0)\r
-                               list = getHibernateTemplate().find("from TreeTestResult");\r
-                       else if (attributes.size() == 1) {\r
-                               Map.Entry<String, String> entry = attributes.entrySet()\r
-                                               .iterator().next();\r
-                               Object[] args = { entry.getKey(), entry.getValue() };\r
-                               list = getHibernateTemplate().find(\r
-                                               "select ttr from TreeTestResult ttr"\r
-                                                               + " where attributes[?]=?", args);\r
-                       } else {\r
-                               throw new SlcException(\r
-                                               "Multiple attributes filter are currently not supported.");\r
-                       }\r
-               } else {\r
-                       if (attributes == null || attributes.size() == 0)\r
-                               list = getHibernateTemplate()\r
-                                               .find(\r
-                                                               "select ttr "\r
-                                                                               + " from TreeTestResult ttr, TreeTestResultCollection ttrc "\r
-                                                                               + " where ttr in elements(ttrc.results) and ttrc.id=?",\r
-                                                               collectionId);\r
-                       else if (attributes.size() == 1) {\r
-                               Map.Entry<String, String> entry = attributes.entrySet()\r
-                                               .iterator().next();\r
-                               Object[] args = { collectionId, entry.getKey(),\r
-                                               entry.getValue() };\r
-                               list = getHibernateTemplate()\r
-                                               .find(\r
-                                                               "select ttr from TreeTestResult ttr, TreeTestResultCollection ttrc "\r
-                                                                               + " where ttr in elements(ttrc.results) and ttrc.id=?"\r
-                                                                               + " and attributes[?]=?", args);\r
-                       } else {\r
-                               throw new SlcException(\r
-                                               "Multiple attributes filter are currently not supported.");\r
-                       }\r
-               }\r
-               return list;\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernate.java b/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernate.java
deleted file mode 100644 (file)
index c25a156..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.test.tree;\r
-\r
-import java.sql.SQLException;\r
-import java.util.Date;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.SortedMap;\r
-\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.core.attachment.SimpleAttachment;\r
-import org.argeo.slc.core.structure.tree.TreeSPath;\r
-import org.argeo.slc.core.test.SimpleResultPart;\r
-import org.argeo.slc.core.test.tree.PartSubList;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
-import org.argeo.slc.structure.StructureElement;\r
-import org.argeo.slc.test.TestResult;\r
-import org.hibernate.HibernateException;\r
-import org.hibernate.Session;\r
-import org.springframework.orm.hibernate3.HibernateCallback;\r
-import org.springframework.orm.hibernate3.support.HibernateDaoSupport;\r
-import org.springframework.util.Assert;\r
-\r
-/**\r
- * The Hibernate implementation for tree-based result of the test result dao.\r
- * \r
- * @see TreeTestResult\r
- */\r
-public class TreeTestResultDaoHibernate extends HibernateDaoSupport implements\r
-               TreeTestResultDao {\r
-\r
-       public void create(TestResult testResult) {\r
-               getHibernateTemplate().save(testResult);\r
-       }\r
-\r
-       public void update(TestResult testResult) {\r
-               getHibernateTemplate().saveOrUpdate(testResult);\r
-       }\r
-\r
-       public TreeTestResult getTestResult(String uuid) {\r
-               List<?> list = getHibernateTemplate().find(\r
-                               "from TreeTestResult where uuid=?", uuid);\r
-               if (list.size() == 0) {\r
-                       return null;\r
-               } else {\r
-                       return (TreeTestResult) list.get(0);\r
-               }\r
-\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<TreeTestResult> listTestResults() {\r
-               return (List<TreeTestResult>) getHibernateTemplate().find(\r
-                               "from TreeTestResult");\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<TreeTestResult> listResults(TreeSPath path) {\r
-               List<TreeTestResult> list = getHibernateTemplate().find(\r
-                               "from TreeTestResult res where ? in indices(res.resultParts)",\r
-                               path.getAsUniqueString());\r
-               return list;\r
-       }\r
-\r
-       public void close(final String testResultId, final Date closeDate) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
-                                               testResultId);\r
-                               treeTestResult.setCloseDate(closeDate);\r
-                               session.update(treeTestResult);\r
-                               return treeTestResult;\r
-                       }\r
-               });\r
-       }\r
-\r
-       public void addResultPart(final String testResultId, final TreeSPath path,\r
-                       final SimpleResultPart resultPart,\r
-                       final Map<TreeSPath, StructureElement> relatedElements) {\r
-\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
-                                               testResultId);\r
-                               PartSubList lst = treeTestResult.getResultParts().get(path);\r
-                               if (lst == null) {\r
-                                       lst = new PartSubList();\r
-                                       treeTestResult.getResultParts().put(path, lst);\r
-                               }\r
-                               lst.getParts().add(resultPart);\r
-                               if (relatedElements != null)\r
-                                       treeTestResult.getElements().putAll(relatedElements);\r
-\r
-                               session.update(treeTestResult);\r
-                               return treeTestResult;\r
-                       }\r
-               });\r
-\r
-       }\r
-\r
-       public void addAttachment(final String testResultId,\r
-                       final SimpleAttachment attachment) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
-                                               testResultId);\r
-\r
-                               // Check is there is already such an attachment\r
-                               Assert.notNull(attachment, "attachment is null");\r
-                               Assert.notNull(session, "session is null");\r
-                               SimpleAttachment att = (SimpleAttachment) session.get(\r
-                                               attachment.getClass(), attachment.getUuid());\r
-                               if (att != null)\r
-                                       throw new SlcException(\r
-                                                       "There is already an attachement with id "\r
-                                                                       + attachment.getUuid());\r
-\r
-                               treeTestResult.getAttachments().add(attachment);\r
-                               session.update(treeTestResult);\r
-                               return treeTestResult;\r
-                       }\r
-               });\r
-\r
-       }\r
-\r
-       protected TreeTestResult getTreeTestResult(Session session,\r
-                       String testResultId) {\r
-               TreeTestResult treeTestResult = (TreeTestResult) session.get(\r
-                               TreeTestResult.class, testResultId);\r
-               if (treeTestResult == null)\r
-                       throw new SlcException("No result with id " + testResultId);\r
-               return treeTestResult;\r
-       }\r
-\r
-       public void updateAttributes(final String testResultId,\r
-                       final SortedMap<String, String> attributes) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               TreeTestResult treeTestResult = getTreeTestResult(session,\r
-                                               testResultId);\r
-                               treeTestResult.setAttributes(attributes);\r
-\r
-                               session.update(treeTestResult);\r
-                               return treeTestResult;\r
-                       }\r
-               });\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/package.html b/runtime/org.argeo.slc.support.hibernate/src/main/java/org/argeo/slc/hibernate/test/tree/package.html
deleted file mode 100644 (file)
index 6042b07..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>\r
-<head></head>\r
-<body>\r
-Hibernate based DAO implementations for tree-based SLC Test.\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml
deleted file mode 100644 (file)
index d35d9ff..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.core.attachment">\r
-       <class name="SimpleAttachment" table="SIMPLE_ATTACHMENT">\r
-               <cache usage="nonstrict-read-write" />\r
-               <id name="uuid" column="UUID" />
-               <property name="name" column="NAME" not-null="true" />\r
-               <property name="contentType" column="CONTENT_TYPE" not-null="true" />\r
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/dao.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/dao.xml
deleted file mode 100644 (file)
index baac403..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="true">
-
-       <bean id="slcTemplates.dao.testResultDao"
-               class="org.argeo.slc.hibernate.test.tree.TreeTestResultDaoHibernate"
-               abstract="true">
-       </bean>
-
-       <bean id="slcTemplates.dao.testResultCollectionDao"
-               class="org.argeo.slc.hibernate.test.tree.TreeTestResultCollectionDaoHibernate"
-               abstract="true">
-       </bean>
-
-       <bean id="slcTemplates.dao.testRunDescriptorDao"
-               class="org.argeo.slc.hibernate.test.TestRunDescriptorDaoHibernate"
-               abstract="true">
-       </bean>
-
-       <bean id="slcTemplates.dao.slcExecutionDao"
-               class="org.argeo.slc.hibernate.process.SlcExecutionDaoHibernate"
-               abstract="true">
-       </bean>
-
-       <bean id="slcTemplates.dao.slcAgentDescriptorDao"
-               class="org.argeo.slc.hibernate.runtime.SlcAgentDescriptorDaoHibernate"
-               abstract="true">
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/ehcache.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/ehcache.xml
deleted file mode 100644 (file)
index b097477..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:noNamespaceSchemaLocation="ehcache.xsd">
-
-       <diskStore path="java.io.tmpdir" />
-
-       <defaultCache maxElementsInMemory="10000" overflowToDisk="false" />
-
-       <cache name="org.argeo.slc.core.test.tree.TreeTestResult"
-               maxElementsInMemory="1000" />
-       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.attributes"
-               maxElementsInMemory="1000" />
-       <cache name="org.argeo.slc.core.test.tree.PartSubList"
-               maxElementsInMemory="5000" />
-       <cache name="org.argeo.slc.core.test.tree.PartSubList.parts"
-               maxElementsInMemory="10000" />
-       <cache name="org.argeo.slc.core.test.SimpleResultPart"
-               maxElementsInMemory="10000" />
-       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.resultParts"
-               maxElementsInMemory="10000" />
-       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.elements"
-               maxElementsInMemory="10000" />
-       <cache name="org.argeo.slc.core.structure.SimpleSElement"
-               maxElementsInMemory="10000" />
-       <cache name="org.argeo.slc.core.structure.SimpleSElement.tags"
-               maxElementsInMemory="20000" />
-
-       <cache name="org.argeo.slc.core.test.tree.TreeTestResultCollection"
-               maxElementsInMemory="100" />
-       <cache name="org.argeo.slc.core.test.tree.TreeTestResultCollection.results"
-               maxElementsInMemory="1000" />
-
-       <cache name="org.argeo.slc.process.SlcExecution"
-               maxElementsInMemory="1000" />
-       <cache name="org.argeo.slc.process.SlcExecution.attributes"
-               maxElementsInMemory="5000" />
-       <cache name="org.argeo.slc.process.SlcExecution.steps"
-               maxElementsInMemory="10000" />
-       <cache name="org.argeo.slc.process.SlcExecutionStep"
-               maxElementsInMemory="10000" />
-       <cache name="org.argeo.slc.process.SlcExecutionStep.logLines"
-               maxElementsInMemory="100000" />
-
-       <cache name="org.argeo.slc.test.TestRunDescriptor"
-               maxElementsInMemory="1000" />
-
-       <cache name="org.argeo.slc.runtime.SlcAgentDescriptor"
-               maxElementsInMemory="100" />
-
-       <cache name="org.argeo.slc.core.attachment.SimpleAttachment"
-               maxElementsInMemory="100000" />
-       <cache name="org.argeo.slc.core.test.tree.TreeTestResult.attachments"
-               maxElementsInMemory="100000" />
-
-</ehcache>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/RealizedFlow.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/RealizedFlow.hbm.xml
deleted file mode 100644 (file)
index c56231d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.process">\r
-       <class name="RealizedFlow" table="REALIZED_FLOW">\r
-               <cache usage="read-write" />\r
-\r
-               <id column="ID" />\r
-               <property name="moduleName" column="MODULE_NAME" />\r
-               <property name="moduleVersion" column="MODULE_VERSION" />\r
-\r
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml
deleted file mode 100644 (file)
index 526d6bf..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.process">\r
-       <class name="SlcExecution" table="SLC_EXECUTION">\r
-               <cache usage="read-write" />\r
-\r
-               <id name="uuid" column="UUID" />\r
-               <property name="host" column="HOST" />\r
-               <property name="user" column="USER" />\r
-               <property name="type" column="TYPE" />\r
-               <property name="status" column="STATUS" />
-               <property name="realizedFlowsXml" column="REALIZED_FLOWS_XML"
-                       type="text" />\r
-               <list name="steps" cascade="all" table="SLC_EXECUTIONS_STEPS"\r
-                       lazy="true">\r
-                       <cache usage="read-write" />\r
-                       <key column="SLC_EXECUTION_ID" />\r
-                       <list-index column="INDX" />\r
-                       <one-to-many class="org.argeo.slc.process.SlcExecutionStep" />
-               </list>
-
-               <map name="attributes" table="SLC_EXEC_ATTRS_MAP" cascade="all"
-                       lazy="false" sort="natural">
-                       <cache usage="read-write" />
-
-                       <key column="PARENT_ID" />
-                       <map-key column="ATTR_NAME" type="string" />
-                       <element column="NAME" type="string" />
-               </map>
-
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml
deleted file mode 100644 (file)
index 0a1ce76..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.process">\r
-       <class name="SlcExecutionStep" table="SLC_EXECUTION_STEP">\r
-               <cache usage="nonstrict-read-write" />\r
-\r
-               <id name="uuid" column="UUID" />\r
-               <property name="type" column="TYPE" />
-               <property name="thread" column="THREAD" />
-               <property name="timestamp" column="TSTAMP" type="imm_timestamp" />\r
-\r
-               <list name="logLines" cascade="all" lazy="false"\r
-                       table="SLC_EXECUTION_STEP_LOG_LINE">
-                       <cache usage="nonstrict-read-write" />
-                       <key column="SLC_EXECUTION_STEP_ID" />
-                       <list-index column="INDX" />
-                       <element column="LOG_LINE" type="text" />
-               </list>
-
-               <query name="stepIndex"><![CDATA[
-select index(step)
- from SlcExecution process
-  join process.steps step
-       with step.uuid = ?
- where process.uuid = ? 
-               ]]></query>
-               <query name="stepsAfter"><![CDATA[
-select step
- from SlcExecution process
-  join process.steps step
- where process.uuid = ? 
-       and index(step) > ?
-               ]]></query>
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml
deleted file mode 100644 (file)
index 90ada75..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.runtime">\r
-       <class name="SlcAgentDescriptor" table="SLC_AGENT_DESCRIPTOR">\r
-               <cache usage="read-write" />\r
-\r
-               <id name="uuid" column="UUID" />\r
-               <property name="host" column="HOST" />
-<!-- 
-               <map name="executionSpecs" table="AGENT_EXEC_SPEC_MAP" cascade="all"
-                       sort="natural">
-                       <cache usage="nonstrict-read-write" />
-                       <key column="PARENT_ID" />
-                       <map-key column="KEY" type="string" />
-                       <many-to-many class="org.argeo.slc.process.SlcExecutionSpec"
-                               column="ELEMENT_ID" unique="true" />
-               </map>
-                -->\r
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/sessionFactories.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/sessionFactories.xml
deleted file mode 100644 (file)
index 48544ec..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="true">
-
-       <bean id="slcTemplates.sessionFactory.hibernateBasic" abstract="true"
-               class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
-               <property name="mappingResources">
-                       <list>
-                               <value>
-                                       org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/process/SlcExecution.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/runtime/SlcAgentDescriptor.hbm.xml
-                               </value>
-                               <value>
-                                       org/argeo/slc/hibernate/attachment/SimpleAttachment.hbm.xml
-                               </value>
-                       </list>
-               </property>
-               <property name="cacheProvider" ref="slcDefault.cacheProvider.ehCache" />
-       </bean>
-
-       <bean id="slcDefault.cacheProvider.ehCache" class="net.sf.ehcache.hibernate.SingletonEhCacheProvider"
-               depends-on="slcDefault.cacheProvider.ehCacheManager">
-       </bean>
-
-       <bean id="slcDefault.cacheProvider.ehCacheManager"
-               class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
-               <property name="shared" value="true" />
-               <property name="configLocation"
-                       value="classpath:/org/argeo/slc/hibernate/ehcache.xml" />
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/spring.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/spring.xml
deleted file mode 100644 (file)
index 240aa92..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="true">
-
-       <import resource="dao.xml" />
-       <import resource="sessionFactories.xml" />
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/structure/SimpleSElement.hbm.xml
deleted file mode 100644 (file)
index 2244d49..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.core.structure">\r
-       <class name="SimpleSElement" table="SIMPLE_SELEMENT">\r
-               <cache usage="nonstrict-read-write" />\r
-               <id name="tid" column="T_ID">\r
-                       <generator class="native" />\r
-               </id>\r
-               <property name="label" column="LABEL" not-null="true" />\r
-               <map name="tags" table="SIMPLE_SELEMENT_TAGS" cascade="all"
-                       lazy="false" sort="natural">
-                       <cache usage="nonstrict-read-write" />
-                       <key column="PARENT_ID" />
-                       <map-key type="string" column="NAME" />
-                       <element type="string" column="VALUE" />
-               </map>
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/SimpleResultPart.hbm.xml
deleted file mode 100644 (file)
index b84cfd6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.core.test">\r
-       <class name="SimpleResultPart" table="SIMPLE_RESULT_PART">\r
-               <cache usage="nonstrict-read-write" />\r
-               <id name="tid" column="T_ID">\r
-                       <generator class="native" />\r
-               </id>\r
-               <property name="status" column="STATUS" not-null="true" />\r
-               <property name="message" column="MESSAGE" not-null="true" />\r
-               <property name="exceptionMessage" column="EXCEPTION_MESSAGE"
-                       type="text" not-null="false" lazy="true" />
-               <property name="testRunUuid" column="TEST_RUN_UUID"
-                       not-null="false" />
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/TestRunDescriptor.hbm.xml
deleted file mode 100644 (file)
index a0ba08c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.test">\r
-       <class name="TestRunDescriptor" table="TEST_RUN_DESCRIPTOR">\r
-               <cache usage="nonstrict-read-write" />
-               <id name="testRunUuid" column="TEST_RUN_UUID" />\r
-               <property name="slcExecutionUuid" column="SLC_EXEC_UUID"\r
-                       not-null="false" />\r
-               <property name="slcExecutionStepUuid"\r
-                       column="SLC_EXEC_STEP_UUID" not-null="false" />\r
-               <property name="testResultUuid" column="TEST_RESULT_UUID"\r
-                       not-null="false" />\r
-               <property name="deployedSytemId" column="DEPLOYED_SYSTEM_ID"\r
-                       not-null="false" />\r
-       </class>\r
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/PartSubList.hbm.xml
deleted file mode 100644 (file)
index 08fc992..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.core.test.tree">\r
-       <class name="PartSubList" table="PART_SUB_LIST">\r
-               <cache usage="nonstrict-read-write" />\r
-               <id name="tid" column="T_ID">\r
-                       <generator class="native" />\r
-               </id>\r
-               <list name="parts" cascade="all" table="PARTS_LIST">\r
-                       <cache usage="nonstrict-read-write" />\r
-                       <key column="PART_SUBLIST_ID" />\r
-                       <list-index column="INDX" />\r
-                       <many-to-many
-                               class="org.argeo.slc.core.test.SimpleResultPart" column="PART_ID"
-                               unique="true" />
-               </list>
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResult.hbm.xml
deleted file mode 100644 (file)
index 6144656..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.core.test.tree">\r
-       <class name="TreeTestResult" table="TREE_TEST_RESULT">\r
-               <cache usage="read-write" />\r
-               <id name="uuid" column="UUID" />\r
-\r
-               <property name="closeDate" column="CLOSE_DATE" type="timestamp"\r
-                       not-null="false" />
-
-               <map name="attributes" table="TTR_ATTRS_MAP" cascade="all" lazy="false"
-                       sort="natural">
-                       <cache usage="read-write" />
-                       <key column="PARENT_ID" />
-                       <map-key column="ATTR_NAME" type="string" />
-                       <element column="NAME" type="string" />
-               </map>
-
-               <map name="resultParts" table="RESULT_PARTS_MAP" cascade="all"
-                       sort="natural">
-                       <cache usage="nonstrict-read-write" />
-                       <key column="PARENT_ID" />
-                       <composite-map-key class="org.argeo.slc.core.structure.tree.TreeSPath">
-                               <key-property name="asUniqueString" column="PATH" />
-                       </composite-map-key>
-                       <many-to-many class="PartSubList" column="PART_SUB_LIST_ID"
-                               unique="true" />
-               </map>
-
-               <map name="elements" table="RESULT_ELEMENTS_MAP" cascade="all"
-                       sort="natural">
-                       <cache usage="nonstrict-read-write" />
-                       <key column="PARENT_ID" />
-                       <composite-map-key class="org.argeo.slc.core.structure.tree.TreeSPath">
-                               <key-property name="asUniqueString" column="PATH" />
-                       </composite-map-key>
-                       <many-to-many class="org.argeo.slc.core.structure.SimpleSElement"
-                               column="ELEMENT_ID" unique="true" />
-               </map>
-
-               <list name="attachments" table="RESULTS_ATTACHMENTS" cascade="all">
-                       <cache usage="nonstrict-read-write" />
-                       <key column="RESULT_ATTACHMENT_ID" />
-                       <list-index column="INDX" />
-                       <many-to-many class="org.argeo.slc.core.attachment.SimpleAttachment"
-                               column="ATTACHMENT_ID" unique="true" />
-               </list>
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/test/tree/TreeTestResultCollection.hbm.xml
deleted file mode 100644 (file)
index 7988d2b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-<hibernate-mapping package="org.argeo.slc.core.test.tree">\r
-       <class name="TreeTestResultCollection"
-               table="TREE_TEST_RESULT_COLLECTION">
-               <cache usage="nonstrict-read-write" />
-               <id name="id" column="ID" />
-
-               <set name="results" table="TTR_COLLECTION_RESULTS"
-                       sort="natural">
-                       <cache usage="read-write" />
-                       <key column="PARENT_ID" />
-                       <many-to-many class="TreeTestResult" column="TTR"/>
-               </set>
-       </class>
-</hibernate-mapping>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/site/apt/index.apt b/runtime/org.argeo.slc.support.hibernate/src/site/apt/index.apt
deleted file mode 100644 (file)
index f414460..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Argeo SLC Site
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java b/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java
deleted file mode 100644 (file)
index d2698c2..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.process;\r
-\r
-import java.sql.SQLException;\r
-\r
-import org.argeo.slc.dao.process.SlcExecutionDao;\r
-import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
-import org.argeo.slc.msg.ObjectList;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.unit.process.SlcExecutionTestUtils;\r
-import org.hibernate.HibernateException;\r
-import org.hibernate.Session;\r
-import org.springframework.orm.hibernate3.HibernateCallback;\r
-import org.springframework.oxm.Marshaller;\r
-import org.springframework.oxm.Unmarshaller;\r
-import org.springframework.xml.transform.StringResult;\r
-import org.springframework.xml.transform.StringSource;\r
-\r
-public class CastorSlcExecutionHibernateTest extends HibernateTestCase {\r
-\r
-       public void testSaveWithRealizedFlowsXml() throws Exception {\r
-               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
-\r
-               SlcExecution slcExec = SlcExecutionTestUtils\r
-                               .createSlcExecutionWithRealizedFlows();\r
-\r
-               ObjectList ol = new ObjectList(slcExec.getRealizedFlows());\r
-               StringResult result = new StringResult();\r
-               getBean(Marshaller.class).marshal(ol, result);\r
-               slcExec.setRealizedFlowsXml(result.toString());\r
-\r
-               dao.create(slcExec);\r
-\r
-               SlcExecution slcExecPersisted = dao.getSlcExecution(slcExec.getUuid());\r
-               assertSlcExecution(slcExec, slcExecPersisted);\r
-\r
-               StringSource source = new StringSource(slcExecPersisted\r
-                               .getRealizedFlowsXml());\r
-               ObjectList ol2 = (ObjectList) getBean(Unmarshaller.class).unmarshal(\r
-                               source);\r
-               ol2.fill(slcExec.getRealizedFlows());\r
-\r
-       }\r
-\r
-       public void assertSlcExecution(final SlcExecution expected,\r
-                       final SlcExecution persisted) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.refresh(persisted);\r
-                               SlcExecutionTestUtils.assertSlcExecution(expected, persisted);\r
-                               return null;\r
-                       }\r
-               });\r
-       }\r
-\r
-       @Override\r
-       protected String getApplicationContextLocation() {\r
-               return "org/argeo/slc/hibernate/withCastor.xml";\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/SlcExecutionHibernateTest.java b/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/SlcExecutionHibernateTest.java
deleted file mode 100644 (file)
index b4798ce..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.process;\r
-\r
-import java.sql.SQLException;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.argeo.slc.dao.process.SlcExecutionDao;\r
-import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.process.SlcExecutionStep;\r
-import org.argeo.slc.unit.process.SlcExecutionTestUtils;\r
-import org.hibernate.HibernateException;\r
-import org.hibernate.Session;\r
-import org.springframework.orm.hibernate3.HibernateCallback;\r
-\r
-public class SlcExecutionHibernateTest extends HibernateTestCase {\r
-\r
-       public void testSave() {\r
-               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
-\r
-               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
-               slcExec.getSteps().add(new SlcExecutionStep("A log line"));\r
-               slcExec.getSteps().add(new SlcExecutionStep("Two log\nlines"));\r
-\r
-               dao.create(slcExec);\r
-\r
-               SlcExecution slcExecPersisted = dao.getSlcExecution(slcExec.getUuid());\r
-               assertSlcExecution(slcExec, slcExecPersisted);\r
-       }\r
-\r
-       public void testTailSteps() {\r
-               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
-\r
-               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
-               int totalStepCount = 20;\r
-               for (int i = 0; i < totalStepCount; i++) {\r
-                       slcExec.getSteps().add(new SlcExecutionStep("Log " + i));\r
-               }\r
-               dao.create(slcExec);\r
-\r
-               int lastStepsCount = 7;\r
-               List<SlcExecutionStep> firstSteps = dao.tailSteps(slcExec.getUuid(),\r
-                               lastStepsCount);\r
-               assertEquals(lastStepsCount, firstSteps.size());\r
-\r
-               SlcExecutionStep lastStep = firstSteps.get(lastStepsCount - 1);\r
-\r
-               List<SlcExecutionStep> additionalSteps = new ArrayList<SlcExecutionStep>();\r
-               int additionalStepsCount = 13;\r
-               for (int i = 0; i < additionalStepsCount; i++) {\r
-                       additionalSteps.add(new SlcExecutionStep("Additonal log " + i));\r
-               }\r
-               dao.addSteps(slcExec.getUuid(), additionalSteps);\r
-\r
-               List<SlcExecutionStep> lastSteps = dao.tailSteps(slcExec.getUuid(),\r
-                               lastStep.getUuid());\r
-               assertEquals(additionalStepsCount, lastSteps.size());\r
-       }\r
-\r
-       public void testModify() {\r
-               SlcExecutionDao dao = getBean(SlcExecutionDao.class);\r
-\r
-               // slcExecution Creation\r
-               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();\r
-               slcExec.getSteps().add(new SlcExecutionStep("A log line"));\r
-               slcExec.getSteps().add(new SlcExecutionStep("Two log\nlines"));\r
-\r
-               dao.create(slcExec);\r
-\r
-               // slcExecution retrieval and update\r
-               final SlcExecution slcExecRetrieved = dao.getSlcExecution(slcExec\r
-                               .getUuid());\r
-\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.refresh(slcExecRetrieved);\r
-                               List<String> logLineListStep0 = slcExecRetrieved.getSteps()\r
-                                               .get(0).getLogLines();\r
-                               for (String logLine : logLineListStep0)\r
-                                       logLine = logLine + "appended Log text";\r
-\r
-                               slcExecRetrieved.getSteps().get(0)\r
-                                               .setLogLines(logLineListStep0);\r
-                               slcExecRetrieved.getSteps().add(\r
-                                               new SlcExecutionStep("Three \n log \n lines"));\r
-                               return null;\r
-                       }\r
-               });\r
-\r
-               dao.update(slcExecRetrieved);\r
-\r
-               // updated slcExecution retrieval and comparison\r
-               SlcExecution slcExecUpdated = dao.getSlcExecution(slcExec.getUuid());\r
-\r
-               assertSlcExecution(slcExecRetrieved, slcExecUpdated);\r
-       }\r
-\r
-       public void assertSlcExecution(final SlcExecution expected,\r
-                       final SlcExecution persisted) {\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.refresh(persisted);\r
-                               SlcExecutionTestUtils.assertSlcExecution(expected, persisted);\r
-                               return null;\r
-                       }\r
-               });\r
-       }\r
-\r
-       @Override\r
-       protected String getApplicationContextLocation() {\r
-               return "org/argeo/slc/hibernate/applicationContext.xml";\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/CastorTestResultDaoHibernateTest.java b/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/CastorTestResultDaoHibernateTest.java
deleted file mode 100644 (file)
index c922809..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.test.tree;\r
-\r
-import org.argeo.slc.core.structure.tree.TreeSPath;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
-import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
-import org.argeo.slc.unit.test.tree.TreeTestResultTestUtils;\r
-import org.springframework.oxm.Marshaller;\r
-import org.springframework.oxm.Unmarshaller;\r
-import org.springframework.xml.transform.StringResult;\r
-import org.springframework.xml.transform.StringSource;\r
-\r
-public class CastorTestResultDaoHibernateTest extends HibernateTestCase {\r
-\r
-       public void testUnmarshallAndCreate() throws Exception {\r
-               TreeTestResult ttr = TreeTestResultTestUtils\r
-                               .createCompleteTreeTestResult();\r
-\r
-               StringResult result = new StringResult();\r
-               getBean(Marshaller.class).marshal(ttr, result);\r
-\r
-               StringSource source = new StringSource(result.toString());\r
-               TreeTestResult ttrUnm = (TreeTestResult) getBean(Unmarshaller.class)\r
-                               .unmarshal(source);\r
-\r
-               for (TreeSPath path : ttrUnm.getResultParts().keySet()) {\r
-                       log.debug("Path: " + path.getClass() + ": " + path);\r
-               }\r
-\r
-               TreeTestResultDao ttrDao = getBean(TreeTestResultDao.class);\r
-               ttrDao.create(ttrUnm);\r
-               TreeTestResult ttrPersist = ttrDao.getTestResult(ttr.getUuid());\r
-\r
-               TreeTestResultDaoHibernateTest.assertInHibernate(\r
-                               getHibernateTemplate(), ttr, ttrPersist);\r
-       }\r
-\r
-       @Override\r
-       protected String getApplicationContextLocation() {\r
-               return "org/argeo/slc/hibernate/withCastor.xml";\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernateTest.java b/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultCollectionDaoHibernateTest.java
deleted file mode 100644 (file)
index de9aa16..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.test.tree;\r
-\r
-import java.sql.SQLException;\r
-import java.util.Date;\r
-\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
-import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
-import org.argeo.slc.unit.test.tree.TreeTestResultTestUtils;\r
-import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
-import org.hibernate.HibernateException;\r
-import org.hibernate.Session;\r
-import org.springframework.orm.hibernate3.HibernateCallback;\r
-\r
-public class TreeTestResultCollectionDaoHibernateTest extends HibernateTestCase {\r
-\r
-       public void testScenario() {\r
-               TreeTestResultDao ttrDao = getBean(TreeTestResultDao.class);\r
-               TreeTestResultCollectionDao ttrcDao = getBean(TreeTestResultCollectionDao.class);\r
-\r
-               String ttrcName = "testCollection";\r
-\r
-               TreeTestResult ttr1 = TreeTestResultTestUtils\r
-                               .createCompleteTreeTestResult();\r
-               ttrDao.create(ttr1);\r
-\r
-               TreeTestResultCollection ttrc = new TreeTestResultCollection(ttrcName);\r
-               ttrcDao.create(ttrc);\r
-\r
-               ttrc.getResults().add(ttr1);\r
-               ttrcDao.update(ttrc);\r
-\r
-               final TreeTestResult ttr2 = TreeTestResultTestUtils\r
-                               .createCompleteTreeTestResult();\r
-               ttrDao.create(ttr2);\r
-\r
-               ttrc.getResults().add(ttr2);\r
-               ttrcDao.update(ttrc);\r
-\r
-               ttrc.getResults().remove(ttr1);\r
-               ttrcDao.update(ttrc);\r
-\r
-               final TreeTestResultCollection ttrcPersist = ttrcDao\r
-                               .getTestResultCollection(ttrcName);\r
-\r
-               // Because of lazy initialization\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.refresh(ttrcPersist);\r
-                               assertEquals(1, ttrcPersist.getResults().size());\r
-                               UnitTestTreeUtil.assertTreeTestResult(ttr2, ttrcPersist\r
-                                               .getResults().iterator().next());\r
-                               return null;\r
-                       }\r
-               });\r
-       }\r
-\r
-       public void testResultsWithSameCloseDate() {\r
-               TreeTestResultDao ttrDao = getBean(TreeTestResultDao.class);\r
-               TreeTestResultCollectionDao ttrcDao = getBean(TreeTestResultCollectionDao.class);\r
-\r
-               String ttrcName = "testCollection";\r
-\r
-               Date closeDate = new Date();\r
-\r
-               // TTR1\r
-               TreeTestResult ttr1 = TreeTestResultTestUtils\r
-                               .createCompleteTreeTestResult();\r
-               ttr1.setCloseDate(closeDate);\r
-               ttrDao.create(ttr1);\r
-\r
-               // TTR2\r
-               TreeTestResult ttr2 = TreeTestResultTestUtils\r
-                               .createCompleteTreeTestResult();\r
-               ttr2.setCloseDate(closeDate);\r
-               ttrDao.create(ttr2);\r
-\r
-               // TTRC\r
-               TreeTestResultCollection ttrc = new TreeTestResultCollection(ttrcName);\r
-               ttrc.getResults().add(ttr1);\r
-               ttrc.getResults().add(ttr2);\r
-               ttrcDao.create(ttrc);\r
-\r
-               final TreeTestResultCollection ttrcPersist = ttrcDao\r
-                               .getTestResultCollection(ttrcName);\r
-               // Because of lazy initialization\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.refresh(ttrcPersist);\r
-                               assertEquals(2, ttrcPersist.getResults().size());\r
-                               return null;\r
-                       }\r
-               });\r
-       }\r
-\r
-       @Override\r
-       protected String getApplicationContextLocation() {\r
-               return "org/argeo/slc/hibernate/applicationContext.xml";\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernateTest.java b/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/test/tree/TreeTestResultDaoHibernateTest.java
deleted file mode 100644 (file)
index 4c5baa6..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.hibernate.test.tree;\r
-\r
-import java.sql.SQLException;\r
-\r
-import org.argeo.slc.core.structure.SimpleSElement;\r
-import org.argeo.slc.core.structure.tree.TreeSPath;\r
-import org.argeo.slc.core.structure.tree.TreeSRegistry;\r
-import org.argeo.slc.core.test.SimpleResultPart;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
-import org.argeo.slc.hibernate.unit.HibernateTestCase;\r
-import org.argeo.slc.test.TestStatus;\r
-import org.argeo.slc.unit.test.tree.TreeTestResultTestUtils;\r
-import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
-import org.hibernate.HibernateException;\r
-import org.hibernate.Session;\r
-import org.springframework.orm.hibernate3.HibernateCallback;\r
-import org.springframework.orm.hibernate3.HibernateTemplate;\r
-\r
-public class TreeTestResultDaoHibernateTest extends HibernateTestCase {\r
-       private TreeTestResultDao testResultDao = null;\r
-\r
-       @Override\r
-       public void setUp() {\r
-               testResultDao = getBean(TreeTestResultDao.class);\r
-       }\r
-\r
-       public void testCreate() {\r
-\r
-               TreeTestResult ttr = TreeTestResultTestUtils\r
-                               .createCompleteTreeTestResult();\r
-               testResultDao.create(ttr);\r
-\r
-               TreeTestResult ttrPersisted = (TreeTestResult) testResultDao\r
-                               .getTestResult(ttr.getUuid());\r
-\r
-               assertInHibernate(ttr, ttrPersisted);\r
-       }\r
-\r
-       public void testUpdate() {\r
-               TreeTestResult ttr = TreeTestResultTestUtils\r
-                               .createCompleteTreeTestResult();\r
-               testResultDao.create(ttr);\r
-\r
-               final TreeTestResult ttrUpdated = (TreeTestResult) testResultDao\r
-                               .getTestResult(ttr.getUuid());\r
-\r
-               // Modifying ttrUpdated\r
-\r
-               /**\r
-                * this closeDate update commented because the assertTreeTestResult will\r
-                * find a unexpected discrepancy in the date.\r
-                * ttrUpdated.setCloseDate(new Date());\r
-                */\r
-\r
-               String pathStr = "/test";\r
-               final TreeSPath path = new TreeSPath(pathStr);\r
-\r
-               final TreeSRegistry registry = new TreeSRegistry();\r
-               SimpleSElement elem = new SimpleSElement("Unit Test");\r
-               elem.getTags().put("myTag", "myTagValue");\r
-               registry.register(path, elem);\r
-\r
-               getHibernateTemplate().execute(new HibernateCallback() {\r
-\r
-                       public Object doInHibernate(Session session)\r
-                                       throws HibernateException, SQLException {\r
-                               session.refresh(ttrUpdated);\r
-                               ttrUpdated.notifyCurrentPath(registry, path);\r
-\r
-                               ttrUpdated.addResultPart(TreeTestResultTestUtils\r
-                                               .createSimpleResultPartPassed());\r
-                               ttrUpdated.addResultPart(TreeTestResultTestUtils\r
-                                               .createSimpleResultPartFailed());\r
-                               ttrUpdated.addResultPart(TreeTestResultTestUtils\r
-                                               .createSimpleResultPartError());\r
-                               return null;\r
-                       }\r
-               });\r
-\r
-               testResultDao.update(ttrUpdated);\r
-\r
-               // comparison of ttrUpdated and ttrRetrieved\r
-               TreeTestResult ttrRetrieved = (TreeTestResult) testResultDao\r
-                               .getTestResult(ttr.getUuid());\r
-\r
-               assertInHibernate(ttrUpdated, ttrRetrieved);\r
-       }\r
-\r
-       public void testMultipleUpdateScenario() throws Exception {\r
-               TreeSRegistry registry = new TreeSRegistry();\r
-\r
-               TreeSPath path = new TreeSPath("/root/test");\r
-               SimpleSElement elem = new SimpleSElement("Unit Test");\r
-               elem.getTags().put("myTag", "myTagValue");\r
-               registry.register(path, elem);\r
-\r
-               TreeTestResult ttr = TreeTestResultTestUtils\r
-                               .createSimpleTreeTestResult();\r
-               ttr.notifyCurrentPath(registry, path);\r
-               ttr\r
-                               .addResultPart(new SimpleResultPart(TestStatus.PASSED,\r
-                                               "First test"));\r
-\r
-               testResultDao.create(ttr);\r
-\r
-               path = new TreeSPath("/root/test2/subtest");\r
-               elem = new SimpleSElement("Sub Test");\r
-               elem.getTags().put("myTag", "myTagValue");\r
-               registry.register(path, elem);\r
-\r
-               ttr.notifyCurrentPath(registry, path);\r
-               ttr\r
-                               .addResultPart(new SimpleResultPart(TestStatus.PASSED,\r
-                                               "Second test"));\r
-\r
-               testResultDao.update(ttr);\r
-\r
-               ttr.notifyCurrentPath(registry, path);\r
-               ttr.addResultPart(new SimpleResultPart(TestStatus.PASSED,\r
-                               "Third test with same path"));\r
-\r
-               testResultDao.update(ttr);\r
-\r
-               ttr.close();\r
-\r
-               testResultDao.close(ttr.getUuid(), ttr.getCloseDate());\r
-\r
-               TreeTestResult ttrRetrieved = (TreeTestResult) testResultDao\r
-                               .getTestResult(ttr.getUuid());\r
-\r
-               assertInHibernate(ttr, ttrRetrieved);\r
-\r
-       }\r
-\r
-       @Override\r
-       protected String getApplicationContextLocation() {\r
-               return "org/argeo/slc/hibernate/applicationContext.xml";\r
-       }\r
-\r
-       public static void assertInHibernate(HibernateTemplate template,\r
-                       final TreeTestResult ttrExpected, final TreeTestResult ttrPersisted) {\r
-               template.execute(new HibernateCallback() {\r
-                       public Object doInHibernate(Session session) {\r
-                               session.refresh(ttrPersisted);\r
-                               UnitTestTreeUtil\r
-                                               .assertTreeTestResult(ttrExpected, ttrPersisted);\r
-                               return null;\r
-                       }\r
-\r
-               });\r
-\r
-       }\r
-\r
-       public void assertInHibernate(final TreeTestResult ttrExpected,\r
-                       final TreeTestResult ttrPersisted) {\r
-               assertInHibernate(getHibernateTemplate(), ttrExpected, ttrPersisted);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/resources/log4j.properties b/runtime/org.argeo.slc.support.hibernate/src/test/resources/log4j.properties
deleted file mode 100644 (file)
index 4a97ea6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# Set root logger level to DEBUG and its only appender to A1.\r
-log4j.rootLogger=WARN, console\r
-\r
-## Levels\r
-# Slc\r
-log4j.logger.org.argeo=DEBUG\r
-log4j.logger.org.argeo.slc.hibernate.process=TRACE\r
-\r
-# Castor\r
-log4j.logger.org.exolab.castor=WARN\r
-\r
-# Spring\r
-#log4j.logger.org.springframework=INFO\r
-# Hibernate\r
-log4j.logger.org.hibernate=WARN\r
-#log4j.logger.org.hibernate.SQL=TRACE\r
-#log4j.logger.org.hibernate.tool.hbm2ddl=TRACE\r
-#log4j.logger.org.hibernate.type=TRACE\r
-\r
-\r
-## Appenders\r
-# A1 is set to be a ConsoleAppender.\r
-log4j.appender.console=org.apache.log4j.ConsoleAppender\r
-\r
-# A1 uses PatternLayout.\r
-log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
-\r
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml b/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml
deleted file mode 100644 (file)
index 739eb09..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <import resource="classpath:/org/argeo/slc/hibernate/spring.xml" />\r
-       <!--\r
-\r
-               <bean id="sessionFactory"\r
-               parent="slcTemplates.sessionFactory.hibernateBasic"> <property\r
-               name="dataSource" ref="dataSource" /> <property\r
-               name="hibernateProperties"> <value><![CDATA[\r
-               hibernate.dialect=org.hibernate.dialect.HSQLDialect\r
-               hibernate.hbm2ddl.auto=create\r
-               hibernate.current_session_context_class=thread ]]></value> </property>\r
-               </bean> <bean id="dataSource"\r
-               class="org.springframework.jdbc.datasource.SingleConnectionDataSource"\r
-               destroy-method="destroy" lazy-init="true"> <property\r
-               name="driverClassName" value="org.hsqldb.jdbcDriver" /> <property\r
-               name="url" value="jdbc:hsqldb:mem:test" /> <property name="username"\r
-               value="sa" /> <property name="password" value="" /> <property\r
-               name="suppressClose" value="true" /> </bean>\r
-       -->\r
-\r
-       <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">\r
-               <property name="dataSource" ref="dataSource" />\r
-               <property name="hibernateProperties">\r
-                       <value><![CDATA[\r
-hibernate.dialect=org.hibernate.dialect.H2Dialect\r
-hibernate.hbm2ddl.auto=create\r
-hibernate.current_session_context_class=thread\r
-hibernate.jdbc.batch_size=20\r
-               ]]></value>\r
-               </property>\r
-       </bean>\r
-       \r
-       <bean id="dataSource"\r
-               class="org.springframework.jdbc.datasource.SingleConnectionDataSource"\r
-               destroy-method="destroy" lazy-init="true">\r
-               <property name="driverClassName" value="org.h2.Driver" />\r
-               <property name="url" value="jdbc:h2:mem:test" />\r
-               <property name="username" value="sa" />\r
-               <property name="password" value="" />\r
-               <property name="suppressClose" value="true" />\r
-       </bean>\r
-       \r
-       <bean id="testResultDao" parent="slcTemplates.dao.testResultDao">\r
-               <property name="sessionFactory" ref="sessionFactory" />\r
-       </bean>\r
-       <bean id="testResultCollectionDao" parent="slcTemplates.dao.testResultCollectionDao">\r
-               <property name="sessionFactory" ref="sessionFactory" />\r
-       </bean>\r
-\r
-       <bean id="slcExecutionDao" parent="slcTemplates.dao.slcExecutionDao">\r
-               <property name="sessionFactory" ref="sessionFactory" />\r
-       </bean>\r
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/withCastor.xml b/runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/withCastor.xml
deleted file mode 100644 (file)
index 48bc9dc..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <import resource="applicationContext.xml" />\r
-       <import resource="classpath:/org/argeo/slc/castor/spring.xml" />\r
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.ws.client/.classpath b/runtime/org.argeo.slc.support.ws.client/.classpath
deleted file mode 100644 (file)
index a002fff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" output="target/classes" path="src/main/java"/>
-       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/runtime/org.argeo.slc.support.ws.client/.project b/runtime/org.argeo.slc.support.ws.client/.project
deleted file mode 100644 (file)
index 142bb4a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.support.ws.client</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/runtime/org.argeo.slc.support.ws.client/.settings/org.eclipse.jdt.core.prefs b/runtime/org.argeo.slc.support.ws.client/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 964778b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri Aug 29 11:31:46 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/runtime/org.argeo.slc.support.ws.client/pom.xml b/runtime/org.argeo.slc.support.ws.client/pom.xml
deleted file mode 100644 (file)
index db1b5b6..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><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>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>runtime</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <groupId>org.argeo.slc.runtime</groupId>
-       <artifactId>org.argeo.slc.support.ws.client</artifactId>
-       <packaging>jar</packaging>
-       <name>SLC Support Web Services Client (deprecated)</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-
-                               <configuration>
-                                       <instructions>
-                                               <Export-Package>
-                                                       org.argeo.slc.ws.*
-                                               </Export-Package>
-                                               <Import-Package>org.w3c.dom;version="0.0.0",
-                                                       javax.xml.*;version="0.0.0",
-                                                       org.xml.*;version="0.0.0",
-                                                       org.springframework.ws.*;resolution:="optional",
-                                                       org.springframework.core;resolution:="optional",
-                                                       *
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-       <dependencies>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.simple</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.castor</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.ws</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>com.sun.xml.messaging.saaj</artifactId>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/ValidatingClientInterceptor.java b/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/ValidatingClientInterceptor.java
deleted file mode 100644 (file)
index 84c4b19..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.ws.client;\r
-\r
-import java.io.IOException;\r
-\r
-import javax.xml.transform.Source;\r
-\r
-import org.springframework.ws.client.WebServiceClientException;\r
-import org.springframework.ws.client.WebServiceIOException;\r
-import org.springframework.ws.client.support.interceptor.ClientInterceptor;\r
-import org.springframework.ws.context.MessageContext;\r
-import org.springframework.xml.validation.XmlValidator;\r
-import org.xml.sax.SAXParseException;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-\r
-public class ValidatingClientInterceptor implements ClientInterceptor {\r
-       private final static Log log = LogFactory\r
-                       .getLog(ValidatingClientInterceptor.class);\r
-\r
-       private Boolean validateRequest = true;\r
-       private Boolean validateResponse = false;\r
-       private XmlValidator validator = null;\r
-\r
-       public boolean handleFault(MessageContext messageContext)\r
-                       throws WebServiceClientException {\r
-               return true;\r
-       }\r
-\r
-       public boolean handleRequest(MessageContext messageContext)\r
-                       throws WebServiceClientException {\r
-               if (validateRequest) {\r
-                       if (messageContext.getRequest() == null)\r
-                               return true;\r
-\r
-                       Source source = messageContext.getRequest().getPayloadSource();\r
-                       try {\r
-                               return validate(source);\r
-                       } catch (IOException e) {\r
-                               throw new WebServiceIOException("Cannot validate request", e);\r
-                       }\r
-               } else {\r
-                       return true;\r
-               }\r
-       }\r
-\r
-       public boolean handleResponse(MessageContext messageContext)\r
-                       throws WebServiceClientException {\r
-               if (validateResponse) {\r
-                       if (messageContext.getResponse() == null)\r
-                               return true;\r
-\r
-                       Source source = messageContext.getResponse().getPayloadSource();\r
-                       try {\r
-                               return validate(source);\r
-                       } catch (IOException e) {\r
-                               throw new WebServiceIOException("Cannot validate response", e);\r
-                       }\r
-               } else {\r
-                       return true;\r
-               }\r
-       }\r
-\r
-       protected boolean validate(Source source) throws IOException {\r
-               SAXParseException[] exceptions = validator.validate(source);\r
-               if (exceptions.length != 0) {\r
-                       for (SAXParseException ex : exceptions) {\r
-                               log.error(ex.getMessage());\r
-                       }\r
-                       return false;\r
-               } else {\r
-                       return true;\r
-               }\r
-       }\r
-\r
-       public void setValidateRequest(Boolean validateRequest) {\r
-               this.validateRequest = validateRequest;\r
-       }\r
-\r
-       public void setValidateResponse(Boolean validateResponse) {\r
-               this.validateResponse = validateResponse;\r
-       }\r
-\r
-       public void setValidator(XmlValidator validator) {\r
-               this.validator = validator;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/WebServiceUtils.java b/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/client/WebServiceUtils.java
deleted file mode 100644 (file)
index 0250230..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.ws.client;\r
-\r
-import java.util.Iterator;\r
-\r
-import javax.xml.transform.Source;\r
-import javax.xml.transform.dom.DOMSource;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.springframework.ws.client.core.WebServiceTemplate;\r
-import org.springframework.ws.soap.SoapFaultDetail;\r
-import org.springframework.ws.soap.SoapFaultDetailElement;\r
-import org.springframework.ws.soap.client.SoapFaultClientException;\r
-import org.springframework.xml.transform.StringResult;\r
-import org.w3c.dom.Node;\r
-\r
-public abstract class WebServiceUtils {\r
-       private final static Log log = LogFactory.getLog(WebServiceUtils.class);\r
-\r
-       public static Object marshalSendAndReceiveSafe(WebServiceTemplate template,\r
-                       Object req) {\r
-               try {\r
-                       Object resp = marshalSendAndReceive(template, req);\r
-                       return resp;\r
-               } catch (Exception e) {\r
-                       log.error("Cannot send web servicerequest: " + e.getMessage());\r
-                       if (log.isDebugEnabled()) {\r
-                               log.debug("Webservice exception details: ", e);\r
-                       }\r
-                       return null;\r
-               }\r
-       }\r
-\r
-       public static Object marshalSendAndReceive(WebServiceTemplate template,\r
-                       Object req) {\r
-               if (log.isTraceEnabled()) {\r
-                       try {\r
-                               StringResult result = new StringResult();\r
-                               template.getMarshaller().marshal(req, result);\r
-                               log.trace("About to send " + result);\r
-                       } catch (Exception e) {\r
-                               log.error("Cannot marshall " + req + " for logging", e);\r
-                       }\r
-               }\r
-               Object resp = template.marshalSendAndReceive(req);\r
-               return resp;\r
-       }\r
-\r
-       public static void manageSoapException(SoapFaultClientException e) {\r
-               log\r
-                               .error("WS root cause: "\r
-                                               + e.getSoapFault().getFaultStringOrReason());\r
-               if (log.isTraceEnabled()) {\r
-                       StringBuffer stack = new StringBuffer("");\r
-                       SoapFaultDetail detail = e.getSoapFault().getFaultDetail();\r
-                       if (detail != null) {\r
-                               Iterator<SoapFaultDetailElement> it = (Iterator<SoapFaultDetailElement>) detail\r
-                                               .getDetailEntries();\r
-                               while (it.hasNext()) {\r
-                                       SoapFaultDetailElement elem = it.next();\r
-                                       if (elem.getName().getLocalPart().equals("StackElement")) {\r
-                                               Source source = elem.getSource();\r
-                                               if (source instanceof DOMSource) {\r
-                                                       Node node = ((DOMSource) source).getNode();\r
-                                                       // stack.append(node.getTextContent()).append('\n');\r
-                                                       stack\r
-                                                                       .append(\r
-                                                                                       node.getChildNodes().item(0)\r
-                                                                                                       .getNodeValue()).append(\r
-                                                                                       '\n');\r
-                                               }\r
-                                       }\r
-                               }\r
-\r
-                               if (stack.length() > 0)\r
-                                       log.error("WS root cause stack: " + stack);\r
-                       }\r
-               }\r
-       }\r
-\r
-       private WebServiceUtils() {\r
-\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/process/WebServiceSlcExecutionNotifier.java b/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/process/WebServiceSlcExecutionNotifier.java
deleted file mode 100644 (file)
index d341a63..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.ws.process;\r
-\r
-import java.util.List;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.msg.process.SlcExecutionRequest;\r
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;\r
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;\r
-import org.argeo.slc.execution.ExecutionStep;\r
-import org.argeo.slc.execution.ExecutionProcess;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.process.SlcExecutionNotifier;\r
-import org.argeo.slc.process.SlcExecutionStep;\r
-import org.argeo.slc.ws.client.WebServiceUtils;\r
-import org.springframework.ws.client.WebServiceIOException;\r
-import org.springframework.ws.client.core.WebServiceTemplate;\r
-import org.springframework.ws.soap.client.SoapFaultClientException;\r
-\r
-public class WebServiceSlcExecutionNotifier implements SlcExecutionNotifier {\r
-       private WebServiceTemplate template;\r
-\r
-       private Log log = LogFactory.getLog(getClass());\r
-\r
-       private Boolean cannotConnect = false;\r
-\r
-       public void newExecution(ExecutionProcess process) {\r
-               SlcExecution slcExecution = (SlcExecution) process;\r
-               if (cannotConnect)\r
-                       return;\r
-\r
-               SlcExecutionRequest req = new SlcExecutionRequest();\r
-               req.setSlcExecution(slcExecution);\r
-               try {\r
-                       WebServiceUtils.marshalSendAndReceive(template, req);\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("Notified creation of slc execution "\r
-                                               + slcExecution.getUuid());\r
-               } catch (SoapFaultClientException e) {\r
-                       WebServiceUtils.manageSoapException(e);\r
-               } catch (WebServiceIOException e) {\r
-                       manageIoException(e);\r
-               }\r
-       }\r
-\r
-       public void updateExecution(SlcExecution slcExecution) {\r
-               if (cannotConnect)\r
-                       return;\r
-\r
-               SlcExecutionRequest req = new SlcExecutionRequest();\r
-               req.setSlcExecution(slcExecution);\r
-               try {\r
-                       WebServiceUtils.marshalSendAndReceive(template, req);\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("Notified update of slc execution "\r
-                                               + slcExecution.getUuid());\r
-               } catch (SoapFaultClientException e) {\r
-                       WebServiceUtils.manageSoapException(e);\r
-               } catch (WebServiceIOException e) {\r
-                       manageIoException(e);\r
-               }\r
-       }\r
-\r
-       public void updateStatus(ExecutionProcess process, String oldStatus,\r
-                       String newStatus) {\r
-               SlcExecution slcExecution = (SlcExecution) process;\r
-               if (cannotConnect)\r
-                       return;\r
-\r
-               SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(\r
-                               slcExecution.getUuid(), newStatus);\r
-               try {\r
-                       WebServiceUtils.marshalSendAndReceive(template, req);\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("Notified status update of slc execution "\r
-                                               + slcExecution.getUuid());\r
-               } catch (SoapFaultClientException e) {\r
-                       WebServiceUtils.manageSoapException(e);\r
-               } catch (WebServiceIOException e) {\r
-                       manageIoException(e);\r
-               }\r
-       }\r
-\r
-       public void addSteps(ExecutionProcess process,\r
-                       List<ExecutionStep> additionalSteps) {\r
-               SlcExecution slcExecution = (SlcExecution) process;\r
-               if (cannotConnect)\r
-                       return;\r
-\r
-               SlcExecutionStepsRequest req = new SlcExecutionStepsRequest(\r
-                               slcExecution.getUuid(), additionalSteps);\r
-               try {\r
-                       WebServiceUtils.marshalSendAndReceive(template, req);\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("Added steps to slc execution "\r
-                                               + slcExecution.getUuid());\r
-               } catch (SoapFaultClientException e) {\r
-                       WebServiceUtils.manageSoapException(e);\r
-               } catch (WebServiceIOException e) {\r
-                       manageIoException(e);\r
-               }\r
-       }\r
-\r
-       public void setTemplate(WebServiceTemplate template) {\r
-               this.template = template;\r
-       }\r
-\r
-       protected void manageIoException(WebServiceIOException e) {\r
-               if (!cannotConnect) {\r
-                       log.error("Cannot connect to " + template.getDefaultUri()\r
-                                       + ". Won't try again.", e);\r
-                       cannotConnect = true;\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/test/tree/WebServiceTreeTestResultNotifier.java b/runtime/org.argeo.slc.support.ws.client/src/main/java/org/argeo/slc/ws/test/tree/WebServiceTreeTestResultNotifier.java
deleted file mode 100644 (file)
index cefbcd1..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.ws.test.tree;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
-import org.argeo.slc.test.TestResultListener;\r
-import org.argeo.slc.test.TestResultPart;\r
-import org.argeo.slc.ws.client.WebServiceUtils;\r
-import org.springframework.ws.client.WebServiceIOException;\r
-import org.springframework.ws.client.core.WebServiceTemplate;\r
-import org.springframework.ws.soap.client.SoapFaultClientException;\r
-\r
-public class WebServiceTreeTestResultNotifier implements\r
-               TestResultListener<TreeTestResult> {\r
-       private WebServiceTemplate template;\r
-       private Boolean onlyOnClose = false;\r
-\r
-       private Log log = LogFactory.getLog(getClass());\r
-\r
-       private Boolean cannotConnect = false;\r
-\r
-       public void resultPartAdded(TreeTestResult testResult,\r
-                       TestResultPart testResultPart) {\r
-               if (onlyOnClose)\r
-                       return;\r
-\r
-               if (cannotConnect)\r
-                       return;\r
-\r
-               try {\r
-                       if (testResult.getResultParts().size() == 1\r
-                                       && testResult.getResultParts().values().iterator().next()\r
-                                                       .getParts().size() == 1) {\r
-                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(\r
-                                               testResult);\r
-\r
-                               if (log.isDebugEnabled())\r
-                                       log.debug("Send create result request for result "\r
-                                                       + testResult.getUuid());\r
-\r
-                               WebServiceUtils.marshalSendAndReceive(template, req);\r
-                       } else {\r
-                               ResultPartRequest req = new ResultPartRequest(testResult);\r
-\r
-                               if (log.isDebugEnabled())\r
-                                       log.debug("Send result parts for result "\r
-                                                       + testResult.getUuid());\r
-\r
-                               WebServiceUtils.marshalSendAndReceive(template, req);\r
-                       }\r
-               } catch (SoapFaultClientException e) {\r
-                       WebServiceUtils.manageSoapException(e);\r
-\r
-               } catch (WebServiceIOException e) {\r
-                       manageIoException(e);\r
-               }\r
-       }\r
-\r
-       public void close(TreeTestResult testResult) {\r
-               if (cannotConnect)\r
-                       return;\r
-\r
-               try {\r
-                       if (onlyOnClose) {\r
-                               CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(\r
-                                               testResult);\r
-\r
-                               if (log.isDebugEnabled())\r
-                                       log.debug("Send create result request for result "\r
-                                                       + testResult.getUuid());\r
-\r
-                               WebServiceUtils.marshalSendAndReceive(template, req);\r
-                       } else {\r
-                               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(\r
-                                               testResult);\r
-\r
-                               if (log.isDebugEnabled())\r
-                                       log.debug("Send close result request for result "\r
-                                                       + testResult.getUuid());\r
-\r
-                               WebServiceUtils.marshalSendAndReceive(template, req);\r
-\r
-                       }\r
-               } catch (SoapFaultClientException e) {\r
-                       WebServiceUtils.manageSoapException(e);\r
-               } catch (WebServiceIOException e) {\r
-                       manageIoException(e);\r
-               }\r
-       }\r
-\r
-       public void setTemplate(WebServiceTemplate template) {\r
-               this.template = template;\r
-       }\r
-\r
-       public void setOnlyOnClose(Boolean onlyOnClose) {\r
-               this.onlyOnClose = onlyOnClose;\r
-       }\r
-\r
-       protected void manageIoException(WebServiceIOException e) {\r
-               if (!cannotConnect) {\r
-                       log.error("Cannot connect to " + template.getDefaultUri()\r
-                                       + ". Won't try again.", e);\r
-                       cannotConnect = true;\r
-               }\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.support.ws.client/src/main/resources/org/argeo/slc/ws/client/spring/applicationContext.xml b/runtime/org.argeo.slc.support.ws.client/src/main/resources/org/argeo/slc/ws/client/spring/applicationContext.xml
deleted file mode 100644 (file)
index 2cf78df..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="true">
-
-       <import
-               resource="classpath:/org/argeo/slc/castor/spring/applicationContext.xml" />
-       <import
-               resource="classpath:/org/argeo/slc/xml/spring/applicationContext.xml" />
-
-       <bean id="slcDefault.ws.client.webServiceTemplate"
-               parent="slcTemplate.ws.client.webServiceTemplate">
-               <constructor-arg ref="slcDefault.ws.client.messageFactory" />
-               <property name="defaultUri" value="${slc.ws.uri}" />
-       </bean>
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
-               lazy-init="false">
-               <property name="systemPropertiesModeName"
-                       value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="ignoreUnresolvablePlaceholders" value="true" />
-               <property name="properties">
-                       <props>
-                               <prop key="slc.ws.uri">
-                                       http://localhost:9090/org.argeo.slc.webapp/slcService/
-                               </prop>
-                       </props>
-               </property>
-       </bean>
-
-       <bean id="slcTemplate.ws.client.webServiceTemplate"
-               class="org.springframework.ws.client.core.WebServiceTemplate"
-               abstract="true">
-               <property name="marshaller" ref="slcDefault.castor.marshaller" />
-               <property name="unmarshaller"
-                       ref="slcDefault.castor.marshaller" />
-               <property name="interceptors">
-                       <list>
-                               <bean
-                                       class="org.argeo.slc.ws.client.ValidatingClientInterceptor">
-                                       <property name="validator"
-                                               ref="slcDefault.xml.xsdValidator" />
-                               </bean>
-                       </list>
-               </property>
-       </bean>
-
-       <bean id="slcDefault.ws.client.messageFactory"
-               class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory" />
-
-       <bean name="slcDefault.ws.client.treeTestResultWsNotfier"
-               class="org.argeo.slc.ws.test.tree.WebServiceTreeTestResultNotifier">
-               <property name="template"
-                       ref="slcDefault.ws.client.webServiceTemplate" />
-               <property name="onlyOnClose" value="false" />
-       </bean>
-
-       <bean name="slcDefault.ws.client.slcExecutionNotifier"
-               class="org.argeo.slc.ws.process.WebServiceSlcExecutionNotifier">
-               <property name="template"
-                       ref="slcDefault.ws.client.webServiceTemplate" />
-       </bean>
-
-</beans>