Move SLC API
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 13 Feb 2015 08:26:33 +0000 (08:26 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 13 Feb 2015 08:26:33 +0000 (08:26 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@7834 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

127 files changed:
org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/CategorizedNameVersion.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/Condition.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/ModuleSet.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/NameVersion.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/SlcConstants.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/SlcException.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/build/License.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/build/package.html [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/AbstractDeployedSystem.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/deploy/package.html [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgentCli.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/package.html [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestData.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/context/package.html [new file with mode: 0644]
org.argeo.slc.api/src/org/argeo/slc/test/package.html [new file with mode: 0644]
pom.xml
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/BasicNameVersion.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/CategorizedNameVersion.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/Condition.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/DefaultNameVersion.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/ModuleSet.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/NameVersion.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/SlcConstants.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/SlcException.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/StreamReadable.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/UnsupportedException.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/Distribution.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/License.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/ModularDistribution.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/package.html [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/AbstractDeployedSystem.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployEnvironment.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployedSystem.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployedSystemManager.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/Deployment.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeploymentData.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DynamicRuntime.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/InstalledExecutables.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModularDeployedSystem.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/Module.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModuleDescriptor.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModulesManager.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/TargetData.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/VersioningDriver.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/package.html [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionContext.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlow.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptor.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModule.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModuleDescriptor.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesListener.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionProcess.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpec.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStack.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStackLevel.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/RealizedFlow.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/SlcAgent.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/SlcAgentCli.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/package.html [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/ExecutableTestRun.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/IncompatibleTestDataException.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestData.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestDataProvider.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestDefinition.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResult.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResultListener.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResultPart.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRun.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRunAware.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestStatus.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/WritableTestRun.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/ContextAware.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/ParentContextAware.java [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/package.html [deleted file]
runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/package.html [deleted file]

diff --git a/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java
new file mode 100644 (file)
index 0000000..9d8e71a
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * 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;
+
+import java.io.Serializable;
+
+/** @deprecated use {@link DefaultNameVersion} instead. */
+@Deprecated
+public class BasicNameVersion extends DefaultNameVersion implements
+               Serializable {
+       private static final long serialVersionUID = -5127304279136195127L;
+
+       public BasicNameVersion() {
+       }
+
+       /** Interprets string in OSGi-like format my.module.name;version=0.0.0 */
+       public BasicNameVersion(String nameVersion) {
+               int index = nameVersion.indexOf(";version=");
+               if (index < 0) {
+                       setName(nameVersion);
+                       setVersion(null);
+               } else {
+                       setName(nameVersion.substring(0, index));
+                       setVersion(nameVersion.substring(index + ";version=".length()));
+               }
+       }
+
+       public BasicNameVersion(String name, String version) {
+               super(name, version);
+       }
+
+       public BasicNameVersion(NameVersion nameVersion) {
+               super(nameVersion);
+       }
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/CategorizedNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/CategorizedNameVersion.java
new file mode 100644 (file)
index 0000000..fd7d56d
--- /dev/null
@@ -0,0 +1,10 @@
+package org.argeo.slc;
+
+/**
+ * Adds a dimension to {@link NameVersion} by adding an arbitrary category (e.g.
+ * Maven groupId, yum repository ID, etc.)
+ */
+public interface CategorizedNameVersion extends NameVersion {
+       /** The category of the component. */
+       public String getCategory();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/Condition.java b/org.argeo.slc.api/src/org/argeo/slc/Condition.java
new file mode 100644 (file)
index 0000000..f5199ce
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+/** Binary check on an arbitrary object. */
+public interface Condition<T> {
+       /**
+        * Checks the condition.
+        * 
+        * @return true, if the condition is verified, false if not.
+        */
+       public Boolean check(T obj);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java
new file mode 100644 (file)
index 0000000..fe230e6
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * 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;
+
+
+/** Canonical implementation of {@link NameVersion} */
+public class DefaultNameVersion implements NameVersion,
+               Comparable<NameVersion> {
+       private String name;
+       private String version;
+
+       public DefaultNameVersion() {
+       }
+
+       public DefaultNameVersion(String name, String version) {
+               this.name = name;
+               this.version = version;
+       }
+
+       public DefaultNameVersion(NameVersion nameVersion) {
+               this.name = nameVersion.getName();
+               this.version = nameVersion.getVersion();
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getVersion() {
+               return version;
+       }
+
+       public void setVersion(String version) {
+               this.version = version;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (obj instanceof NameVersion) {
+                       NameVersion nameVersion = (NameVersion) obj;
+                       return name.equals(nameVersion.getName())
+                                       && version.equals(nameVersion.getVersion());
+               } else
+                       return false;
+       }
+
+       @Override
+       public int hashCode() {
+               return name.hashCode() + version.hashCode();
+       }
+
+       @Override
+       public String toString() {
+               return name + ":" + version;
+       }
+
+       public int compareTo(NameVersion o) {
+               if (o.getName().equals(name))
+                       return version.compareTo(o.getVersion());
+               else
+                       return name.compareTo(o.getName());
+       }
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/ModuleSet.java b/org.argeo.slc.api/src/org/argeo/slc/ModuleSet.java
new file mode 100644 (file)
index 0000000..fd125a2
--- /dev/null
@@ -0,0 +1,8 @@
+package org.argeo.slc;
+
+import java.util.Iterator;
+
+/** A set of {@link NameVersion}. */
+public interface ModuleSet {
+       Iterator<? extends NameVersion> nameVersions();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java
new file mode 100644 (file)
index 0000000..0086cbb
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * 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;
+
+/**
+ * Abstraction of a name / version pair, typically used as coordinates for a
+ * software module either deployed or packaged as an archive.
+ */
+public interface NameVersion {
+       /** The name of the component. */
+       public String getName();
+
+       /** The version of the component. */
+       public String getVersion();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcConstants.java b/org.argeo.slc.api/src/org/argeo/slc/SlcConstants.java
new file mode 100644 (file)
index 0000000..2b26e87
--- /dev/null
@@ -0,0 +1,10 @@
+package org.argeo.slc;
+
+/** Constants useful across all SLC components */
+public interface SlcConstants {
+       /** Read-write role. */
+       public final static String ROLE_SLC = "ROLE_SLC";
+
+       /** Read only unlogged user */
+       public final static String USER_ANONYMOUS = "anonymous";
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcException.java b/org.argeo.slc.api/src/org/argeo/slc/SlcException.java
new file mode 100644 (file)
index 0000000..408bd06
--- /dev/null
@@ -0,0 +1,32 @@
+/*\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;\r
+\r
+/** Basis for all SLC exceptions. This is an unchecked exception. */\r
+public class SlcException extends RuntimeException {\r
+       private static final long serialVersionUID = 6373738619304106445L;\r
+\r
+       /** Constructor. */\r
+       public SlcException(String message) {\r
+               super(message);\r
+       }\r
+\r
+       /** Constructor. */\r
+       public SlcException(String message, Throwable e) {\r
+               super(message, e);\r
+       }\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java b/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java
new file mode 100644 (file)
index 0000000..302a226
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+import java.io.InputStream;
+
+public interface StreamReadable {
+       public InputStream getInputStream();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java b/org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java
new file mode 100644 (file)
index 0000000..fe63322
--- /dev/null
@@ -0,0 +1,69 @@
+/*\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;\r
+\r
+/** Exception for unsupported features or actions. */\r
+public class UnsupportedException extends SlcException {\r
+       static final long serialVersionUID = 1l;\r
+\r
+       /** Action not supported. */\r
+       public UnsupportedException() {\r
+               this("Action not supported");\r
+       }\r
+\r
+       /** Constructor with a message. */\r
+       public UnsupportedException(String message) {\r
+               super(message);\r
+       }\r
+\r
+       /**\r
+        * Constructor generating a message.\r
+        * \r
+        * @param nature\r
+        *            the nature of the unsupported object\r
+        * @param obj\r
+        *            the object itself (its class name will be used in message)\r
+        */\r
+       public UnsupportedException(String nature, Object obj) {\r
+               super("Unsupported " + nature + ": "\r
+                               + (obj != null ? obj.getClass() : "[object is null]"));\r
+       }\r
+\r
+       /**\r
+        * Constructor generating a message.\r
+        * \r
+        * @param nature\r
+        *            the nature of the unsupported object\r
+        * @param clss\r
+        *            the class itself (will be used in message)\r
+        */\r
+       public UnsupportedException(String nature, Class<?> clss) {\r
+               super("Unsupported " + nature + ": " + clss);\r
+       }\r
+\r
+       /**\r
+        * Constructor generating a message.\r
+        * \r
+        * @param nature\r
+        *            the nature of the unsupported object\r
+        * @param value\r
+        *            the problematic value itself\r
+        */\r
+       public UnsupportedException(String nature, String value) {\r
+               super("Unsupported " + nature + ": " + value);\r
+       }\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java b/org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java
new file mode 100644 (file)
index 0000000..9e233e2
--- /dev/null
@@ -0,0 +1,22 @@
+/*\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.build;\r
+\r
+/** A packaged software component */\r
+public interface Distribution {\r
+       public String getDistributionId();\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/build/License.java b/org.argeo.slc.api/src/org/argeo/slc/build/License.java
new file mode 100644 (file)
index 0000000..d115f45
--- /dev/null
@@ -0,0 +1,12 @@
+package org.argeo.slc.build;
+
+/** A software license */
+public interface License {
+       public String getName();
+
+       public String getUri();
+
+       public String getLink();
+
+       public String getText();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java b/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java
new file mode 100644 (file)
index 0000000..0b917aa
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * 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.build;
+
+import org.argeo.slc.ModuleSet;
+import org.argeo.slc.NameVersion;
+
+/**
+ * A distribution of modules, that is components that can be identified by a
+ * name / version couple.
+ * 
+ * @see NameVersion
+ */
+public interface ModularDistribution extends Distribution, NameVersion,
+               ModuleSet {
+       public Distribution getModuleDistribution(String moduleName,
+                       String moduleVersion);
+
+       /** A descriptor such as P2, OBR or yum metadata. */
+       public Object getModulesDescriptor(String descriptorType);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/build/package.html b/org.argeo.slc.api/src/org/argeo/slc/build/package.html
new file mode 100644 (file)
index 0000000..5da2052
--- /dev/null
@@ -0,0 +1,6 @@
+<html>\r
+<head></head>\r
+<body>\r
+SLC Build: building of software systems.\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/AbstractDeployedSystem.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/AbstractDeployedSystem.java
new file mode 100644 (file)
index 0000000..4bb603b
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * 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.deploy;
+
+import org.argeo.slc.UnsupportedException;
+import org.argeo.slc.build.Distribution;
+
+public abstract class AbstractDeployedSystem implements DeployedSystem {
+       public String getDeployedSystemId() {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       public DeploymentData getDeploymentData() {
+               throw new UnsupportedException("Method not supported");
+       }
+
+       public Distribution getDistribution() {
+               throw new UnsupportedException("Method not supported");
+       }
+
+       public TargetData getTargetData() {
+               throw new UnsupportedException("Method not supported");
+       }
+
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java
new file mode 100644 (file)
index 0000000..2dce868
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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.deploy;
+
+import java.io.File;
+import java.util.Map;
+
+public interface DeployEnvironment {
+       public void unpackTo(Object packg, File targetLocation,
+                       Map<String, String> filter);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java
new file mode 100644 (file)
index 0000000..89c1708
--- /dev/null
@@ -0,0 +1,33 @@
+/*\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.deploy;\r
+\r
+import org.argeo.slc.build.Distribution;\r
+\r
+/** An instance of a software system. */\r
+public interface DeployedSystem extends TargetData {\r
+       /** Unique ID for this system instance. */\r
+       public String getDeployedSystemId();\r
+\r
+       /** Underlying packages */\r
+       public Distribution getDistribution();\r
+\r
+       /** Data required to initialize the instance (e.g. DB dump, etc.). */\r
+       public DeploymentData getDeploymentData();\r
+\r
+       /** Resources required by the system (ports, disk location, etc.) */\r
+       public TargetData getTargetData();\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java
new file mode 100644 (file)
index 0000000..092ac55
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * 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.deploy;
+
+public interface DeployedSystemManager<T extends DeployedSystem> {
+       public void setDeployedSystem(T deployedSystem);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java
new file mode 100644 (file)
index 0000000..99f4e10
--- /dev/null
@@ -0,0 +1,28 @@
+/*\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.deploy;\r
+\r
+import org.argeo.slc.build.Distribution;\r
+\r
+public interface Deployment extends Runnable{\r
+       public DeployedSystem getDeployedSystem();\r
+\r
+       public void setTargetData(TargetData targetData);\r
+\r
+       public void setDeploymentData(DeploymentData deploymentData);\r
+\r
+       public void setDistribution(Distribution distribution);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java
new file mode 100644 (file)
index 0000000..e5b0f40
--- /dev/null
@@ -0,0 +1,20 @@
+/*\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.deploy;\r
+\r
+public interface DeploymentData {\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java
new file mode 100644 (file)
index 0000000..231d52a
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * 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.deploy;
+
+import org.argeo.slc.NameVersion;
+import org.argeo.slc.build.Distribution;
+
+public interface DynamicRuntime<M extends Module> extends
+               ModularDeployedSystem<M> {
+       public void shutdown();
+
+       public M installModule(Distribution distribution);
+
+       public void uninstallModule(NameVersion nameVersion);
+
+       public void updateModule(NameVersion nameVersion);
+
+       public void startModule(NameVersion nameVersion);
+
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java
new file mode 100644 (file)
index 0000000..0f9601c
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * 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.deploy;
+
+public interface InstalledExecutables extends DeployedSystem {
+       public String getExecutablePath(String key);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java
new file mode 100644 (file)
index 0000000..6805eec
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * 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.deploy;
+
+import java.util.List;
+
+public interface ModularDeployedSystem<M extends Module> extends DeployedSystem {
+       /** List the underlying deployed modules (in real time) */
+       public List<M> listModules();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java
new file mode 100644 (file)
index 0000000..2a0bd4d
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * 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.deploy;
+
+import org.argeo.slc.NameVersion;
+
+/**
+ * Represents a deployed module of a broader deployed system. A module is
+ * uniquely identifiable via a name / version.
+ */
+public interface Module extends DeployedSystem, NameVersion {
+       /** A serializable stateless description of the module */
+       public ModuleDescriptor getModuleDescriptor();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java
new file mode 100644 (file)
index 0000000..a0bddd1
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * 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.deploy;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.argeo.slc.BasicNameVersion;
+
+/** The description of a versioned module. */
+public class ModuleDescriptor extends BasicNameVersion implements Serializable {
+       private static final long serialVersionUID = 4310820315478645419L;
+       private String title;
+       private String description;
+       private Map<String, String> metadata = new HashMap<String, String>();
+       private Boolean started = false;
+
+       public String getTitle() {
+               return title;
+       }
+
+       public void setTitle(String title) {
+               this.title = title;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       /** @deprecated use {@link #getTitle()} instead */
+       public String getLabel() {
+               return title;
+       }
+
+       /** @deprecated use {@link #setTitle(String)} instead */
+       public void setLabel(String label) {
+               this.title = label;
+       }
+
+       public Map<String, String> getMetadata() {
+               return metadata;
+       }
+
+       public void setMetadata(Map<String, String> metadata) {
+               this.metadata = metadata;
+       }
+
+       public Boolean getStarted() {
+               return started;
+       }
+
+       public void setStarted(Boolean started) {
+               this.started = started;
+       }
+
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java
new file mode 100644 (file)
index 0000000..d7ec945
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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.deploy;
+
+import java.util.List;
+
+import org.argeo.slc.NameVersion;
+
+/** Provides access to deployed modules */
+public interface ModulesManager {
+       /** @return a full fledged module descriptor. */
+       public ModuleDescriptor getModuleDescriptor(String moduleName,
+                       String version);
+
+       /**
+        * @return a list of minimal module descriptors of the deployed modules
+        */
+       public List<ModuleDescriptor> listModules();
+
+       /** Synchronously upgrades the module referenced by this name version */
+       public void upgrade(NameVersion nameVersion);
+
+       /** Starts the module */
+       public void start(NameVersion nameVersion);
+
+       /** Stops the module */
+       public void stop(NameVersion nameVersion);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java
new file mode 100644 (file)
index 0000000..8472e7e
--- /dev/null
@@ -0,0 +1,20 @@
+/*\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.deploy;\r
+\r
+public interface TargetData {\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java
new file mode 100644 (file)
index 0000000..52659b7
--- /dev/null
@@ -0,0 +1,48 @@
+/*\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.deploy;\r
+\r
+import java.io.File;\r
+import java.io.OutputStream;\r
+import java.util.List;\r
+\r
+/** Abstracts common versioning operations */\r
+public interface VersioningDriver {\r
+       public void getFileFromRepository(String repositoryBaseUrl,\r
+                       String location, OutputStream out);\r
+\r
+       public List<String> getChangedPaths(File repositoryRoot, Long revision);\r
+\r
+       public String getRepositoryRoot(String repositoryUrl);\r
+\r
+       public String getRelativePath(String repositoryUrl);\r
+\r
+       public void updateToHead(File fileOrDir);\r
+\r
+       public void importFileOrDir(String repositoryUrl, File fileOrDir);\r
+\r
+       /**\r
+        * Checks out or update this versioned directory\r
+        * \r
+        * @return true if the content has changed, false otherwise\r
+        */\r
+       public Boolean checkout(String repositoryUrl, File destDir,\r
+                       Boolean recursive);\r
+\r
+       public void createRepository(String filePath);\r
+\r
+       public void commit(File fileOrDir, String commitMessage);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/package.html b/org.argeo.slc.api/src/org/argeo/slc/deploy/package.html
new file mode 100644 (file)
index 0000000..f3a4c5b
--- /dev/null
@@ -0,0 +1,6 @@
+<html>\r
+<head></head>\r
+<body>\r
+SLC Deploy: deployment of software systems.\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java
new file mode 100644 (file)
index 0000000..0566143
--- /dev/null
@@ -0,0 +1,31 @@
+/*\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.execution;\r
+\r
+/** Variables or references attached to an execution (typically thread bounded).*/\r
+public interface ExecutionContext {\r
+       public final static String VAR_EXECUTION_CONTEXT_ID = "slcVar.executionContext.id";\r
+       public final static String VAR_EXECUTION_CONTEXT_CREATION_DATE = "slcVar.executionContext.creationDate";\r
+       public final static String VAR_FLOW_ID = "slcVar.flow.id";\r
+       public final static String VAR_FLOW_NAME = "slcVar.flow.name";\r
+\r
+       public String getUuid();\r
+\r
+       /** @return the variable value, or <code>null</code> if not found. */\r
+       public Object getVariable(String key);\r
+\r
+       public void setVariable(String key, Object value);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java
new file mode 100644 (file)
index 0000000..520f249
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * 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.execution;
+
+import java.util.Iterator;
+
+/** Abstraction of an execution that can be identified and configured. */
+public interface ExecutionFlow extends Runnable {
+       /** Retrieve an immutable parameter */
+       public Object getParameter(String key);
+
+       /** Whether this immutable parameter is set */
+       public Boolean isSetAsParameter(String key);
+
+       /** The specifications of the execution flow. */
+       public ExecutionSpec getExecutionSpec();
+
+       /**
+        * List sub-runnables that would be executed if run() method would be
+        * called.
+        */
+       public Iterator<Runnable> runnables();
+
+       /**
+        * If there is one and only one runnable wrapped return it, throw an
+        * exeception otherwise.
+        */
+       public Runnable getRunnable();
+
+       /**
+        * The name of this execution flow. Can contains '/' which will be
+        * interpreted by UIs as a hierarchy;
+        */
+       public String getName();
+
+       /**
+        * @deprecated will be removed in SLC 2.0, the path should be the part of
+        *             the name with '/'
+        */
+       public String getPath();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java
new file mode 100644 (file)
index 0000000..e3eea04
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * 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.execution;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 
+ * Implements both archetype and implementation of a given process.
+ * 
+ * At specification time, <code>executionSpec</code> represents the spec of the
+ * parameters accepted by the process, with, among others: type, default value
+ * and, optionally, possible values for each parameter. Thus ExecutionSpec might
+ * be a huge object. Note that when marshalling only a reference to a specific
+ * ExecutionSpec is stored in the XML to optimize performance and avoid
+ * redundancy between various ExecutionFlowDesciptor that might have the same
+ * ExecutionSpec.
+ * 
+ * At runtime, we build a RealizedFlow which references an
+ * ExecutionFlowDescriptor. As it happens AFTER marshalling / unmarshalling
+ * process, the ExecutionSpec is null but we manage to retrieve the
+ * ExecutionSpec and store it in the RealizedFlow, whereas set values of the
+ * parameters are stored in the <code>values</code> map.
+ * 
+ * Generally, values object are either a <code>PrimitiveAccessor</code> or a
+ * <code>RefValue</code> but can be other objects.
+ */
+public class ExecutionFlowDescriptor implements Serializable, Cloneable {
+       private static final long serialVersionUID = 7101944857038041216L;
+       private String name;
+       private String description;
+       private String path;
+       private Map<String, Object> values;
+       private ExecutionSpec executionSpec;
+
+       public ExecutionFlowDescriptor() {
+       }
+
+       public ExecutionFlowDescriptor(String name, String description,
+                       Map<String, Object> values, ExecutionSpec executionSpec) {
+               this.name = name;
+               this.values = values;
+               this.executionSpec = executionSpec;
+       }
+
+       /** The referenced {@link ExecutionSpec} is NOT cloned. */
+       @Override
+       protected Object clone() throws CloneNotSupportedException {
+               return new ExecutionFlowDescriptor(name, description,
+                               new HashMap<String, Object>(values), executionSpec);
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       /**
+        * @deprecated will be removed in SLC 2.x, the path should be the part of
+        *             the name with '/'
+        */
+       public String getPath() {
+               return path;
+       }
+
+       /**
+        * @deprecated will be removed in SLC 2.0, the path should be the part of
+        *             the name with '/'
+        */
+       public void setPath(String path) {
+               this.path = path;
+       }
+
+       public Map<String, Object> getValues() {
+               return values;
+       }
+
+       public ExecutionSpec getExecutionSpec() {
+               return executionSpec;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public void setValues(Map<String, Object> values) {
+               this.values = values;
+       }
+
+       public void setExecutionSpec(ExecutionSpec executionSpec) {
+               this.executionSpec = executionSpec;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (obj instanceof ExecutionFlowDescriptor)
+                       return name.equals(((ExecutionFlowDescriptor) obj).getName());
+               return false;
+       }
+
+       @Override
+       public int hashCode() {
+               return name.hashCode();
+       }
+
+       @Override
+       public String toString() {
+               return (path != null && !path.trim().equals("") ? path + "/" : "")
+                               + name;
+       }
+
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java
new file mode 100644 (file)
index 0000000..f43e14d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * 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.execution;
+
+import java.util.Map;
+
+/**
+ * Maps back and forth between {@link ExecutionFlowDescriptor} and
+ * {@link ExecutionFlow}
+ */
+public interface ExecutionFlowDescriptorConverter {
+       public Map<String, Object> convertValues(
+                       ExecutionFlowDescriptor executionFlowDescriptor);
+
+       public void addFlowsToDescriptor(ExecutionModuleDescriptor md,
+                       Map<String, ExecutionFlow> executionFlows);
+
+       public ExecutionFlowDescriptor getExecutionFlowDescriptor(
+                       ExecutionFlow executionFlow);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java
new file mode 100644 (file)
index 0000000..79d788b
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * 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.execution;
+
+@Deprecated
+public interface ExecutionModule {
+/*     public String getName();
+
+       public String getVersion();
+       
+       public ExecutionModuleDescriptor getDescriptor();
+
+       public void execute(ExecutionFlowDescriptor descriptor);*/
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java
new file mode 100644 (file)
index 0000000..4de0268
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * 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.execution;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.deploy.ModuleDescriptor;
+
+/** Describes the information required to launch a flow */
+public class ExecutionModuleDescriptor extends ModuleDescriptor {
+       /** Metadata header identifying an SLC execution module */
+       public final static String SLC_EXECUTION_MODULE = "SLC-ExecutionModule";
+
+       private static final long serialVersionUID = -2394473464513029512L;
+       private List<ExecutionSpec> executionSpecs = new ArrayList<ExecutionSpec>();
+       private List<ExecutionFlowDescriptor> executionFlows = new ArrayList<ExecutionFlowDescriptor>();
+
+       public List<ExecutionSpec> getExecutionSpecs() {
+               return executionSpecs;
+       }
+
+       public List<ExecutionFlowDescriptor> getExecutionFlows() {
+               return executionFlows;
+       }
+
+       /**
+        * Returns a new {@link ExecutionModuleDescriptor} that can be used to build
+        * a {@link RealizedFlow}.
+        */
+       public ExecutionFlowDescriptor cloneFlowDescriptor(String name) {
+               ExecutionFlowDescriptor res = null;
+               for (ExecutionFlowDescriptor efd : executionFlows) {
+                       if (efd.getName().equals(name)
+                                       || ("/" + efd.getName()).equals(name)) {
+                               try {
+                                       res = (ExecutionFlowDescriptor) efd.clone();
+                               } catch (CloneNotSupportedException e) {
+                                       throw new SlcException("Cannot clone " + efd, e);
+                               }
+                       }
+               }
+               if (res == null)
+                       throw new SlcException("Flow " + name + " not found.");
+               return res;
+       }
+
+       public RealizedFlow asRealizedFlow(String flow, Map<String, Object> values) {
+               RealizedFlow realizedFlow = new RealizedFlow();
+               realizedFlow.setFlowDescriptor(cloneFlowDescriptor(flow));
+               realizedFlow.setModuleName(getName());
+               realizedFlow.setModuleVersion(getVersion());
+               realizedFlow.getFlowDescriptor().getValues().putAll(values);
+               return realizedFlow;
+       }
+
+       public void setExecutionSpecs(List<ExecutionSpec> executionSpecs) {
+               this.executionSpecs = executionSpecs;
+       }
+
+       public void setExecutionFlows(List<ExecutionFlowDescriptor> executionFlows) {
+               this.executionFlows = executionFlows;
+       }
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java
new file mode 100644 (file)
index 0000000..52b52a6
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * 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.execution;
+
+import org.argeo.slc.deploy.ModuleDescriptor;
+
+/** Listen to events on execution modules. */
+public interface ExecutionModulesListener {
+       public void executionModuleAdded(ModuleDescriptor moduleDescriptor);
+
+       public void executionModuleRemoved(ModuleDescriptor moduleDescriptor);
+
+       public void executionFlowAdded(ModuleDescriptor moduleDescriptor,
+                       ExecutionFlowDescriptor executionFlowDescriptor);
+
+       public void executionFlowRemoved(ModuleDescriptor moduleDescriptor,
+                       ExecutionFlowDescriptor executionFlowDescriptor);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java
new file mode 100644 (file)
index 0000000..0668174
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * 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.execution;
+
+import java.util.List;
+
+import org.argeo.slc.deploy.ModulesManager;
+
+/** Provides access to the execution modules */
+public interface ExecutionModulesManager extends ModulesManager {
+       /** Used to filter event notified to an execution notifier. */
+       public static String SLC_PROCESS_ID = "slc.process.id";
+
+       /** Unique launch module */
+       public static String UNIQUE_LAUNCH_MODULE_PROPERTY = "slc.launch.module";
+
+       /** Unique launch flow */
+       public static String UNIQUE_LAUNCH_FLOW_PROPERTY = "slc.launch.flow";
+
+       /** @return a full fledged module descriptor. */
+       public ExecutionModuleDescriptor getExecutionModuleDescriptor(
+                       String moduleName, String version);
+
+       /**
+        * @return a list of minimal execution module descriptors (only the module
+        *         meta data, not the flows)
+        */
+       public List<ExecutionModuleDescriptor> listExecutionModules();
+
+       /** Synchronously finds and executes an {@link ExecutionFlow}. */
+       public void execute(RealizedFlow realizedFlow);
+
+       // /** Notify of a status update status of the {@link ExecutionProcess} */
+//      public void dispatchUpdateStatus(ExecutionProcess process,
+//      String oldStatus, String newStatus);
+       //
+       // /** Notify that a step was added in an {@link ExecutionProcess} */
+       // public void dispatchAddSteps(ExecutionProcess process,
+       // List<ExecutionStep> steps);
+       //
+       // /**
+       // * Register a notifier which will be notified based on the provided
+       // * properties.
+       // */
+       // public void registerProcessNotifier(ExecutionProcessNotifier notifier,
+       // Map<String, String> properties);
+       //
+       // /** Unregisters a notifier */
+       // public void unregisterProcessNotifier(ExecutionProcessNotifier notifier,
+       // Map<String, String> properties);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java
new file mode 100644 (file)
index 0000000..550c164
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.execution;
+
+import java.util.List;
+
+/**
+ * A process is the functional representation of a combination of executions.
+ * While an execution is the actual java code running, a process exists before,
+ * during and after the execution actually took place, providing an entry point
+ * for the definition of executions, their monitoring (e.g. logging) and
+ * tracking. A process can be distributed or parallelized. <br/>
+ * NEW => INITIALIZED => SCHEDULED => RUNNING<br/>
+ * RUNNING => {COMPLETED | ERROR | KILLED}<br/>
+ * {COMPLETED | ERROR | KILLED} => PURGED<br/>
+ * UNKOWN : this is a bug if this status occurs<br/>
+ */
+public interface ExecutionProcess {
+       /** The process is not yet usable. */
+       public final static String NEW = "NEW";
+       /** The process is usable but not yet scheduled to run. */
+       public final static String INITIALIZED = "INITIALIZED";
+       /** The process is usable and scheduled to run, but not yet running. */
+       public final static String SCHEDULED = "SCHEDULED";
+       /** The process is currently running. */
+       public final static String RUNNING = "RUNNING";
+       /** The process has properly completed. */
+       public final static String COMPLETED = "COMPLETED";
+       /** The process failed because of an unexpected error. */
+       public final static String ERROR = "ERROR";
+       /** The process was killed explicitly or through a crash. */
+       public final static String KILLED = "KILLED";
+       /** The status cannot be retrieved (probably because of unexpected errors). */
+       public final static String UNKOWN = "UNKOWN";
+
+       /**
+        * Only a reference to the process has been kept, all monitoring data such
+        * as logs have been purged.
+        */
+       public final static String PURGED = "PURGED";
+
+       /** The UUID of this process. */
+       public String getUuid();
+
+       /** The current status of this process. */
+       public String getStatus();
+
+       /** Sets the current status of this process */
+       public void setStatus(String status);
+
+       public void addSteps(List<ExecutionStep> steps);
+
+       public List<RealizedFlow> getRealizedFlows();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java
new file mode 100644 (file)
index 0000000..49d7c79
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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.execution;
+
+import java.util.Map;
+
+/**
+ * The class implementing this interface defines the map of attributes that are
+ * necessary for the corresponding ExecutionFlow.
+ */
+public interface ExecutionSpec {
+       /**
+        * The name for an internal spec (for backward compatibility where a
+        * non-null name is expected)
+        */
+       public final static String INTERNAL_NAME = "__SLC_EXECUTION_SPEC_INTERNAL";
+
+       /**
+        * The name identifying the execution spec within its application context.
+        * Can be null. An execution spec can be referenced only if its name is not
+        * null or different from {@link #INTERNAL_NAME}
+        */
+       public String getName();
+
+       /** An optional description. Can be null. */
+       public String getDescription();
+
+       /** The attributes managed by this execution spec */
+       public Map<String, ExecutionSpecAttribute> getAttributes();
+
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java
new file mode 100644 (file)
index 0000000..a430e5b
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.execution;
+
+/**
+ * Possible attribute of an execution flow.
+ * 
+ * There are mainly two implementations :<br>
+ * + Primitive attributes (no predefined choice, the end user must compute a
+ * String, a Float, an Integer...)<br>
+ * + RefSpecAttribute which enable two things<br>
+ * ++ a reference to another object of the application context<br>
+ * ++ the display of some choices among which the end user can choose.<br>
+ * 
+ * @see org.argeo.slc.core.execution.PrimitiveSpecAttribute
+ * @see org.argeo.slc.core.execution.RefSpecAttribute
+ * @see org.argeo.slc.core.execution.PrimitiveUtils : this class offers some
+ *      helper, among others to cast the various type of primitive attribute.
+ */
+public interface ExecutionSpecAttribute {
+       /**
+        * Whether this attribute has to be set at instantiation of the flow and
+        * cannot be modified afterwards. If the attribute is not immutable (that
+        * is, this method returns false), it can be set at execution time.
+        */
+       public Boolean getIsImmutable();
+
+       /**
+        * Whether this attribute must be explicitly set and cannot be modified.
+        * This attribute is then basically a constant within a given application
+        * context. {@link #getValue()} cannot return null if the attribute is a
+        * constant.
+        */
+       public Boolean getIsConstant();
+
+       /** Whether this attribute will be hidden to end users. */
+       public Boolean getIsHidden();
+
+       /**
+        * The default value for this attribute. Can be null, except if
+        * {@link #getIsFrozen()} is <code>true</code>, in which case it represents
+        * the constant value of this attribute.
+        */
+       public Object getValue();
+
+       /** Description of this attribute, can be null */
+       public String getDescription();
+
+       /** @deprecated use {@link #getIsImmutable()} instead */
+       public Boolean getIsParameter();
+
+       /** @deprecated use {@link #getIsConstant()} instead */
+       public Boolean getIsFrozen();
+
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java
new file mode 100644 (file)
index 0000000..c4e88b9
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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.execution;
+
+/** Deal with nested level of executions using different vartiables. */
+public interface ExecutionStack {
+       /**
+        * @param name
+        * @return null if no object is found
+        */
+       public Object findScopedObject(String name);
+
+       public void addScopedObject(String name, Object obj);
+
+       public void enterFlow(ExecutionFlow executionFlow);
+
+       /** @return internal stack level UUID. */
+       public String getCurrentStackLevelUuid();
+
+       public Integer getStackSize();
+
+       public void leaveFlow(ExecutionFlow executionFlow);
+
+       Object findLocalVariable(String key);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java
new file mode 100644 (file)
index 0000000..7729d59
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * 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.execution;
+
+import java.util.Map;
+
+public interface ExecutionStackLevel {
+       public ExecutionFlow getExecutionFlow();
+
+       public Map<String, Object> getScopedObjects();
+
+       public String getUuid();
+
+       public Map<String, Object> getLocalVariables();
+
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java
new file mode 100644 (file)
index 0000000..628a3b6
--- /dev/null
@@ -0,0 +1,111 @@
+/*\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.execution;\r
+\r
+import java.io.Serializable;\r
+import java.util.Date;\r
+\r
+/**\r
+ * An atomic step to be notified in during an {@link ExecutionProcess}. Can be a\r
+ * log or the start/end of a phase, etc.\r
+ */\r
+public class ExecutionStep implements Serializable {\r
+       private static final long serialVersionUID = 798640526532912161L;\r
+\r
+       public final static String PHASE_START = "PHASE_START";\r
+       public final static String PHASE_END = "PHASE_END";\r
+       public final static String ERROR = "ERROR";\r
+       public final static String WARNING = "WARNING";\r
+       public final static String INFO = "INFO";\r
+       public final static String DEBUG = "DEBUG";\r
+       public final static String TRACE = "TRACE";\r
+\r
+       /** @deprecated */\r
+       public final static String START = "START";\r
+       /** @deprecated */\r
+       public final static String END = "END";\r
+\r
+       // TODO make the fields final and private when we don't need POJO support\r
+       // anymore (that\r
+       // is when SlcExecutionStep is removed)\r
+       protected String type;\r
+       protected String thread;\r
+       protected Date timestamp;\r
+       protected String log;\r
+\r
+       private String location;\r
+\r
+       /** Empty constructor */\r
+       public ExecutionStep() {\r
+               Thread currentThread = Thread.currentThread();\r
+               thread = currentThread.getName();\r
+       }\r
+\r
+       /** Creates a step at the current date */\r
+       public ExecutionStep(String location, String type, String log) {\r
+               this(location, new Date(), type, log);\r
+       }\r
+\r
+       /** Creates a step of the given type. */\r
+       public ExecutionStep(String location, Date timestamp, String type,\r
+                       String log) {\r
+               this(location, timestamp, type, log, Thread.currentThread().getName());\r
+       }\r
+\r
+       public ExecutionStep(String location, Date timestamp, String type,\r
+                       String log, String thread) {\r
+               this.location = location;\r
+               this.type = type;\r
+               this.timestamp = timestamp;\r
+               this.thread = thread;\r
+               this.log = addLog(log);\r
+       }\r
+\r
+       public String getType() {\r
+               return type;\r
+       }\r
+\r
+       public Date getTimestamp() {\r
+               return timestamp;\r
+       }\r
+\r
+       public String getThread() {\r
+               return thread;\r
+       }\r
+\r
+       /**\r
+        * Return the string that should be stored in the log field. Can be null if\r
+        * another mechanism is used to store log lines.\r
+        */\r
+       protected String addLog(String log) {\r
+               return log;\r
+       }\r
+\r
+       public String getLog() {\r
+               return log;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               return "Execution step, thread=" + thread + ", type=" + type;\r
+       }\r
+\r
+       /** Typically the logging category */\r
+       public String getLocation() {\r
+               return location;\r
+       }\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java
new file mode 100644 (file)
index 0000000..bf6f3d3
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * 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.execution;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.argeo.slc.BasicNameVersion;
+import org.argeo.slc.NameVersion;
+
+/** A fully configured execution flow, ready to be executed. */
+public class RealizedFlow implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       private String moduleName;
+       private String moduleVersion;
+       private ExecutionFlowDescriptor flowDescriptor;
+
+       public String getModuleName() {
+               return moduleName;
+       }
+
+       public void setModuleName(String moduleName) {
+               this.moduleName = moduleName;
+       }
+
+       public NameVersion getModuleNameVersion() {
+               return new BasicNameVersion(getModuleName(), getModuleVersion());
+       }
+
+       public String getModuleVersion() {
+               return moduleVersion;
+       }
+
+       public void setModuleVersion(String moduleVersion) {
+               this.moduleVersion = moduleVersion;
+       }
+
+       public ExecutionFlowDescriptor getFlowDescriptor() {
+               return flowDescriptor;
+       }
+
+       public void setFlowDescriptor(ExecutionFlowDescriptor flowDescriptor) {
+               this.flowDescriptor = flowDescriptor;
+       }
+
+       /** Create a simple realized flow */
+       public static RealizedFlow create(String module, String version,
+                       String flowName, Map<String, String> args) {
+               final RealizedFlow realizedFlow = new RealizedFlow();
+               realizedFlow.setModuleName(module);
+               // TODO deal with version
+               if (version == null)
+                       version = "0.0.0";
+               realizedFlow.setModuleVersion(version);
+               ExecutionFlowDescriptor efd = new ExecutionFlowDescriptor();
+               efd.setName(flowName);
+
+               // arguments
+               if (args != null && args.size() > 0) {
+                       Map<String, Object> values = new HashMap<String, Object>();
+                       for (String key : args.keySet()) {
+                               String value = args.get(key);
+                               values.put(key, value);
+                       }
+                       efd.setValues(values);
+               }
+
+               realizedFlow.setFlowDescriptor(efd);
+               return realizedFlow;
+       }
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java b/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java
new file mode 100644 (file)
index 0000000..c96d4a8
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.execution;
+
+import java.net.URI;
+import java.util.List;
+
+/**
+ * A local agent can run SLC processes. It is responsible for creating their
+ * threads and integrating them with various UIs. It typically wraps
+ * {@link ExecutionModulesManager} which is used to run flows synchronously at a
+ * lower level.
+ */
+public interface SlcAgent {
+       /** Agent unique identifier */
+       public String getAgentUuid();
+
+       /** Execute / take part to this process */
+       public void process(ExecutionProcess process);
+
+       /**
+        * Asynchronously processes the flows defined as URIs, or interpret a single
+        * UUID URN as a scheduled or template process.
+        * 
+        * @return the UUID of the process launched.
+        */
+       public String process(List<URI> uris);
+
+       /** Kills this process */
+       public void kill(String processUuid);
+
+       /**
+        * Wait for this process to finish. returns immediately if it does not
+        * exist.
+        * 
+        * @param millis
+        *            can be null
+        */
+       public void waitFor(String processUuid, Long millis);
+
+       /**
+        * Describe all the flows provided by this execution module. Typically
+        * called in order to build a realized flow.
+        */
+       public ExecutionModuleDescriptor getExecutionModuleDescriptor(
+                       String moduleName, String version);
+
+       /** List all execution modules which can be processed by this agent. */
+       public List<ExecutionModuleDescriptor> listExecutionModuleDescriptors();
+
+       /** @return true if still alive. */
+       public boolean ping();
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgentCli.java b/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgentCli.java
new file mode 100644 (file)
index 0000000..497d110
--- /dev/null
@@ -0,0 +1,14 @@
+package org.argeo.slc.execution;
+
+/**
+ * Interpret a command line and run it in the underlying agent, with the proper
+ * authentication.
+ */
+public interface SlcAgentCli {
+       /**
+        * Synchronously executes.
+        * 
+        * @return the UUID of the process
+        */
+       public String process(String[] args);
+}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/package.html b/org.argeo.slc.api/src/org/argeo/slc/package.html
new file mode 100644 (file)
index 0000000..db808c8
--- /dev/null
@@ -0,0 +1,6 @@
+<html>\r
+<head></head>\r
+<body>\r
+Common classes of teh SLC framework.\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java b/org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java
new file mode 100644 (file)
index 0000000..a70b592
--- /dev/null
@@ -0,0 +1,22 @@
+/*\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.test;\r
+\r
+\r
+/** A test run that can be executed */\r
+public interface ExecutableTestRun extends TestRun, Runnable {\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java b/org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java
new file mode 100644 (file)
index 0000000..4cc6ddd
--- /dev/null
@@ -0,0 +1,39 @@
+/*\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.test;\r
+\r
+import org.argeo.slc.SlcException;\r
+\r
+/**\r
+ * Exception to throw when a test definition cannot interpret the provided test\r
+ * data.\r
+ */\r
+public class IncompatibleTestDataException extends SlcException {\r
+       static final long serialVersionUID = 1l;\r
+\r
+       public IncompatibleTestDataException(TestData testData,\r
+                       TestDefinition testDefinition) {\r
+               super("TestData " + testData.getClass()\r
+                               + " is not compatible with TestDefinition "\r
+                               + testDefinition.getClass());\r
+       }\r
+\r
+       public IncompatibleTestDataException(TestRun testRun) {\r
+               super("TestData " + ((TestData) testRun.getTestData()).getClass()\r
+                               + " is not compatible with TestDefinition "\r
+                               + ((TestDefinition) testRun.getTestDefinition()).getClass());\r
+       }\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestData.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestData.java
new file mode 100644 (file)
index 0000000..1b3f466
--- /dev/null
@@ -0,0 +1,24 @@
+/*\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.test;\r
+\r
+/**\r
+ * Any data required by a test in order to run: configuration, expected,\r
+ * reached, etc.\r
+ */\r
+public interface TestData {\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java
new file mode 100644 (file)
index 0000000..711c177
--- /dev/null
@@ -0,0 +1,20 @@
+/*\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.test;\r
+\r
+public interface TestDataProvider {\r
+       public <T extends TestData> T getTestData(Class<T> clss, String key);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java
new file mode 100644 (file)
index 0000000..5fea1dc
--- /dev/null
@@ -0,0 +1,25 @@
+/*\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.test;\r
+\r
+/**\r
+ * The programmatic definition of a test, which will be associated with\r
+ * transient objects within a test run.\r
+ */\r
+public interface TestDefinition extends TestStatus {\r
+       /** Performs the test. */\r
+       public void execute(TestRun testRun);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java
new file mode 100644 (file)
index 0000000..d3ef62b
--- /dev/null
@@ -0,0 +1,42 @@
+/*\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.test;\r
+\r
+import java.util.Date;\r
+import java.util.Map;\r
+\r
+/** The result of a test */\r
+public interface TestResult extends TestStatus, TestRunAware {\r
+       public String getUuid();\r
+\r
+       /** Adds a part of the result. */\r
+       public void addResultPart(TestResultPart part);\r
+\r
+       /**\r
+        * Marks that the collection of test results is completed and free the\r
+        * related resources (also closing listeners).\r
+        */\r
+       public void close();\r
+\r
+       /**\r
+        * The date when this test result was closed. Can be null, which means the\r
+        * result is not closed.\r
+        */\r
+       public Date getCloseDate();\r
+\r
+       /** Additional arbitrary meta data */\r
+       public Map<String, String> getAttributes();\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java
new file mode 100644 (file)
index 0000000..788e1b8
--- /dev/null
@@ -0,0 +1,25 @@
+/*\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.test;\r
+\r
+/** Listener to the operations on a test result. */\r
+public interface TestResultListener<T extends TestResult> {\r
+       /** Notified when a part was added to a test result. */\r
+       public void resultPartAdded(T testResult, TestResultPart testResultPart);\r
+\r
+       /** Stops listening and release the related resources. */\r
+       public void close(T testResult);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java
new file mode 100644 (file)
index 0000000..aeac4ad
--- /dev/null
@@ -0,0 +1,32 @@
+/*\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.test;\r
+\r
+/**\r
+ * Part of a test result.\r
+ * \r
+ * @see TestResult\r
+ */\r
+public interface TestResultPart {\r
+       /** The status, as defined in {@link TestStatus}. */\r
+       public Integer getStatus();\r
+\r
+       /** The related message. */\r
+       public String getMessage();\r
+\r
+       /** The underlying <code>Exception</code>. Can be null. */\r
+       public String getExceptionMessage();\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java
new file mode 100644 (file)
index 0000000..0935a55
--- /dev/null
@@ -0,0 +1,36 @@
+/*\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.test;\r
+\r
+import org.argeo.slc.deploy.DeployedSystem;\r
+\r
+/** The actual run of a test */\r
+public interface TestRun {\r
+       /** Gets UUID */\r
+       public String getUuid();\r
+\r
+       /** Gets the related test definition. */\r
+       public <T extends TestDefinition> T getTestDefinition();\r
+\r
+       /** Gets the related test data */\r
+       public <T extends TestData> T getTestData();\r
+\r
+       /** Gets the related deployed system. */\r
+       public <T extends DeployedSystem> T getDeployedSystem();\r
+\r
+       /** Gets the related result where to record results. */\r
+       public <T extends TestResult> T getTestResult();\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java
new file mode 100644 (file)
index 0000000..3330cc8
--- /dev/null
@@ -0,0 +1,23 @@
+/*\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.test;\r
+\r
+/** Allows a test run to notify other objects. */\r
+public interface TestRunAware {\r
+       /** Notifies the current test run. */\r
+       public void notifyTestRun(TestRun testRun);\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java
new file mode 100644 (file)
index 0000000..e7ebecf
--- /dev/null
@@ -0,0 +1,46 @@
+/*\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.test;\r
+\r
+/**\r
+ * Simple statuses. Ordering of the flags can be relied upon in aggregation: if\r
+ * one element is failed, the aggregation is failed. Is one element is in ERROR,\r
+ * the aggregation is in ERROR.\r
+ * <p>\r
+ * <ul>\r
+ * <li>{@link #PASSED}: the test succeeded</li>\r
+ * <li>{@link #FAILED}: the test could run, but did not reach the expected\r
+ * result</li>\r
+ * <li>{@link #ERROR}: an error during the test run prevented to get a\r
+ * significant information on the tested system.</li>\r
+ * </ul>\r
+ * </p>\r
+ */\r
+public interface TestStatus {\r
+       /** The flag for a passed test: 0 */\r
+       public final static Integer PASSED = 0;\r
+       /** The flag for a failed test: 1 */\r
+       public final static Integer FAILED = 1;\r
+       /**\r
+        * The flag for a test which could not properly run because of an error\r
+        * (there is no feedback on the behavior of the tested component): 2\r
+        */\r
+       public final static Integer ERROR = 2;\r
+       public final static String STATUSSTR_PASSED = "PASSED";\r
+       public final static String STATUSSTR_FAILED = "FAILED";\r
+       public final static String STATUSSTR_ERROR = "ERROR";\r
+\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java b/org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java
new file mode 100644 (file)
index 0000000..e113950
--- /dev/null
@@ -0,0 +1,29 @@
+/*\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.test;\r
+\r
+import org.argeo.slc.deploy.DeployedSystem;\r
+\r
+/** Test run whose various components can be externally set. */\r
+public interface WritableTestRun extends ExecutableTestRun {\r
+       public void setDeployedSystem(DeployedSystem deployedSystem);\r
+\r
+       public void setTestData(TestData testData);\r
+\r
+       public void setTestDefinition(TestDefinition testDefinition);\r
+\r
+       public void setTestResult(TestResult testResult);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java b/org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java
new file mode 100644 (file)
index 0000000..cd9897e
--- /dev/null
@@ -0,0 +1,37 @@
+/*\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.test.context;\r
+\r
+import java.util.Map;\r
+\r
+/** Access to an SLC test context that is, maps of reached and expected values. */\r
+public interface ContextAware {\r
+       public final static String DEFAULT_SKIP_FLAG = "!";\r
+       public final static String DEFAULT_ANY_FLAG = "*";\r
+\r
+       /** Retrieves reached values. */\r
+       public Map<String, Object> getValues();\r
+\r
+       /** Set reached values. */\r
+       public void setValues(Map<String, Object> values);\r
+\r
+       /** Retrieves expected values. */\r
+       public Map<String, Object> getExpectedValues();\r
+\r
+       public String getContextSkipFlag();\r
+\r
+       public String getContextAnyFlag();\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java b/org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java
new file mode 100644 (file)
index 0000000..0da990d
--- /dev/null
@@ -0,0 +1,24 @@
+/*\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.test.context;\r
+\r
+import java.util.Collection;\r
+\r
+public interface ParentContextAware extends ContextAware {\r
+       public Collection<ContextAware> getChildContexts();\r
+\r
+       public void addChildContext(ContextAware contextAware);\r
+}\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/context/package.html b/org.argeo.slc.api/src/org/argeo/slc/test/context/package.html
new file mode 100644 (file)
index 0000000..cd08d63
--- /dev/null
@@ -0,0 +1,6 @@
+<html>\r
+<head></head>\r
+<body>\r
+Context variables to be passed between parts of tests.\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/package.html b/org.argeo.slc.api/src/org/argeo/slc/test/package.html
new file mode 100644 (file)
index 0000000..c70d2d1
--- /dev/null
@@ -0,0 +1,6 @@
+<html>\r
+<head></head>\r
+<body>\r
+SLC Test: test of software systems.\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index f9ab9df16ed3b446766adfa79777de245b344581..4063097e1bcdb4bfb8270603224624adf5e4494f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -3,13 +3,12 @@
        <parent>
                <groupId>org.argeo.commons</groupId>
                <artifactId>argeo-commons</artifactId>
-               <version>1.2.3</version>
+               <version>2.1.17-SNAPSHOT</version>
        </parent>
        <groupId>org.argeo.slc</groupId>
        <artifactId>argeo-slc</artifactId>
        <packaging>pom</packaging>
        <name>Argeo SLC</name>
-       <description>SLC is a framework integrating various build, deployment and testing technologies in order to build specific application life cycle management systems.</description>
        <version>2.1.1-SNAPSHOT</version>
        <properties>
                <developmentCycle.slc>2.1</developmentCycle.slc>
                <version.slc>2.1.1-SNAPSHOT</version.slc>
        </properties>
        <modules>
-               <module>runtime</module>
-               <module>modules</module>
-               <module>plugins</module>
-               <module>lib</module>
-               <module>dep</module>
-               <module>archetypes</module>
-               <module>dist</module>
-               <module>demo</module>
+               <module>org.argeo.slc.api</module>
+
+<!--           <module>runtime</module> -->
+<!--           <module>modules</module> -->
+<!--           <module>plugins</module> -->
+<!--           <module>archetypes</module> -->
+
+<!--           <module>lib</module> -->
+<!--           <module>dep</module> -->
+<!--           <module>dist</module> -->
+<!--           <module>demo</module> -->
        </modules>
        <url>http://projects.argeo.org/slc/</url>
        <scm>
@@ -106,7 +108,7 @@ limitations under the License.
        <repositories>
                <repository>
                        <id>argeo-commons</id>
-                       <url>http://repo.argeo.org/data/public/java/argeo-commons-1.2</url>
+                       <url>http://repo.argeo.org/data/public/java/argeo-commons-2.1</url>
                        <releases>
                                <enabled>true</enabled>
                                <updatePolicy>daily</updatePolicy>
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/BasicNameVersion.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/BasicNameVersion.java
deleted file mode 100644 (file)
index 9d8e71a..0000000
+++ /dev/null
@@ -1,48 +0,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.
- */
-package org.argeo.slc;
-
-import java.io.Serializable;
-
-/** @deprecated use {@link DefaultNameVersion} instead. */
-@Deprecated
-public class BasicNameVersion extends DefaultNameVersion implements
-               Serializable {
-       private static final long serialVersionUID = -5127304279136195127L;
-
-       public BasicNameVersion() {
-       }
-
-       /** Interprets string in OSGi-like format my.module.name;version=0.0.0 */
-       public BasicNameVersion(String nameVersion) {
-               int index = nameVersion.indexOf(";version=");
-               if (index < 0) {
-                       setName(nameVersion);
-                       setVersion(null);
-               } else {
-                       setName(nameVersion.substring(0, index));
-                       setVersion(nameVersion.substring(index + ";version=".length()));
-               }
-       }
-
-       public BasicNameVersion(String name, String version) {
-               super(name, version);
-       }
-
-       public BasicNameVersion(NameVersion nameVersion) {
-               super(nameVersion);
-       }
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/CategorizedNameVersion.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/CategorizedNameVersion.java
deleted file mode 100644 (file)
index fd7d56d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.argeo.slc;
-
-/**
- * Adds a dimension to {@link NameVersion} by adding an arbitrary category (e.g.
- * Maven groupId, yum repository ID, etc.)
- */
-public interface CategorizedNameVersion extends NameVersion {
-       /** The category of the component. */
-       public String getCategory();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/Condition.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/Condition.java
deleted file mode 100644 (file)
index f5199ce..0000000
+++ /dev/null
@@ -1,26 +0,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.
- */
-package org.argeo.slc;
-
-/** Binary check on an arbitrary object. */
-public interface Condition<T> {
-       /**
-        * Checks the condition.
-        * 
-        * @return true, if the condition is verified, false if not.
-        */
-       public Boolean check(T obj);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/DefaultNameVersion.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/DefaultNameVersion.java
deleted file mode 100644 (file)
index fe230e6..0000000
+++ /dev/null
@@ -1,80 +0,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.
- */
-package org.argeo.slc;
-
-
-/** Canonical implementation of {@link NameVersion} */
-public class DefaultNameVersion implements NameVersion,
-               Comparable<NameVersion> {
-       private String name;
-       private String version;
-
-       public DefaultNameVersion() {
-       }
-
-       public DefaultNameVersion(String name, String version) {
-               this.name = name;
-               this.version = version;
-       }
-
-       public DefaultNameVersion(NameVersion nameVersion) {
-               this.name = nameVersion.getName();
-               this.version = nameVersion.getVersion();
-       }
-
-       public String getName() {
-               return name;
-       }
-
-       public void setName(String name) {
-               this.name = name;
-       }
-
-       public String getVersion() {
-               return version;
-       }
-
-       public void setVersion(String version) {
-               this.version = version;
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (obj instanceof NameVersion) {
-                       NameVersion nameVersion = (NameVersion) obj;
-                       return name.equals(nameVersion.getName())
-                                       && version.equals(nameVersion.getVersion());
-               } else
-                       return false;
-       }
-
-       @Override
-       public int hashCode() {
-               return name.hashCode() + version.hashCode();
-       }
-
-       @Override
-       public String toString() {
-               return name + ":" + version;
-       }
-
-       public int compareTo(NameVersion o) {
-               if (o.getName().equals(name))
-                       return version.compareTo(o.getVersion());
-               else
-                       return name.compareTo(o.getName());
-       }
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/ModuleSet.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/ModuleSet.java
deleted file mode 100644 (file)
index fd125a2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.argeo.slc;
-
-import java.util.Iterator;
-
-/** A set of {@link NameVersion}. */
-public interface ModuleSet {
-       Iterator<? extends NameVersion> nameVersions();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/NameVersion.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/NameVersion.java
deleted file mode 100644 (file)
index 0086cbb..0000000
+++ /dev/null
@@ -1,28 +0,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.
- */
-package org.argeo.slc;
-
-/**
- * Abstraction of a name / version pair, typically used as coordinates for a
- * software module either deployed or packaged as an archive.
- */
-public interface NameVersion {
-       /** The name of the component. */
-       public String getName();
-
-       /** The version of the component. */
-       public String getVersion();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/SlcConstants.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/SlcConstants.java
deleted file mode 100644 (file)
index 2b26e87..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.argeo.slc;
-
-/** Constants useful across all SLC components */
-public interface SlcConstants {
-       /** Read-write role. */
-       public final static String ROLE_SLC = "ROLE_SLC";
-
-       /** Read only unlogged user */
-       public final static String USER_ANONYMOUS = "anonymous";
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/SlcException.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/SlcException.java
deleted file mode 100644 (file)
index 408bd06..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*\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;\r
-\r
-/** Basis for all SLC exceptions. This is an unchecked exception. */\r
-public class SlcException extends RuntimeException {\r
-       private static final long serialVersionUID = 6373738619304106445L;\r
-\r
-       /** Constructor. */\r
-       public SlcException(String message) {\r
-               super(message);\r
-       }\r
-\r
-       /** Constructor. */\r
-       public SlcException(String message, Throwable e) {\r
-               super(message, e);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/StreamReadable.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/StreamReadable.java
deleted file mode 100644 (file)
index 302a226..0000000
+++ /dev/null
@@ -1,22 +0,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.
- */
-package org.argeo.slc;
-
-import java.io.InputStream;
-
-public interface StreamReadable {
-       public InputStream getInputStream();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/UnsupportedException.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/UnsupportedException.java
deleted file mode 100644 (file)
index fe63322..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*\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;\r
-\r
-/** Exception for unsupported features or actions. */\r
-public class UnsupportedException extends SlcException {\r
-       static final long serialVersionUID = 1l;\r
-\r
-       /** Action not supported. */\r
-       public UnsupportedException() {\r
-               this("Action not supported");\r
-       }\r
-\r
-       /** Constructor with a message. */\r
-       public UnsupportedException(String message) {\r
-               super(message);\r
-       }\r
-\r
-       /**\r
-        * Constructor generating a message.\r
-        * \r
-        * @param nature\r
-        *            the nature of the unsupported object\r
-        * @param obj\r
-        *            the object itself (its class name will be used in message)\r
-        */\r
-       public UnsupportedException(String nature, Object obj) {\r
-               super("Unsupported " + nature + ": "\r
-                               + (obj != null ? obj.getClass() : "[object is null]"));\r
-       }\r
-\r
-       /**\r
-        * Constructor generating a message.\r
-        * \r
-        * @param nature\r
-        *            the nature of the unsupported object\r
-        * @param clss\r
-        *            the class itself (will be used in message)\r
-        */\r
-       public UnsupportedException(String nature, Class<?> clss) {\r
-               super("Unsupported " + nature + ": " + clss);\r
-       }\r
-\r
-       /**\r
-        * Constructor generating a message.\r
-        * \r
-        * @param nature\r
-        *            the nature of the unsupported object\r
-        * @param value\r
-        *            the problematic value itself\r
-        */\r
-       public UnsupportedException(String nature, String value) {\r
-               super("Unsupported " + nature + ": " + value);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/Distribution.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/Distribution.java
deleted file mode 100644 (file)
index 9e233e2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*\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.build;\r
-\r
-/** A packaged software component */\r
-public interface Distribution {\r
-       public String getDistributionId();\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/License.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/License.java
deleted file mode 100644 (file)
index d115f45..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.argeo.slc.build;
-
-/** A software license */
-public interface License {
-       public String getName();
-
-       public String getUri();
-
-       public String getLink();
-
-       public String getText();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/ModularDistribution.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/ModularDistribution.java
deleted file mode 100644 (file)
index 0b917aa..0000000
+++ /dev/null
@@ -1,34 +0,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.
- */
-package org.argeo.slc.build;
-
-import org.argeo.slc.ModuleSet;
-import org.argeo.slc.NameVersion;
-
-/**
- * A distribution of modules, that is components that can be identified by a
- * name / version couple.
- * 
- * @see NameVersion
- */
-public interface ModularDistribution extends Distribution, NameVersion,
-               ModuleSet {
-       public Distribution getModuleDistribution(String moduleName,
-                       String moduleVersion);
-
-       /** A descriptor such as P2, OBR or yum metadata. */
-       public Object getModulesDescriptor(String descriptorType);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/package.html b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/build/package.html
deleted file mode 100644 (file)
index 5da2052..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>\r
-<head></head>\r
-<body>\r
-SLC Build: building of software systems.\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/AbstractDeployedSystem.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/AbstractDeployedSystem.java
deleted file mode 100644 (file)
index 4bb603b..0000000
+++ /dev/null
@@ -1,39 +0,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.
- */
-package org.argeo.slc.deploy;
-
-import org.argeo.slc.UnsupportedException;
-import org.argeo.slc.build.Distribution;
-
-public abstract class AbstractDeployedSystem implements DeployedSystem {
-       public String getDeployedSystemId() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       public DeploymentData getDeploymentData() {
-               throw new UnsupportedException("Method not supported");
-       }
-
-       public Distribution getDistribution() {
-               throw new UnsupportedException("Method not supported");
-       }
-
-       public TargetData getTargetData() {
-               throw new UnsupportedException("Method not supported");
-       }
-
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployEnvironment.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployEnvironment.java
deleted file mode 100644 (file)
index 2dce868..0000000
+++ /dev/null
@@ -1,24 +0,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.
- */
-package org.argeo.slc.deploy;
-
-import java.io.File;
-import java.util.Map;
-
-public interface DeployEnvironment {
-       public void unpackTo(Object packg, File targetLocation,
-                       Map<String, String> filter);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployedSystem.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployedSystem.java
deleted file mode 100644 (file)
index 89c1708..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*\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.deploy;\r
-\r
-import org.argeo.slc.build.Distribution;\r
-\r
-/** An instance of a software system. */\r
-public interface DeployedSystem extends TargetData {\r
-       /** Unique ID for this system instance. */\r
-       public String getDeployedSystemId();\r
-\r
-       /** Underlying packages */\r
-       public Distribution getDistribution();\r
-\r
-       /** Data required to initialize the instance (e.g. DB dump, etc.). */\r
-       public DeploymentData getDeploymentData();\r
-\r
-       /** Resources required by the system (ports, disk location, etc.) */\r
-       public TargetData getTargetData();\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployedSystemManager.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeployedSystemManager.java
deleted file mode 100644 (file)
index 092ac55..0000000
+++ /dev/null
@@ -1,20 +0,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.
- */
-package org.argeo.slc.deploy;
-
-public interface DeployedSystemManager<T extends DeployedSystem> {
-       public void setDeployedSystem(T deployedSystem);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/Deployment.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/Deployment.java
deleted file mode 100644 (file)
index 99f4e10..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*\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.deploy;\r
-\r
-import org.argeo.slc.build.Distribution;\r
-\r
-public interface Deployment extends Runnable{\r
-       public DeployedSystem getDeployedSystem();\r
-\r
-       public void setTargetData(TargetData targetData);\r
-\r
-       public void setDeploymentData(DeploymentData deploymentData);\r
-\r
-       public void setDistribution(Distribution distribution);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeploymentData.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DeploymentData.java
deleted file mode 100644 (file)
index e5b0f40..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*\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.deploy;\r
-\r
-public interface DeploymentData {\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DynamicRuntime.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/DynamicRuntime.java
deleted file mode 100644 (file)
index 231d52a..0000000
+++ /dev/null
@@ -1,33 +0,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.
- */
-package org.argeo.slc.deploy;
-
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.build.Distribution;
-
-public interface DynamicRuntime<M extends Module> extends
-               ModularDeployedSystem<M> {
-       public void shutdown();
-
-       public M installModule(Distribution distribution);
-
-       public void uninstallModule(NameVersion nameVersion);
-
-       public void updateModule(NameVersion nameVersion);
-
-       public void startModule(NameVersion nameVersion);
-
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/InstalledExecutables.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/InstalledExecutables.java
deleted file mode 100644 (file)
index 0f9601c..0000000
+++ /dev/null
@@ -1,20 +0,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.
- */
-package org.argeo.slc.deploy;
-
-public interface InstalledExecutables extends DeployedSystem {
-       public String getExecutablePath(String key);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModularDeployedSystem.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModularDeployedSystem.java
deleted file mode 100644 (file)
index 6805eec..0000000
+++ /dev/null
@@ -1,23 +0,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.
- */
-package org.argeo.slc.deploy;
-
-import java.util.List;
-
-public interface ModularDeployedSystem<M extends Module> extends DeployedSystem {
-       /** List the underlying deployed modules (in real time) */
-       public List<M> listModules();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/Module.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/Module.java
deleted file mode 100644 (file)
index 2a0bd4d..0000000
+++ /dev/null
@@ -1,27 +0,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.
- */
-package org.argeo.slc.deploy;
-
-import org.argeo.slc.NameVersion;
-
-/**
- * Represents a deployed module of a broader deployed system. A module is
- * uniquely identifiable via a name / version.
- */
-public interface Module extends DeployedSystem, NameVersion {
-       /** A serializable stateless description of the module */
-       public ModuleDescriptor getModuleDescriptor();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModuleDescriptor.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModuleDescriptor.java
deleted file mode 100644 (file)
index a0bddd1..0000000
+++ /dev/null
@@ -1,74 +0,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.
- */
-package org.argeo.slc.deploy;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.argeo.slc.BasicNameVersion;
-
-/** The description of a versioned module. */
-public class ModuleDescriptor extends BasicNameVersion implements Serializable {
-       private static final long serialVersionUID = 4310820315478645419L;
-       private String title;
-       private String description;
-       private Map<String, String> metadata = new HashMap<String, String>();
-       private Boolean started = false;
-
-       public String getTitle() {
-               return title;
-       }
-
-       public void setTitle(String title) {
-               this.title = title;
-       }
-
-       public String getDescription() {
-               return description;
-       }
-
-       public void setDescription(String description) {
-               this.description = description;
-       }
-
-       /** @deprecated use {@link #getTitle()} instead */
-       public String getLabel() {
-               return title;
-       }
-
-       /** @deprecated use {@link #setTitle(String)} instead */
-       public void setLabel(String label) {
-               this.title = label;
-       }
-
-       public Map<String, String> getMetadata() {
-               return metadata;
-       }
-
-       public void setMetadata(Map<String, String> metadata) {
-               this.metadata = metadata;
-       }
-
-       public Boolean getStarted() {
-               return started;
-       }
-
-       public void setStarted(Boolean started) {
-               this.started = started;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModulesManager.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/ModulesManager.java
deleted file mode 100644 (file)
index d7ec945..0000000
+++ /dev/null
@@ -1,41 +0,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.
- */
-package org.argeo.slc.deploy;
-
-import java.util.List;
-
-import org.argeo.slc.NameVersion;
-
-/** Provides access to deployed modules */
-public interface ModulesManager {
-       /** @return a full fledged module descriptor. */
-       public ModuleDescriptor getModuleDescriptor(String moduleName,
-                       String version);
-
-       /**
-        * @return a list of minimal module descriptors of the deployed modules
-        */
-       public List<ModuleDescriptor> listModules();
-
-       /** Synchronously upgrades the module referenced by this name version */
-       public void upgrade(NameVersion nameVersion);
-
-       /** Starts the module */
-       public void start(NameVersion nameVersion);
-
-       /** Stops the module */
-       public void stop(NameVersion nameVersion);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/TargetData.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/TargetData.java
deleted file mode 100644 (file)
index 8472e7e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*\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.deploy;\r
-\r
-public interface TargetData {\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/VersioningDriver.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/VersioningDriver.java
deleted file mode 100644 (file)
index 52659b7..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\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.deploy;\r
-\r
-import java.io.File;\r
-import java.io.OutputStream;\r
-import java.util.List;\r
-\r
-/** Abstracts common versioning operations */\r
-public interface VersioningDriver {\r
-       public void getFileFromRepository(String repositoryBaseUrl,\r
-                       String location, OutputStream out);\r
-\r
-       public List<String> getChangedPaths(File repositoryRoot, Long revision);\r
-\r
-       public String getRepositoryRoot(String repositoryUrl);\r
-\r
-       public String getRelativePath(String repositoryUrl);\r
-\r
-       public void updateToHead(File fileOrDir);\r
-\r
-       public void importFileOrDir(String repositoryUrl, File fileOrDir);\r
-\r
-       /**\r
-        * Checks out or update this versioned directory\r
-        * \r
-        * @return true if the content has changed, false otherwise\r
-        */\r
-       public Boolean checkout(String repositoryUrl, File destDir,\r
-                       Boolean recursive);\r
-\r
-       public void createRepository(String filePath);\r
-\r
-       public void commit(File fileOrDir, String commitMessage);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/package.html b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/deploy/package.html
deleted file mode 100644 (file)
index f3a4c5b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>\r
-<head></head>\r
-<body>\r
-SLC Deploy: deployment of software systems.\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionContext.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionContext.java
deleted file mode 100644 (file)
index 0566143..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*\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.execution;\r
-\r
-/** Variables or references attached to an execution (typically thread bounded).*/\r
-public interface ExecutionContext {\r
-       public final static String VAR_EXECUTION_CONTEXT_ID = "slcVar.executionContext.id";\r
-       public final static String VAR_EXECUTION_CONTEXT_CREATION_DATE = "slcVar.executionContext.creationDate";\r
-       public final static String VAR_FLOW_ID = "slcVar.flow.id";\r
-       public final static String VAR_FLOW_NAME = "slcVar.flow.name";\r
-\r
-       public String getUuid();\r
-\r
-       /** @return the variable value, or <code>null</code> if not found. */\r
-       public Object getVariable(String key);\r
-\r
-       public void setVariable(String key, Object value);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlow.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlow.java
deleted file mode 100644 (file)
index 520f249..0000000
+++ /dev/null
@@ -1,54 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.util.Iterator;
-
-/** Abstraction of an execution that can be identified and configured. */
-public interface ExecutionFlow extends Runnable {
-       /** Retrieve an immutable parameter */
-       public Object getParameter(String key);
-
-       /** Whether this immutable parameter is set */
-       public Boolean isSetAsParameter(String key);
-
-       /** The specifications of the execution flow. */
-       public ExecutionSpec getExecutionSpec();
-
-       /**
-        * List sub-runnables that would be executed if run() method would be
-        * called.
-        */
-       public Iterator<Runnable> runnables();
-
-       /**
-        * If there is one and only one runnable wrapped return it, throw an
-        * exeception otherwise.
-        */
-       public Runnable getRunnable();
-
-       /**
-        * The name of this execution flow. Can contains '/' which will be
-        * interpreted by UIs as a hierarchy;
-        */
-       public String getName();
-
-       /**
-        * @deprecated will be removed in SLC 2.0, the path should be the part of
-        *             the name with '/'
-        */
-       public String getPath();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptor.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptor.java
deleted file mode 100644 (file)
index e3eea04..0000000
+++ /dev/null
@@ -1,134 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 
- * Implements both archetype and implementation of a given process.
- * 
- * At specification time, <code>executionSpec</code> represents the spec of the
- * parameters accepted by the process, with, among others: type, default value
- * and, optionally, possible values for each parameter. Thus ExecutionSpec might
- * be a huge object. Note that when marshalling only a reference to a specific
- * ExecutionSpec is stored in the XML to optimize performance and avoid
- * redundancy between various ExecutionFlowDesciptor that might have the same
- * ExecutionSpec.
- * 
- * At runtime, we build a RealizedFlow which references an
- * ExecutionFlowDescriptor. As it happens AFTER marshalling / unmarshalling
- * process, the ExecutionSpec is null but we manage to retrieve the
- * ExecutionSpec and store it in the RealizedFlow, whereas set values of the
- * parameters are stored in the <code>values</code> map.
- * 
- * Generally, values object are either a <code>PrimitiveAccessor</code> or a
- * <code>RefValue</code> but can be other objects.
- */
-public class ExecutionFlowDescriptor implements Serializable, Cloneable {
-       private static final long serialVersionUID = 7101944857038041216L;
-       private String name;
-       private String description;
-       private String path;
-       private Map<String, Object> values;
-       private ExecutionSpec executionSpec;
-
-       public ExecutionFlowDescriptor() {
-       }
-
-       public ExecutionFlowDescriptor(String name, String description,
-                       Map<String, Object> values, ExecutionSpec executionSpec) {
-               this.name = name;
-               this.values = values;
-               this.executionSpec = executionSpec;
-       }
-
-       /** The referenced {@link ExecutionSpec} is NOT cloned. */
-       @Override
-       protected Object clone() throws CloneNotSupportedException {
-               return new ExecutionFlowDescriptor(name, description,
-                               new HashMap<String, Object>(values), executionSpec);
-       }
-
-       public String getName() {
-               return name;
-       }
-
-       /**
-        * @deprecated will be removed in SLC 2.x, the path should be the part of
-        *             the name with '/'
-        */
-       public String getPath() {
-               return path;
-       }
-
-       /**
-        * @deprecated will be removed in SLC 2.0, the path should be the part of
-        *             the name with '/'
-        */
-       public void setPath(String path) {
-               this.path = path;
-       }
-
-       public Map<String, Object> getValues() {
-               return values;
-       }
-
-       public ExecutionSpec getExecutionSpec() {
-               return executionSpec;
-       }
-
-       public void setName(String name) {
-               this.name = name;
-       }
-
-       public void setValues(Map<String, Object> values) {
-               this.values = values;
-       }
-
-       public void setExecutionSpec(ExecutionSpec executionSpec) {
-               this.executionSpec = executionSpec;
-       }
-
-       public String getDescription() {
-               return description;
-       }
-
-       public void setDescription(String description) {
-               this.description = description;
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (obj instanceof ExecutionFlowDescriptor)
-                       return name.equals(((ExecutionFlowDescriptor) obj).getName());
-               return false;
-       }
-
-       @Override
-       public int hashCode() {
-               return name.hashCode();
-       }
-
-       @Override
-       public String toString() {
-               return (path != null && !path.trim().equals("") ? path + "/" : "")
-                               + name;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java
deleted file mode 100644 (file)
index f43e14d..0000000
+++ /dev/null
@@ -1,33 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.util.Map;
-
-/**
- * Maps back and forth between {@link ExecutionFlowDescriptor} and
- * {@link ExecutionFlow}
- */
-public interface ExecutionFlowDescriptorConverter {
-       public Map<String, Object> convertValues(
-                       ExecutionFlowDescriptor executionFlowDescriptor);
-
-       public void addFlowsToDescriptor(ExecutionModuleDescriptor md,
-                       Map<String, ExecutionFlow> executionFlows);
-
-       public ExecutionFlowDescriptor getExecutionFlowDescriptor(
-                       ExecutionFlow executionFlow);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModule.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModule.java
deleted file mode 100644 (file)
index 79d788b..0000000
+++ /dev/null
@@ -1,27 +0,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.
- */
-package org.argeo.slc.execution;
-
-@Deprecated
-public interface ExecutionModule {
-/*     public String getName();
-
-       public String getVersion();
-       
-       public ExecutionModuleDescriptor getDescriptor();
-
-       public void execute(ExecutionFlowDescriptor descriptor);*/
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModuleDescriptor.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModuleDescriptor.java
deleted file mode 100644 (file)
index 4de0268..0000000
+++ /dev/null
@@ -1,79 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.deploy.ModuleDescriptor;
-
-/** Describes the information required to launch a flow */
-public class ExecutionModuleDescriptor extends ModuleDescriptor {
-       /** Metadata header identifying an SLC execution module */
-       public final static String SLC_EXECUTION_MODULE = "SLC-ExecutionModule";
-
-       private static final long serialVersionUID = -2394473464513029512L;
-       private List<ExecutionSpec> executionSpecs = new ArrayList<ExecutionSpec>();
-       private List<ExecutionFlowDescriptor> executionFlows = new ArrayList<ExecutionFlowDescriptor>();
-
-       public List<ExecutionSpec> getExecutionSpecs() {
-               return executionSpecs;
-       }
-
-       public List<ExecutionFlowDescriptor> getExecutionFlows() {
-               return executionFlows;
-       }
-
-       /**
-        * Returns a new {@link ExecutionModuleDescriptor} that can be used to build
-        * a {@link RealizedFlow}.
-        */
-       public ExecutionFlowDescriptor cloneFlowDescriptor(String name) {
-               ExecutionFlowDescriptor res = null;
-               for (ExecutionFlowDescriptor efd : executionFlows) {
-                       if (efd.getName().equals(name)
-                                       || ("/" + efd.getName()).equals(name)) {
-                               try {
-                                       res = (ExecutionFlowDescriptor) efd.clone();
-                               } catch (CloneNotSupportedException e) {
-                                       throw new SlcException("Cannot clone " + efd, e);
-                               }
-                       }
-               }
-               if (res == null)
-                       throw new SlcException("Flow " + name + " not found.");
-               return res;
-       }
-
-       public RealizedFlow asRealizedFlow(String flow, Map<String, Object> values) {
-               RealizedFlow realizedFlow = new RealizedFlow();
-               realizedFlow.setFlowDescriptor(cloneFlowDescriptor(flow));
-               realizedFlow.setModuleName(getName());
-               realizedFlow.setModuleVersion(getVersion());
-               realizedFlow.getFlowDescriptor().getValues().putAll(values);
-               return realizedFlow;
-       }
-
-       public void setExecutionSpecs(List<ExecutionSpec> executionSpecs) {
-               this.executionSpecs = executionSpecs;
-       }
-
-       public void setExecutionFlows(List<ExecutionFlowDescriptor> executionFlows) {
-               this.executionFlows = executionFlows;
-       }
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesListener.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesListener.java
deleted file mode 100644 (file)
index 52b52a6..0000000
+++ /dev/null
@@ -1,31 +0,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.
- */
-package org.argeo.slc.execution;
-
-import org.argeo.slc.deploy.ModuleDescriptor;
-
-/** Listen to events on execution modules. */
-public interface ExecutionModulesListener {
-       public void executionModuleAdded(ModuleDescriptor moduleDescriptor);
-
-       public void executionModuleRemoved(ModuleDescriptor moduleDescriptor);
-
-       public void executionFlowAdded(ModuleDescriptor moduleDescriptor,
-                       ExecutionFlowDescriptor executionFlowDescriptor);
-
-       public void executionFlowRemoved(ModuleDescriptor moduleDescriptor,
-                       ExecutionFlowDescriptor executionFlowDescriptor);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java
deleted file mode 100644 (file)
index 0668174..0000000
+++ /dev/null
@@ -1,64 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.util.List;
-
-import org.argeo.slc.deploy.ModulesManager;
-
-/** Provides access to the execution modules */
-public interface ExecutionModulesManager extends ModulesManager {
-       /** Used to filter event notified to an execution notifier. */
-       public static String SLC_PROCESS_ID = "slc.process.id";
-
-       /** Unique launch module */
-       public static String UNIQUE_LAUNCH_MODULE_PROPERTY = "slc.launch.module";
-
-       /** Unique launch flow */
-       public static String UNIQUE_LAUNCH_FLOW_PROPERTY = "slc.launch.flow";
-
-       /** @return a full fledged module descriptor. */
-       public ExecutionModuleDescriptor getExecutionModuleDescriptor(
-                       String moduleName, String version);
-
-       /**
-        * @return a list of minimal execution module descriptors (only the module
-        *         meta data, not the flows)
-        */
-       public List<ExecutionModuleDescriptor> listExecutionModules();
-
-       /** Synchronously finds and executes an {@link ExecutionFlow}. */
-       public void execute(RealizedFlow realizedFlow);
-
-       // /** Notify of a status update status of the {@link ExecutionProcess} */
-//      public void dispatchUpdateStatus(ExecutionProcess process,
-//      String oldStatus, String newStatus);
-       //
-       // /** Notify that a step was added in an {@link ExecutionProcess} */
-       // public void dispatchAddSteps(ExecutionProcess process,
-       // List<ExecutionStep> steps);
-       //
-       // /**
-       // * Register a notifier which will be notified based on the provided
-       // * properties.
-       // */
-       // public void registerProcessNotifier(ExecutionProcessNotifier notifier,
-       // Map<String, String> properties);
-       //
-       // /** Unregisters a notifier */
-       // public void unregisterProcessNotifier(ExecutionProcessNotifier notifier,
-       // Map<String, String> properties);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionProcess.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionProcess.java
deleted file mode 100644 (file)
index 550c164..0000000
+++ /dev/null
@@ -1,67 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.util.List;
-
-/**
- * A process is the functional representation of a combination of executions.
- * While an execution is the actual java code running, a process exists before,
- * during and after the execution actually took place, providing an entry point
- * for the definition of executions, their monitoring (e.g. logging) and
- * tracking. A process can be distributed or parallelized. <br/>
- * NEW => INITIALIZED => SCHEDULED => RUNNING<br/>
- * RUNNING => {COMPLETED | ERROR | KILLED}<br/>
- * {COMPLETED | ERROR | KILLED} => PURGED<br/>
- * UNKOWN : this is a bug if this status occurs<br/>
- */
-public interface ExecutionProcess {
-       /** The process is not yet usable. */
-       public final static String NEW = "NEW";
-       /** The process is usable but not yet scheduled to run. */
-       public final static String INITIALIZED = "INITIALIZED";
-       /** The process is usable and scheduled to run, but not yet running. */
-       public final static String SCHEDULED = "SCHEDULED";
-       /** The process is currently running. */
-       public final static String RUNNING = "RUNNING";
-       /** The process has properly completed. */
-       public final static String COMPLETED = "COMPLETED";
-       /** The process failed because of an unexpected error. */
-       public final static String ERROR = "ERROR";
-       /** The process was killed explicitly or through a crash. */
-       public final static String KILLED = "KILLED";
-       /** The status cannot be retrieved (probably because of unexpected errors). */
-       public final static String UNKOWN = "UNKOWN";
-
-       /**
-        * Only a reference to the process has been kept, all monitoring data such
-        * as logs have been purged.
-        */
-       public final static String PURGED = "PURGED";
-
-       /** The UUID of this process. */
-       public String getUuid();
-
-       /** The current status of this process. */
-       public String getStatus();
-
-       /** Sets the current status of this process */
-       public void setStatus(String status);
-
-       public void addSteps(List<ExecutionStep> steps);
-
-       public List<RealizedFlow> getRealizedFlows();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpec.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpec.java
deleted file mode 100644 (file)
index 49d7c79..0000000
+++ /dev/null
@@ -1,44 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.util.Map;
-
-/**
- * The class implementing this interface defines the map of attributes that are
- * necessary for the corresponding ExecutionFlow.
- */
-public interface ExecutionSpec {
-       /**
-        * The name for an internal spec (for backward compatibility where a
-        * non-null name is expected)
-        */
-       public final static String INTERNAL_NAME = "__SLC_EXECUTION_SPEC_INTERNAL";
-
-       /**
-        * The name identifying the execution spec within its application context.
-        * Can be null. An execution spec can be referenced only if its name is not
-        * null or different from {@link #INTERNAL_NAME}
-        */
-       public String getName();
-
-       /** An optional description. Can be null. */
-       public String getDescription();
-
-       /** The attributes managed by this execution spec */
-       public Map<String, ExecutionSpecAttribute> getAttributes();
-
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java
deleted file mode 100644 (file)
index a430e5b..0000000
+++ /dev/null
@@ -1,68 +0,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.
- */
-package org.argeo.slc.execution;
-
-/**
- * Possible attribute of an execution flow.
- * 
- * There are mainly two implementations :<br>
- * + Primitive attributes (no predefined choice, the end user must compute a
- * String, a Float, an Integer...)<br>
- * + RefSpecAttribute which enable two things<br>
- * ++ a reference to another object of the application context<br>
- * ++ the display of some choices among which the end user can choose.<br>
- * 
- * @see org.argeo.slc.core.execution.PrimitiveSpecAttribute
- * @see org.argeo.slc.core.execution.RefSpecAttribute
- * @see org.argeo.slc.core.execution.PrimitiveUtils : this class offers some
- *      helper, among others to cast the various type of primitive attribute.
- */
-public interface ExecutionSpecAttribute {
-       /**
-        * Whether this attribute has to be set at instantiation of the flow and
-        * cannot be modified afterwards. If the attribute is not immutable (that
-        * is, this method returns false), it can be set at execution time.
-        */
-       public Boolean getIsImmutable();
-
-       /**
-        * Whether this attribute must be explicitly set and cannot be modified.
-        * This attribute is then basically a constant within a given application
-        * context. {@link #getValue()} cannot return null if the attribute is a
-        * constant.
-        */
-       public Boolean getIsConstant();
-
-       /** Whether this attribute will be hidden to end users. */
-       public Boolean getIsHidden();
-
-       /**
-        * The default value for this attribute. Can be null, except if
-        * {@link #getIsFrozen()} is <code>true</code>, in which case it represents
-        * the constant value of this attribute.
-        */
-       public Object getValue();
-
-       /** Description of this attribute, can be null */
-       public String getDescription();
-
-       /** @deprecated use {@link #getIsImmutable()} instead */
-       public Boolean getIsParameter();
-
-       /** @deprecated use {@link #getIsConstant()} instead */
-       public Boolean getIsFrozen();
-
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStack.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStack.java
deleted file mode 100644 (file)
index c4e88b9..0000000
+++ /dev/null
@@ -1,38 +0,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.
- */
-package org.argeo.slc.execution;
-
-/** Deal with nested level of executions using different vartiables. */
-public interface ExecutionStack {
-       /**
-        * @param name
-        * @return null if no object is found
-        */
-       public Object findScopedObject(String name);
-
-       public void addScopedObject(String name, Object obj);
-
-       public void enterFlow(ExecutionFlow executionFlow);
-
-       /** @return internal stack level UUID. */
-       public String getCurrentStackLevelUuid();
-
-       public Integer getStackSize();
-
-       public void leaveFlow(ExecutionFlow executionFlow);
-
-       Object findLocalVariable(String key);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStackLevel.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStackLevel.java
deleted file mode 100644 (file)
index 7729d59..0000000
+++ /dev/null
@@ -1,29 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.util.Map;
-
-public interface ExecutionStackLevel {
-       public ExecutionFlow getExecutionFlow();
-
-       public Map<String, Object> getScopedObjects();
-
-       public String getUuid();
-
-       public Map<String, Object> getLocalVariables();
-
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionStep.java
deleted file mode 100644 (file)
index 628a3b6..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*\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.execution;\r
-\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-\r
-/**\r
- * An atomic step to be notified in during an {@link ExecutionProcess}. Can be a\r
- * log or the start/end of a phase, etc.\r
- */\r
-public class ExecutionStep implements Serializable {\r
-       private static final long serialVersionUID = 798640526532912161L;\r
-\r
-       public final static String PHASE_START = "PHASE_START";\r
-       public final static String PHASE_END = "PHASE_END";\r
-       public final static String ERROR = "ERROR";\r
-       public final static String WARNING = "WARNING";\r
-       public final static String INFO = "INFO";\r
-       public final static String DEBUG = "DEBUG";\r
-       public final static String TRACE = "TRACE";\r
-\r
-       /** @deprecated */\r
-       public final static String START = "START";\r
-       /** @deprecated */\r
-       public final static String END = "END";\r
-\r
-       // TODO make the fields final and private when we don't need POJO support\r
-       // anymore (that\r
-       // is when SlcExecutionStep is removed)\r
-       protected String type;\r
-       protected String thread;\r
-       protected Date timestamp;\r
-       protected String log;\r
-\r
-       private String location;\r
-\r
-       /** Empty constructor */\r
-       public ExecutionStep() {\r
-               Thread currentThread = Thread.currentThread();\r
-               thread = currentThread.getName();\r
-       }\r
-\r
-       /** Creates a step at the current date */\r
-       public ExecutionStep(String location, String type, String log) {\r
-               this(location, new Date(), type, log);\r
-       }\r
-\r
-       /** Creates a step of the given type. */\r
-       public ExecutionStep(String location, Date timestamp, String type,\r
-                       String log) {\r
-               this(location, timestamp, type, log, Thread.currentThread().getName());\r
-       }\r
-\r
-       public ExecutionStep(String location, Date timestamp, String type,\r
-                       String log, String thread) {\r
-               this.location = location;\r
-               this.type = type;\r
-               this.timestamp = timestamp;\r
-               this.thread = thread;\r
-               this.log = addLog(log);\r
-       }\r
-\r
-       public String getType() {\r
-               return type;\r
-       }\r
-\r
-       public Date getTimestamp() {\r
-               return timestamp;\r
-       }\r
-\r
-       public String getThread() {\r
-               return thread;\r
-       }\r
-\r
-       /**\r
-        * Return the string that should be stored in the log field. Can be null if\r
-        * another mechanism is used to store log lines.\r
-        */\r
-       protected String addLog(String log) {\r
-               return log;\r
-       }\r
-\r
-       public String getLog() {\r
-               return log;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "Execution step, thread=" + thread + ", type=" + type;\r
-       }\r
-\r
-       /** Typically the logging category */\r
-       public String getLocation() {\r
-               return location;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/RealizedFlow.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/RealizedFlow.java
deleted file mode 100644 (file)
index bf6f3d3..0000000
+++ /dev/null
@@ -1,86 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.argeo.slc.BasicNameVersion;
-import org.argeo.slc.NameVersion;
-
-/** A fully configured execution flow, ready to be executed. */
-public class RealizedFlow implements Serializable {
-       private static final long serialVersionUID = 1L;
-
-       private String moduleName;
-       private String moduleVersion;
-       private ExecutionFlowDescriptor flowDescriptor;
-
-       public String getModuleName() {
-               return moduleName;
-       }
-
-       public void setModuleName(String moduleName) {
-               this.moduleName = moduleName;
-       }
-
-       public NameVersion getModuleNameVersion() {
-               return new BasicNameVersion(getModuleName(), getModuleVersion());
-       }
-
-       public String getModuleVersion() {
-               return moduleVersion;
-       }
-
-       public void setModuleVersion(String moduleVersion) {
-               this.moduleVersion = moduleVersion;
-       }
-
-       public ExecutionFlowDescriptor getFlowDescriptor() {
-               return flowDescriptor;
-       }
-
-       public void setFlowDescriptor(ExecutionFlowDescriptor flowDescriptor) {
-               this.flowDescriptor = flowDescriptor;
-       }
-
-       /** Create a simple realized flow */
-       public static RealizedFlow create(String module, String version,
-                       String flowName, Map<String, String> args) {
-               final RealizedFlow realizedFlow = new RealizedFlow();
-               realizedFlow.setModuleName(module);
-               // TODO deal with version
-               if (version == null)
-                       version = "0.0.0";
-               realizedFlow.setModuleVersion(version);
-               ExecutionFlowDescriptor efd = new ExecutionFlowDescriptor();
-               efd.setName(flowName);
-
-               // arguments
-               if (args != null && args.size() > 0) {
-                       Map<String, Object> values = new HashMap<String, Object>();
-                       for (String key : args.keySet()) {
-                               String value = args.get(key);
-                               values.put(key, value);
-                       }
-                       efd.setValues(values);
-               }
-
-               realizedFlow.setFlowDescriptor(efd);
-               return realizedFlow;
-       }
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/SlcAgent.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/SlcAgent.java
deleted file mode 100644 (file)
index c96d4a8..0000000
+++ /dev/null
@@ -1,66 +0,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.
- */
-package org.argeo.slc.execution;
-
-import java.net.URI;
-import java.util.List;
-
-/**
- * A local agent can run SLC processes. It is responsible for creating their
- * threads and integrating them with various UIs. It typically wraps
- * {@link ExecutionModulesManager} which is used to run flows synchronously at a
- * lower level.
- */
-public interface SlcAgent {
-       /** Agent unique identifier */
-       public String getAgentUuid();
-
-       /** Execute / take part to this process */
-       public void process(ExecutionProcess process);
-
-       /**
-        * Asynchronously processes the flows defined as URIs, or interpret a single
-        * UUID URN as a scheduled or template process.
-        * 
-        * @return the UUID of the process launched.
-        */
-       public String process(List<URI> uris);
-
-       /** Kills this process */
-       public void kill(String processUuid);
-
-       /**
-        * Wait for this process to finish. returns immediately if it does not
-        * exist.
-        * 
-        * @param millis
-        *            can be null
-        */
-       public void waitFor(String processUuid, Long millis);
-
-       /**
-        * Describe all the flows provided by this execution module. Typically
-        * called in order to build a realized flow.
-        */
-       public ExecutionModuleDescriptor getExecutionModuleDescriptor(
-                       String moduleName, String version);
-
-       /** List all execution modules which can be processed by this agent. */
-       public List<ExecutionModuleDescriptor> listExecutionModuleDescriptors();
-
-       /** @return true if still alive. */
-       public boolean ping();
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/SlcAgentCli.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/SlcAgentCli.java
deleted file mode 100644 (file)
index 497d110..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.argeo.slc.execution;
-
-/**
- * Interpret a command line and run it in the underlying agent, with the proper
- * authentication.
- */
-public interface SlcAgentCli {
-       /**
-        * Synchronously executes.
-        * 
-        * @return the UUID of the process
-        */
-       public String process(String[] args);
-}
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/package.html b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/package.html
deleted file mode 100644 (file)
index db808c8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>\r
-<head></head>\r
-<body>\r
-Common classes of teh SLC framework.\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/ExecutableTestRun.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/ExecutableTestRun.java
deleted file mode 100644 (file)
index a70b592..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*\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.test;\r
-\r
-\r
-/** A test run that can be executed */\r
-public interface ExecutableTestRun extends TestRun, Runnable {\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/IncompatibleTestDataException.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/IncompatibleTestDataException.java
deleted file mode 100644 (file)
index 4cc6ddd..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*\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.test;\r
-\r
-import org.argeo.slc.SlcException;\r
-\r
-/**\r
- * Exception to throw when a test definition cannot interpret the provided test\r
- * data.\r
- */\r
-public class IncompatibleTestDataException extends SlcException {\r
-       static final long serialVersionUID = 1l;\r
-\r
-       public IncompatibleTestDataException(TestData testData,\r
-                       TestDefinition testDefinition) {\r
-               super("TestData " + testData.getClass()\r
-                               + " is not compatible with TestDefinition "\r
-                               + testDefinition.getClass());\r
-       }\r
-\r
-       public IncompatibleTestDataException(TestRun testRun) {\r
-               super("TestData " + ((TestData) testRun.getTestData()).getClass()\r
-                               + " is not compatible with TestDefinition "\r
-                               + ((TestDefinition) testRun.getTestDefinition()).getClass());\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestData.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestData.java
deleted file mode 100644 (file)
index 1b3f466..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*\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.test;\r
-\r
-/**\r
- * Any data required by a test in order to run: configuration, expected,\r
- * reached, etc.\r
- */\r
-public interface TestData {\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestDataProvider.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestDataProvider.java
deleted file mode 100644 (file)
index 711c177..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*\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.test;\r
-\r
-public interface TestDataProvider {\r
-       public <T extends TestData> T getTestData(Class<T> clss, String key);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestDefinition.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestDefinition.java
deleted file mode 100644 (file)
index 5fea1dc..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*\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.test;\r
-\r
-/**\r
- * The programmatic definition of a test, which will be associated with\r
- * transient objects within a test run.\r
- */\r
-public interface TestDefinition extends TestStatus {\r
-       /** Performs the test. */\r
-       public void execute(TestRun testRun);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResult.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResult.java
deleted file mode 100644 (file)
index d3ef62b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*\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.test;\r
-\r
-import java.util.Date;\r
-import java.util.Map;\r
-\r
-/** The result of a test */\r
-public interface TestResult extends TestStatus, TestRunAware {\r
-       public String getUuid();\r
-\r
-       /** Adds a part of the result. */\r
-       public void addResultPart(TestResultPart part);\r
-\r
-       /**\r
-        * Marks that the collection of test results is completed and free the\r
-        * related resources (also closing listeners).\r
-        */\r
-       public void close();\r
-\r
-       /**\r
-        * The date when this test result was closed. Can be null, which means the\r
-        * result is not closed.\r
-        */\r
-       public Date getCloseDate();\r
-\r
-       /** Additional arbitrary meta data */\r
-       public Map<String, String> getAttributes();\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResultListener.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResultListener.java
deleted file mode 100644 (file)
index 788e1b8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*\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.test;\r
-\r
-/** Listener to the operations on a test result. */\r
-public interface TestResultListener<T extends TestResult> {\r
-       /** Notified when a part was added to a test result. */\r
-       public void resultPartAdded(T testResult, TestResultPart testResultPart);\r
-\r
-       /** Stops listening and release the related resources. */\r
-       public void close(T testResult);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResultPart.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestResultPart.java
deleted file mode 100644 (file)
index aeac4ad..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*\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.test;\r
-\r
-/**\r
- * Part of a test result.\r
- * \r
- * @see TestResult\r
- */\r
-public interface TestResultPart {\r
-       /** The status, as defined in {@link TestStatus}. */\r
-       public Integer getStatus();\r
-\r
-       /** The related message. */\r
-       public String getMessage();\r
-\r
-       /** The underlying <code>Exception</code>. Can be null. */\r
-       public String getExceptionMessage();\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRun.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRun.java
deleted file mode 100644 (file)
index 0935a55..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*\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.test;\r
-\r
-import org.argeo.slc.deploy.DeployedSystem;\r
-\r
-/** The actual run of a test */\r
-public interface TestRun {\r
-       /** Gets UUID */\r
-       public String getUuid();\r
-\r
-       /** Gets the related test definition. */\r
-       public <T extends TestDefinition> T getTestDefinition();\r
-\r
-       /** Gets the related test data */\r
-       public <T extends TestData> T getTestData();\r
-\r
-       /** Gets the related deployed system. */\r
-       public <T extends DeployedSystem> T getDeployedSystem();\r
-\r
-       /** Gets the related result where to record results. */\r
-       public <T extends TestResult> T getTestResult();\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRunAware.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRunAware.java
deleted file mode 100644 (file)
index 3330cc8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*\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.test;\r
-\r
-/** Allows a test run to notify other objects. */\r
-public interface TestRunAware {\r
-       /** Notifies the current test run. */\r
-       public void notifyTestRun(TestRun testRun);\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestStatus.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestStatus.java
deleted file mode 100644 (file)
index e7ebecf..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*\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.test;\r
-\r
-/**\r
- * Simple statuses. Ordering of the flags can be relied upon in aggregation: if\r
- * one element is failed, the aggregation is failed. Is one element is in ERROR,\r
- * the aggregation is in ERROR.\r
- * <p>\r
- * <ul>\r
- * <li>{@link #PASSED}: the test succeeded</li>\r
- * <li>{@link #FAILED}: the test could run, but did not reach the expected\r
- * result</li>\r
- * <li>{@link #ERROR}: an error during the test run prevented to get a\r
- * significant information on the tested system.</li>\r
- * </ul>\r
- * </p>\r
- */\r
-public interface TestStatus {\r
-       /** The flag for a passed test: 0 */\r
-       public final static Integer PASSED = 0;\r
-       /** The flag for a failed test: 1 */\r
-       public final static Integer FAILED = 1;\r
-       /**\r
-        * The flag for a test which could not properly run because of an error\r
-        * (there is no feedback on the behavior of the tested component): 2\r
-        */\r
-       public final static Integer ERROR = 2;\r
-       public final static String STATUSSTR_PASSED = "PASSED";\r
-       public final static String STATUSSTR_FAILED = "FAILED";\r
-       public final static String STATUSSTR_ERROR = "ERROR";\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/WritableTestRun.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/WritableTestRun.java
deleted file mode 100644 (file)
index e113950..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*\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.test;\r
-\r
-import org.argeo.slc.deploy.DeployedSystem;\r
-\r
-/** Test run whose various components can be externally set. */\r
-public interface WritableTestRun extends ExecutableTestRun {\r
-       public void setDeployedSystem(DeployedSystem deployedSystem);\r
-\r
-       public void setTestData(TestData testData);\r
-\r
-       public void setTestDefinition(TestDefinition testDefinition);\r
-\r
-       public void setTestResult(TestResult testResult);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/ContextAware.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/ContextAware.java
deleted file mode 100644 (file)
index cd9897e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*\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.test.context;\r
-\r
-import java.util.Map;\r
-\r
-/** Access to an SLC test context that is, maps of reached and expected values. */\r
-public interface ContextAware {\r
-       public final static String DEFAULT_SKIP_FLAG = "!";\r
-       public final static String DEFAULT_ANY_FLAG = "*";\r
-\r
-       /** Retrieves reached values. */\r
-       public Map<String, Object> getValues();\r
-\r
-       /** Set reached values. */\r
-       public void setValues(Map<String, Object> values);\r
-\r
-       /** Retrieves expected values. */\r
-       public Map<String, Object> getExpectedValues();\r
-\r
-       public String getContextSkipFlag();\r
-\r
-       public String getContextAnyFlag();\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/ParentContextAware.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/ParentContextAware.java
deleted file mode 100644 (file)
index 0da990d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*\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.test.context;\r
-\r
-import java.util.Collection;\r
-\r
-public interface ParentContextAware extends ContextAware {\r
-       public Collection<ContextAware> getChildContexts();\r
-\r
-       public void addChildContext(ContextAware contextAware);\r
-}\r
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/package.html b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/context/package.html
deleted file mode 100644 (file)
index cd08d63..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>\r
-<head></head>\r
-<body>\r
-Context variables to be passed between parts of tests.\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/package.html b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/package.html
deleted file mode 100644 (file)
index c70d2d1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>\r
-<head></head>\r
-<body>\r
-SLC Test: test of software systems.\r
-</body>\r
-</html>
\ No newline at end of file