+++ /dev/null
-<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>modules</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.ext.castor</artifactId>
- <name>SLC Castor Extension</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Fragment-Host>org.castor</Fragment-Host>
- <Import-Package>
- org.argeo.slc.detached;resolution:=optional
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java" output="target/classes" />
- <classpathentry kind="src" path="src/main/resources"
- output="target/classes" />
- <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>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.core</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>
+++ /dev/null
-#Sat Jun 27 17:07:29 CEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-#Mon Feb 14 20:13:06 CET 2011
-eclipse.preferences.version=1
-pluginProject.equinox=false
-pluginProject.extensions=false
-resolve.requirebundle=false
-selfhosting.binExcludes=/org.argeo.slc.core/target/test-classes,/org.argeo.slc.core/target/test-classes
+++ /dev/null
-additional.bundles = slf4j.api,\
- slf4j.log4j,\
- org.apache.log4j,\
- slf4j.org.apache.commons.logging,\
- org.aopalliance,\
- org.aspectj.weaver,\
- net.sf.cglib,\
- org.springframework.context.support,\
- org.springframework.context
-source.. = src/main/java/,\
- src/main/resources/,\
- src/test/java/,\
- src/test/resources/
-bin.includes = META-INF/spring.handlers,\
- META-INF/spring.schemas
-
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.core</artifactId>
- <name>SLC Core</name>
- <description>Basic implementations of SLC Specifications</description>
- <build>
- <outputDirectory>bin</outputDirectory>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.*,org.argeo.slc.core.test.spring
- </Export-Package>
- <Import-Package>
- org.w3c.dom;version="0.0.0",
- org.dbunit;resolution:="optional",
- org.dbunit.database;resolution:="optional",
- org.dbunit.dataset;resolution:="optional",
- org.dbunit.dataset.xml;resolution:="optional",
- org.dbunit.operation;resolution:="optional",
- junit.framework;resolution:="optional",
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.specs</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.commons.base</groupId>
- <artifactId>org.argeo.util</artifactId>
- <version>${version.argeo-commons}</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.commons.security</groupId>
- <artifactId>org.argeo.security.core</artifactId>
- <version>${version.argeo-commons}</version>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.aspectj.runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.aspectj.weaver</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.io</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.exec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.cli</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.org.apache.commons.logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.commons.base</groupId>
- <artifactId>org.argeo.dep.log4j</artifactId>
- <version>${version.argeo-commons}</version>
- <type>pom</type>
- </dependency>
-
- <!-- Spring -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.context</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.aop</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.security.core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>net.sf.cglib</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.codec</artifactId>
- </dependency>
-
- <!-- Test -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:slc="http://argeo.org/projects/slc/schemas"
- elementFormDefault="qualified"
- targetNamespace="http://argeo.org/projects/slc/schemas">
- <!-- TREE TEST RESULT -->
- <xs:element name="tree-test-result" type="slc:TreeTestResultType" />
- <xs:element name="tree-test-result-collection"
- type="slc:TreeTestResultCollectionType" />
-
- <xs:complexType name="TreeTestResultCollectionType">
- <xs:all>
- <xs:element name="results" minOccurs="0"
- type="slc:ResultsType" />
- </xs:all>
- <xs:attribute name="id" use="required" />
- </xs:complexType>
- <xs:complexType name="ResultsType">
- <xs:sequence>
- <xs:element name="tree-test-result"
- type="slc:TreeTestResultType" minOccurs="0"
- maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="TreeTestResultType">
- <xs:all>
- <xs:element name="close-date" type="xs:dateTime"
- minOccurs="0" />
- <xs:element name="attributes" minOccurs="0"
- type="slc:AttributesType" />
- <xs:element name="result-parts" minOccurs="0"
- type="slc:ResultPartsType" />
- <xs:element name="elements" minOccurs="0"
- type="slc:ElementsType" />
- </xs:all>
- <xs:attribute name="uuid" use="required" />
- </xs:complexType>
- <xs:complexType name="ResultPartsType">
- <xs:sequence>
- <xs:element name="result-part" type="slc:ResultPartType"
- minOccurs="0" maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="ResultPartType">
- <xs:all>
- <xs:element name="part-sub-list" type="slc:PartSubListType" />
- </xs:all>
- <xs:attribute name="path" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="PartSubListType">
- <xs:all>
- <xs:element name="parts" minOccurs="0" type="slc:PartsType" />
- </xs:all>
- </xs:complexType>
- <xs:complexType name="PartsType">
- <xs:sequence>
- <xs:element name="simple-result-part"
- type="slc:SimpleResultPartType" maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="SimpleResultPartType">
- <xs:all>
- <xs:element name="status">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="PASSED" />
- <xs:enumeration value="FAILED" />
- <xs:enumeration value="ERROR" />
- </xs:restriction>
- </xs:simpleType>
- </xs:element>
- <xs:element name="message" type="xs:string" />
- <xs:element name="exception-message" minOccurs="0"
- type="xs:string" />
- <xs:element name="stack-lines" minOccurs="0"
- type="slc:StackLinesType" />
- <xs:element name="test-run-uuid" type="xs:string"
- minOccurs="0" />
- </xs:all>
- </xs:complexType>
- <xs:complexType name="StackLinesType">
- <xs:sequence>
- <xs:element name="stack-line" maxOccurs="unbounded"
- type="xs:string" />
- </xs:sequence>
- <xs:attribute name="message" type="xs:string" />
- </xs:complexType>
- <xs:complexType name="ElementsType">
- <xs:sequence>
- <xs:element name="element" type="slc:ElementType"
- minOccurs="0" maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="ElementType">
- <xs:all>
- <xs:element name="simple-sElement"
- type="slc:SimpleSElementType" />
- </xs:all>
- <xs:attribute name="path" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="SimpleSElementType">
- <xs:all>
- <xs:element name="label" type="xs:string" />
- <xs:element name="tags" type="slc:TagsType" minOccurs="0" />
- </xs:all>
- </xs:complexType>
- <xs:complexType name="TagsType">
- <xs:sequence>
- <xs:element name="tag" type="slc:TagType" minOccurs="0"
- maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="TagType">
- <xs:all>
- <xs:element name="tag-value" type="xs:string" />
- </xs:all>
- <xs:attribute name="name" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="TreeSPathType">
- <xs:attribute name="as-unique-string" type="xs:string"
- use="required" />
- </xs:complexType>
- <xs:complexType name="TestRunDescriptorType">
- <xs:all>
- <xs:element name="test-run-uuid" type="xs:string" />
- <xs:element name="slc-execution-uuid" type="xs:string"
- minOccurs="0" />
- <xs:element name="slc-execution-step-uuid" type="xs:string"
- minOccurs="0" />
- <xs:element name="deployed-sytem-id" type="xs:string"
- minOccurs="0" />
- <xs:element name="test-result-uuid" type="xs:string"
- minOccurs="0" />
- </xs:all>
- </xs:complexType>
-
- <!-- BASIC MESSAGES -->
- <xs:element name="execution-answer">
- <xs:complexType>
- <xs:all>
- <xs:element name="status"
- type="xs:string" maxOccurs="1" minOccurs="1" />
- <xs:element name="message"
- type="xs:string" maxOccurs="1" minOccurs="1"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <!-- TREE TEST RESULT REQUESTS -->
- <xs:element name="create-tree-test-result-request">
- <xs:complexType>
- <xs:all>
- <xs:element name="tree-test-result"
- type="slc:TreeTestResultType" />
- <xs:element name="test-run-descriptor"
- type="slc:TestRunDescriptorType" maxOccurs="1" minOccurs="0"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="close-tree-test-result-request">
- <xs:complexType>
- <xs:all>
- <xs:element name="result-uuid" type="xs:string" />
- <xs:element name="close-date" type="xs:dateTime" />
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="result-part-request">
- <xs:complexType>
- <xs:all>
- <xs:element name="result-uuid" type="xs:string" />
- <xs:element name="simple-result-part"
- type="slc:SimpleResultPartType" />
- <xs:element name="related-elements"
- type="slc:ElementsType" />
- <xs:element name="tree-sPath" type="slc:TreeSPathType" />
- <xs:element name="test-run-descriptor"
- type="slc:TestRunDescriptorType" />
- <xs:element name="attributes" minOccurs="0"
- type="slc:AttributesType" />
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <!-- SLC EXECUTION -->
- <xs:element name="slc-execution" type="slc:SlcExecutionType" />
- <xs:complexType name="SlcExecutionType">
- <xs:all>
- <xs:element name="status" type="xs:string" />
- <xs:element name="type" type="xs:string" />
- <xs:element name="host" type="xs:string" />
- <xs:element name="user" type="xs:string" />
- <xs:element name="steps" minOccurs="0"
- type="slc:SlcExecutionStepsType" />
- <xs:element name="attributes" minOccurs="0"
- type="slc:AttributesType" />
- </xs:all>
- <xs:attribute name="uuid" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="SlcExecutionStepsType">
- <xs:sequence>
- <xs:element name="slc-execution-step"
- type="slc:SlcExecutionStepType" maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="SlcExecutionStepType">
- <xs:all>
- <xs:element name="type" type="xs:string" />
- <xs:element name="thread" type="xs:string" />
- <xs:element name="timestamp" type="xs:dateTime" />
- <xs:element name="log-lines" minOccurs="0">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="log-line" type="xs:string"
- maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:all>
- <xs:attribute name="uuid" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="AttributesType">
- <xs:sequence>
- <xs:element name="attribute" type="slc:AttributeType"
- minOccurs="0" maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="AttributeType">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="name" type="xs:string"
- use="required" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!-- SLC EXECUTION REQUESTS-->
- <xs:element name="slc-execution-request">
- <xs:complexType>
- <xs:all>
- <xs:element name="slc-execution"
- type="slc:SlcExecutionType" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="slc-execution-steps-request">
- <xs:complexType>
- <xs:all>
- <xs:element name="slc-execution-uuid" type="xs:string" />
- <xs:element name="steps"
- type="slc:SlcExecutionStepsType" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="slc-execution-status-request">
- <xs:complexType>
- <xs:all>
- <xs:element name="slc-execution-uuid" type="xs:string" />
- <xs:element name="new-status" type="xs:string" />
- </xs:all>
- </xs:complexType>
- </xs:element>
-
-</xs:schema>
\ No newline at end of file
+++ /dev/null
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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
- default-lazy-init="true">\r
-\r
- <bean id="slcDefault.xml.xsdValidator"\r
- factory-bean="slcDefault.xml.xsdSchema" factory-method="createValidator" />\r
-\r
- <bean id="slcDefault.xml.xsdSchema"\r
- class="org.springframework.xml.xsd.SimpleXsdSchema">\r
- <property name="xsd"\r
- value="classpath:/org/argeo/slc/xml/slc.xsd" />\r
- </bean>\r
-</beans>\r
+++ /dev/null
-# 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
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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
- <bean id="relativeResourceSet" class="org.argeo.slc.core.deploy.DefaultResourceSet">\r
- <property name="base" value="classpath:/org/argeo/slc/core/deploy/data" />\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="executionModule_1" class="org.argeo.slc.core.execution.SimpleSpringExecutionModule" >\r
- <property name="executionContext">\r
- <ref bean="executionContext" />\r
- </property> \r
- <property name="name" value="dummyname" />\r
- <property name="version" value="dummyversion" />\r
- </bean>\r
- \r
- <bean id="main" parent="slcTemplate.simpleFlow">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="testKey">\r
- <bean parent="specAttr.primitive" p:value="660" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- <property name="executables">\r
- <list>\r
- <ref local="echo1" />\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="echo1" parent="task.echo" scope="execution">\r
- <property name="message"\r
- value="From main! @{testKey}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="canonic.xml" />\r
-\r
- <bean id="canonic.001" parent="canonic.flowTemplate">\r
- <constructor-arg>\r
- <map>\r
- <entry key="parameterAtInstantiation" value="1" />\r
- </map>\r
- </constructor-arg>\r
- </bean>\r
-</beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="canonic.xml" />\r
-\r
- <bean id="canonic.002" parent="canonic.flowTemplate">\r
- <constructor-arg>\r
- <map>\r
- <entry key="parameterAtInstantiation" value="2" />\r
- <entry key="displayWithoutControl" value="102" />\r
- <entry key="displayWithControl" value="202" />\r
- <entry key="hide" value="202" />\r
- <entry key="notParameterAtInstantiation" value="202" />\r
- </map>\r
- </constructor-arg>\r
- </bean>\r
-</beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="canonic.xml" />\r
-\r
- <bean id="canonic.003" parent="canonic.flowTemplate">\r
- <constructor-arg>\r
- <map>\r
- <!-- missing parameter -->\r
- <entry key="displayWithoutControl" value="102" />\r
- <entry key="displayWithControl" value="202" />\r
- <entry key="hide" value="202" />\r
- </map>\r
- </constructor-arg>\r
- </bean>\r
-</beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="canonic.xml" />\r
-\r
- <bean id="canonic.004" parent="canonic.flowTemplate">\r
- <constructor-arg>\r
- <map>\r
- <entry key="parameterAtInstantiation" value="2" />\r
- <entry key="displayWithoutControl" value="102" />\r
- <entry key="displayWithControl" value="202" />\r
- <entry key="hide" value="202" />\r
- <entry key="unknownParameter" value="1" />\r
- </map>\r
- </constructor-arg>\r
- </bean>\r
-</beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" />\r
-\r
- <bean id="canonic.spec" parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="parameterAtInstantiation">\r
- <bean parent="specAttr.primitive" p:isParameter="true" p:type="integer" />\r
- </entry>\r
- <entry key="displayWithoutControl">\r
- <bean parent="specAttr.primitive" p:value="100" p:isParameter="true"\r
- p:isFrozen="true" p:type="integer" />\r
- </entry>\r
- <entry key="displayWithControl">\r
- <bean parent="specAttr.primitive" p:value="200" p:isParameter="true"\r
- p:isFrozen="false" p:type="integer" />\r
- </entry>\r
- <entry key="hide">\r
- <bean parent="specAttr.primitive" p:value="300" p:isParameter="true"\r
- p:isFrozen="false" p:isHidden="true" p:type="integer" />\r
- </entry> \r
- <entry key="notParameterAtInstantiation">\r
- <bean parent="specAttr.primitive" p:value="400" p:isParameter="false"\r
- p:isFrozen="false" p:isHidden="false" p:type="integer" />\r
- </entry> \r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="canonic.flowTemplate" parent="slcTemplate.simpleFlow"\r
- abstract="true">\r
- <constructor-arg ref="canonic.spec" />\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo"\r
- p:message="Canonical: displayWithControl=@{displayWithControl}, displayWithoutControl=@{displayWithoutControl}, hide=@{hide}">\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" />\r
-\r
- <bean id="executionResources.spec" parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="var">\r
- <bean parent="specAttr.primitive" p:isParameter="false"\r
- p:type="integer" p:value="60" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="executionResources.placeholderPass" parent="slcTemplate.simpleFlow">\r
- <constructor-arg ref="executionResources.spec" />\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo">\r
- <property name="message" value="DATA" />\r
- <property name="writeTo">\r
- <bean parent="slcTemplate.resourcesFactoryBean" scope="execution">\r
- <property name="executionResources" ref="executionResources" />\r
- <property name="relativePath" value="subdir/@{var}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property>\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="executionResources.placeholderFail" parent="slcTemplate.simpleFlow">\r
- <constructor-arg ref="executionResources.spec" />\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo">\r
- <property name="message" value="DATA" />\r
- <property name="writeTo">\r
- <bean factory-bean="executionResources" factory-method="getWritableResource"\r
- scope="execution">\r
- <constructor-arg value="subdir/@{var}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property>\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="executionResources.simple" parent="slcTemplate.simpleFlow">\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo">\r
- <property name="message" value="DATA" />\r
- <property name="writeTo">\r
- <bean factory-bean="executionResources" factory-method="getWritableResource"\r
- scope="execution">\r
- <constructor-arg value="subdir/writeTo" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property>\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="executionResources" parent="slcTemplate.fileResources">\r
- <property name="executionContext" ref="executionContext" />\r
- <property name="withExecutionSubdirectory" value="false" />\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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) 2007-2012 Mathieu Baudier Licensed under the Apache License,
- Version 2.0 (the "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software distributed
- under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
- OR CONDITIONS OF ANY KIND, either express or implied. See the License for
- the specific language governing permissions and limitations under the License. -->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
- <import resource="classpath:org/argeo/slc/core/execution/spring.xml" />
- <import resource="classpath:/org/argeo/slc/core/test/spring.xml" />
-
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="myTestRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="basic.testDef" />\r
- <property name="testResult" ref="myTestResult"/>\r
- </bean> \r
-\r
- <bean id="myFlow" parent="slcTemplate.simpleFlow">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="testKey">\r
- <bean parent="specAttr.primitive" p:value="myValue" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- <property name="executables">\r
- <list>\r
- <ref local="echo1" />\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="simpleMap.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingMap.testData" />\r
- </bean> \r
- \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="simpleList.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingList.testData" />\r
- </bean> \r
- \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="simpleSet.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingSet.testData" />\r
- </bean> \r
- \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingListMap.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingSetMap.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingComplex.testData" />\r
- </bean> \r
- \r
- </list>\r
- </property>\r
- </bean>\r
-\r
-\r
- <bean id="simpleMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <map>\r
- <entry key="key1" value="myValue_myValue" />\r
- </map>\r
- </property>\r
- <property name="reached">\r
- <map>\r
- <entry key="key1" value="@{testKey}_@{testKey}" />\r
- </map>\r
- </property>\r
- </bean>\r
- \r
- <bean id="cascadingMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <map>\r
- <entry key="key3">\r
- <map>\r
- <entry key="key2">\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map>\r
- </entry>\r
- <entry key="key2bis" value="myValue" />\r
- </map>\r
- </entry>\r
- </map>\r
- </property>\r
- <property name="reached">\r
- <map>\r
- <entry key="key3">\r
- <map>\r
- <entry key="key2">\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map>\r
- </entry>\r
- <entry key="key2bis" value="@{testKey}" />\r
- </map>\r
- </entry>\r
- </map>\r
- </property>\r
- </bean> \r
- \r
- <bean id="simpleList.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <list>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </list>\r
- </property>\r
- <property name="reached">\r
- <list>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value> \r
- </list>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingList.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <list>\r
- <list>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </list>\r
- <value>myValue</value>\r
- </list>\r
- </property>\r
- <property name="reached">\r
- <list>\r
- <list>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- </list>\r
- <value>@{testKey}</value>\r
- </list>\r
- </property>\r
- </bean> \r
- \r
- <bean id="simpleSet.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value> \r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingSet.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <set>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </set>\r
- <value>myValue</value>\r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <set>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- </set>\r
- <value>@{testKey}</value>\r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingListMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <list>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- </list>\r
- </property>\r
- <property name="reached">\r
- <list>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- </list>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingSetMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingComplex.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- <list>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- <set>\r
- <set>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- <list>\r
- <list>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </list>\r
- <value>myValue</value>\r
- </list> \r
- </set>\r
- <value>myValue</value>\r
- </set> \r
- </list> \r
- <set>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- </set> \r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- <list>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- <set>\r
- <set>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- <list>\r
- <list>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- </list>\r
- <value>@{testKey}</value>\r
- </list> \r
- </set>\r
- <value>@{testKey}</value>\r
- </set> \r
- </list> \r
- <set>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- </set> \r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="basic.testDef" class="org.argeo.slc.core.test.BasicTestDefinition">\r
- </bean> \r
-\r
-\r
- <bean id="echo1" parent="task.echo" scope="prototype">\r
- <property name="message"\r
- value="testKey=@{testKey}" />\r
- </bean>\r
- \r
- <bean id="myTestResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="myTestRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="basic.testDef" />\r
- <property name="testResult" ref="myTestResult"/>\r
- </bean> \r
-\r
- <bean id="abstractFlow" parent="slcTemplate.simpleFlow" abstract="true">\r
- <property name="executables">\r
- <list>\r
- <ref local="echo1" />\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="simpleMap.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingMap.testData" />\r
- </bean> \r
- \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="simpleList.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingList.testData" />\r
- </bean> \r
- \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="simpleSet.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingSet.testData" />\r
- </bean> \r
- \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingListMap.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingSetMap.testData" />\r
- </bean> \r
- <bean parent="myTestRunTemplate">\r
- <property name="testData" ref="cascadingComplex.testData" />\r
- </bean> \r
- \r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flow1" parent="abstractFlow" scope="prototype">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="testKey">\r
- <bean parent="specAttr.primitive" p:value="myValue" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- </bean> \r
-\r
- <bean id="flow2" parent="abstractFlow" scope="prototype">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="testKey">\r
- <bean parent="specAttr.primitive" p:value="myValue2" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- </bean> \r
-\r
-\r
- <bean id="simpleMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <map>\r
- <entry key="key1" value="myValue_myValue" />\r
- </map>\r
- </property>\r
- <property name="reached">\r
- <map>\r
- <entry key="key1" value="@{testKey}_@{testKey}" />\r
- </map>\r
- </property>\r
- </bean>\r
- \r
- <bean id="cascadingMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <map>\r
- <entry key="key3">\r
- <map>\r
- <entry key="key2">\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map>\r
- </entry>\r
- <entry key="key2bis" value="myValue" />\r
- </map>\r
- </entry>\r
- </map>\r
- </property>\r
- <property name="reached">\r
- <map>\r
- <entry key="key3">\r
- <map>\r
- <entry key="key2">\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map>\r
- </entry>\r
- <entry key="key2bis" value="@{testKey}" />\r
- </map>\r
- </entry>\r
- </map>\r
- </property>\r
- </bean> \r
- \r
- <bean id="simpleList.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <list>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </list>\r
- </property>\r
- <property name="reached">\r
- <list>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value> \r
- </list>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingList.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <list>\r
- <list>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </list>\r
- <value>myValue</value>\r
- </list>\r
- </property>\r
- <property name="reached">\r
- <list>\r
- <list>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- </list>\r
- <value>@{testKey}</value>\r
- </list>\r
- </property>\r
- </bean> \r
- \r
- <bean id="simpleSet.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value> \r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingSet.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <set>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </set>\r
- <value>myValue</value>\r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <set>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- </set>\r
- <value>@{testKey}</value>\r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingListMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <list>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- </list>\r
- </property>\r
- <property name="reached">\r
- <list>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- </list>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingSetMap.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="cascadingComplex.testData" class="org.argeo.slc.core.test.BasicTestData" scope="prototype">\r
- <property name="expected">\r
- <set>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- <list>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- <set>\r
- <set>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- <list>\r
- <list>\r
- <value>myValue</value>\r
- <value>_myValue_</value>\r
- </list>\r
- <value>myValue</value>\r
- </list> \r
- </set>\r
- <value>myValue</value>\r
- </set> \r
- </list> \r
- <set>\r
- <map>\r
- <entry key="key1" value="myValue" />\r
- </map> \r
- </set> \r
- </set>\r
- </property>\r
- <property name="reached">\r
- <set>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- <list>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- <set>\r
- <set>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- <list>\r
- <list>\r
- <value>@{testKey}</value>\r
- <value>_@{testKey}_</value>\r
- </list>\r
- <value>@{testKey}</value>\r
- </list> \r
- </set>\r
- <value>@{testKey}</value>\r
- </set> \r
- </list> \r
- <set>\r
- <map>\r
- <entry key="key1" value="@{testKey}" />\r
- </map> \r
- </set> \r
- </set>\r
- </property>\r
- </bean> \r
- \r
- <bean id="basic.testDef" class="org.argeo.slc.core.test.BasicTestDefinition">\r
- </bean> \r
-\r
-\r
- <bean id="echo1" parent="task.echo" scope="prototype">\r
- <property name="message"\r
- value="testKey=@{testKey}" />\r
- </bean>\r
- \r
- <bean id="myTestResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="minimal" parent="slcTemplate.simpleFlow">\r
- <property name="executionSpec">\r
- <bean parent="slcTemplate.simpleSpec">\r
-<!-- <property name="attributes">\r
- <map>\r
- <entry key="testKey">\r
- <bean parent="specAttr.primitive" p:value="660" />\r
- </entry>\r
- </map>\r
- </property> -->\r
- </bean>\r
- </property>\r
- <property name="executables">\r
- <list>\r
- <ref local="echo1" />\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="echo1" parent="task.echo" scope="execution">\r
- <property name="message"\r
- value="From minimal" />\r
- <aop:scoped-proxy />\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="myTestResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="myTestDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
-\r
- <bean id="myTestRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="myTestDef" />\r
- <property name="testResult" ref="myTestResult"/>\r
- </bean> \r
-\r
- <bean id="fileDiff.spec" parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="fileName">\r
- <bean parent="specAttr.primitive" p:isParameter="true" p:type="string"\r
- p:isFrozen="true" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
-\r
-\r
- <bean id="fileDiff.flowTemplate" parent="slcTemplate.simpleFlow"\r
- abstract="true">\r
- <property name="path" value="/fileDiff/testcases" />\r
- <constructor-arg ref="fileDiff.spec" />\r
- <property name="executables">\r
- <list> \r
- <bean parent="task.echo">\r
- <property name="message" value="fileName=@{fileName}" />\r
- </bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="file1" />\r
- <property name="reached" value="@{fileName}" />\r
- </bean>\r
- </property> \r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
- \r
- <bean id="echo" parent="task.echo" scope="prototype">\r
- <property name="message" value="fileName=@{fileName}" />\r
- </bean> \r
- \r
- <bean id="flow1" parent="fileDiff.flowTemplate">\r
- <constructor-arg>\r
- <map>\r
- <entry key="fileName" value="file1" />\r
- </map>\r
- </constructor-arg>\r
- </bean> \r
-\r
- <bean id="flow2" parent="fileDiff.flowTemplate">\r
- <constructor-arg>\r
- <map>\r
- <entry key="fileName" value="file2" />\r
- </map>\r
- </constructor-arg>\r
- </bean> \r
- \r
- \r
- <!-- \r
- <bean id="flow1" parent="slcTemplate.simpleFlow">\r
- <property name="path" value="/fileDiff/testcases" />\r
- <constructor-arg ref="fileDiff.spec" />\r
- <constructor-arg>\r
- <map>\r
- <entry key="fileName" value="file1" />\r
- </map>\r
- </constructor-arg> \r
- <property name="executables">\r
- <list> \r
- <bean parent="task.echo" scope="execution">\r
- <property name="message" value="fileName=@{fileName}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flow2" parent="slcTemplate.simpleFlow">\r
- <property name="path" value="/fileDiff/testcases" />\r
- <constructor-arg ref="fileDiff.spec" />\r
- <constructor-arg>\r
- <map>\r
- <entry key="fileName" value="file2" />\r
- </map>\r
- </constructor-arg> \r
- <property name="executables">\r
- <list> \r
- <bean parent="task.echo" scope="execution">\r
- <property name="message" value="fileName=@{fileName}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
- -->\r
-<!-- \r
- <bean id="main" parent="slcTemplate.simpleFlow">\r
- <property name="executables">\r
- <list> \r
- <ref bean="flow1"/> \r
- <ref bean="flow2"/> \r
- </list>\r
- </property>\r
- </bean>\r
- -->\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" />\r
-\r
- <!-- DEFINITIONS -->\r
- <bean id="parameterRef.spec" parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="exceptionIfInitCalledTwice">\r
- <bean parent="specAttr.ref"\r
- p:targetClass="org.argeo.slc.core.execution.ExceptionIfInitCalledTwice"\r
- p:isParameter="true" p:isFrozen="true" />\r
- </entry>\r
- <entry key="testData1">\r
- <bean parent="specAttr.ref" p:targetClass="org.argeo.slc.core.test.BasicTestData"\r
- p:isParameter="true" p:isFrozen="true" />\r
- </entry>\r
- <entry key="testData2">\r
- <bean parent="specAttr.ref" p:targetClass="org.argeo.slc.core.test.BasicTestData"\r
- p:isParameter="true" p:isFrozen="true" />\r
- </entry>\r
- <entry key="testedComponentId">\r
- <bean parent="specAttr.primitive" p:value="100" p:isParameter="true"\r
- p:type="integer" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="parameterRef.flowTemplate" parent="slcTemplate.simpleFlow"\r
- abstract="true">\r
- <constructor-arg ref="parameterRef.spec" />\r
- <property name="executables">\r
- <list>\r
- <!-- Primitive -->\r
- <bean parent="task.echo" scope="execution">\r
- <property name="message" value="testedComponentId=@{testedComponentId}" />\r
- </bean>\r
-\r
- <!-- Exception if init called twice -->\r
- <bean parent="parameterRef">\r
- <constructor-arg value="exceptionIfInitCalledTwice" />\r
- </bean>\r
- <bean parent="parameterRef">\r
- <property name="name" value="exceptionIfInitCalledTwice" />\r
- </bean>\r
-\r
- <!-- Basic tests -->\r
- <bean parent="parameterRef.testRun">\r
- <property name="testData">\r
- <bean parent="parameterRef">\r
- <constructor-arg value="testData1" />\r
- </bean>\r
- </property>\r
- </bean>\r
- <bean parent="parameterRef.testRun">\r
- <property name="testData" ref="ref1" />\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <!-- TEST CASES -->\r
- <bean id="parameterRef.001" parent="parameterRef.flowTemplate">\r
- <constructor-arg>\r
- <map>\r
- <entry key="exceptionIfInitCalledTwice">\r
- <bean class="org.argeo.slc.core.execution.ExceptionIfInitCalledTwice" />\r
- </entry>\r
- <entry key="testData1">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="toto" />\r
- <property name="reached" value="toto" />\r
- </bean>\r
- </entry>\r
- <entry key="testData2">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="tata" />\r
- <property name="reached" value="toto" />\r
- </bean>\r
- </entry>\r
- </map>\r
- </constructor-arg>\r
- </bean>\r
-\r
- <!-- UTILITIES -->\r
-\r
- <bean id="ref1" parent="parameterRef">\r
- <constructor-arg value="testData2" />\r
- </bean>\r
-\r
- <bean id="parameterRef.testResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="parameterRef.testRun" class="org.argeo.slc.core.test.SimpleTestRun"\r
- abstract="true">\r
- <property name="testResult" ref="parameterRef.testResult" />\r
- <property name="testDefinition">\r
- <bean class="org.argeo.slc.core.test.BasicTestDefinition" />\r
- </property>\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="myTestResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="myTestDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
-\r
- <bean id="echo1" parent="task.echo">\r
- <property name="message" value="From minimal" />\r
- </bean>\r
-\r
- <bean id="myTestRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="myTestDef" />\r
- <property name="testResult" ref="myTestResult"/>\r
- </bean> \r
-\r
- <!-- \r
- The Flow A contains the flow B as executable.\r
- \r
- Parameters\r
- p1: flow A: default - flow B: - \r
- p2: flow A: set - flow B: - \r
- p3: flow A: default - flow B: default \r
- p4: flow A: set - flow B: default\r
- p5: flow A: default - flow B: set \r
- p6: flow A: set - flow B: set\r
- p7: flow A: - - flow B: default\r
- p8: flow A: - - flow B: set\r
- \r
- \r
- -->\r
-\r
- <bean id="flowA" parent="slcTemplate.simpleFlow">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="p1"><bean parent="specAttr.primitive" p:value="da1" /></entry>\r
- <entry key="p2"><bean parent="specAttr.primitive" p:value="da2" /></entry> \r
- <entry key="p3"><bean parent="specAttr.primitive" p:value="da3" /></entry> \r
- <entry key="p4"><bean parent="specAttr.primitive" p:value="da4" /></entry> \r
- <entry key="p5"><bean parent="specAttr.primitive" p:value="da5" /></entry> \r
- <entry key="p6"><bean parent="specAttr.primitive" p:value="da6" /></entry> \r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- <constructor-arg> \r
- <map>\r
- <entry key="p2" value="va2"/>\r
- <entry key="p4" value="va4"/>\r
- <entry key="p6" value="va6"/>\r
- </map>\r
- </constructor-arg>\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo"><property name="message" value="p1=@{p1}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da1" />\r
- <property name="reached" value="@{p1}" />\r
- </bean>\r
- </property> \r
- </bean>\r
- <bean parent="task.echo"><property name="message" value="p2=@{p2}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va2" />\r
- <property name="reached" value="@{p2}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p3=@{p3}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da3" />\r
- <property name="reached" value="@{p3}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p4=@{p4}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va4" />\r
- <property name="reached" value="@{p4}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p5=@{p5}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da5" />\r
- <property name="reached" value="@{p5}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p6=@{p6}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va6" />\r
- <property name="reached" value="@{p6}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <ref bean="flowB"/> \r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flowB" parent="slcTemplate.simpleFlow" scope="prototype">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="p3"><bean parent="specAttr.primitive" p:value="db3" /></entry> \r
- <entry key="p4"><bean parent="specAttr.primitive" p:value="db4" /></entry>\r
- <entry key="p5"><bean parent="specAttr.primitive" p:value="db5" /></entry> \r
- <entry key="p6"><bean parent="specAttr.primitive" p:value="db6" /></entry>\r
- <entry key="p7"><bean parent="specAttr.primitive" p:value="db7" /></entry> \r
- <entry key="p8"><bean parent="specAttr.primitive" p:value="db8" /></entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- <constructor-arg> \r
- <map>\r
- <entry key="p3" value="vb3"/>\r
- <entry key="p4" value="vb4"/>\r
- <entry key="p7" value="vb7"/>\r
- </map>\r
- </constructor-arg> \r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo"><property name="message" value="p1=@{p1}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da1" />\r
- <property name="reached" value="@{p1}" />\r
- </bean>\r
- </property> \r
- </bean>\r
- <bean parent="task.echo"><property name="message" value="p2=@{p2}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va2" />\r
- <property name="reached" value="@{p2}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p3=@{p3}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da3" />\r
- <property name="reached" value="@{p3}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p4=@{p4}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va4" />\r
- <property name="reached" value="@{p4}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p5=@{p5}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da5" />\r
- <property name="reached" value="@{p5}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p6=@{p6}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va6" />\r
- <property name="reached" value="@{p6}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p7=@{p7}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="vb7" />\r
- <property name="reached" value="@{p7}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p8=@{p8}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="db8" />\r
- <property name="reached" value="@{p8}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- \r
- <!-- test in scope execution -->\r
- <bean parent="task.echo" scope="execution"><property name="message" value="p1=@{p1}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="e1" />\r
- <property name="reached" value="@{p1}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean>\r
- <bean parent="task.echo" scope="execution"><property name="message" value="p2=@{p2}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="e2" />\r
- <property name="reached" value="@{p2}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo" scope="execution"><property name="message" value="p3=@{p3}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="e3" />\r
- <property name="reached" value="@{p3}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo" scope="execution"><property name="message" value="p4=@{p4}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="e4" />\r
- <property name="reached" value="@{p4}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo" scope="execution"><property name="message" value="p5=@{p5}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="e5" />\r
- <property name="reached" value="@{p5}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo" scope="execution"><property name="message" value="p6=@{p6}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="e6" />\r
- <property name="reached" value="@{p6}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean>\r
- \r
- <!-- \r
- p7 and p8 are not in the spec of FlowA and therefore can not be overridden\r
- at the execution\r
- -->\r
- <bean parent="task.echo" scope="execution"><property name="message" value="p7=@{p7}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="vb7" />\r
- <property name="reached" value="@{p7}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo" scope="execution"><property name="message" value="p8=@{p8}" /><aop:scoped-proxy /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <property name="expected" value="db8" />\r
- <property name="reached" value="@{p8}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property> \r
- </bean> \r
- \r
- </list>\r
- </property>\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="myTestResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="myTestDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
-\r
- <bean id="echo1" parent="task.echo">\r
- <property name="message" value="From minimal" />\r
- </bean>\r
-\r
- <bean id="myTestRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="myTestDef" />\r
- <property name="testResult" ref="myTestResult"/>\r
- </bean> \r
-\r
- <!-- \r
- The Flow A contains the flow B as executable.\r
- \r
- Parameters\r
- p1: flow A: default - flow B: - \r
- p2: flow A: set - flow B: - \r
- p3: flow A: default - flow B: default \r
- p4: flow A: set - flow B: default\r
- p5: flow A: default - flow B: set \r
- p6: flow A: set - flow B: set\r
- p7: flow A: - - flow B: default\r
- p8: flow A: - - flow B: set\r
- \r
- \r
- -->\r
-\r
- <bean id="flowA" parent="slcTemplate.simpleFlow">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="p1"><bean parent="specAttr.primitive" p:value="da1" /></entry>\r
- <entry key="p2"><bean parent="specAttr.primitive" p:value="da2" /></entry> \r
- <entry key="p3"><bean parent="specAttr.primitive" p:value="da3" /></entry> \r
- <entry key="p4"><bean parent="specAttr.primitive" p:value="da4" /></entry> \r
- <entry key="p5"><bean parent="specAttr.primitive" p:value="da5" /></entry> \r
- <entry key="p6"><bean parent="specAttr.primitive" p:value="da6" /></entry> \r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- <constructor-arg> \r
- <map>\r
- <entry key="p2" value="va2"/>\r
- <entry key="p4" value="va4"/>\r
- <entry key="p6" value="va6"/>\r
- </map>\r
- </constructor-arg>\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo"><property name="message" value="p1=@{p1}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da1" />\r
- <property name="reached" value="@{p1}" />\r
- </bean>\r
- </property> \r
- </bean>\r
- <bean parent="task.echo"><property name="message" value="p2=@{p2}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va2" />\r
- <property name="reached" value="@{p2}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p3=@{p3}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da3" />\r
- <property name="reached" value="@{p3}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p4=@{p4}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va4" />\r
- <property name="reached" value="@{p4}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p5=@{p5}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da5" />\r
- <property name="reached" value="@{p5}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p6=@{p6}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va6" />\r
- <property name="reached" value="@{p6}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <ref bean="flowB"/> \r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flowB" parent="slcTemplate.simpleFlow" scope="prototype">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="p3"><bean parent="specAttr.primitive" p:value="db3" /></entry> \r
- <entry key="p4"><bean parent="specAttr.primitive" p:value="db4" /></entry>\r
- <entry key="p5"><bean parent="specAttr.primitive" p:value="db5" /></entry> \r
- <entry key="p6"><bean parent="specAttr.primitive" p:value="db6" /></entry>\r
- <entry key="p7"><bean parent="specAttr.primitive" p:value="db7" /></entry> \r
- <entry key="p8"><bean parent="specAttr.primitive" p:value="db8" /></entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- <constructor-arg> \r
- <map>\r
- <entry key="p3" value="vb3"/>\r
- <entry key="p4" value="vb4"/>\r
- <entry key="p7" value="vb7"/>\r
- </map>\r
- </constructor-arg> \r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo"><property name="message" value="p1=@{p1}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da1" />\r
- <property name="reached" value="@{p1}" />\r
- </bean>\r
- </property> \r
- </bean>\r
- <bean parent="task.echo"><property name="message" value="p2=@{p2}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va2" />\r
- <property name="reached" value="@{p2}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p3=@{p3}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da3" />\r
- <property name="reached" value="@{p3}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p4=@{p4}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va4" />\r
- <property name="reached" value="@{p4}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p5=@{p5}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="da5" />\r
- <property name="reached" value="@{p5}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p6=@{p6}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="va6" />\r
- <property name="reached" value="@{p6}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p7=@{p7}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="vb7" />\r
- <property name="reached" value="@{p7}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- <bean parent="task.echo"><property name="message" value="p8=@{p8}" /></bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="db8" />\r
- <property name="reached" value="@{p8}" />\r
- </bean>\r
- </property> \r
- </bean> \r
- </list>\r
- </property>\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
- \r
- <bean id="myTestResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="myTestDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
-\r
- <bean id="myTestRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="myTestDef" />\r
- <property name="testResult" ref="myTestResult"/>\r
- </bean> \r
- \r
- <bean id="spec1" parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="testedComponentId">\r
- <bean parent="specAttr.primitive" p:isParameter="true"\r
- p:type="integer" />\r
- </entry>\r
- <entry key="testData1">\r
- <bean parent="specAttr.ref" p:targetClass="org.argeo.slc.core.test.BasicTestData"\r
- p:isParameter="true" p:isFrozen="true" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flowTemplate1" parent="slcTemplate.simpleFlow"\r
- abstract="true">\r
- <constructor-arg ref="spec1" />\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo" scope="execution">\r
- <property name="message" value="From basic @{testedComponentId}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean parent="parameterRef">\r
- <constructor-arg value="testData1" />\r
- </bean>\r
- </property>\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flow1" parent="flowTemplate1" scope="prototype">\r
- <constructor-arg>\r
- <map>\r
- <entry key="testedComponentId" value="200" />\r
- <entry key="testData1">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <aop:scoped-proxy/>\r
- <property name="expected" value="tata101" />\r
- <property name="reached" value="tata@{testedComponentId}" />\r
- </bean>\r
- </entry>\r
- </map> \r
- </constructor-arg>\r
- </bean>\r
-\r
- <bean id="spec2" parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="testData1">\r
- <bean parent="specAttr.ref" p:targetClass="org.argeo.slc.core.test.BasicTestData"\r
- p:isParameter="true" p:isFrozen="true" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flowTemplate2" parent="slcTemplate.simpleFlow" abstract="true">\r
- <constructor-arg ref="spec2" />\r
- <property name="executables">\r
- <list>\r
- <ref bean="flow1"/>\r
- </list>\r
- </property>\r
- </bean>\r
- \r
- <bean id="flow2" parent="flowTemplate2">\r
- <constructor-arg>\r
- <map>\r
- <entry key="testData1">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected" value="tata100" />\r
- <property name="reached" value="tata100" />\r
- </bean>\r
- </entry>\r
- </map> \r
- </constructor-arg>\r
- </bean> \r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="../imports.xml" />\r
-\r
- <bean id="systemCallSimple" parent="slcTemplate.simpleFlow">\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo">\r
- <property name="message" value="os.name=${os.name}" />\r
- </bean>\r
- <bean parent="task.systemCall">\r
- <property name="cmd" value="echo Hello World" />\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="systemCallList" parent="slcTemplate.simpleFlow">\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.systemCall">\r
- <property name="command">\r
- <list>\r
- <value>echo</value>\r
- <value>Hello</value>\r
- <value>World</value>\r
- </list>\r
- </property>\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="systemCallOsSpecific" parent="slcTemplate.simpleFlow">\r
- <!-- Direct call to dir under Windows isnot working -->\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.systemCall">\r
- <property name="cmd" value="dir" />\r
- <property name="execDir" value="../.." />\r
- <property name="osCmds">\r
- <map>\r
- <entry key="Linux" value="ls" />\r
- <entry key="Mac OS X" value="ls" />\r
- </map>\r
- </property>\r
- </bean>\r
- <bean parent="task.systemCall">\r
- <property name="command">\r
- <list>\r
- <value>dir</value>\r
- </list>\r
- </property>\r
- <property name="osCommands">\r
- <map>\r
- <entry key="Linux">\r
- <list>\r
- <value>ls</value>\r
- </list>\r
- </entry>\r
- <entry key="Mac OS X">\r
- <list>\r
- <value>ls</value>\r
- </list>\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="systemCallWithVar" parent="slcTemplate.simpleFlow">\r
- <constructor-arg>\r
- <bean parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="var">\r
- <bean parent="specAttr.primitive" p:value="660" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
- </constructor-arg>\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.systemCall" scope="execution">\r
- <property name="cmd" value="echo var=@{var}" />\r
- <aop:scoped-proxy />\r
- </bean>\r
- </list>\r
- </property>\r
- </bean>\r
-\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
- <import resource="imports.xml" /> \r
-\r
- <bean id="myTestResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="myTestDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
-\r
- <bean id="myTestRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="myTestDef" />\r
- <property name="testResult" ref="myTestResult"/>\r
- </bean> \r
- \r
- <bean id="spec1" parent="slcTemplate.simpleSpec">\r
- <property name="attributes">\r
- <map>\r
- <entry key="testedComponentId">\r
- <bean parent="specAttr.primitive" p:isParameter="true"\r
- p:type="integer" />\r
- </entry>\r
- <entry key="testData1">\r
- <bean parent="specAttr.ref" p:targetClass="org.argeo.slc.core.test.BasicTestData"\r
- p:isParameter="true" p:isFrozen="true" />\r
- </entry>\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flowTemplate1" parent="slcTemplate.simpleFlow"\r
- abstract="true">\r
- <constructor-arg ref="spec1" />\r
- <property name="executables">\r
- <list>\r
- <bean parent="task.echo">\r
- <property name="message" value="From basic @{testedComponentId}" />\r
- </bean>\r
- <bean parent="myTestRunTemplate">\r
- <property name="testData">\r
- <bean parent="parameterRef">\r
- <constructor-arg value="testData1" />\r
- </bean>\r
- </property>\r
- </bean>\r
- <bean parent="task.echo">\r
- <property name="message"><value>From basic @{testedComponentId}</value></property>\r
- </bean> \r
- <bean parent="task.echo">\r
- <property name="message"><value>testData1='@{testData1}'</value></property>\r
- </bean> \r
- </list>\r
- </property>\r
- </bean>\r
-\r
- <bean id="flow1" parent="flowTemplate1" scope="prototype">\r
- <constructor-arg>\r
- <map>\r
- <entry key="testedComponentId" value="200" />\r
- <entry key="testData1">\r
- <bean class="org.argeo.slc.core.test.BasicTestData" scope="execution">\r
- <aop:scoped-proxy/>\r
- <property name="expected" value="tata101" />\r
- <property name="reached" value="tata@{testedComponentId}" />\r
- </bean>\r
- </entry>\r
- </map> \r
- </constructor-arg>\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:flow="http://www.argeo.org/schema/slc-flow"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">\r
-\r
- <import resource="classpath:org/argeo/slc/core/execution/spring.xml" />\r
- <import resource="classpath:/org/argeo/slc/core/test/spring.xml" />\r
-\r
- <bean id="testResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="testDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
-\r
- <bean id="testRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="testDef" />\r
- <property name="testResult" ref="testResult"/>\r
- </bean> \r
-\r
- <flow:spec id="advanced.spec">\r
- <description>spec description</description>\r
- <flow:primitive name="param1" isParameter="true"\r
- type="integer" />\r
- <flow:primitive name="param2" isParameter="true"\r
- type="integer" /> \r
- </flow:spec>\r
-\r
-\r
- <flow:flow id="advanced.flowTemplate" abstract="true" spec="advanced.spec"\r
- path="/path">\r
- <description>flow description</description>\r
- <bean parent="task.echo">\r
- <property name="message" value="Advanced: param1=@{param1}, param2=@{param2}" />\r
- <flow:variable/>\r
- </bean> \r
- <flow:flow>\r
- <bean parent="task.echo" p:message="Flow in Flow - param1=@{param1}, param2=@{param2} [Not variable]" />\r
- </flow:flow>\r
- \r
- <bean parent="testRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <flow:variable/>\r
- <property name="expected" value="@{param1}" />\r
- <property name="reached" value="@{param2}" />\r
- </bean>\r
- </property> \r
- </bean>\r
- \r
- </flow:flow>\r
-\r
- <flow:flow id="advanced.flowTemplate2" abstract="true" spec="advanced.spec"\r
- path="/path">\r
- <bean parent="task.echo" p:message="Advanced2: param1=@{param1}, param2=@{param2}">\r
- <flow:variable/>\r
- </bean>\r
- <flow:flow parent="advanced.flowTemplate">\r
- <flow:arg name="param1" value="@{param1}"/>\r
- <flow:arg name="param2">\r
- <!-- flow:param in flow:arg -->\r
- <flow:param name="param2" />\r
- </flow:arg>\r
- </flow:flow>\r
- </flow:flow>\r
-\r
- \r
- <flow:flow id="flow1" parent="advanced.flowTemplate">\r
- <flow:arg name="param1" value="1" />\r
- <flow:arg name="param2" value="1" />\r
- </flow:flow>\r
- \r
- <flow:flow id="flow2">\r
- <flow:flow parent="advanced.flowTemplate">\r
- <flow:arg name="param1" value="2" />\r
- <flow:arg name="param2" value="2" />\r
- </flow:flow>\r
- </flow:flow>\r
-\r
- <flow:flow id="flow3" parent="advanced.flowTemplate2">\r
- <flow:arg name="param1" value="3" />\r
- <flow:arg name="param2" value="3" />\r
- </flow:flow>\r
- \r
- <flow:flow id="flow4" parent="advanced.flowTemplate">\r
- <description>Would fail if param 2 is not changed at execution</description>\r
- <flow:arg name="param1" value="4" />\r
- <flow:arg name="param2" value="3" />\r
- </flow:flow> \r
-\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:flow="http://www.argeo.org/schema/slc-flow"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">\r
-\r
- <bean id="canonic-ns.001" parent="canonic-ns.flowTemplate">\r
- <description>Canonic 001</description>\r
- <constructor-arg>\r
- <map>\r
- <entry key="parameterAtInstantiation" value="1" />\r
- </map>\r
- </constructor-arg>\r
- </bean>\r
-</beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:beans xmlns="http://www.argeo.org/schema/slc-flow"\r
- xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:p="http://www.springframework.org/schema/p"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">\r
-\r
- <flow id="canonic-ns.002" parent="canonic-ns.flowTemplate">\r
- <arg name="parameterAtInstantiation" value="2" />\r
- <arg name="displayWithoutControl" value="102" />\r
- <arg name="displayWithControl" value="202" />\r
- <arg name="hide" value="202" />\r
- <arg name="refWithoutValue">\r
- <beans:bean id="testDataOk" p:expected="tata" p:reached="tata"\r
- class="org.argeo.slc.core.test.BasicTestData" />\r
- </arg>\r
- </flow>\r
-</beans:beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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:beans xmlns="http://www.argeo.org/schema/slc-flow"\r
- xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd\r
- http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">\r
-\r
- <beans:import resource="classpath:org/argeo/slc/core/execution/spring.xml" />\r
- <beans:import resource="classpath:/org/argeo/slc/core/test/spring.xml" />\r
-\r
- <beans:import resource="canonic-ns-001.xml" />\r
- <beans:import resource="canonic-ns-002.xml" />\r
- <beans:import resource="tests.xml" />\r
-\r
- <!--\r
- Specifications definition is greatly simplified by the flow namespace\r
- -->\r
- <spec id="canonic-ns.spec">\r
- <primitive name="parameterAtInstantiation" isParameter="true"\r
- type="integer" />\r
- <primitive name="displayWithoutControl" value="100"\r
- isParameter="true" type="integer" isFrozen="true" />\r
- <primitive name="displayWithControl" value="200"\r
- isParameter="true" type="integer" />\r
- <primitive name="hide" value="300" isParameter="true" type="integer"\r
- isHidden="true" />\r
- <ref name="refWithValue" targetClass="org.argeo.slc.core.test.BasicTestData"\r
- isParameter="true" ref="testDataNok" />\r
- <ref name="refWithoutValue" targetClass="org.argeo.slc.core.test.BasicTestData" />\r
- <ref name="refWithoutValueFrozen" targetClass="org.argeo.slc.core.test.BasicTestData"\r
- isParameter="true" isFrozen="true">\r
- <value>\r
- <beans:bean class="org.argeo.slc.core.test.BasicTestData">\r
- <aop:scoped-proxy />\r
- <beans:property name="expected" value="tata" />\r
- <beans:property name="reached" value="tata" />\r
- </beans:bean>\r
- </value>\r
- </ref>\r
- </spec>\r
-\r
- <flow id="canonic-ns.flowTemplate" abstract="true" spec="canonic-ns.spec"\r
- path="/path">\r
- <beans:bean parent="task.echo"\r
- p:message="Canonical: displayWithControl=@{displayWithControl}, displayWithoutControl=@{displayWithoutControl}, hide=@{hide}"\r
- scope="execution">\r
- <aop:scoped-proxy />\r
- </beans:bean>\r
- <beans:ref bean="testRun" />\r
- </flow>\r
-\r
- <beans:bean id="testDataOk" class="org.argeo.slc.core.test.BasicTestData">\r
- <aop:scoped-proxy />\r
- <beans:property name="expected" value="tata" />\r
- <beans:property name="reached" value="tata" />\r
- </beans:bean>\r
-\r
- <beans:bean id="testDataNok" class="org.argeo.slc.core.test.BasicTestData">\r
- <aop:scoped-proxy />\r
- <beans:property name="expected" value="tata" />\r
- <beans:property name="reached" value="toto" />\r
- </beans:bean>\r
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:flow="http://www.argeo.org/schema/slc-flow" xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd\r
- http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">\r
-\r
- <import resource="classpath:org/argeo/slc/core/execution/spring.xml" />\r
- <import resource="classpath:/org/argeo/slc/core/test/spring.xml" />\r
-\r
- <bean id="testResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
-\r
- <bean id="testDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
-\r
- <bean id="testRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
- <property name="testDefinition" ref="testDef" />\r
- <property name="testResult" ref="testResult"/>\r
- </bean> \r
-\r
- <flow:spec id="test.list.spec">\r
- <flow:ref name="list1" targetClass="java.util.List">\r
- <flow:value>\r
- <!-- a list element can be used directly as default value-->\r
- <list>\r
- <value>val1</value>\r
- </list>\r
- </flow:value>\r
- </flow:ref>\r
- <flow:ref name="list2" targetClass="java.util.List" />\r
- <!-- following parameters are not used in flow -->\r
- <flow:ref name="dummyMap" targetClass="java.util.Map">\r
- <flow:value>\r
- <map></map>\r
- </flow:value>\r
- </flow:ref>\r
- <flow:ref name="dummySet" targetClass="java.util.Set">\r
- <flow:value>\r
- <set></set>\r
- </flow:value>\r
- </flow:ref>\r
- <flow:ref name="dummyProperties" targetClass="java.util.Properties">\r
- <flow:value>\r
- <props></props>\r
- </flow:value>\r
- </flow:ref>\r
- \r
- </flow:spec>\r
-\r
-\r
- <flow:flow id="test.list.flowTemplate" abstract="true" spec="test.list.spec"\r
- path="/path">\r
- <bean parent="task.echo">\r
- <property name="message" value="list1=@{list1}, list2=@{list2}" />\r
- <flow:variable/>\r
- </bean> \r
-\r
- <bean parent="testRunTemplate">\r
- <property name="testData">\r
- <bean class="org.argeo.slc.core.test.BasicTestData">\r
- <property name="expected">\r
- <flow:param name="list1"/>\r
- </property>\r
- <property name="reached">\r
- <flow:param name="list2"/>\r
- </property>\r
- </bean>\r
- </property> \r
- </bean>\r
- \r
- </flow:flow>\r
-\r
- <flow:flow id="test.list.flow1" parent="test.list.flowTemplate">\r
- <flow:arg name="list1">\r
- <list>\r
- <value>val1</value>\r
- <value>val2</value> \r
- </list>\r
- </flow:arg>\r
- <flow:arg name="list2">\r
- <list>\r
- <value>val1</value>\r
- <value>val2</value> \r
- </list>\r
- </flow:arg>\r
- \r
- <!-- not used in flow (just to test that the syntax is accepted): -->\r
- <flow:arg name="dummyMap">\r
- <map></map>\r
- </flow:arg>\r
- <flow:arg name="dummySet">\r
- <set></set>\r
- </flow:arg>\r
- <flow:arg name="dummyProperties">\r
- <props></props>\r
- </flow:arg> \r
- \r
- </flow:flow>\r
- \r
- <flow:flow id="test.list.flow2" parent="test.list.flowTemplate">\r
- <description>use default value for parameter "list1"</description>\r
- <flow:arg name="list2">\r
- <list>\r
- <value>val1</value>\r
- </list>\r
- </flow:arg>\r
- </flow:flow>\r
-\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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" xmlns:flow="http://www.argeo.org/schema/slc-flow"\r
- xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd\r
- http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">\r
-\r
- <bean id="testRun" class="org.argeo.slc.core.test.SimpleTestRun">\r
- <property name="testDefinition">\r
- <bean class="org.argeo.slc.core.test.BasicTestDefinition" />\r
- </property>\r
- <property name="testData">\r
- <flow:param name="refWithValue" />\r
- </property>\r
- <!-- <property name="testData">-->\r
- <!-- <bean parent="parameterRef">-->\r
- <!-- <constructor-arg value="refWithValue" />-->\r
- <!-- </bean>-->\r
- <!-- </property>-->\r
- <property name="testResult">\r
- <bean parent="slcDefault.test.basicSimpleTestResult" scope="execution">\r
- <property name="attributes">\r
- <map>\r
- <entry key="displayWithControl" value="@{displayWithControl}" />\r
- </map>\r
- </property>\r
- <aop:scoped-proxy />\r
- </bean>\r
- </property>\r
- </bean>\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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
- <bean id="parentContext.pc1" parent="parentContext.template">\r
- <property name="values">\r
- <map>\r
- <entry key="rootvar" value="text" />\r
- </map>\r
- </property>\r
- <property name="expectedValues">\r
- <map>\r
- <entry key="reference" value="20" />\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="context.c1" parent="context.template">\r
- <property name="parentContext" ref="parentContext.pc1" />\r
- <property name="values">\r
- <map>\r
- <entry key="reference" value="20" />\r
- <entry key="any" value="999" />\r
- <entry key="skipped" value="999" />\r
- </map>\r
- </property>\r
- <property name="expectedValues">\r
- <map>\r
- <entry key="reference" value="21" />\r
- <entry key="any" value="*" />\r
- <entry key="skipped" value="!" />\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="context.c2" parent="context.template">\r
- <property name="parentContext" ref="parentContext.pc1" />\r
- <property name="values">\r
- <map>\r
- <entry key="var" value="37" />\r
- <entry key="bad" value="56" />\r
- </map>\r
- </property>\r
- <property name="expectedValues">\r
- <map>\r
- <entry key="var" value="37" />\r
- <entry key="bad" value="57" />\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="parentContext.pc2" parent="parentContext.template">\r
- <property name="parentContext" ref="parentContext.pc1" />\r
- <property name="expectedValues">\r
- <map>\r
- <entry key="reference" value="40" />\r
- </map>\r
- </property>\r
- </bean>\r
-\r
- <bean id="context.c3" parent="context.template">\r
- <property name="parentContext" ref="parentContext.pc2" />\r
- <property name="values">\r
- <map>\r
- <entry key="reference" value="41" />\r
- <entry key="rootvar" value="textX" />\r
- </map>\r
- </property>\r
- <property name="expectedValues">\r
- <map>\r
- <entry key="reference" value="40" />\r
- <entry key="rootvar" value="text" />\r
- </map>\r
- </property>\r
- </bean>\r
-\r
-\r
- <bean id="parentContext.template"\r
- class="org.argeo.slc.core.test.context.SimpleParentContextAware"\r
- abstract="true">\r
- </bean>\r
-\r
- <bean id="context.template"\r
- class="org.argeo.slc.core.test.context.SimpleContextAware"\r
- abstract="true">\r
- </bean>\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.detached.launcher</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>
+++ /dev/null
-#Mon Nov 17 14:48:56 CET 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
+++ /dev/null
-#Wed Sep 24 16:04:14 CEST 2008
-activeProfiles=
-eclipse.preferences.version=1
-filterResources=false
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-useMavenFolders=false
-version=1
+++ /dev/null
-source.. = src/main/java/,\
- src/main/resources/
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.detached.launcher</artifactId>
- <name>SLC Detached Launcher</name>
- <packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>
- org.argeo.slc.detached.launcher.Main
- </mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Bundle-RequiredExecutionEnvironment>J2SE-1.4</Bundle-RequiredExecutionEnvironment>
- <Export-Package>
- org.argeo.slc.*
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\r
-\r
- Licensed under the Apache License, Version 2.0 (the "License");\r
- you may not use this file except in compliance with the License.\r
- You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-\r
--->\r
-<assembly xmlns="http://maven.apache.org/POM/4.0.0"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">\r
- <id>dist</id>\r
- <includeBaseDirectory>false</includeBaseDirectory>\r
- <formats>\r
- <format>tar.gz</format>\r
- </formats>\r
- <fileSets>\r
- <fileSet>\r
- <directory>src/main/base</directory>\r
- <outputDirectory></outputDirectory>\r
- <fileMode>0755</fileMode>\r
- </fileSet>\r
- </fileSets>\r
-</assembly>
\ No newline at end of file
+++ /dev/null
-@echo off\r
-\r
-rem Target application\r
-set JAVA_HOME=[the target JRE]\r
-set SLC_USER_CLASSPATH=[classpath of the application to test]\r
-set SLC_DETACHED_APPCLASS=[main class of the application to test]\r
-set SLC_DETACHED_APPARGS=[arguments of the application to test]\r
-set SLC_DETACHED_JVM_ARGS=[additional JVM arguments]\r
-\r
-rem Runtime\r
-set PROJECT_BASE=[base of the project to being developed]\r
-set SLC_WORK_DIR=%PROJECT_BASE%/src/main/slc/work\r
-set SLC_USER_BUNDLES=reference:file:%PROJECT_BASE%/target/classes\r
-\r
+++ /dev/null
-@echo off
-echo SLC Detached
-set SLC_HOME=%~dp0..
-echo SLC_HOME=%SLC_HOME%
-set SLC_LIB_DETACHED=%SLC_HOME%\lib\detached
-
-call slc-detached-settings.bat
-
-rem FOR %%f IN (%SLC_HOME%\lib\detached\*.jar) DO set CLASSPATH=%CLASSPATH%;%%f
-FOR %%f IN (%SLC_HOME%\lib\detached\org.argeo.slc.detached.launcher-*.jar) DO set SLC_DETACHED_LAUNCHER_JAR=%%f
-FOR %%f IN (%SLC_HOME%\lib\org.argeo.slc.detached-*.jar) DO set SLC_DETACHED_JAR=%%f
-
-set CLASSPATH=%SLC_DETACHED_LAUNCHER_JAR%;%SLC_USER_CLASSPATH%;%SLC_LIB_DETACHED%\com.springsource.org.aopalliance-1.0.0.jar;%SLC_LIB_DETACHED%\com.springsource.org.apache.commons.io-1.4.0.jar;%SLC_LIB_DETACHED%\com.springsource.org.apache.commons.logging-1.1.1.jar;%SLC_LIB_DETACHED%\com.springsource.org.apache.log4j-1.2.15.jar;%SLC_LIB_DETACHED%\org.apache.felix.main-1.2.1.jar;%SLC_LIB_DETACHED%\com.springsource.org.apache.xerces-2.8.1.jar;%SLC_LIB_DETACHED%\com.springsource.org.apache.xalan-2.7.0.jar
-
-set CMD=%JAVA_HOME%\bin\java %SLC_DETACHED_JVM_ARGS% -Dslc.detached.jar=%SLC_DETACHED_JAR% -Dslc.home=%SLC_HOME% -Dslc.workDir=%SLC_WORK_DIR% "-Dslc.detached.userBundles=%SLC_USER_BUNDLES%" -Dslc.detached.appclass=%SLC_DETACHED_APPCLASS% "-Dslc.detached.appargs=%SLC_DETACHED_APPARGS%" -classpath %CLASSPATH% org.argeo.slc.detached.launcher.Main
-rem echo CMD=%CMD%
-
-start %CMD%
-
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.launcher;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.TreeMap;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.adaptor.EclipseStarter;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-
-public class Main {
- public final static String PROP_SLC_HOME = "slc.home";
- public final static String PROP_SLC_DETACHED_PROEPRTIES = "slc.detached.properties";
- public final static String PROP_SLC_OSGI_START = "slc.osgi.start";
- public final static String PROP_SLC_OSGI_SCAN_CLASSPATH = "slc.osgi.scanClasspath";
- public final static String PROP_SLC_OSGI_EQUINOX_ARGS = "slc.osgi.equinox.args";
-
- private final static String DEV_BUNDLE_PREFIX = "slc.osgi.devbundle.";
-
- public static void main(String[] args) {
- info("Argeo SLC Detached launcher starting...");
- try {
- // Load properties
- String propertyPath = System.getProperty("slc.detached.properties",
- "slc-detached.properties");
- Properties config = prepareConfig(propertyPath);
-
- // Start app (in main class loader)
- startApp(config);
-
- // Start OSGi framework
- startEquinox(config);
- info("Argeo SLC Detached launcher started.");
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
-
- protected static Properties prepareConfig(String propertyFilePath)
- throws Exception {
- // Load config
- Properties config = new Properties();
- InputStream in = null;
- try {
- File file = new File(propertyFilePath);
- if (file.exists()) {
- in = new FileInputStream(propertyFilePath);
- config.load(in);
- }
- } finally {
- if (in != null)
- in.close();
- }
-
- // Format slc.home
- String slcHome = System.getProperty(Main.PROP_SLC_HOME);
- if (slcHome == null) {
- slcHome = config.getProperty(Main.PROP_SLC_HOME);
- }
- if (slcHome != null) {
- slcHome = new File(slcHome).getCanonicalPath();
- System.setProperty(Main.PROP_SLC_HOME, slcHome);
- }
-
- // System properties have priority.
- config.putAll(System.getProperties());
-
- // SET ALL PROPERTIES AS SYSTEM PROPERTIES
- TreeMap ordered = new TreeMap(config);
- for (Iterator it = ordered.keySet().iterator(); it.hasNext();) {
- String key = it.next().toString();
- String value = ordered.get(key).toString();
- System.out.println(key + "=" + value);
- System.setProperty(key, value);
- }
-
- return config;
- }
-
- public static void startEquinox(Properties config) throws Exception {
- info("java.home=" + System.getProperty("java.home"));
- info("java.class.path=" + System.getProperty("java.class.path"));
-
- File baseDir = new File(System.getProperty("user.dir"))
- .getCanonicalFile();
- String equinoxConfigurationPath = baseDir.getPath() + File.separator
- + "slc-detached" + File.separator + "equinoxConfiguration";
-
- String equinoxArgsLineDefault = "-console -noExit -clean -debug -configuration "
- + equinoxConfigurationPath;
- String equinoxArgsLine = config.getProperty(PROP_SLC_OSGI_EQUINOX_ARGS,
- equinoxArgsLineDefault);
- // String[] equinoxArgs = { "-console", "-noExit", "-clean", "-debug",
- // "-configuration", equinoxConfigurationPath };
- String[] equinoxArgs = equinoxArgsLine.split(" ");
-
- BundleContext context = EclipseStarter.startup(equinoxArgs, null);
-
- List installBundleNames = new ArrayList();
-
- // Load from class path (dev environment, maven)
- if (config.getProperty(PROP_SLC_OSGI_SCAN_CLASSPATH, "false").equals(
- "true")) {
- StringTokenizer st = new StringTokenizer(System
- .getProperty("java.class.path"), File.pathSeparator);
- while (st.hasMoreTokens()) {
- try {
- String path = st.nextToken();
- String url = "reference:file:"
- + new File(path).getCanonicalPath();
- Bundle bundle = context.installBundle(url);
- if (bundle.getSymbolicName() != null)
- installBundleNames.add(bundle.getSymbolicName());
- info("Installed from classpath " + url);
- } catch (Exception e) {
- bundleInstallWarn(e.getMessage());
- }
- }
- }
-
- // Load from dev bundles
- Map devBundleUrls = getDevBundleUrls(config);
- Iterator devBundles = devBundleUrls.keySet().iterator();
- while (devBundles.hasNext()) {
- try {
- String bundleName = (String) devBundles.next();
- String url = (String) devBundleUrls.get(bundleName);
- Bundle bundle = context.installBundle(url);
- installBundleNames.add(bundle.getSymbolicName());
- info("Installed as dev bundle " + url);
- } catch (Exception e) {
- bundleInstallWarn(e.getMessage());
- }
- }
-
- // Load from distribution
- String slcHome = config.getProperty(PROP_SLC_HOME);
- if (slcHome != null) {
- File libDir = new File(slcHome + File.separator + "lib");
- File[] bundleFiles = libDir.listFiles();
- for (int i = 0; i < bundleFiles.length; i++) {
- try {
- String url = "reference:file:"
- + bundleFiles[i].getCanonicalPath();
- Bundle bundle = context.installBundle(url);
- installBundleNames.add(bundle.getSymbolicName());
- info("INFO: Installed from SLC home " + url);
- } catch (Exception e) {
- bundleInstallWarn(e.getMessage());
- }
-
- }
- }
-
- // Start bundles
- String bundleStart = config.getProperty(PROP_SLC_OSGI_START,
- "org.springframework.osgi.extender,org.argeo.slc.detached");
-
- if (bundleStart.trim().equals("*")) {
- for (int i = 0; i < installBundleNames.size(); i++) {
- Object obj = installBundleNames.get(i);
- if (obj != null) {
- String bundleSymbolicName = obj.toString();
- try {
- startBundle(context, bundleSymbolicName);
- } catch (Exception e) {
- bundleInstallWarn("Cannot start " + bundleSymbolicName
- + ": " + e.getMessage());
- }
- }
- }
- } else {
- StringTokenizer stBundleStart = new StringTokenizer(bundleStart,
- ",");
- while (stBundleStart.hasMoreTokens()) {
- String bundleSymbolicName = stBundleStart.nextToken();
- startBundle(context, bundleSymbolicName);
- }
- }
- }
-
- private static Map getDevBundleUrls(Properties config) {
- Map bundles = new Hashtable();
- Iterator keys = config.keySet().iterator();
- while (keys.hasNext()) {
- String key = (String) keys.next();
- if (key.startsWith(DEV_BUNDLE_PREFIX)) {
- String bundle = key.substring(DEV_BUNDLE_PREFIX.length());
- String path = config.getProperty(key);
- bundles.put(bundle, path);
- }
- }
- return bundles;
- }
-
- private static void startBundle(BundleContext bundleContext,
- String symbolicName) throws BundleException {
- // info("Starting bundle " + symbolicName + "...");
- Bundle bundle = findBundleBySymbolicName(bundleContext, symbolicName);
- if (bundle != null)
- bundle.start();
- else
- throw new RuntimeException("Bundle " + symbolicName + " not found");
- info("Started " + symbolicName);
- }
-
- /** WARNING: return the first one found! */
- private static Bundle findBundleBySymbolicName(BundleContext bundleContext,
- String symbolicName) {
- Bundle[] bundles = bundleContext.getBundles();
- for (int i = 0; i < bundles.length; i++) {
- Bundle bundle = bundles[i];
- String bundleSymbolicName = bundle.getSymbolicName();
- if (bundleSymbolicName != null) {
- // throw new RuntimeException("Bundle " + bundle.getBundleId()
- // + " (" + bundle.getLocation()
- // + ") has no symbolic name.");
-
- if (bundleSymbolicName.equals(symbolicName)) {
- return bundle;
- }
- }
- }
- return null;
- }
-
- public static void startApp(Properties config) throws Exception {
- String className = config.getProperty("slc.detached.appclass");
- String[] uiArgs = readArgumentsFromLine(config.getProperty(
- "slc.detached.appargs", ""));
-
- if (className == null) {
- info("No slc.detached.appclass property define: does not try to launch an app from the standard classpath.");
- } else {
- // Launch main method using reflection
- Class clss = Class.forName(className);
- Class[] mainArgsClasses = new Class[] { uiArgs.getClass() };
- Object[] mainArgs = { uiArgs };
- Method mainMethod = clss.getMethod("main", mainArgsClasses);
- mainMethod.invoke(null, mainArgs);
- }
- }
-
- /* UTILITIES */
-
- /**
- * Transform a line into an array of arguments, taking "" as single
- * arguments. (nested \" are not supported)
- */
- private static String[] readArgumentsFromLine(String lineOrig) {
-
- String line = lineOrig.trim();// remove trailing spaces
- // System.out.println("line=" + line);
- List args = new Vector();
- StringBuffer curr = new StringBuffer("");
- boolean inQuote = false;
- char[] arr = line.toCharArray();
- for (int i = 0; i < arr.length; i++) {
- char c = arr[i];
- switch (c) {
- case '\"':
- inQuote = !inQuote;
- break;
- case ' ':
- if (!inQuote) {// otherwise, no break: goes to default
- if (curr.length() > 0) {
- args.add(curr.toString());
- curr = new StringBuffer("");
- }
- break;
- }
- default:
- curr.append(c);
- break;
- }
- }
-
- // Add last arg
- if (curr.length() > 0) {
- args.add(curr.toString());
- curr = null;
- }
-
- String[] res = new String[args.size()];
- for (int i = 0; i < args.size(); i++) {
- res[i] = args.get(i).toString();
- // System.out.println("res[i]=" + res[i]);
- }
- return res;
- }
-
- private static void info(Object obj) {
- System.out.println("[INFO] " + obj);
- }
-
- private static void bundleInstallWarn(Object obj) {
- System.err.println("[WARN] " + obj);
- // Thread.dumpStack();
- }
-}
+++ /dev/null
-# 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.slc=DEBUG\r
-log4j.logger.org.springframework=WARN\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
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.detached</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>
+++ /dev/null
-#Sat Nov 22 15:15:12 CET 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
+++ /dev/null
-#Thu Sep 18 18:28:43 CEST 2008
-activeProfiles=
-eclipse.preferences.version=1
-filterResources=false
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-useMavenFolders=false
-version=1
+++ /dev/null
-source.. = src/main/java/,\
- src/main/resources/
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.detached</artifactId>
- <name>SLC Detached</name>
- <packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Bundle-RequiredExecutionEnvironment>J2SE-1.4</Bundle-RequiredExecutionEnvironment>
- <Export-Package>
- org.argeo.slc.detached.*
- </Export-Package>
- <Import-Package>
- org.w3c.dom;version="0.0.0",
- javax.xml.*;version="0.0.0",
- org.springframework.core,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.osgi.extender</artifactId>
- </dependency>
-
- <!-- Required under JDK 1.4 -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>edu.emory.mathcs.backport</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.xmlcommons</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.io</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.org.apache.commons.logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.log4j</artifactId>
- </dependency>
-
- <!-- JRE 1.4 -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.xerces</artifactId>
- </dependency>
-
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-public class AppLauncher {
- private Properties systemProperties = new Properties();
- private String mainClass = null;
- private List arguments = new ArrayList();
-
- public void launch() {
-
- Properties base = System.getProperties();
- Properties fake = new Properties(base);
-
- try {
- if (mainClass == null)
- throw new DetachedException(
- "A main class name has to be specified.");
-
- System.getProperties().putAll(systemProperties);
-
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Class clss = cl.loadClass(mainClass);
-
- String[] args = new String[arguments.size()];
- for (int i = 0; i < arguments.size(); i++) {
- args[i] = arguments.get(i).toString();
- }
-
- Class[] mainArgsClasses = new Class[] { args.getClass() };
- Object[] mainArgs = { args };
- Method mainMethod = clss.getMethod("main", mainArgsClasses);
-
- System.setProperties(fake);
-
- mainMethod.invoke(null, mainArgs);
-
- } catch (Exception e) {
- throw new DetachedException("Unexpected exception while launching "
- + mainClass, e);
- } finally {
- System.setProperties(base);
- }
-
- }
-
- public void setSystemProperties(Properties systemProperties) {
- this.systemProperties = systemProperties;
- }
-
- public void setMainClass(String mainClass) {
- this.mainClass = mainClass;
- }
-
- public void setArguments(List arguments) {
- this.arguments = arguments;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-public interface DetachedAdminCommand {
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.util.Properties;
-
-/** An answer returned by the detached server. Always related to a request. */
-public class DetachedAnswer implements DetachedCommunication {
- static final long serialVersionUID = 1l;
-
- public final static int UNKOWN = -1;
- public final static int PROCESSED = 0;
- public final static int ERROR = 1;
- public final static int SKIPPED = 2;
- public final static int CLOSED_SESSION = 10;
-
- private Properties properties = new Properties();
- private int status = UNKOWN;
- private String log;
- private String uuid;
-
- public DetachedAnswer() {
-
- }
-
- public DetachedAnswer(DetachedRequest request) {
- uuid = request.getUuid();
- }
-
- public DetachedAnswer(DetachedRequest request, String message) {
- this(request);
- log = message;
- status = PROCESSED;
- }
-
- public Properties getProperties() {
- return properties;
- }
-
- public void setProperties(Properties outputParameters) {
- this.properties = outputParameters;
- }
-
- public int getStatus() {
- return status;
- }
-
- public void setStatus(int outputStatus) {
- this.status = outputStatus;
- }
-
- public String getLog() {
- return log;
- }
-
- public void setLog(String log) {
- this.log = log;
- }
-
- public void addToLog(String msg) {
- this.log = new StringBuffer(this.log).append(msg).toString();
- }
-
- /** The unique identifier of this answer. */
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public String getStatusAsString() {
- return convertStatus(getStatus());
- }
-
- public static String convertStatus(int status) {
- switch (status) {
- case UNKOWN:
- return "UNKOWN";
- case PROCESSED:
- return "PROCESSED";
- case SKIPPED:
- return "SKIPPED";
- case ERROR:
- return "ERROR";
- case CLOSED_SESSION:
- return "CLOSED_SESSION";
- default:
- throw new DetachedException("Unkown status " + status);
- }
- }
-
- public String toString() {
- StringBuffer buf = new StringBuffer("detached answer ");
- buf.append('#').append(uuid);
- buf.append(" status=").append(convertStatus(status));
- buf.append(" properties=").append(properties);
- buf.append(" log=").append(log);
- return buf.toString();
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-/**
- * Sends Request and receives answers. Meant to be used on runtime side to
- * communicate with a Detached.
- */
-public interface DetachedClient {
- public void sendRequest(DetachedRequest request) throws Exception;
-
- /** Blocks until next answer. */
- public DetachedAnswer receiveAnswer() throws Exception;
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.io.Serializable;
-
-/**
- * Common interface for all communications between the source context and the
- * detached server.
- */
-public interface DetachedCommunication extends Serializable {
- /** The unique identifier of this answer. */
- public String getUuid();
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.util.List;
-import java.util.Set;
-
-public interface DetachedContext {
- public Object getDynamicRef(String ref);
-
- public void setDynamicRef(String ref, Object obj);
-
- public String getCurrentPath();
-
- public List getExecutedPaths();
-
- public Set getDynamicRefKeys();
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.Vector;
-
-public class DetachedContextImpl implements DetachedContext {
- private List executedPaths = new Vector();
- private String currentPath;
- private Map dynamicRefs = new TreeMap();
-
- public String getCurrentPath() {
- return currentPath;
- }
-
- public void setDynamicRef(String ref, Object obj) {
- dynamicRefs.put(ref, obj);
- }
-
- public Object getDynamicRef(String ref) {
- if (dynamicRefs.containsKey(ref))
- return dynamicRefs.get(ref);
- else
- return null;
- }
-
- public List getExecutedPaths() {
- return new ArrayList(executedPaths);
- }
-
- public String toString() {
- StringBuffer buf = new StringBuffer(getClass().getName());
- buf.append(" currentPath=").append(currentPath);
- buf.append(" executedPaths=").append(executedPaths);
- return buf.toString();
- }
-
- public Set getDynamicRefKeys() {
- return dynamicRefs.keySet();
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-/**
- * Receives Request and sends answers. Meant to be used on detached side to
- * communicate with the runtime.
- */
-public interface DetachedDriver {
- /** Blocks until it receives a request. */
- public DetachedRequest receiveRequest() throws Exception;
- public void sendAnswer(DetachedAnswer answer) throws Exception;
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-public class DetachedException extends RuntimeException {
- static final long serialVersionUID = 1l;
-
- public DetachedException(String message) {
- super(message);
- }
-
- public DetachedException(String message, Exception cause) {
- super(message, cause);
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-/**
- * Interface between the detached and the source context via request and
- * answers.
- */
-public interface DetachedExecutionServer {
- /** Actually executes the request. */
- public DetachedAnswer executeRequest(DetachedRequest request);
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.detached.admin.CloseSession;
-import org.argeo.slc.detached.admin.OpenSession;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.util.tracker.ServiceTracker;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.osgi.context.BundleContextAware;
-
-/** Default implementation of a detached server. */
-public class DetachedExecutionServerImpl implements DetachedExecutionServer,
- BundleContextAware, InitializingBean, DisposableBean,
- ApplicationContextAware {
- private final static Log log = LogFactory
- .getLog(DetachedExecutionServerImpl.class);
-
- private final DetachedContextImpl detachedContext;
-
- private DetachedSession currentSession;
-
- /**
- * Session being replayed, skipping the steps in the current session. If
- * null, no session is replayed
- */
- private DetachedSession replayedSession = null;
-
- private BundleContext bundleContext;
- private ApplicationContext applicationContext;
-
- private final static String ALL_APP_CONTEXTS_KEY = "__allApplicationContexts";
-
- private Map/* <String,ServiceTracker> */appContextServiceTrackers = Collections
- .synchronizedMap(new HashMap());
-
- public DetachedExecutionServerImpl() {
- detachedContext = new DetachedContextImpl();
- currentSession = new DetachedSession();
- currentSession.setUuid(Long.toString(System.currentTimeMillis()));
- }
-
- public synchronized DetachedAnswer executeRequest(DetachedRequest request) {
- if(log.isDebugEnabled())
- log.debug("Received " + request);
-
- DetachedAnswer answer = null;
- try {
- Object obj = retrieveStep(request);
-
- if (obj == null)
- throw new DetachedException("Could not find action with ref "
- + request.getRef());
-
- // Execute actions
- if (obj instanceof DetachedStep) {
- answer = processStep((DetachedStep) obj, request);
-
- } else if (obj instanceof DetachedAdminCommand) {
- answer = processAdminCommand((DetachedAdminCommand) obj,
- request);
- }
-
- if (answer == null) {
- throw new DetachedException("Unknown action type "
- + obj.getClass() + " for action with ref "
- + request.getRef());
- }
- } catch (Exception e) {
- answer = new DetachedAnswer(request);
- answer.setStatus(DetachedAnswer.ERROR);
- log.error("Error executing request " + request, e);
- }
-
- currentSession.getRequests().add(request);
- currentSession.getAnswers().add(answer);
- if(log.isDebugEnabled())
- log.debug("Sent " + answer);
- return answer;
- }
-
- protected synchronized Object retrieveStep(DetachedRequest request)
- throws Exception {
-
- // Check whether there is a cached object
- if (request.getCachedObject() != null) {
- Object cachedObj = request.getCachedObject();
- if (log.isTraceEnabled())
- log.trace("Use cached object " + cachedObj + " for request "
- + request);
- return cachedObj;
- }
-
- // Check its own app context (typically for admin steps)
- if (applicationContext.containsBean(request.getRef())) {
- try {
- Object obj = applicationContext.getBean(request.getRef());
- if (log.isTraceEnabled())
- log.trace("Retrieve from server app context " + obj
- + " for request " + request);
- return obj;
- } catch (Exception e) {
- if (log.isTraceEnabled())
- log.trace("Could not retrieve " + request.getRef()
- + " from server app context: " + e);
- }
- }
-
- // Check whether the source bundle is set
- String bundleName = request.getProperties().getProperty(
- Constants.BUNDLE_SYMBOLICNAME);
-
- ApplicationContext sourceAppContext = null;
- if (bundleName != null) {
- if (!appContextServiceTrackers.containsKey(bundleName)) {
- ServiceTracker nSt = new ServiceTracker(bundleContext,
- bundleContext.createFilter("(Bundle-SymbolicName="
- + bundleName + ")"), null);
- nSt.open();
- appContextServiceTrackers.put(bundleName, nSt);
- }
- ServiceTracker st = (ServiceTracker) appContextServiceTrackers
- .get(bundleName);
- sourceAppContext = (ApplicationContext) st.getService();
- if (log.isTraceEnabled())
- log.trace("Use source application context from bundle "
- + bundleName);
-
- Object obj = null;
- try {
- obj = sourceAppContext.getBean(request.getRef());
- } catch (Exception e) {
- if (log.isTraceEnabled())
- log.trace("Could not retrieve " + request.getRef()
- + " from app context of " + bundleName + ": " + e);
- }
- return obj;
- }
-
- // no bundle name specified or it failed
- if (!appContextServiceTrackers.containsKey(ALL_APP_CONTEXTS_KEY)) {
- ServiceTracker nSt = new ServiceTracker(bundleContext,
- ApplicationContext.class.getName(), null);
- nSt.open();
- appContextServiceTrackers.put(ALL_APP_CONTEXTS_KEY, nSt);
- }
- ServiceTracker st = (ServiceTracker) appContextServiceTrackers
- .get(ALL_APP_CONTEXTS_KEY);
- Object[] arr = st.getServices();
- for (int i = 0; i < arr.length; i++) {
- ApplicationContext appC = (ApplicationContext) arr[i];
- if (appC.containsBean(request.getRef())) {
- sourceAppContext = appC;
- if (log.isTraceEnabled())
- log
- .trace("Retrieved source application context "
- + "by scanning all published application contexts.");
- try {
- Object obj = sourceAppContext.getBean(request.getRef());
- return obj;
- } catch (Exception e) {
- if (log.isTraceEnabled())
- log.trace("Could not retrieve " + request.getRef()
- + " from app context " + appC + ": " + e);
- }
- }
- }
-
- throw new Exception(
- "Cannot find any published application context containing bean "
- + request.getRef());
- }
-
- protected synchronized DetachedAnswer processStep(DetachedStep obj,
- DetachedRequest request) {
- DetachedAnswer answer;
-
- StringBuffer skippedLog = new StringBuffer();
- boolean execute = true;
-
- if (replayedSession != null) {
- // Skip execution of already successful steps
- int stepIndex = currentSession.getExecutedStepCount();
-
- if (stepIndex < replayedSession.getExecutedStepCount()) {
- DetachedAnswer previousAnswer = (DetachedAnswer) replayedSession
- .getAnswers().get(stepIndex);
- DetachedRequest previousRequest = (DetachedRequest) replayedSession
- .getRequests().get(stepIndex);
-
- // check step names
- if (!previousRequest.getRef().equals(request.getRef())) {
- String msg = "New request is not consistent with previous ref. previousRef="
- + previousRequest.getRef()
- + ", newRef="
- + request.getRef() + "\n";
- skippedLog.append(msg);
- log.warn(msg);
- }
-
- if (previousAnswer.getStatus() != DetachedAnswer.ERROR) {
- // if no error occurred in the replayedSession,
- // skip the step
- execute = false;
- String msg = "Skipped Step " + request.getRef()
- + " (stepIndex=" + stepIndex + ")";
- skippedLog.append(msg);
- log.info(msg);
-
- } else {
- // if an error occurred, execute the step and leave
- // skipUntillError mode (even if replayedSession
- // has more steps)
- log.info("### End of SkipUntilError Mode ###");
- log.info("Step " + request.getRef()
- + " was previously in error, executing it again."
- + " (stepIndex=" + stepIndex + ").");
- replayedSession = null;
- }
- } else {
- // went further as skip count, doing nothing.
- }
- }
-
- if (execute) {
- DetachedStep step = (DetachedStep) obj;
- // Actually execute the step
- answer = step.execute(detachedContext, request);
- } else {
- answer = new DetachedAnswer(request);
- answer.setStatus(DetachedAnswer.SKIPPED);
- answer.setLog(skippedLog.toString());
- }
- return answer;
- }
-
- protected synchronized DetachedAnswer processAdminCommand(
- DetachedAdminCommand obj, DetachedRequest request) {
- DetachedAnswer answer;
- if (obj instanceof OpenSession) {
- DetachedSession newSession = ((OpenSession) obj).execute(request,
- bundleContext);
-
- log.debug("Creating new DetachedSession : " + newSession);
-
- if ((currentSession != null) && currentSession.lastActionIsError()
- && DetachedSession.SKIP_UNTIL_ERROR.equals(newSession.getDoItAgainPolicy())) {
- // switch to replay mode
- log.info("### Start SkipUntilError Mode ###");
- replayedSession = currentSession;
- }
-
- currentSession = newSession;
-
- answer = new DetachedAnswer(request, "Session #"
- + currentSession.getUuid() + " open.");
- } else if (obj instanceof CloseSession) {
- if (currentSession == null)
- throw new DetachedException("There is no open session to close");
- answer = new DetachedAnswer(request, "Session #"
- + currentSession.getUuid() + " closed.");
- answer.setStatus(DetachedAnswer.CLOSED_SESSION);
- } else {
- answer = null;
- }
- return answer;
- }
-
- protected synchronized String dumpSessionsHistory(
- DetachedRequest requestCurrent, DetachedAnswer answerCurrent) {
- StringBuffer buf = new StringBuffer(
- "##\n## SESSIONS HISTORY DUMP\n##\n");
- buf.append("# CURRENT\n");
- buf.append("Current session: ").append(currentSession)
- .append('\n');
- buf.append("Current request: ").append(requestCurrent).append('\n');
- buf.append("Current answer: ").append(answerCurrent).append('\n');
-
- buf.append("# CURRENT SESSION\n");
-
- List requests = currentSession.getRequests();
- List answers = currentSession.getAnswers();
- for (int j = 0; j < requests.size(); j++) {
- DetachedRequest request = (DetachedRequest) requests.get(j);
- buf.append('\t').append(j).append(". ").append(request)
- .append('\n');
- if (answers.size() > j) {
- DetachedAnswer answer = (DetachedAnswer) answers.get(j);
- buf.append('\t').append(j).append(". ").append(answer).append(
- '\n');
- }
- }
-
- buf.append("# DETACHED CONTEXT\n");
- buf.append(detachedContext).append('\n');
-
- buf.append("##\n## END OF SESSIONS HISTORY DUMP\n##\n");
- return buf.toString();
- }
-
- public void setBundleContext(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
-
- public void afterPropertiesSet() throws Exception {
- log.debug("Detached execution server initialized.");
- }
-
- public synchronized void destroy() throws Exception {
- Iterator/* <String> */keys = appContextServiceTrackers.keySet()
- .iterator();
- while (keys.hasNext()) {
- ServiceTracker st = (ServiceTracker) appContextServiceTrackers
- .get(keys.next());
- st.close();
- }
- appContextServiceTrackers.clear();
-
- log.debug("Detached execution server closed.");
- }
-
- public void setApplicationContext(ApplicationContext applicationContext) {
- this.applicationContext = applicationContext;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.util.Properties;
-
-/** A request sent to the detached server. */
-public class DetachedRequest implements DetachedCommunication {
- static final long serialVersionUID = 1l;
-
- private String uuid;
- private Properties properties = new Properties();
- private String ref;
-
- private Object cachedObject = null;
-
- public DetachedRequest() {
-
- }
-
- public DetachedRequest(String uuid) {
- this.uuid = uuid;
- }
-
- /** The properties configuring this request. */
- public Properties getProperties() {
- return properties;
- }
-
- public void setProperties(Properties inputParameters) {
- this.properties = inputParameters;
- }
-
- /**
- * A reference to the underlying implementation which will process the
- * request.
- */
- public String getRef() {
- return ref;
- }
-
- public void setRef(String stepRef) {
- this.ref = stepRef;
- }
-
- /** The unique identifier of this request. */
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public String toString() {
- StringBuffer buf = new StringBuffer("detached request for ref ");
- buf.append(ref);
- buf.append(" #").append(uuid);
- buf.append(" cachedObject=").append((cachedObject != null));
- buf.append(" properties=").append(properties);
- return buf.toString();
- }
-
- /**
- * Optimization. Allows the driver to eagerly cache the object in the
- * request, in order to relieve the detached server of the task to look for
- * it. No implementation should rely on this to be set.
- */
- public Object getCachedObject() {
- return cachedObject;
- }
-
- public void setCachedObject(Object cachedObject) {
- this.cachedObject = cachedObject;
- }
-
-}
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\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.detached;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.osgi.framework.BundleContext;\r
-import org.osgi.framework.Constants;\r
-import org.springframework.beans.BeansException;\r
-import org.springframework.context.ApplicationContext;\r
-import org.springframework.context.ApplicationContextAware;\r
-import org.springframework.osgi.context.BundleContextAware;\r
-\r
-/**\r
- * When started, processes <code>DetachedRequest</code> through a\r
- * <code>DetachedExecutionServer</code> and sends <code>DetachedAnswer</code>\r
- * back\r
- */\r
-public class DetachedServer implements BundleContextAware, ApplicationContextAware {\r
-\r
- private final static Log log = LogFactory.getLog(DetachedServer.class); \r
- \r
- private boolean active = true;\r
- private DetachedExecutionServer executionServer = null;\r
-\r
- private boolean cacheObjects = true;\r
-\r
- /** May be null */\r
- private ApplicationContext applicationContext;\r
- /** May be null */\r
- private BundleContext bundleContext;\r
- \r
- /**\r
- * Used to receive Request and send answers\r
- */\r
- private DetachedDriver detachedDriver;\r
-\r
- public synchronized void start() {\r
-\r
- log.info("Starting DetachedServer");\r
- \r
- Thread driverThread = new Thread(new Runnable() {\r
-\r
- public void run() {\r
- while (active) {\r
- try {\r
- // no timeout to receive a request\r
- DetachedRequest request = detachedDriver.receiveRequest();\r
- if (!active)\r
- break;\r
-\r
- String driverBundleName = null;\r
- if (bundleContext != null)\r
- driverBundleName = bundleContext.getBundle()\r
- .getSymbolicName();\r
-\r
- if (applicationContext != null && cacheObjects) {\r
- try {\r
- String ref = request.getRef();\r
- if (applicationContext.containsBean(ref)) {\r
- Object obj = applicationContext\r
- .getBean(request.getRef());\r
- request.setCachedObject(obj);\r
- if (log.isTraceEnabled())\r
- log.trace("Cached bean '" + ref\r
- + "' in request " + request);\r
- } else {\r
- log\r
- .warn("Cannot cache object in request because no bean '"\r
- + ref\r
- + "' was found in application context"\r
- + (driverBundleName != null ? " (driver bundle "\r
- + driverBundleName\r
- + ")"\r
- : ""));\r
- }\r
- } catch (Exception e) {\r
- if (log.isTraceEnabled())\r
- log\r
- .trace("Could not retrieve "\r
- + request.getRef()\r
- + " from driver application context because of "\r
- + e);\r
- driverBundleName = null;// do not publish bundle\r
- // name\r
- }\r
- }\r
-\r
- if (driverBundleName != null)\r
- request.getProperties().put(\r
- Constants.BUNDLE_SYMBOLICNAME,\r
- driverBundleName);\r
-\r
- DetachedAnswer answer = executionServer\r
- .executeRequest(request);\r
- detachedDriver.sendAnswer(answer);\r
- } catch (Exception e) {\r
- // if (e instanceof RuntimeException)\r
- // throw (RuntimeException) e;\r
- // else\r
- e.printStackTrace();\r
- }\r
- }\r
-\r
- }\r
- }, "driverThread (" + getClass() + ")");\r
- driverThread.start();\r
-\r
- }\r
-\r
- public void setExecutionServer(DetachedExecutionServer executionServer) {\r
- this.executionServer = executionServer;\r
- }\r
-\r
- public synchronized void stop() {\r
- active = false;\r
- notifyAll();\r
- }\r
-\r
- public synchronized boolean isActive() {\r
- return active;\r
- }\r
-\r
- public synchronized void setActive(boolean active) {\r
- this.active = active;\r
- }\r
-\r
- public void setApplicationContext(ApplicationContext applicationContext)\r
- throws BeansException {\r
- this.applicationContext = applicationContext;\r
- }\r
-\r
- public void setBundleContext(BundleContext bundleContext) {\r
- this.bundleContext = bundleContext;\r
- }\r
-\r
- public void setCacheObjects(boolean cacheObjects) {\r
- this.cacheObjects = cacheObjects;\r
- }\r
-\r
- public void setDetachedDriver(DetachedDriver detachedDriver) {\r
- this.detachedDriver = detachedDriver;\r
- } \r
- \r
-}\r
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-/** A session within the detached context. */
-public class DetachedSession {
- public final static String PROP_DO_IT_AGAIN_POLICY = "slc.detached.doItAgainPolicy";
- public final static String SKIP_UNTIL_ERROR = "skipUntilError";
- public final static String REPLAY = "replay";
-
- private String uuid = null;
- private List requests = new Vector();
- private List answers = new Vector();
- private String doItAgainPolicy = REPLAY;
- private List refreshedBundleNames = new ArrayList();
-
- public boolean isClosed() {
- if (answers.size() > 0) {
- DetachedAnswer answer = (DetachedAnswer) answers
- .get(answers.size() - 1);
- return answer.getStatus() == DetachedAnswer.CLOSED_SESSION;
- } else {
- return false;
- }
- }
-
- public boolean lastActionIsError() {
- if (answers.size() > 0) {
- DetachedAnswer answer = (DetachedAnswer) answers
- .get(answers.size() - 1);
- return answer.getStatus() == DetachedAnswer.ERROR;
- } else {
- return false;
- }
- }
-
- public int getExecutedStepCount() {
- if(requests.size() != answers.size()) {
- throw new DetachedException("requests.size() != answers.size() in DetachedSession");
- }
- return answers.size();
- }
-
- public String getDoItAgainPolicy() {
- return doItAgainPolicy;
- }
-
- public void setDoItAgainPolicy(String doItAgainPolicy) {
- this.doItAgainPolicy = doItAgainPolicy;
- }
-
- public List getRequests() {
- return requests;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public List getAnswers() {
- return answers;
- }
-
- public List getRefreshedBundleNames() {
- return refreshedBundleNames;
- }
-
- public String toString() {
- StringBuffer buf = new StringBuffer(getClass().getName());
- buf.append("#").append(uuid);
- buf.append(" doItAgainPolicy=").append(doItAgainPolicy);
- return buf.toString();
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-
-public interface DetachedStep {
- public DetachedAnswer execute(DetachedContext detachedContext,
- DetachedRequest detachedStepRequest);
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-public interface DetachedXmlConverter {
- public void marshallCommunication(DetachedCommunication detCom,
- Result result);
-
- public DetachedCommunication unmarshallCommunication(Source source);
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * For compatibility with old JDKs (pre 1.5). Use Spring base one when possible.
- */
-public class DetachedXmlConverterCompat implements DetachedXmlConverter {
- public final static String SLC_DETACHED_NAMESPACE_URI = "http://argeo.org/projects/slc/schemas/detached";
- private final static Log log = LogFactory
- .getLog(DetachedXmlConverterCompat.class);
-
- private final Transformer copy;
-
- public DetachedXmlConverterCompat() {
- try {
- copy = TransformerFactory.newInstance().newTransformer();
- } catch (Exception e) {
- throw new DetachedException("Could not create transformer.", e);
- }
- }
-
- public void marshallCommunication(DetachedCommunication detCom,
- Result result) {
- if (detCom instanceof DetachedRequest) {
- marshallRequest((DetachedRequest) detCom, result);
- } else if (detCom instanceof DetachedAnswer) {
- marshallAnswer((DetachedAnswer) detCom, result);
- } else {
- throw new DetachedException("Unkown communication type "
- + detCom.getClass());
- }
- }
-
- public DetachedCommunication unmarshallCommunication(Source source) {
- // Parse
- DOMResult result = new DOMResult();
- try {
- copy.transform(source, result);
- } catch (TransformerException e) {
- throw new DetachedException("Could not copy xml source", e);
- }
-
- if (log.isTraceEnabled()) {
- try {
- DOMSource domSource = new DOMSource(result.getNode());
- StringWriter stringWriter = new StringWriter();
- StreamResult streamResult = new StreamResult(stringWriter);
- copy.transform(domSource, streamResult);
- log.trace("Unmarshall communication:\n"
- + stringWriter.toString());
- IOUtils.closeQuietly(stringWriter);
- } catch (TransformerException e) {
- log.warn("Could not log xml source", e);
- }
- }
- Element root = (Element) ((Document) result.getNode())
- .getDocumentElement();
-
- // Create objects
- String requestType = root.getLocalName();
- if (requestType.equals("detached-request")) {
- DetachedRequest request = new DetachedRequest();
- request.setUuid(root.getElementsByTagNameNS(
- SLC_DETACHED_NAMESPACE_URI, "uuid").item(0)
- .getTextContent());
- request
- .setRef(root.getElementsByTagNameNS(
- SLC_DETACHED_NAMESPACE_URI, "ref").item(0)
- .getTextContent());
- Element propertiesElement = (Element) root.getElementsByTagNameNS(
- SLC_DETACHED_NAMESPACE_URI, "properties").item(0);
- NodeList propElements = propertiesElement.getElementsByTagNameNS(
- SLC_DETACHED_NAMESPACE_URI, "prop");
- Properties properties = new Properties();
- for (int i = 0; i < propElements.getLength(); i++) {
- Element propElement = (Element) propElements.item(i);
- String key = propElement.getAttribute("key");
- String value = propElement.getTextContent();
- properties.setProperty(key, value);
- }
- request.setProperties(properties);
- return request;
- } else {
- throw new DetachedException(requestType + " not implemented.");
- }
- }
-
- public void marshallAnswer(DetachedAnswer answer, Result result) {
- StringBuffer buf = new StringBuffer("");
- buf.append("<slc-det:detached-answer xmlns:slc-det=\""
- + SLC_DETACHED_NAMESPACE_URI + "\">");
- if (answer.getUuid() != null)
- buf.append("<slc-det:uuid>").append(answer.getUuid()).append(
- "</slc-det:uuid>");
- buf.append("<slc-det:status>").append(answer.getStatus()).append(
- "</slc-det:status>");
- if (answer.getLog() != null)
- buf.append("<slc-det:log>").append(answer.getLog()).append(
- "</slc-det:log>");
- if (answer.getProperties().size() != 0) {
- buf.append("<slc-det:properties>");
- Enumeration keys = answer.getProperties().keys();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- buf.append("<slc-det:prop key=\"").append(key).append("\">");
- buf.append(answer.getProperties().getProperty(key));
- buf.append("</slc-det:prop>");
- }
- buf.append("</slc-det:properties>");
- }
- buf.append("</slc-det:detached-answer>");
- StringReader reader = new StringReader(buf.toString());
- Source source = new StreamSource(reader);
- try {
- copy.transform(source, result);
- } catch (TransformerException e) {
- throw new DetachedException("Could not copy xml to result", e);
- } finally {
- IOUtils.closeQuietly(reader);
- }
- }
-
- public void marshallRequest(DetachedRequest request, Result result) {
- throw new DetachedException(" Not implemented.");
- }
-
- public DetachedRequest unmarshallRequest(Source source) {
- DOMResult result = new DOMResult();
- try {
- copy.transform(source, result);
- } catch (TransformerException e) {
- throw new DetachedException("Could not copy xml source", e);
- }
- Element node = (Element) ((Document) result.getNode())
- .getDocumentElement();
- DetachedRequest request = new DetachedRequest();
- request.setUuid(node.getElementsByTagNameNS(SLC_DETACHED_NAMESPACE_URI,
- "uuid").item(0).getTextContent());
- request.setRef(node.getElementsByTagNameNS(SLC_DETACHED_NAMESPACE_URI,
- "ref").item(0).getTextContent());
- Element propertiesElement = (Element) node.getElementsByTagNameNS(
- SLC_DETACHED_NAMESPACE_URI, "properties").item(0);
- NodeList propElements = propertiesElement.getElementsByTagNameNS(
- SLC_DETACHED_NAMESPACE_URI, "prop");
- Properties properties = new Properties();
- for (int i = 0; i < propElements.getLength(); i++) {
- Element propElement = (Element) propElements.item(i);
- String key = propElement.getAttribute("key");
- String value = propElement.getTextContent();
- properties.setProperty(key, value);
- }
- request.setProperties(properties);
- return request;
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached;
-
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Dummy detached step which copies the request into the answer and log. Useful
- * for testing.
- */
-public class MirrorStep implements DetachedStep {
- private final static Log log = LogFactory.getLog(MirrorStep.class);
-
- public DetachedAnswer execute(DetachedContext detachedContext,
- DetachedRequest req) {
- log.debug(" uuid=" + req.getUuid());
- log.debug(" ref=" + req.getRef());
- log.debug(" properties=" + req.getProperties());
-
- DetachedAnswer answer = new DetachedAnswer(req, "Mirror");
- Properties answerProps = new Properties();
- answerProps.putAll(req.getProperties());
- answer.setProperties(answerProps);
- return answer;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.admin;
-
-import org.argeo.slc.detached.DetachedAdminCommand;
-
-public class CloseSession implements DetachedAdminCommand {
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.admin;
-
-import org.argeo.slc.detached.DetachedAdminCommand;
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedException;
-import org.argeo.slc.detached.DetachedRequest;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-public class FelixShellCommand implements DetachedAdminCommand {
- public final static String PROP_FELIX_CMDLINE = "slc.detached.felix.cmdline";
-
- public DetachedAnswer execute(DetachedRequest request,
- BundleContext bundleContext) {
- ServiceReference ref = bundleContext
- .getServiceReference("org.apache.felix.shell.ShellService");
- if (ref == null)
- throw new DetachedException("Felix shell service not found.");
-
- String cmdLine = request.getProperties()
- .getProperty(PROP_FELIX_CMDLINE);
- if (cmdLine == null)
- throw new DetachedException("Property " + PROP_FELIX_CMDLINE
- + " must be defined.");
-
- // TODO: check were to put Felix dependency
- // see http://felix.apache.org/site/apache-felix-shell-service.html
- throw new DetachedException("Not yet implemented.");
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.admin;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.FrameworkListener;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Wraps low-level access to a {@link BundleContext}. Hacked from the related
- * class in org.argeo.slc.support.osgi.
- */
-class MinimalBundlesManager implements FrameworkListener {
- private final static Log log = LogFactory
- .getLog(MinimalBundlesManager.class);
-
- private final BundleContext bundleContext;
-
- private long defaultTimeout = 10000l;
- private final Object refreshedPackageSem = new Object();
-
- public MinimalBundlesManager(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- bundleContext.addFrameworkListener(this);
- }
-
- protected void finalize() throws Throwable {
- bundleContext.removeFrameworkListener(this);
- }
-
- /**
- * @see #upgradeSynchronous(Bundle[])
- */
- public void upgradeSynchronous(Bundle bundle) {
- upgradeSynchronous(new Bundle[] { bundle });
- }
-
- /**
- * Stop the active bundles, update them, refresh them and restart the
- * initially active bundles. All synchronously.
- */
- public void upgradeSynchronous(Bundle[] bundles) {
- try {
- // State (ACTIVE or other) before upgrading
- int[] initialStates = new int[bundles.length];
-
- // store initial state and stop active bundles
- for (int i = 0; i < bundles.length; ++i) {
- initialStates[i] = bundles[i].getState();
- if (initialStates[i] == Bundle.ACTIVE) {
- stopSynchronous(bundles[i]);
- }
- }
-
- // update the bundles
- for (int i = 0; i < bundles.length; ++i) {
- updateSynchronous(bundles[i]);
- }
-
- // refresh the bundles
- refreshSynchronous(bundles);
-
- // restart the bundles that were ACTIVE before upgrading
- for (int i = 0; i < bundles.length; ++i) {
- if (initialStates[i] == Bundle.ACTIVE) {
- startSynchronous(bundles[i]);
-
- String filter = "(Bundle-SymbolicName="
- + bundles[i].getSymbolicName() + ")";
- // Wait for application context to be ready
- // TODO: use service tracker
- try {
- getServiceRefSynchronous(
- "org.springframework.context.ApplicationContext",
- filter);
- }
- // in case of exception, catch and go on
- catch (Exception e) {
- log.error("getServiceRefSynchronous failed", e);
- }
- }
- }
- } catch (Exception e) {
- throw new RuntimeException("Cannot update bundles", e);
- }
- }
-
- /** Updates bundle synchronously. */
- protected void updateSynchronous(Bundle bundle) throws BundleException {
- bundle.update();
- boolean waiting = true;
-
- long begin = System.currentTimeMillis();
- do {
- int state = bundle.getState();
- if (state == Bundle.INSTALLED || state == Bundle.ACTIVE
- || state == Bundle.RESOLVED)
- waiting = false;
-
- sleep(100);
- if (System.currentTimeMillis() - begin > defaultTimeout)
- throw new RuntimeException("Update of bundle "
- + bundle.getSymbolicName()
- + " timed out. Bundle state = " + bundle.getState());
- } while (waiting);
-
- if (log.isDebugEnabled())
- log.debug("Bundle " + bundle.getSymbolicName() + " updated.");
- }
-
- /** Starts bundle synchronously. Does nothing if already started. */
- protected void startSynchronous(Bundle bundle) throws BundleException {
- int originalState = bundle.getState();
- if (originalState == Bundle.ACTIVE)
- return;
-
- bundle.start();
- boolean waiting = true;
-
- long begin = System.currentTimeMillis();
- do {
- if (bundle.getState() == Bundle.ACTIVE)
- waiting = false;
-
- sleep(100);
- if (System.currentTimeMillis() - begin > defaultTimeout)
- throw new RuntimeException("Start of bundle "
- + bundle.getSymbolicName()
- + " timed out. Bundle state = " + bundle.getState());
- } while (waiting);
-
- if (log.isDebugEnabled())
- log.debug("Bundle " + bundle.getSymbolicName() + " started.");
- }
-
- /** Stops bundle synchronously. Does nothing if already started. */
- protected void stopSynchronous(Bundle bundle) throws BundleException {
- int originalState = bundle.getState();
- if (originalState != Bundle.ACTIVE)
- return;
-
- bundle.stop();
- boolean waiting = true;
-
- long begin = System.currentTimeMillis();
- do {
- if (bundle.getState() != Bundle.ACTIVE
- && bundle.getState() != Bundle.STOPPING)
- waiting = false;
-
- sleep(100);
- if (System.currentTimeMillis() - begin > defaultTimeout)
- throw new RuntimeException("Stop of bundle "
- + bundle.getSymbolicName()
- + " timed out. Bundle state = " + bundle.getState());
- } while (waiting);
-
- if (log.isDebugEnabled())
- log.debug("Bundle " + bundle.getSymbolicName() + " stopped.");
- }
-
- /** Refresh bundle synchronously. Does nothing if already started. */
- protected void refreshSynchronous(Bundle[] bundles) throws BundleException {
- ServiceReference packageAdminRef = bundleContext
- .getServiceReference(PackageAdmin.class.getName());
- PackageAdmin packageAdmin = (PackageAdmin) bundleContext
- .getService(packageAdminRef);
- packageAdmin.refreshPackages(bundles);
-
- synchronized (refreshedPackageSem) {
- try {
- refreshedPackageSem.wait(defaultTimeout);
- } catch (InterruptedException e) {
- // silent
- }
- }
-
- if (log.isDebugEnabled())
- log.debug("Bundles refreshed.");
- }
-
- public void frameworkEvent(FrameworkEvent event) {
- if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
- synchronized (refreshedPackageSem) {
- refreshedPackageSem.notifyAll();
- }
- }
- }
-
- public ServiceReference[] getServiceRefSynchronous(String clss,
- String filter) throws InvalidSyntaxException {
- if (log.isTraceEnabled())
- log.trace("Filter: '" + filter + "'");
- ServiceReference[] sfs = null;
- boolean waiting = true;
- long begin = System.currentTimeMillis();
- do {
- sfs = bundleContext.getServiceReferences(clss, filter);
-
- if (sfs != null)
- waiting = false;
-
- sleep(100);
- if (System.currentTimeMillis() - begin > defaultTimeout)
- throw new RuntimeException("Search of services " + clss
- + " with filter " + filter + " timed out.");
- } while (waiting);
-
- return sfs;
- }
-
- protected void sleep(long ms) {
- try {
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- // silent
- }
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.admin;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.detached.DetachedAdminCommand;
-import org.argeo.slc.detached.DetachedException;
-import org.argeo.slc.detached.DetachedRequest;
-import org.argeo.slc.detached.DetachedSession;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-public class OpenSession implements DetachedAdminCommand {
- private final static Log log = LogFactory.getLog(OpenSession.class);
-
- public DetachedSession execute(DetachedRequest request,
- BundleContext bundleContext) {
-
- DetachedSession session = new DetachedSession();
- session.setUuid(Long.toString(System.currentTimeMillis()));
-
- Properties props = request.getProperties();
- if (props.containsKey(DetachedSession.PROP_DO_IT_AGAIN_POLICY))
- session.setDoItAgainPolicy(props
- .getProperty(DetachedSession.PROP_DO_IT_AGAIN_POLICY));
-
- String refreshedBundles = props
- .getProperty("slc.detached.refreshedBundles");
- if (refreshedBundles != null) {
-
- List refreshedBundleNames = new ArrayList();
- StringTokenizer st = new StringTokenizer(refreshedBundles, ",");
- while (st.hasMoreTokens()) {
- refreshedBundleNames.add(st.nextElement());
- }
-
- Bundle[] allBundles = bundleContext.getBundles();
- Bundle[] bundlesToRefresh = new Bundle[refreshedBundleNames.size()];
-
- log.debug("Bundles to refresh for DetachedSession:");
-
- for(int i = 0; i < bundlesToRefresh.length; ++i) {
- bundlesToRefresh[i] = getBundleForName((String)refreshedBundleNames.get(i), allBundles);
- if(log.isDebugEnabled())
- log.debug(" " + refreshedBundleNames.get(i));
- }
-
- (new MinimalBundlesManager(bundleContext)).upgradeSynchronous(bundlesToRefresh);
- }
-
- return session;
- }
-
- private Bundle getBundleForName(String symbolicName, Bundle[] bundles) {
- for (int i = 0; i < bundles.length; i++) {
- if (symbolicName.equals(bundles[i].getSymbolicName())) {
- return bundles[i];
- }
- }
- throw new DetachedException("No Bundle found for symbolic name " + symbolicName);
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.drivers;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.text.MessageFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.filefilter.NotFileFilter;
-import org.apache.commons.io.filefilter.SuffixFileFilter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedClient;
-import org.argeo.slc.detached.DetachedCommunication;
-import org.argeo.slc.detached.DetachedDriver;
-import org.argeo.slc.detached.DetachedException;
-import org.argeo.slc.detached.DetachedRequest;
-import org.argeo.slc.detached.DetachedXmlConverter;
-import org.springframework.beans.factory.InitializingBean;
-
-/**
- * Implements both <code>DetachedClient</code> and <code>DetachedDriver</code>
- * using File protocol
- */
-public class FileDriver implements DetachedClient, DetachedDriver,
- InitializingBean {
- private final static Log log = LogFactory.getLog(FileDriver.class);
- private final static SimpleDateFormat sdf = new SimpleDateFormat(
- "yyMMdd_HHmmss_SSS");
- private final static MessageFormat mf = new MessageFormat("{0,number,000}");
-
- private File baseDir;
- private File requestsDir;
- private File answersDir;
- private File processedRequestsDir;
- private File processedAnswersDir;
- private File cleanedRequestsDir;
- private File cleanedAnswersDir;
-
- private String lockFileExt = "lck";
- private FileFilter notLockFileFilter = new NotFileFilter(
- new SuffixFileFilter("." + lockFileExt));
-
- // Counters to avoid naming files with same prefix
- private long lastSentTime = 0;
- private int counter = 0;
-
- private DetachedXmlConverter xmlConverter = null;
-
- private long receiveAnswerTimeout = 10000l;
-
- private boolean active = true;
-
- public synchronized DetachedRequest receiveRequest() throws Exception {
- DetachedRequest request = (DetachedRequest) receiveFile(requestsDir,
- processedRequestsDir, 0);
- if (request != null)
- if (log.isTraceEnabled())
- log.trace("Received detached request #" + request.getUuid()
- + " for ref '" + request.getRef());
- return request;
- }
-
- public synchronized void sendAnswer(DetachedAnswer answer) throws Exception {
- sendFile(answersDir, answer);
- if (log.isTraceEnabled())
- log.trace("Sent detached answer #" + answer.getUuid());
- }
-
- public synchronized DetachedAnswer receiveAnswer() throws Exception {
- DetachedAnswer answer = (DetachedAnswer) receiveFile(answersDir,
- processedAnswersDir, getReceiveAnswerTimeout());
- if (answer != null)
- if (log.isTraceEnabled())
- log.trace("Received detached answer #" + answer.getUuid());
- return answer;
- }
-
- public synchronized void sendRequest(DetachedRequest request)
- throws Exception {
- sendFile(requestsDir, request);
- if (log.isTraceEnabled())
- log.trace("Sent detached request #" + request.getUuid()
- + " for ref '" + request.getRef());
- }
-
- protected synchronized void sendFile(File dir, DetachedCommunication detCom)
- throws Exception {
- final String ext;
- if (getXmlConverter() != null)
- ext = ".xml";
- else
- ext = "";
-
- // Check counters
- Date nowDate = new Date();
- long nowMs = nowDate.getTime();
- if (nowMs == lastSentTime) {
- counter++;
- } else {
- counter = 0;
- }
-
- // Create file path
- StringBuffer filePath = new StringBuffer(dir.getPath());
- filePath.append(File.separatorChar).append(sdf.format(nowDate))
- .append('-');
- filePath.append(mf.format(new Object[] { new Long(counter) })).append(
- '-');
- filePath.append(detCom.getUuid()).append(ext);
- File file = new File(filePath.toString());
-
- File lockFile = createLockFile(file);
- if (getXmlConverter() != null) {// xml
- FileOutputStream outFile = new FileOutputStream(file);
- try {
- StreamResult result = new StreamResult(outFile);
- getXmlConverter().marshallCommunication(detCom, result);
- } finally {
- IOUtils.closeQuietly(outFile);
- }
- } else {// serialize
- ObjectOutputStream out = new ObjectOutputStream(
- new FileOutputStream(file));
- try {
- out.writeObject(detCom);
- } finally {
- IOUtils.closeQuietly(out);
- }
- }
- lockFile.delete();
- }
-
- /**
- * @param timeout
- * in ms, 0 is no timeout
- */
- protected synchronized DetachedCommunication receiveFile(File dir,
- File processedDir, long timeout) throws Exception {
- long begin = System.currentTimeMillis();
- File file = null;
- while (file == null && isActive()) {
- if (!dir.exists())
- throw new DetachedException("Dir " + dir + " does not exist.");
-
- File[] files = dir.listFiles(notLockFileFilter);
- if (files.length > 0)
- file = files[0];
- else {
- try {
- wait(100);
- } catch (InterruptedException e) {
- // silent
- }
- }
-
- long duration = System.currentTimeMillis() - begin;
- if (timeout != 0 && duration > timeout) {
- throw new DetachedException("Receive file timed out after "
- + duration + "ms.");
- }
- }
-
- if (!isActive()) {
- log.debug("DetachedDriver is not active. Leaving receiveFile");
- return null;
- }
-
- File lockFile = nameLockFile(file);
- while (lockFile.exists())
- // FIXME: implements time out
- Thread.sleep(100);
-
- // Read the file
- final DetachedCommunication detCom;
- if (FilenameUtils.getExtension(file.getName()).equals("xml")) {
- if (getXmlConverter() == null)
- throw new DetachedException("No XML converter defined.");
- FileInputStream in = new FileInputStream(file);
- try {
- StreamSource source = new StreamSource(in);
- detCom = getXmlConverter().unmarshallCommunication(source);
- } finally {
- IOUtils.closeQuietly(in);
- }
- } else {
- ObjectInputStream in = new ObjectInputStream(new FileInputStream(
- file));
- try {
- detCom = (DetachedCommunication) in.readObject();
- } finally {
- IOUtils.closeQuietly(in);
- }
- }
- // Move to processed dir
- FileUtils.moveFileToDirectory(file, processedDir, false);
- return detCom;
- }
-
- public synchronized void stop() {
- log.debug("Stopping Detached Driver");
- active = false;
- notifyAll();
- }
-
- private synchronized boolean isActive() {
- return active;
- }
-
- protected File createLockFile(File file) {
- File lockFile = nameLockFile(file);
- try {
- lockFile.createNewFile();
- } catch (IOException e) {
- throw new DetachedException("Cannot create lock file " + lockFile);
- }
- return lockFile;
- }
-
- protected File nameLockFile(File file) {
- return new File(file.getAbsolutePath() + "." + lockFileExt);
- }
-
- public void setBaseDir(File baseDir) {
- this.baseDir = baseDir;
- }
-
- private void createIfNotExist(File dir) {
- if (!dir.exists()) {
- log.warn("Dir " + dir.getAbsolutePath()
- + " does not exist. Creating it...");
- dir.mkdirs();
- }
- }
-
- public void afterPropertiesSet() throws Exception {
- this.requestsDir = new File(baseDir.getAbsolutePath() + File.separator
- + "requests");
- this.answersDir = new File(baseDir.getAbsolutePath() + File.separator
- + "answers");
- this.processedRequestsDir = new File(baseDir.getAbsolutePath()
- + File.separator + "processed" + File.separator + "requests");
- this.processedAnswersDir = new File(baseDir.getAbsolutePath()
- + File.separator + "processed" + File.separator + "answers");
- this.cleanedRequestsDir = new File(baseDir.getAbsolutePath()
- + File.separator + "cleaned" + File.separator + "requests");
- this.cleanedAnswersDir = new File(baseDir.getAbsolutePath()
- + File.separator + "cleaned" + File.separator + "answers");
-
- createIfNotExist(requestsDir);
- createIfNotExist(answersDir);
- createIfNotExist(processedRequestsDir);
- createIfNotExist(processedAnswersDir);
- createIfNotExist(cleanedRequestsDir);
- createIfNotExist(cleanedAnswersDir);
- if (log.isDebugEnabled())
- log.debug("Detached File Driver initialized on " + baseDir);
- }
-
- public void cleanPreviousRuns() throws Exception {
-
- // Clean requests and answers from previous builds
- File[] remainingRequests = requestsDir.listFiles();
- for (int i = 0; i < remainingRequests.length; i++) {
- FileUtils.moveFileToDirectory(remainingRequests[i],
- cleanedRequestsDir, false);
- }
-
- File[] remainingAnswers = answersDir.listFiles();
- for (int i = 0; i < remainingAnswers.length; i++) {
- FileUtils.moveFileToDirectory(remainingAnswers[i],
- cleanedAnswersDir, false);
- }
- log.info("Clean previous runs of File Driver on " + baseDir);
-
- }
-
- public long getReceiveAnswerTimeout() {
- return receiveAnswerTimeout;
- }
-
- public void setReceiveAnswerTimeout(long receiveAnswerTimeout) {
- this.receiveAnswerTimeout = receiveAnswerTimeout;
- }
-
- public DetachedXmlConverter getXmlConverter() {
- return xmlConverter;
- }
-
- public void setXmlConverter(DetachedXmlConverter xmlConverter) {
- this.xmlConverter = xmlConverter;
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.drivers;
-
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedClient;
-import org.argeo.slc.detached.DetachedDriver;
-import org.argeo.slc.detached.DetachedRequest;
-
-/**
- * Implements both <code>DetachedClient</code> and <code>DetachedDriver</code>
- * using memory access
- */
-public class MemoryDriver implements DetachedClient, DetachedDriver {
- private DetachedRequest currentRequest = null;
- private DetachedAnswer currentAnswer = null;
-
- // DRIVER
- public synchronized DetachedRequest receiveRequest() throws Exception {
- while (currentRequest == null)
- this.wait(500);
- return currentRequest;
- }
-
- public synchronized void sendAnswer(DetachedAnswer answer) throws Exception {
- currentAnswer = answer;
- this.notify();
- }
-
- // CLIENT
- public synchronized DetachedAnswer receiveAnswer() throws Exception {
- while (currentAnswer == null)
- this.wait(500);
- DetachedAnswer answer = currentAnswer;
- currentAnswer = null;
- currentRequest = null;
- return answer;
- }
-
- public synchronized void sendRequest(DetachedRequest request)
- throws Exception {
- currentRequest = request;
- this.notify();
- }
-
- public void stop() {
- // NOTHING
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.ui;
-
-import org.argeo.slc.detached.DetachedContext;
-import org.argeo.slc.detached.DetachedRequest;
-
-public abstract class UiPart {
- private boolean initialized = false;
-
- public synchronized final void init(DetachedContext context,
- DetachedRequest request) {
- initUi(context, request);
- initialized = true;
- }
-
- public synchronized final void reset(DetachedContext context,
- DetachedRequest request) {
- resetUi(context, request);
- initialized = false;
- }
-
- protected abstract void initUi(DetachedContext context,
- DetachedRequest request);
-
- protected void resetUi(DetachedContext context, DetachedRequest request) {
-
- }
-
- public synchronized boolean isInitialized() {
- return initialized;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.detached.ui;
-
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedContext;
-import org.argeo.slc.detached.DetachedRequest;
-import org.argeo.slc.detached.DetachedStep;
-import org.springframework.beans.factory.BeanNameAware;
-
-public abstract class UiStep implements DetachedStep, BeanNameAware {
- private String beanName;
-
- public final DetachedAnswer execute(DetachedContext detachedContext,
- DetachedRequest detachedStepRequest) {
- // uiPart.init(detachedContext, detachedStepRequest);
- return executeUiStep(detachedContext, detachedStepRequest);
- }
-
- protected abstract DetachedAnswer executeUiStep(DetachedContext context,
- DetachedRequest request);
-
- public void setBeanName(String name) {
- this.beanName = name;
- }
-
- public String getBeanName() {
- return beanName;
- }
-
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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:beans xmlns="http://www.springframework.org/schema/osgi"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi.xsd
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-<!--
- <service id="slcDetached.service.driver.fileXmlCompat" ref="slcDetached.driver.fileXmlCompat"
- interface="org.argeo.slc.detached.DetachedDriver" />
- -->
- <service id="executionServer.service" ref="executionServer"
- interface="org.argeo.slc.detached.DetachedExecutionServer" />
-
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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.0.xsd">
-
- <import resource="classpath:/org/argeo/slc/detached/spring.xml" />
-
- <bean id="executionServer" class="org.argeo.slc.detached.DetachedExecutionServerImpl">
- </bean>
-
- <!--
- <bean id="slcDetached.driver.fileXmlCompat"
- parent="slcTemplate.detached.fileDriver"> <property name="baseDir"
- value="${slc.workDir}/detached" /> <property name="xmlConverter"
- ref="slcDefault.detached.xmlConverterCompat" /> </bean>
- -->
-</beans>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema
- targetNamespace="http://argeo.org/projects/slc/schemas/detached"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- xmlns:slc-det="http://argeo.org/projects/slc/schemas/detached">
-
- <xs:element name="detached-request">
- <xs:complexType>
- <xs:all>
- <xs:element name="uuid" type="xs:string" maxOccurs="1" />
- <xs:element name="ref" type="xs:string" minOccurs="0"
- maxOccurs="1" />
- <xs:element name="path" type="xs:string" minOccurs="0"
- maxOccurs="1" />
- <xs:element name="properties" minOccurs="0"
- maxOccurs="1" type="slc-det:PropertiesType" />
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="detached-answer">
- <xs:complexType>
- <xs:all>
- <xs:element name="uuid" type="xs:string" maxOccurs="1" />
- <xs:element name="status" minOccurs="0" maxOccurs="1">
- <xs:simpleType>
- <xs:restriction base="xs:integer">
- <xs:enumeration value="-1" />
- <xs:enumeration value="0" />
- <xs:enumeration value="1" />
- <xs:enumeration value="2" />
- <xs:enumeration value="10" />
- </xs:restriction>
- </xs:simpleType>
- </xs:element>
- <xs:element name="log" type="xs:string" minOccurs="0"
- maxOccurs="1" />
- <xs:element name="properties" minOccurs="0"
- maxOccurs="1" type="slc-det:PropertiesType" />
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <xs:complexType name="PropertiesType">
- <xs:sequence>
- <xs:element name="prop" type="slc-det:PropType"
- minOccurs="0" maxOccurs="unbounded">
- </xs:element>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="PropType">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="key" type="xs:string"
- use="required" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
-
-</xs:schema>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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.detached.admin.openSession" class="org.argeo.slc.detached.admin.OpenSession">
- </bean>
-
- <bean id="slcDefault.detached.admin.closeSession" class="org.argeo.slc.detached.admin.CloseSession">
- </bean>
-
- <bean id="slcDefault.detached.xmlConverterCompat" class="org.argeo.slc.detached.DetachedXmlConverterCompat">
- </bean>
-
- <bean id="slcTemplate.detached.fileDriver" class="org.argeo.slc.detached.drivers.FileDriver"
- abstract="true">
- </bean>
-
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>\r
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>\r
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>\r
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.lib.detached</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>
+++ /dev/null
-#Fri Aug 29 11:31:46 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-additional.bundles = org.springframework.xml,\
- org.argeo.slc.unit,\
- junit
-source.. = src/main/java/,\
- src/main/resources/,\
- src/test/java/,\
- src/test/resources/
+++ /dev/null
-<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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.lib.detached</artifactId>
- <name>SLC Lib Detached</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.*
- </Export-Package>
- <Import-Package>javax.xml.*;version="0.0.0",org.argeo.slc.ant.*;resolution:="optional",*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.simple</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.detached</artifactId>
- <version>2.1.1-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>
-
- <!-- Unit Tests -->
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.unit</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.lib.detached;
-
-import java.util.Properties;
-import java.util.UUID;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedClient;
-import org.argeo.slc.detached.DetachedRequest;
-
-public class DetachedAdminTask implements Runnable {
- private final static Log log = LogFactory.getLog(DetachedAdminTask.class);
-
- private String action;
- private DetachedClient client;
- private Properties properties;
-
- public void run() {
- // Prepare and send request
- DetachedRequest request = new DetachedRequest(UUID.randomUUID()
- .toString());
- request.setRef(action);
-
- if (properties != null) {
- request.setProperties(properties);
- }
-
- try {
- client.sendRequest(request);
- DetachedAnswer answer = client.receiveAnswer();
- if (answer.getStatus() == DetachedAnswer.ERROR)
- throw new SlcException("Error when executing request "
- + answer.getUuid() + ": " + answer.getLog());
- else
- log.info("Admin answer: " + answer.getLog());
- } catch (Exception e) {
- throw new SlcException("Could not send request.", e);
- }
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
- public void setClient(DetachedClient detachedClient) {
- this.client = detachedClient;
- }
-
- public void setProperties(Properties properties) {
- this.properties = properties;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.lib.detached;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.core.execution.tasks.JvmProcess;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.context.ResourceLoaderAware;
-import org.springframework.core.io.FileSystemResource;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.ResourceLoader;
-import org.springframework.osgi.context.BundleContextAware;
-
-public class DetachedLauncher extends JvmProcess implements BundleContextAware,
- InitializingBean, ResourceLoaderAware {
- private final static Log log = LogFactory.getLog(DetachedLauncher.class);
-
- private BundleContext bundleContext = null;
- private ResourceLoader resourceLoader = null;
-
- private Resource osgiFramework = null;
- private String osgibootBundleName = "org.argeo.osgi.boot";
- private String equinoxBundleName = "org.eclipse.osgi";
- private String xmlapisBundleName = "org.apache.xmlcommons";
- private String xercesBundleName = "org.apache.xerces";
-
- private List<String> excludeBundleNames = new ArrayList<String>();
- private List<String> includeBundleUrls = new ArrayList<String>();
-
- /**
- * Required by Spring for JDK 1.4. see
- * http://forum.springsource.org/showthread.php?t=74555
- */
- private Boolean prependXmlJars = false;
-
- public DetachedLauncher() {
- // Override defaults
- setSynchronous(false);
- setMainClass("org.argeo.osgi.boot.Launcher");
- }
-
- public void afterPropertiesSet() throws Exception {
- if (bundleContext == null)
- throw new SlcException("An OSGi bundle context is required.");
-
- // Equinox jar
- if (osgiFramework == null)
- getClasspath()
- .add(asResource(System.getProperty("osgi.framework")));
- else
- getClasspath().add(osgiFramework);
-
- StringBuffer osgiBundles = new StringBuffer("");
- StringBuffer osgiLocations = new StringBuffer("");
- bundles: for (Bundle bundle : bundleContext.getBundles()) {
- String name = bundle.getSymbolicName();
-
- if (excludeBundleNames.contains(name)) {
- if (log.isDebugEnabled())
- log.debug("Exclude bundle " + name);
- continue bundles;// skip excluded
- }
-
- String originalLocation = bundle.getLocation();
- if (log.isTraceEnabled())
- log.trace("Original location of bundle " + name + ": "
- + originalLocation);
- String location = removeInitialReference(originalLocation);
-
- // Special bundles
- if (osgibootBundleName.equals(name))
- getClasspath().add(asResource(location));
- else if (equinoxBundleName.equals(name))
- continue bundles;// skip framework
- else if (xmlapisBundleName.equals(name) && prependXmlJars)
- getPBootClasspath().add(asResource(location));
- else if (xercesBundleName.equals(name) && prependXmlJars)
- getPBootClasspath().add(asResource(location));
-
- if (location.startsWith("file:")) {
- File file = new File(location.substring("file:".length()));
- if (osgiLocations.length() != 0)
- osgiLocations.append(File.pathSeparatorChar);
- location = file.getPath().replace('/', File.separatorChar);
- osgiLocations.append(location);
- if (log.isTraceEnabled())
- log.trace("Added bundle " + name
- + " to argeo.osgi.locations: " + location);
- } else {
- if (osgiBundles.length() != 0)
- osgiBundles.append(',');
- location = location.replace('/', File.separatorChar);
- osgiBundles.append(location);
- if (log.isTraceEnabled())
- log.trace("Added bundle " + name + " to osgi.bundles: "
- + location);
- }
- }
-
- for (String url : includeBundleUrls) {
- if (osgiBundles.length() != 0)
- osgiBundles.append(',');
- osgiBundles.append(url);
- if (log.isDebugEnabled())
- log.debug("Include url" + url);
- }
-
- getSystemProperties().setProperty("osgi.bundles",
- osgiBundles.toString());
- getSystemProperties().setProperty("argeo.osgi.locations",
- osgiLocations.toString());
-
- super.afterPropertiesSet();
- }
-
- protected String removeInitialReference(String location) {
- if (location.startsWith("initial@reference:file:"))
- location = System.getProperty("osgi.install.area")
- + location.substring("initial@reference:file:".length());
- if (location.charAt(location.length() - 1) == '/')
- location.substring(0, location.length() - 1);
- return location;
- }
-
- protected Resource asResource(String location) {
- // Resource res = resourceLoader.getResource(location);
-
- final Resource res;
- if (location.startsWith("file:")) {
- File file = new File(location.substring("file:".length()));
- if (!file.exists())
- throw new SlcException("File " + file + " does not exist");
-
- try {
- res = new FileSystemResource(file.getCanonicalFile());
- } catch (IOException e) {
- throw new SlcException("Cannot create resource based on "
- + file, e);
- }
- } else
- res = resourceLoader.getResource(location);
-
- if (log.isDebugEnabled())
- log.debug("Converted " + location + " to " + res);
- return res;
- }
-
- public void setBundleContext(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
-
- public void setResourceLoader(ResourceLoader resourceLoader) {
- this.resourceLoader = resourceLoader;
- }
-
- public void setOsgibootBundleName(String osgibootBundleName) {
- this.osgibootBundleName = osgibootBundleName;
- }
-
- public void setXmlapisBundleName(String xmlapisBundleName) {
- this.xmlapisBundleName = xmlapisBundleName;
- }
-
- public void setXercesBundleName(String xercesBundleName) {
- this.xercesBundleName = xercesBundleName;
- }
-
- public void setOsgiFramework(Resource osgiFramework) {
- this.osgiFramework = osgiFramework;
- }
-
- public void setEquinoxBundleName(String equinoxBundleName) {
- this.equinoxBundleName = equinoxBundleName;
- }
-
- public void setPrependXmlJars(Boolean prependXmlJars) {
- this.prependXmlJars = prependXmlJars;
- }
-
- public void setExcludeBundleNames(List<String> excludeBundleNames) {
- this.excludeBundleNames = excludeBundleNames;
- }
-
- public void setIncludeBundleUrls(List<String> includeBundleUrls) {
- this.includeBundleUrls = includeBundleUrls;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.lib.detached;
-
-import org.argeo.slc.core.test.context.DefaultContextTestData;
-
-/**
- * @deprecated
- *
- */
-public class DetachedTestData extends DefaultContextTestData {
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.lib.detached;
-
-import java.util.Map;
-import java.util.Properties;
-import java.util.UUID;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.core.test.SimpleResultPart;
-import org.argeo.slc.core.test.context.ContextUtils;
-import org.argeo.slc.core.test.context.DefaultContextTestData;
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedClient;
-import org.argeo.slc.detached.DetachedRequest;
-import org.argeo.slc.detached.DetachedStep;
-import org.argeo.slc.detached.ui.UiStep;
-import org.argeo.slc.test.TestDefinition;
-import org.argeo.slc.test.TestResult;
-import org.argeo.slc.test.TestRun;
-import org.argeo.slc.test.TestStatus;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.PropertyValue;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
-import org.springframework.beans.factory.BeanInitializationException;
-import org.springframework.beans.factory.BeanNameAware;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.beans.factory.config.BeanReference;
-import org.springframework.beans.factory.support.BeanDefinitionRegistry;
-
-public class DetachedTestDefinition implements TestDefinition, BeanNameAware,
- BeanFactoryAware, InitializingBean {
- private final static Log log = LogFactory
- .getLog(DetachedTestDefinition.class);
-
- private DetachedStep step;
- private DetachedClient client;
-
- // Spring properties
- private String testDefBeanName = null;
- private BeanDefinitionRegistry beanDefinitionRegistry = null;
- private String stepRef = null;
-
- public void execute(TestRun testRun) {
- // Look for step bean name
- String stepBeanNameT = null;
- if (this.stepRef == null && step != null) {
- if (step instanceof UiStep) {
- stepBeanNameT = ((UiStep) step).getBeanName();
- } else {
- // Introspects bean factory in order to find step bean name
- BeanDefinition thisBeanDef = beanDefinitionRegistry
- .getBeanDefinition(testDefBeanName);
- PropertyValue propValue = thisBeanDef.getPropertyValues()
- .getPropertyValue("step");
- Object stepBeanRef = propValue.getValue();
- BeanReference ref = (BeanReference) stepBeanRef;
- stepBeanNameT = ref.getBeanName();
- }
- } else if (this.stepRef != null) {
- stepBeanNameT = this.stepRef;
- }
-
- // Execute
- DetachedRequest request = new DetachedRequest();
- request.setUuid(UUID.randomUUID().toString());
- request.setRef(stepBeanNameT);
-
- DefaultContextTestData testData = testRun.getTestData();
- if (testData != null) {
- Map<String, Object> values = testData.getValues();
- Properties inputParameters = new Properties();
- inputParameters.putAll(values);// TODO: check conversions to string
- request.setProperties(inputParameters);
- }
-
- try {
- client.sendRequest(request);
- } catch (Exception e) {
- throw new SlcException("Could not send request for step "
- + stepBeanNameT, e);
- }
-
- DetachedAnswer answer;
- try {
- answer = client.receiveAnswer();
- } catch (Exception e) {
- throw new SlcException("Could not receive answer #"
- + request.getUuid() + " for step " + stepBeanNameT, e);
- }
-
- if (answer.getStatus() == DetachedAnswer.ERROR)
- throw new SlcException("Error when executing step "
- + answer.getUuid() + ": " + answer.getLog());
- else
- log.info("Received answer for '" + request.getRef() + "' ("
- + answer.getStatusAsString() + "):" + answer.getLog());
-
- if (testData != null) {
- Properties outputParameters = answer.getProperties();
- for (Object key : outputParameters.keySet())
- testData.getValues().put(key.toString(),
- outputParameters.get(key));
- }
-
- if (testData != null) {
- ContextUtils.compareReachedExpected(testData,
- testRun.getTestResult());
- } else {
- ((TestResult) testRun.getTestResult())
- .addResultPart(new SimpleResultPart(TestStatus.PASSED,
- "Step " + stepBeanNameT + " executed successfully"));
- }
- }
-
- public void setBeanName(String name) {
- this.testDefBeanName = name;
- }
-
- public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
- if (beanFactory instanceof BeanDefinitionRegistry)
- beanDefinitionRegistry = (BeanDefinitionRegistry) beanFactory;
- else
- throw new BeanInitializationException(
- "Require BeanDefinitionRegistry");
- }
-
- public void afterPropertiesSet() throws Exception {
- }
-
- public void setStep(DetachedStep step) {
- this.step = step;
- }
-
- public void setClient(DetachedClient client) {
- this.client = client;
- }
-
- public void setStepRef(String stepBeanName) {
- this.stepRef = stepBeanName;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.lib.detached;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedCommunication;
-import org.argeo.slc.detached.DetachedException;
-import org.argeo.slc.detached.DetachedRequest;
-import org.argeo.slc.detached.DetachedXmlConverter;
-import org.springframework.oxm.Marshaller;
-import org.springframework.oxm.Unmarshaller;
-
-public class DetachedXmlConverterSpring implements DetachedXmlConverter {
- private Marshaller marshaller;
- private Unmarshaller unmarshaller;
-
- public void marshallCommunication(DetachedCommunication detCom,
- Result result) {
- if (detCom instanceof DetachedRequest) {
- marshallRequest((DetachedRequest) detCom, result);
- } else if (detCom instanceof DetachedAnswer) {
- marshallAnswer((DetachedAnswer) detCom, result);
- } else {
- throw new DetachedException("Unkown communication type "
- + detCom.getClass());
- }
- }
-
- public DetachedCommunication unmarshallCommunication(Source source) {
- try {
- return (DetachedCommunication) unmarshaller.unmarshal(source);
- } catch (Exception e) {
- throw new SlcException("Could not unmarshall", e);
- }
- }
-
- public void marshallRequest(DetachedRequest request, Result result) {
- try {
- marshaller.marshal(request, result);
- } catch (Exception e) {
- throw new SlcException("Could not marshall", e);
- }
- }
-
- public void marshallAnswer(DetachedAnswer answer, Result result) {
- try {
- marshaller.marshal(answer, result);
- } catch (Exception e) {
- throw new SlcException("Could not marshall", e);
- }
- }
-
- public void setMarshaller(Marshaller marshaller) {
- this.marshaller = marshaller;
- }
-
- public void setUnmarshaller(Unmarshaller unmarshaller) {
- this.unmarshaller = unmarshaller;
- }
-
-}
+++ /dev/null
-<?xml version="1.0"?>
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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.
-
--->
-<!DOCTYPE doc [
-<!ENTITY slc-detached-namespace-uri "http://argeo.org/projects/slc/schemas/detached">
-<!ENTITY slc-detached-namespace-prefix "slc-det">
-]>
-
-<mapping>
- <description>Mapping of SLC detached types</description>
-
- <class name="org.argeo.slc.detached.DetachedRequest">
- <map-to ns-uri="&slc-detached-namespace-uri;"
- ns-prefix="&slc-detached-namespace-prefix;" />
- <field name="uuid" />
- <field name="ref" />
- <field name="properties" collection="map">
- <bind-xml name="prop" location="properties">
- <class name="org.exolab.castor.mapping.MapItem">
- <map-to ns-uri="&slc-detached-namespace-uri;"
- ns-prefix="&slc-detached-namespace-prefix;" />
- <field name="key" type="string">
- <bind-xml name="key" node="attribute" />
- </field>
- <field name="value" type="string">
- <bind-xml node="text" />
- </field>
- </class>
- </bind-xml>
- </field>
- </class>
-
- <class name="org.argeo.slc.detached.DetachedAnswer">
- <map-to ns-uri="&slc-detached-namespace-uri;"
- ns-prefix="&slc-detached-namespace-prefix;" />
- <field name="uuid" />
- <field name="status" />
- <field name="log" />
- <field name="properties" collection="map">
- <bind-xml name="prop" location="properties">
- <class name="org.exolab.castor.mapping.MapItem">
- <map-to ns-uri="&slc-detached-namespace-uri;"
- ns-prefix="&slc-detached-namespace-prefix;" />
- <field name="key" type="string">
- <bind-xml name="key" 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
+++ /dev/null
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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="slcTemplate.detached.testDefinition"
- class="org.argeo.slc.lib.detached.DetachedTestDefinition"
- abstract="true">
- </bean>
-
- <bean id="slcDefault.detached.xmlConverterCastor"
- class="org.argeo.slc.lib.detached.DetachedXmlConverterSpring">
- <property name="marshaller"
- ref="slcDefault.detached.castor.marshaller" />
- <property name="unmarshaller"
- ref="slcDefault.detached.castor.marshaller" />
- </bean>
-
- <bean id="slcDefault.detached.castor.marshaller"
- class="org.springframework.oxm.castor.CastorMarshaller">
- <property name="mappingLocations">
- <list>
- <value>
- classpath:org/argeo/slc/lib/detached/castor.xml
- </value>
- </list>
- </property>
- <property name="whitespacePreserve" value="true" />
- </bean>
-
- <bean id="slcDefault.detached.xml.xsdValidator"
- factory-bean="slcDefault.detached.xml.xsdSchema"
- factory-method="createValidator" />
-
- <bean id="slcDefault.detached.xml.xsdSchema"
- class="org.springframework.xml.xsd.SimpleXsdSchema">
- <property name="xsd"
- value="classpath:/org/argeo/slc/detached/slc-detached.xsd" />
- </bean>
-
-</beans>
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.lib.detached;
-
-import java.util.Enumeration;
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.detached.DetachedAnswer;
-import org.argeo.slc.detached.DetachedRequest;
-import org.argeo.slc.detached.DetachedXmlConverter;
-import org.argeo.slc.detached.DetachedXmlConverterCompat;
-import org.argeo.slc.unit.AbstractSpringTestCase;
-import org.argeo.slc.unit.UnitXmlUtils;
-import org.springframework.xml.transform.StringResult;
-import org.springframework.xml.transform.StringSource;
-import org.springframework.xml.validation.XmlValidator;
-
-public class DetachedCastorTest extends AbstractSpringTestCase {
- private final Log log = LogFactory.getLog(getClass());
-
- private DetachedXmlConverter converter = null;
- private XmlValidator validator = null;
- private DetachedXmlConverter converterCompat = null;
-
- public void setUp() {
- converter = getBean("slcDefault.detached.xmlConverterCastor");
- validator = getBean("slcDefault.detached.xml.xsdValidator");
- converterCompat = new DetachedXmlConverterCompat();
- }
-
- public void testRequest() throws Exception {
- DetachedRequest request = createTestRequest();
-
- StringResult result = new StringResult();
- converter.marshallCommunication(request, result);
- String xml = result.toString();
- log.debug(xml + "\n");
-
- UnitXmlUtils.assertXmlValidation(validator, new StringSource(xml));
- DetachedRequest requestUnm = (DetachedRequest) converter
- .unmarshallCommunication(new StringSource(xml));
- assertDetachedRequest(request, requestUnm);
- }
-
- public void testRequestCompat() throws Exception {
- DetachedRequest request = createTestRequest();
-
- StringResult result = new StringResult();
- converter.marshallCommunication(request, result);
- String xml = result.toString();
- log.debug(xml + "\n");
-
- UnitXmlUtils.assertXmlValidation(validator, new StringSource(xml));
- DetachedRequest requestUnm = (DetachedRequest) converterCompat
- .unmarshallCommunication(new StringSource(xml));
- assertDetachedRequest(request, requestUnm);
- }
-
- public void testAnswer() throws Exception {
- DetachedAnswer answer = createTestAnswer();
- StringResult result = new StringResult();
- converter.marshallCommunication(answer, result);
- String xml = result.toString();
- log.debug(xml + "\n");
-
- UnitXmlUtils.assertXmlValidation(validator, new StringSource(xml));
- DetachedAnswer answerUnm = (DetachedAnswer) converter
- .unmarshallCommunication(new StringSource(xml));
- assertDetachedAnswer(answer, answerUnm);
- }
-
- public void testAnswerCompat() throws Exception {
- DetachedAnswer answer = createTestAnswer();
- StringResult result = new StringResult();
- converterCompat.marshallCommunication(answer, result);
- String xml = result.toString();
- log.debug(xml + "\n");
-
- UnitXmlUtils.assertXmlValidation(validator, new StringSource(xml));
- DetachedAnswer answerUnm = (DetachedAnswer) converter
- .unmarshallCommunication(new StringSource(xml));
- assertDetachedAnswer(answer, answerUnm);
- }
-
- public static DetachedRequest createTestRequest() {
- DetachedRequest request = new DetachedRequest();
- request.setUuid("12345");
- request.setRef("testRef");
- Properties properties = new Properties();
- properties.setProperty("key1", "value1");
- properties.setProperty("key2", "value2");
- request.setProperties(properties);
- return request;
- }
-
- public static DetachedAnswer createTestAnswer() {
- DetachedAnswer answer = new DetachedAnswer();
- answer.setUuid("12345");
- answer.setStatus(DetachedAnswer.PROCESSED);
- answer.setLog("my log\nline break.");
- Properties properties = new Properties();
- properties.setProperty("key1", "value1");
- properties.setProperty("key2", "value2");
- answer.setProperties(properties);
- return answer;
- }
-
- public static void assertDetachedRequest(DetachedRequest expected,
- DetachedRequest reached) {
- assertEquals(expected.getUuid(), reached.getUuid());
- assertEquals(expected.getRef(), reached.getRef());
- Properties expectedProps = expected.getProperties();
- Properties reachedProps = reached.getProperties();
- assertEquals(expectedProps.size(), reachedProps.size());
- Enumeration<Object> keys = expectedProps.keys();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- assertTrue(reachedProps.containsKey(key));
- assertEquals(expectedProps.getProperty(key), reachedProps
- .getProperty(key));
- }
- }
-
- public static void assertDetachedAnswer(DetachedAnswer expected,
- DetachedAnswer reached) {
- assertEquals(expected.getUuid(), reached.getUuid());
- assertEquals(expected.getStatus(), reached.getStatus());
- assertEquals(expected.getLog(), reached.getLog());
- Properties expectedProps = expected.getProperties();
- Properties reachedProps = reached.getProperties();
- assertEquals(expectedProps.size(), reachedProps.size());
- Enumeration<Object> keys = expectedProps.keys();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- assertTrue(reachedProps.containsKey(key));
- assertEquals(expectedProps.getProperty(key), reachedProps
- .getProperty(key));
- }
- }
-}
+++ /dev/null
-# 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
-## 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
+++ /dev/null
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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">
-
- <import resource="classpath:/org/argeo/slc/lib/detached/spring.xml" />
-
-</beans>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <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="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.repo</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-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.6
+++ /dev/null
-#Sat Feb 05 12:23:06 CET 2011
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
+++ /dev/null
-source.. = src/main/java/
-output.. = target/classes/
-bin.includes = META-INF/,\
- .
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.repo</artifactId>
- <name>SLC Repo Runtime</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.repo.*
- </Export-Package>
- <Import-Package>
- org.w3c.dom.*;version="0.0.0",
- org.xml.sax.*;version="0.0.0",
- javax.xml.transform.*;version="0.0.0",
- javax.xml.parsers.*;version="0.0.0",
- javax.jcr.nodetype,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <!-- SLC Runtime -->
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.aether</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.jcr</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <!-- Commons -->
- <dependency>
- <groupId>org.argeo.commons.server</groupId>
- <artifactId>org.argeo.server.jcr</artifactId>
- <version>${version.argeo-commons}</version>
- </dependency>
-
- <!-- Third party -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.io</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.org.apache.commons.logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>javax.servlet</artifactId>
- </dependency>
-
- <!-- OSGi -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>biz.aQute.bndlib</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- RPM -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.redline_rpm</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activation,\
- javax.activity,\
- javax.annotation,\
- javax.annotation.processing,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.jws,\
- javax.jws.soap,\
- javax.lang.model,\
- javax.lang.model.element,\
- javax.lang.model.type,\
- javax.lang.model.util,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.script,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.tools,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.bind,\
- javax.xml.bind.annotation,\
- javax.xml.bind.annotation.adapters,\
- javax.xml.bind.attachment,\
- javax.xml.bind.helpers,\
- javax.xml.bind.util,\
- javax.xml.crypto,\
- javax.xml.crypto.dom,\
- javax.xml.crypto.dsig,\
- javax.xml.crypto.dsig.dom,\
- javax.xml.crypto.dsig.keyinfo,\
- javax.xml.crypto.dsig.spec,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.soap,\
- javax.xml.stream,\
- javax.xml.stream.events,\
- javax.xml.stream.util,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.ws,\
- javax.xml.ws.handler,\
- javax.xml.ws.handler.soap,\
- javax.xml.ws.http,\
- javax.xml.ws.soap,\
- javax.xml.ws.spi,\
- javax.xml.ws.wsaddressing,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views,\
- org.w3c.dom.xpath,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5,\
- JavaSE-1.6
-osgi.java.profile.name = JavaSE-1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+++ /dev/null
-###############################################################################
-# Copyright (c) 2009, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activation,\
- javax.activity,\
- javax.annotation,\
- javax.annotation.processing,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.jws,\
- javax.jws.soap,\
- javax.lang.model,\
- javax.lang.model.element,\
- javax.lang.model.type,\
- javax.lang.model.util,\
- javax.management,\
- javax.management.event,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.namespace,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.script,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.nimbus,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.tools,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.bind,\
- javax.xml.bind.annotation,\
- javax.xml.bind.annotation.adapters,\
- javax.xml.bind.attachment,\
- javax.xml.bind.helpers,\
- javax.xml.bind.util,\
- javax.xml.crypto,\
- javax.xml.crypto.dom,\
- javax.xml.crypto.dsig,\
- javax.xml.crypto.dsig.dom,\
- javax.xml.crypto.dsig.keyinfo,\
- javax.xml.crypto.dsig.spec,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.soap,\
- javax.xml.stream,\
- javax.xml.stream.events,\
- javax.xml.stream.util,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.ws,\
- javax.xml.ws.handler,\
- javax.xml.ws.handler.soap,\
- javax.xml.ws.http,\
- javax.xml.ws.soap,\
- javax.xml.ws.spi,\
- javax.xml.ws.wsaddressing,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views,\
- org.w3c.dom.xpath,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5,\
- JavaSE-1.6,\
- JavaSE-1.7
-osgi.java.profile.name = JavaSE-1.7
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+++ /dev/null
-<slc = 'http://www.argeo.org/ns/slc'>
-
-// AETHER
-[slc:artifact] > mix:referenceable, mix:created, mix:lastModified
-mixin
-- slc:artifactId (STRING) m
-- slc:groupId (STRING) m
-- slc:artifactVersion (STRING) m
-- slc:artifactExtension (STRING) m
-- slc:artifactClassifier (STRING) ='' m a
-
-[slc:artifactVersion] > mix:referenceable, mix:created, mix:lastModified, mix:title
-mixin
-- slc:artifactId (STRING) m
-- slc:groupId (STRING) m
-- slc:artifactVersion (STRING) m
-
-[slc:artifactBase] > mix:referenceable, mix:created, mix:lastModified
-mixin
-- slc:artifactId (STRING) m
-- slc:groupId (STRING) m
-
-[slc:groupBase] > mix:referenceable, mix:created, mix:lastModified
-mixin
-// it is possible to have groupBase being artifact base (e.g. org.argeo.commons.basic)
-// so using groupId would conflict
-- slc:groupBaseId (STRING) m
-
-// Mark a given group base as relevant to create modular distribution in the current workspace
-// [slc:category]
-// mixin
-
-[slc:distribution] > slc:artifactVersion
-mixin
-+ slc:artifactVersions (argeo:references) m
-
-
-[slc:modularDistributionBase]
-mixin
-
-// Question: Extend slc:categorizedNameVersion ? (not possible without migration)
-[slc:modularDistribution]
-mixin
-+ slc:modules (nt:unstructured) m
-
-[slc:moduleCoordinates] > nt:unstructured
-- slc:category (STRING)
-- slc:name (STRING)
-- slc:version (STRING)
-
-
-// ORIGINS
-[slc:knownOrigin] > nt:base
-mixin
-+ slc:origin (nt:address)
-
-[slc:proxied] > nt:address
-- slc:proxy (REFERENCE)
-
-// JAVA
-[slc:jarFile] > mix:referenceable
-mixin
-- 'slc:manifest' (BINARY) m
-- 'slc:Manifest-Version' (STRING)
-- 'slc:Signature-Version' (STRING)
-- 'slc:Class-Path' (STRING)
-- 'slc:Main-Class' (STRING)
-- 'slc:Extension-Name' (STRING)
-- 'slc:Implementation-Version' (STRING)
-- 'slc:Implementation-Vendor' (STRING)
-- 'slc:Implementation-Vendor-Id' (STRING)
-- 'slc:Implementation-URL' (STRING)
-- 'slc:Specification-Title' (STRING)
-- 'slc:Specification-Version' (STRING)
-- 'slc:Specification-Vendor' (STRING)
-- 'slc:Sealed' (STRING)
-
-// OSGi
-// see http://www.osgi.org/Specifications/Reference
-
-[slc:javaPackage] > mix:referenceable
-- slc:name (STRING) primary m
-
-[slc:osgiBaseVersion] > mix:referenceable
-- slc:asString (STRING) primary m
-- slc:major (LONG) m
-- slc:minor (LONG) m
-- slc:micro (LONG) m
-
-[slc:osgiVersion] > slc:osgiBaseVersion
-- slc:qualifier (STRING)
-
-[slc:exportedPackage] > slc:javaPackage
-+ slc:uses (slc:javaPackage) multiple
-+ slc:version (slc:osgiVersion)
-
-[slc:importedPackage] > slc:javaPackage
-- slc:version (STRING) ='0.0.0' m a
-- slc:optional (BOOLEAN) ='false' m a
-
-[slc:dynamicImportedPackage] > slc:javaPackage
-- slc:version (STRING) ='0.0.0' m a
-- slc:optional (BOOLEAN) ='false' m a
-
-[slc:requiredBundle] > mix:referenceable
-- 'slc:symbolic-name' (STRING) primary m
-- 'slc:bundle-version' (STRING) ='0.0.0' m a
-- slc:optional (BOOLEAN) ='false' m a
-
-[slc:fragmentHost] > mix:referenceable
-- 'slc:symbolic-name' (STRING) m
-- 'slc:bundle-version' (STRING) ='0.0.0' m a
-
-[slc:bundleNativeCode] > mix:referenceable
-- slc:path (STRING) primary m
-- slc:osname (STRING)
-- slc:processor (STRING)
-
-// see http://www.osgi.org/Specifications/ReferenceHeaders
-[slc:bundle] > mix:referenceable
-mixin
-- 'slc:symbolic-name' (STRING) primary m
-- 'slc:bundle-version' (STRING) m
-- 'slc:Bundle-SymbolicName' (STRING) m
-- 'slc:Bundle-Name' (STRING)
-- 'slc:Bundle-Description' (STRING)
-- 'slc:Bundle-ManifestVersion' (STRING)
-- 'slc:Bundle-Category' (STRING)
-- 'slc:Bundle-ActivationPolicy' (STRING)
-- 'slc:Bundle-Copyright' (STRING)
-- 'slc:Bundle-Vendor' (STRING)
-- 'slc:Bundle-License' (STRING)
-- 'slc:Bundle-DocURL' (STRING)
-- 'slc:Bundle-ContactAddress' (STRING)
-- 'slc:Bundle-Activator' (STRING)
-- 'slc:Bundle-UpdateLocation' (STRING)
-- 'slc:Bundle-Localization' (STRING)
-- 'slc:Bundle-ClassPath' (STRING) *
-// see http://wiki.eclipse.org/EE < 'OSGi/Minimum-1.0','OSGi/Minimum-1.1','CDC-1.0/Foundation-1.0','CDC-1.1/Foundation-1.1','JRE-1.1','J2SE-1.2','J2SE-1.3','J2SE-1.4','J2SE-1.5','JavaSE-1.6','JavaSE-1.7'
-- 'slc:Bundle-RequiredExecutionEnvironment' (STRING) *
-+ 'slc:Bundle-Version' (slc:osgiVersion) m
-+ 'slc:Fragment-Host' (slc:fragmentHost)
-+ 'slc:Import-Package' (slc:importedPackage) multiple
-+ 'slc:Export-Package' (slc:exportedPackage) multiple
-+ 'slc:Require-Bundle' (slc:requiredBundle) multiple
-+ 'slc:Bundle-NativeCode' (slc:bundleNativeCode) multiple
-+ 'slc:DynamicImport-Package' (slc:dynamicImportedPackage) multiple
-
-[slc:bundleArtifact] > slc:artifact,slc:jarFile,slc:bundle
-mixin
-
-// RPM
-[slc:rpm] > mix:referenceable, mix:created, mix:lastModified, mix:title
-mixin
-- slc:name (STRING)
-- slc:version (STRING)
-- slc:rpmVersion (STRING)
-- slc:rpmRelease (STRING)
-- slc:rpmArch (STRING)
-- slc:rpmArchivaeSize (STRING)
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <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="src" path="src/main/java"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.rpmfactory</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+++ /dev/null
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
+++ /dev/null
-source.. = src/main/java/
-output.. = target/classes/
-bin.includes = META-INF/,\
- .
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.rpmfactory</artifactId>
- <name>SLC RPM Factory</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.rpmfactory.*
- </Export-Package>
- <Import-Package>
- javax.jcr.nodetype,
- org.argeo.slc.repo,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <!-- SLC Runtime -->
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.repo</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.jcr</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <!-- Third party -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.io</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.org.apache.commons.logging</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <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>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.specs</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>
+++ /dev/null
-#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
+++ /dev/null
-source.. = src/main/java/
-jre.compilation.profile = J2SE-1.5
-
+++ /dev/null
-<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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.specs</artifactId>
- <name>SLC Specifications</name>
- <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.hibernate.proxy;resolution:="optional",
- javassist.util.proxy;resolution:="optional"
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
+++ /dev/null
-Argeo SLC Site
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <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="src" path="src/main/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.aether</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-#Sun Feb 13 11:00:00 CET 2011
-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.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-#Sun Feb 13 11:00:00 CET 2011
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
+++ /dev/null
-source.. = src/main/java/,\
- src/test/java/
-output.. = target/classes/
-bin.includes = META-INF/,\
- .
-additional.bundles = junit,\
- slf4j.api,\
- slf4j.log4j,\
- org.apache.log4j,\
- slf4j.org.apache.commons.logging
-
\ No newline at end of file
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.aether</artifactId>
- <name>SLC Support Aether</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.aether.*
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.core</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.sonatype.aether</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.beans</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.org.apache.commons.logging</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Test -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>\r
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>\r
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>\r
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.ant</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>
+++ /dev/null
-#Fri Aug 29 11:31:46 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-source.. = src/main/java/,\
- src/main/resources/,\
- src/test/java/,\
- src/test/resources/
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.ant</artifactId>
- <packaging>jar</packaging>
- <name>SLC Support Ant</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.ant.*
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.core</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.tools.ant</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.tools.ant.launch</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.net</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.oro</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.bsf</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-# 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
-## 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
+++ /dev/null
-<?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>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.jcr</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>
+++ /dev/null
-#Sun Feb 21 12:26:27 CET 2010
-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
+++ /dev/null
-#Thu Feb 18 16:48:02 CET 2010
-eclipse.preferences.version=1
-resolve.requirebundle=false
+++ /dev/null
-additional.bundles = org.springframework.core,\
- org.argeo.server.jackrabbit,\
- junit,\
- org.argeo.slc.unit,\
- org.apache.xerces,\
- org.apache.log4j,\
- slf4j.api,\
- slf4j.log4j,\
- org.eclipse.osgi,\
- org.apache.commons.io,\
- org.apache.jackrabbit,\
- org.h2,\
- org.apache.commons.dbcp,\
- org.apache.commons.pool,\
- edu.oswego.cs.dl.util.concurrent,\
- org.apache.commons.collections,\
- org.apache.lucene,\
- org.apache.tika
-source.. = src/main/java/,\
- src/main/resources/,\
- src/test/java/,\
- src/test/resources/
-
\ No newline at end of file
+++ /dev/null
-<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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.jcr</artifactId>
- <name>SLC Support JCR</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.jcr.*
- </Export-Package>
- <Import-Package>
- org.springframework.context,
- javax.jcr.nodetype,
- org.springframework.beans.factory,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.core</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.commons.server</groupId>
- <artifactId>org.argeo.server.jcr</artifactId>
- <version>${version.argeo-commons}</version>
- </dependency>
-
- <!-- Unit Tests -->
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.unit</artifactId>
- <scope>test</scope>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.commons.server</groupId>
- <artifactId>org.argeo.server.jackrabbit</artifactId>
- <version>${version.argeo-commons}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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.
-
--->
-<!DOCTYPE jackrabbit-ocm PUBLIC "-//The Apache Software Foundation//DTD Repository//EN" "http://jackrabbit.apache.org/dtd/jackrabbit-ocm-1.5.dtd">
-<jackrabbit-ocm>
- <class-descriptor className="Type" jcrType="my:type"
- jcrSuperTypes="nt:base" jcrMixinTypes="mix:referenceable">
- <field-descriptor fieldName="path" path="true" />
- <field-descriptor fieldName="uuid" uuid="true" />
- <field-descriptor fieldName="name" jcrName="my:name"
- jcrMandatory="true" />
- <field-descriptor fieldName="description" jcrName="my:description" />
- </class-descriptor>
- <class-descriptor className="Element" jcrType="my:element"
- jcrSuperTypes="nt:base" jcrMixinTypes="mix:versionable">
- <field-descriptor fieldName="path" path="true" />
- <field-descriptor fieldName="uuid" uuid="true" />
- <field-descriptor fieldName="name" jcrName="my:name"
- jcrMandatory="true" />
- <field-descriptor fieldName="description" jcrName="my:description" />
- <bean-descriptor fieldName="type" jcrName="my:type"
- proxy="false" jcrType="my:type" jcrMandatory="true"
- jcrOnParentVersion="IGNORE"
- converter="org.apache.jackrabbit.ocm.manager.beanconverter.impl.ReferenceBeanConverterImpl" />
- </class-descriptor>
-</jackrabbit-ocm>
\ No newline at end of file
+++ /dev/null
-# Set root logger level to DEBUG and its only appender to A1.\r
-log4j.rootLogger=WARN, console\r
-\r
-## Levels\r
-# Slc\r
-log4j.logger.org.argeo=DEBUG\r
-#log4j.logger.org.argeo.jcr=TRACE\r
-\r
-# Castor\r
-log4j.logger.org.exolab.castor=WARN\r
-\r
-# Spring\r
-#log4j.logger.org.springframework=INFO\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
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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
-<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under \r
- the Apache License, Version 2.0 (the "License"); you may not use this file \r
- except in compliance with the License. You may obtain a copy of the License \r
- at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable \r
- law or agreed to in writing, software distributed under the License is distributed \r
- on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either \r
- express or implied. See the License for the specific language governing permissions \r
- and limitations under the License. -->\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
- <bean\r
- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">\r
- <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />\r
- <property name="ignoreUnresolvablePlaceholders" value="true" />\r
- </bean>\r
-\r
- <bean id="slcAgentDescriptorDao" class="org.argeo.slc.jcr.dao.SlcAgentDescriptorDaoJcr"\r
- init-method="init">\r
- <property name="session" ref="argeo.jcr.session.inMemory" />\r
- <property name="nodeMapperProvider" ref="nodeMapperProvider" />\r
- </bean>\r
-\r
- <bean id="slcExecutionDao" class="org.argeo.slc.jcr.dao.SlcExecutionDaoJcr"\r
- init-method="init">\r
- <property name="session" ref="argeo.jcr.session.inMemory" />\r
- <property name="nodeMapperProvider" ref="nodeMapperProvider" />\r
- </bean>\r
-\r
- <bean id="nodeMapperProvider" class="org.argeo.slc.jcr.dao.SlcNodeMapperProvider"\r
- init-method="init">\r
- <property name="defaultNodeMapper" ref="nodeMapper" />\r
- <property name="treeTestResultNodeMapper" ref="treeTestResultNodeMapper" />\r
- </bean>\r
-\r
- <bean id="treeTestResultDao" class="org.argeo.slc.jcr.dao.TreeTestResultDaoJcr"\r
- init-method="init">\r
- <property name="session" ref="argeo.jcr.session.inMemory" />\r
- <property name="nodeMapperProvider" ref="nodeMapperProvider" />\r
- </bean>\r
-\r
- <bean id="treeTestResultCollectionDao" class="org.argeo.slc.jcr.dao.TreeTestResultCollectionDaoJcr"\r
- init-method="init">\r
- <property name="session" ref="argeo.jcr.session.inMemory" />\r
- <property name="nodeMapperProvider" ref="nodeMapperProvider" />\r
- </bean>\r
-\r
- <bean id="nodeMapper" class="org.argeo.jcr.spring.BeanNodeMapper" />\r
-\r
- <bean id="treeTestResultNodeMapper" class="org.argeo.slc.jcr.dao.TreeTestResultNodeMapper">\r
- </bean>\r
-\r
-\r
- <bean id="argeo.jcr.session.inMemory" factory-bean="argeo.jcr.repository.inMemory"\r
- factory-method="login" destroy-method="logout">\r
- <constructor-arg>\r
- <bean class="javax.jcr.SimpleCredentials">\r
- <constructor-arg value="demo" />\r
- <constructor-arg value="demo" />\r
- </bean>\r
- </constructor-arg>\r
- </bean>\r
-\r
- <bean id="argeo.jcr.repository.inMemory" class="org.argeo.jackrabbit.JackrabbitContainer"\r
- init-method="init" destroy-method="destroy">\r
- <property name="homeDirectory"\r
- value="${java.io.tmpdir}/jackrabbit-slc-unit-${user.name}" />\r
- <property name="inMemory" value="true" />\r
- <property name="configuration"\r
- value="classpath:/org/argeo/jackrabbit/repository-inMemory.xml" />\r
- </bean>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" 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>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.osgi</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>
+++ /dev/null
-#Sun Jun 28 09:05:50 CEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-source.. = src/main/java/,\
- src/main/resources/,\
- src/test/java/,\
- src/test/resources/
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.osgi</artifactId>
- <name>SLC Support OSGi</name>
- <packaging>jar</packaging>
- <properties />
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.*
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.core</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>biz.aQute.bndlib</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.osgi.core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.osgi.extender</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>net.sf.cglib</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.objectweb.asm.attrs</artifactId>
- </dependency>
-
- <!-- Xalan and Xerces are implicitly required since the JDK provided implementations
- are overridden in the execution modules manager -->
-<!-- <dependency> -->
-<!-- <groupId>org.argeo.tp</groupId> -->
-<!-- <artifactId>org.apache.xalan</artifactId> -->
-<!-- </dependency> -->
-
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-# Set root logger level to DEBUG and its only appender to A1.\r
-log4j.rootLogger=WARN, console\r
-\r
-## Levels\r
-log4j.logger.org.argeo=DEBUG\r
-log4j.logger.org.argeo.slc.osgi.FileSystemBundleRegister=DEBUG\r
-\r
-## Appenders\r
-log4j.appender.console=org.apache.log4j.ConsoleAppender\r
-log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
-\r
+++ /dev/null
-<?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>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.simple</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>
+++ /dev/null
-source.. = src/main/java/,\
- src/test/java/,\
- src/test/resources/,\
- src/main/resources/
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.simple</artifactId>
- <name>SLC Support Simple</name>
- <description>Basic implementations of SLC Specifications</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.*,org.argeo.slc.core.test.spring
- </Export-Package>
- <Import-Package>*,org.apache.commons.logging;version="1.1",
- org.dbunit;resolution:="optional",
- org.dbunit.database;resolution:="optional",
- org.dbunit.dataset;resolution:="optional",
- org.dbunit.dataset.xml;resolution:="optional",
- org.dbunit.operation;resolution:="optional",
- junit.framework;resolution:="optional",
- org.apache.commons.vfs.*,
- javax.swing.plaf.metal
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.core</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.commons.server</groupId>
- <artifactId>org.argeo.server.jcr</artifactId>
- <version>${version.argeo-commons}</version>
- </dependency>
-
- <!-- SSH -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>com.jcraft.jsch</artifactId>
- </dependency>
-
- <!-- Scheduling -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.quartz</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.context.support</artifactId>
- </dependency>
-
- <!-- Mail -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>javax.mail</artifactId>
- </dependency>
-
- <!-- SVN -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.tmatesoft.svn</artifactId>
- </dependency>
-
- <!-- Commons -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.vfs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.exec</artifactId>
- </dependency>
-
- <!-- TODO: check if necessary here -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.transaction</artifactId>
- </dependency>
-
- <!-- Unit Tests -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-echo demo | passwd root --stdin
-
-#Fix root login on console
-echo "pts/0" >>/etc/securetty
-sed -i s/"session required pam_selinux.so close"/"#session required pam_selinux.so close"/g /etc/pam.d/login
-sed -i s/"session required pam_selinux.so open"/"#session required pam_selinux.so open"/g /etc/pam.d/login
-sed -i s/"session required pam_loginuid.so"/"#session required pam_loginuid.so"/g /etc/pam.d/login
-
-#Configuring basic networking
-cat > /etc/sysconfig/network << EOF
-NETWORKING=yes
-HOSTNAME=demo
-EOF
-cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
-DEVICE=eth0
-BOOTPROTO=dhcp
-ONBOOT=yes
-EOF
-
-#Enabling sshd
-chkconfig sshd on
-
-# Fixing root login for sshd
-sed -i s/"session required pam_selinux.so close"/"#session required pam_selinux.so close"/g /etc/pam.d/sshd
-sed -i s/"session required pam_loginuid.so"/"#session required pam_loginuid.so"/g /etc/pam.d/sshd
-sed -i s/"session required pam_selinux.so open env_params"/"#session required pam_selinux.so open env_params"/g /etc/pam.d/sshd
-
-# Leaving the chroot'ed filesystem
-exit
\ No newline at end of file
+++ /dev/null
-#!/bin/sh
-CHROOT=$1
-echo Init LXC container $CHROOT
-
-mkdir $CHROOT/etc/yum.repos.d/ -p
-cat /etc/yum.repos.d/CentOS-Base.repo |sed s/'$releasever'/6/g > $CHROOT/etc/yum.repos.d/CentOS-Base.repo
-yum groupinstall core --installroot=$CHROOT --nogpgcheck -y
-yum install plymouth libselinux-python --installroot=$CHROOT --nogpgcheck -y
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\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
-<!-- Copyright (C) 2007-2012 Mathieu Baudier Licensed under the Apache License, \r
- Version 2.0 (the "License"); you may not use this file except in compliance \r
- with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 \r
- Unless required by applicable law or agreed to in writing, software distributed \r
- under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES \r
- OR CONDITIONS OF ANY KIND, either express or implied. See the License for \r
- the specific language governing permissions and limitations under the License. -->\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop" xmlns:flow="http://www.argeo.org/schema/slc-flow"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd\r
- http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-1.2.xsd">\r
-\r
- <bean id="hostManager" class="org.argeo.slc.lib.linux.RedhatHostManager">\r
- <property name="sshTarget" ref="sshTarget" />\r
- <property name="host" ref="host" />\r
- </bean>\r
-\r
- <!-- Execution Flows -->\r
- <bean flow:as-flow="deployConfig" class="org.argeo.slc.core.execution.tasks.MethodCall"\r
- p:target-ref="hostManager" p:method="deployConfig" />\r
-\r
- <bean flow:as-flow="system/reboot" p:command="shutdown -r now"\r
- p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />\r
-\r
- <bean flow:as-flow="system/shutdown" p:command="shutdown -h now"\r
- p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />\r
-\r
- <bean flow:as-flow="system/packages/install" class="org.argeo.slc.core.execution.tasks.MethodCall"\r
- p:target-ref="hostManager" p:method="installPackages" />\r
-\r
- <bean flow:as-flow="system/packages/update" p:sshTarget-ref="sshTarget"\r
- class="org.argeo.slc.jsch.RemoteExec">\r
- <property name="systemCall">\r
- <bean class="org.argeo.slc.core.execution.tasks.SystemCall">\r
- <property name="cmd" value="yum -y update" />\r
- </bean>\r
- </property>\r
- </bean>\r
-\r
- <bean flow:as-flow="system/security/firewall" p:script="osgibundle:/scripts/firewall.sh"\r
- p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />\r
-\r
- <flow:flow name="system/security/authconfig">\r
- <flow:spec>\r
- <flow:primitive name="ldapserver" />\r
- <flow:primitive name="ldapbasedn" />\r
- </flow:spec>\r
- <bean p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec">\r
- <flow:variable />\r
- <property name="systemCall">\r
- <bean class="org.argeo.slc.core.execution.tasks.SystemCall">\r
- <property name="command">\r
- <list>\r
- <value>authconfig</value>\r
- <value>--enableldap</value>\r
- <value>--enableldapauth</value>\r
- <value>--enablecache</value>\r
- <value>--enablemkhomedir</value>\r
- <value>--ldapserver=@{ldapserver}</value>\r
- <value>--ldapbasedn=@{ldapbasedn}</value>\r
- <value>--passalgo=sha256</value>\r
- <value>--updateall</value>\r
- </list>\r
- </property>\r
- </bean>\r
- </property>\r
- </bean>\r
- </flow:flow>\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-Argeo SLC Site
\ No newline at end of file
+++ /dev/null
-Bundle-SymbolicName: org.argeo.slc.support.simple.tests
-Fragment-Host: org.argeo.slc.support.simple
-
+++ /dev/null
-# 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
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>\r
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>\r
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>\r
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.unit</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>
+++ /dev/null
-#Sat Jun 27 16:59:43 CEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-source.. = src/main/java/,\
- src/main/resources/,\
- src/test/java/,\
- src/test/resources/
+++ /dev/null
-<?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>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.unit</artifactId>
- <name>SLC Unit Tests Helpers</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.*,org.argeo.slc.core.test.spring
- </Export-Package>
- <Import-Package>org.apache.commons.logging;version="1.1",
- org.dbunit.*;resolution:="optional",
- org.hibernate.*;resolution:="optional",
- org.springframework.xml.*;resolution:="optional",
- org.springframework.orm.*;resolution:="optional",
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.core</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.simple</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>junit</artifactId>
- </dependency>
-
- <!-- DB Unit -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.dbunit</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.collections</artifactId>
- <optional>true</optional>
- </dependency>
-
- <!-- Hibernate -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.hibernate</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.orm</artifactId>
- <optional>true</optional>
- </dependency>
-
- <!-- OSGi -->
- <dependency>
- <groupId>org.argeo.commons.base</groupId>
- <artifactId>org.argeo.osgi.boot</artifactId>
- <version>${version.argeo-commons}</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.osgi.core</artifactId>
- </dependency>
-
- <!-- OXM -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.oxm</artifactId>
- <optional>true</optional>
- </dependency>
-
- <!-- Logging -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.org.apache.commons.logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.log4j</artifactId>
- </dependency>
-
- </dependencies>
-</project>
\ No newline at end of file