Restructured SLC building
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Jul 2012 14:14:45 +0000 (14:14 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Jul 2012 14:14:45 +0000 (14:14 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@5495 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

80 files changed:
dep/org.argeo.slc.dep.backend/pom.xml
legacy/modules/org.argeo.slc.agent.ext.jdbc/pom.xml
legacy/modules/org.argeo.slc.agent.ext.xalan/pom.xml
legacy/modules/org.argeo.slc.agent.jms/pom.xml
legacy/modules/org.argeo.slc.ext.activemq/pom.xml
legacy/runtime/org.argeo.slc.support.castor/.classpath [deleted file]
legacy/runtime/org.argeo.slc.support.castor/.project [deleted file]
legacy/runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs [deleted file]
legacy/runtime/org.argeo.slc.support.castor/build.properties [deleted file]
legacy/runtime/org.argeo.slc.support.castor/pom.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/site/apt/index.apt [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties [deleted file]
legacy/runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml [deleted file]
modules/agent/pom.xml
modules/org.argeo.slc.agent.jcr/pom.xml
modules/org.argeo.slc.agent/pom.xml
modules/org.argeo.slc.node.jackrabbit/pom.xml
modules/org.argeo.slc.server.repo.webapp/pom.xml
modules/org.argeo.slc.server.repo/pom.xml
modules/server/pom.xml
plugins/org.argeo.slc.client.rcp/META-INF/MANIFEST.MF
plugins/org.argeo.slc.client.rcp/pom.xml
plugins/org.argeo.slc.client.ui.dist/pom.xml
plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF
plugins/org.argeo.slc.client.ui/pom.xml
runtime/org.argeo.slc.support.castor/.classpath [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/.project [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/build.properties [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/pom.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/execution/PrimitiveFieldHandler.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/structure/tree/TreeSPathFieldHandler.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/castor/test/tree/StatusFieldHandler.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/attachment.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/common.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/execution.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/msg.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/process.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/runtime.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/structure.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/test.xml [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/site/apt/index.apt [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionAnswerCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ObjectListCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcAgentDescriptorCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/TreeTestResultCollectionCastorTest.java [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties [new file with mode: 0644]
runtime/org.argeo.slc.support.castor/src/test/resources/org/argeo/slc/castor/applicationContext.xml [new file with mode: 0644]
runtime/pom.xml

index bb76b30494c55cd2dc3d1f01eae73754e6129804..6ffb9aae6b5c314a29eb2ad73451e48f59400ce6 100644 (file)
                        <artifactId>org.argeo.slc.support.jcr</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.activemq</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.server</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.support.equinox</artifactId>
 
                <!-- SLC Agent Modules -->
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.agent</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.agent.jcr</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.node.jackrabbit</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.server.repo</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.server.repo.webapp</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
index 929dc59cdeebcd0fab856785ad5fb28ee195ff3a..1288c1d53e6d8b4f7b8c0e9312d8a19d36aa7e51 100644 (file)
@@ -1,8 +1,8 @@
 <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>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index cb8bf1e8c3daab4a6c6c941d8d2921e05518e0e4..a74e35482295e885a58d089ca1d76848e0500107 100644 (file)
@@ -1,8 +1,8 @@
 <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>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index d6d154ff532b924fa8873a2478dfd79a7a1915d0..fb3fd85b7c625fd3b4576842b6559e419c138ee6 100644 (file)
@@ -1,8 +1,8 @@
 <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>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index b1241927be14778829b27e3638f83a099f0bd577..185dba271bbb50899f7ed6e84bdf7643d4407eb1 100644 (file)
@@ -1,8 +1,8 @@
 <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>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
diff --git a/legacy/runtime/org.argeo.slc.support.castor/.classpath b/legacy/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/legacy/runtime/org.argeo.slc.support.castor/.project b/legacy/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/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
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/legacy/runtime/org.argeo.slc.support.castor/build.properties b/legacy/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/legacy/runtime/org.argeo.slc.support.castor/pom.xml b/legacy/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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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
index 84da38466ae598da91fdbc401a168ab8d1e735eb..52f633ac9819931ab4668ce06996a3191a0ee8dc 100644 (file)
@@ -6,8 +6,8 @@
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
-       <groupId>org.argeo.slc.modules</groupId>
-       <artifactId>agent</artifactId>
+       <groupId>org.argeo.slc</groupId>
+       <artifactId>modules</artifactId>
        <packaging>pom</packaging>
        <name>SLC Modules Agent</name>
        <modules>
index a27eec6271ab516382c80230b7bb2037eef9b8c9..a0b72ae5f8fa367792e3762e29f186e7b2d2f55a 100644 (file)
@@ -1,8 +1,8 @@
 <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>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index b1b056580982991e4985dfd6a44d79d6bfe89cae..03fdcb0b34751b97f56215a618fc749636e4e791 100644 (file)
@@ -1,8 +1,8 @@
 <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>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index 4363c321f13b4411a4bc606c4f3f5f0b14be683a..4bc021e24c07e2dd5854ce40d0d337a507953533 100644 (file)
@@ -1,8 +1,8 @@
 <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>server</artifactId>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index 3f388ea07e48ce453ab116cb65164f82e4bbd112..880feb0971acefefdcd593b776ecb0620b3f453e 100644 (file)
@@ -1,8 +1,8 @@
 <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>server</artifactId>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index 85affbbbd03c6c7e5fa04ab5821860bef28a2eba..fb3abbd47b65934e6e2c4c988d749f679455f811 100644 (file)
@@ -1,8 +1,8 @@
 <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>server</artifactId>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>modules</artifactId>
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
index 31e8d4d96c56f8f9a893e262ead934e6310390fc..fdc177d8c53c745b673d080292e8ef3690d9d923 100644 (file)
@@ -6,8 +6,8 @@
                <version>1.1.3-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
-       <groupId>org.argeo.slc.modules</groupId>
-       <artifactId>server</artifactId>
+       <groupId>org.argeo.slc</groupId>
+       <artifactId>modules</artifactId>
        <packaging>pom</packaging>
        <name>SLC Modules Server</name>
        <modules>
index 201bff662c791b1781a508764d51ca3daf85b8d7..03c71a755e0617afab2eb7b8cf9b0a5630d68216 100644 (file)
@@ -13,6 +13,4 @@ Import-Package: org.argeo.security.ui.rcp,
  org.argeo.slc.execution,
  org.argeo.slc.process,
  org.argeo.slc.runtime,
- org.argeo.slc.services,
- org.argeo.slc.services.impl
 Export-Package: org.argeo.slc.client.rcp
index 62e86094ec9d41d3e9c2ef2f095a00ab0454c684..bbe2e40ca2deaf05ea850504db904f96689f3909 100644 (file)
 
                <!-- Bundles to start -->
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.node.jackrabbit</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.agent</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
index 647520d94d4ef4e9798f2d3d9451fe86b08a2a2b..5a234bfec81f89234d0b953c736881f74f337117 100644 (file)
@@ -38,7 +38,7 @@
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.server.repo</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
index f7ddb79988297ac453f52a7c232c860573bc06fb..07ac629c9ba6754241840765d452ba5051148629 100644 (file)
@@ -43,8 +43,6 @@ Import-Package: javax.jcr;version="2.0.0",
  org.argeo.slc.msg.test.tree,
  org.argeo.slc.process,
  org.argeo.slc.runtime,
- org.argeo.slc.services,
- org.argeo.slc.services.impl,
  org.argeo.slc.test,
  org.eclipse.core.expressions,
  org.eclipse.ui.forms,
index 95c278784592476708ada1b45e09900c42969f1c..b87c5587057cd9f2941e2617045e902a0359ffd2 100644 (file)
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
 
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.server</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
+<!--           <dependency> -->
+<!--                   <groupId>org.argeo.slc.runtime</groupId> -->
+<!--                   <artifactId>org.argeo.slc.server</artifactId> -->
+<!--                   <version>1.1.3-SNAPSHOT</version> -->
+<!--           </dependency> -->
 
                <!-- Argeo Eclipse -->
                <dependency>
diff --git a/runtime/org.argeo.slc.support.castor/.classpath b/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/runtime/org.argeo.slc.support.castor/.project b/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/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
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/runtime/org.argeo.slc.support.castor/build.properties b/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/runtime/org.argeo.slc.support.castor/pom.xml b/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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/runtime/org.argeo.slc.support.castor/src/site/apt/index.apt b/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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/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
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/runtime/org.argeo.slc.support.castor/src/test/resources/log4j.properties b/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/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
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
index d272adeee54aa0f96bdfc0cdf407325825b858bc..97d206be006e42fa97ec8ae5c0a23ebad12ff0e4 100644 (file)
@@ -22,6 +22,7 @@
                <module>org.argeo.slc.support.maven</module>
                <module>org.argeo.slc.support.jemmy</module>
                <module>org.argeo.slc.support.jcr</module>
+               <module>org.argeo.slc.support.castor</module>
                <module>org.argeo.slc.detached</module>
                <module>org.argeo.slc.detached.launcher</module>
                <module>org.argeo.slc.launcher</module>