Refactor Argeo API
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 11 Mar 2024 08:00:15 +0000 (09:00 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 11 Mar 2024 08:00:15 +0000 (09:00 +0100)
207 files changed:
Makefile
org.argeo.api.slc/.classpath [new file with mode: 0644]
org.argeo.api.slc/.gitignore [new file with mode: 0644]
org.argeo.api.slc/.project [new file with mode: 0644]
org.argeo.api.slc/META-INF/.gitignore [new file with mode: 0644]
org.argeo.api.slc/bnd.bnd [new file with mode: 0644]
org.argeo.api.slc/build.properties [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/BasicNameVersion.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/CategoryNameVersion.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/Condition.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/DefaultCategoryNameVersion.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/DefaultNameVersion.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/ManifestConstants.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/ModuleSet.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/NameVersion.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/SlcConstants.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/SlcException.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/SlcNames.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/SlcTypes.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/StreamReadable.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/UnsupportedException.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/WellKnownConstants.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/attachment/Attachment.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/attachment/AttachmentsEnabled.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/attachment/AttachmentsStorage.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/build/Distribution.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/build/License.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/build/ModularDistribution.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/build/package.html [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeployEnvironment.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeployedSystem.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeployedSystemManager.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/Deployment.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeploymentData.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/DynamicRuntime.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/InstalledExecutables.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/ModularDeployedSystem.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/Module.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/ModuleDescriptor.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/ModulesManager.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/TargetData.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/VersioningDriver.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/deploy/package.html [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/AbstractExecutionValue.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/AbstractSpecAttribute.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionContext.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlow.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlowDescriptor.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlowDescriptorConverter.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModule.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModuleDescriptor.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModulesListener.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModulesManager.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionProcess.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionResources.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpec.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpecAttribute.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionStack.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionStackLevel.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionStep.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/FlowConfigurationException.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/RealizedFlow.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/RefSpecAttribute.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/RefValue.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/RefValueChoice.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/SlcAgent.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/execution/SlcAgentCli.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/package.html [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveAccessor.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveSpecAttribute.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveUtils.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveValue.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/ExecutableTestRun.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/IncompatibleTestDataException.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestData.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestDataProvider.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestDefinition.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestResult.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestResultListener.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestResultPart.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestRun.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestRunAware.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/TestStatus.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/WritableTestRun.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/context/ContextAware.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/context/ParentContextAware.java [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/context/package.html [new file with mode: 0644]
org.argeo.api.slc/src/org/argeo/api/slc/test/package.html [new file with mode: 0644]
org.argeo.slc.api/.classpath [deleted file]
org.argeo.slc.api/.gitignore [deleted file]
org.argeo.slc.api/.project [deleted file]
org.argeo.slc.api/META-INF/.gitignore [deleted file]
org.argeo.slc.api/bnd.bnd [deleted file]
org.argeo.slc.api/build.properties [deleted file]
org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/CategoryNameVersion.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/Condition.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/DefaultCategoryNameVersion.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/ManifestConstants.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/ModuleSet.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/NameVersion.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/SlcConstants.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/SlcException.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/SlcNames.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/SlcTypes.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/WellKnownConstants.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/attachment/Attachment.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsEnabled.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsStorage.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/build/License.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/build/package.html [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/deploy/package.html [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/AbstractExecutionValue.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/AbstractSpecAttribute.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionResources.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/FlowConfigurationException.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/RefSpecAttribute.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/RefValue.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/RefValueChoice.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgentCli.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/package.html [deleted file]
org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveAccessor.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveSpecAttribute.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveUtils.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveValue.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestData.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/context/package.html [deleted file]
org.argeo.slc.api/src/org/argeo/slc/test/package.html [deleted file]
org.argeo.slc.runtime/bnd.bnd
org.argeo.slc.runtime/src/org/argeo/slc/cms/deploy/CmsDeployedSystem.java
org.argeo.slc.runtime/src/org/argeo/slc/cms/deploy/CmsDeploymentData.java
org.argeo.slc.runtime/src/org/argeo/slc/cms/deploy/CmsTargetData.java
org.argeo.slc.runtime/src/org/argeo/slc/cms/deploy/osgi/OsgiCmsDeployedSystem.java
org.argeo.slc.runtime/src/org/argeo/slc/cms/deploy/osgi/OsgiCmsDeployment.java
org.argeo.slc.runtime/src/org/argeo/slc/cms/distribution/A2Distribution.java
org.argeo.slc.runtime/src/org/argeo/slc/cms/distribution/A2ModuleDistribution.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/AbstractExecutionModulesManager.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultAgent.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultAgentCli.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionFlow.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionSpec.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionStack.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultProcess.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/ExecutionThread.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/InstantiationManager.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThread.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThreadGroup.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/CloseTestResult.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/Echo.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/If.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/JvmProcess.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCall.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestData.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestDefinition.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/ContextUtils.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleResultPart.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestResult.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestRun.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SlcTestUtils.java
org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/TestDataUtils.java

index d400f9449122d4e384d54483562c209835381e08..562eba3bef7bb15f8a7fea4e44453fdb345bd536 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ uninstall: osgi-uninstall
 A2_CATEGORY = org.argeo.slc
 
 BUNDLES = \
-org.argeo.slc.api \
+org.argeo.api.slc \
 org.argeo.slc.runtime \
 org.argeo.slc.cms \
 org.argeo.rt.cms \
diff --git a/org.argeo.api.slc/.classpath b/org.argeo.api.slc/.classpath
new file mode 100644 (file)
index 0000000..d499d30
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.argeo.api.slc/.gitignore b/org.argeo.api.slc/.gitignore
new file mode 100644 (file)
index 0000000..b83d222
--- /dev/null
@@ -0,0 +1 @@
+/target/
diff --git a/org.argeo.api.slc/.project b/org.argeo.api.slc/.project
new file mode 100644 (file)
index 0000000..e8b4199
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.api.slc</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.argeo.api.slc/META-INF/.gitignore b/org.argeo.api.slc/META-INF/.gitignore
new file mode 100644 (file)
index 0000000..4854a41
--- /dev/null
@@ -0,0 +1 @@
+/MANIFEST.MF
diff --git a/org.argeo.api.slc/bnd.bnd b/org.argeo.api.slc/bnd.bnd
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/org.argeo.api.slc/build.properties b/org.argeo.api.slc/build.properties
new file mode 100644 (file)
index 0000000..07891d9
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,.\r
+source..=src/\r
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/BasicNameVersion.java b/org.argeo.api.slc/src/org/argeo/api/slc/BasicNameVersion.java
new file mode 100644 (file)
index 0000000..47bd2d4
--- /dev/null
@@ -0,0 +1,33 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/CategoryNameVersion.java b/org.argeo.api.slc/src/org/argeo/api/slc/CategoryNameVersion.java
new file mode 100644 (file)
index 0000000..afb8121
--- /dev/null
@@ -0,0 +1,25 @@
+package org.argeo.api.slc;
+
+/**
+ * Adds a dimension to {@link NameVersion} by adding an arbitrary category (e.g.
+ * Maven groupId, yum repository ID, etc.)
+ */
+public interface CategoryNameVersion extends NameVersion {
+       /** The category of the component. */
+       String getCategory();
+
+       static CategoryNameVersion parseCategoryNameVersion(String str) {
+               if (str == null || "".equals(str.trim()))
+                       throw new IllegalArgumentException("At least one character required.");
+               String[] arr = str.trim().split(":");
+               if (arr.length > 3)
+                       throw new IllegalArgumentException(str + " does not respect the [category]:[name]:[version] pattern");
+               DefaultCategoryNameVersion res = new DefaultCategoryNameVersion();
+               res.setCategory(arr[0]);
+               if (arr.length > 1)
+                       res.setName(arr[1]);
+               if (arr.length > 2)
+                       res.setVersion(arr[2]);
+               return res;
+       }
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/Condition.java b/org.argeo.api.slc/src/org/argeo/api/slc/Condition.java
new file mode 100644 (file)
index 0000000..f028b58
--- /dev/null
@@ -0,0 +1,11 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/DefaultCategoryNameVersion.java b/org.argeo.api.slc/src/org/argeo/api/slc/DefaultCategoryNameVersion.java
new file mode 100644 (file)
index 0000000..1303e43
--- /dev/null
@@ -0,0 +1,34 @@
+package org.argeo.api.slc;
+
+/** Canonical implementation of {@link CategoryNameVersion} */
+public class DefaultCategoryNameVersion extends DefaultNameVersion implements CategoryNameVersion {
+       private String category;
+
+       public DefaultCategoryNameVersion() {
+       }
+
+       public DefaultCategoryNameVersion(String category, String name, String version) {
+               super(name, version);
+               this.category = category;
+       }
+
+       public DefaultCategoryNameVersion(String category, NameVersion nameVersion) {
+               super(nameVersion);
+               this.category = category;
+       }
+
+       @Override
+       public String getCategory() {
+               return category;
+       }
+
+       public void setCategory(String category) {
+               this.category = category;
+       }
+
+       @Override
+       public String toString() {
+               return category + ":" + super.toString();
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/DefaultNameVersion.java b/org.argeo.api.slc/src/org/argeo/api/slc/DefaultNameVersion.java
new file mode 100644 (file)
index 0000000..7ae25cb
--- /dev/null
@@ -0,0 +1,77 @@
+package org.argeo.api.slc;
+
+
+/** Canonical implementation of {@link NameVersion} */
+public class DefaultNameVersion implements NameVersion,
+               Comparable<NameVersion> {
+       private String name;
+       private String version;
+
+       public DefaultNameVersion() {
+       }
+
+       /** Interprets string in OSGi-like format my.module.name;version=0.0.0 */
+       public DefaultNameVersion(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 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();
+       }
+
+       @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.api.slc/src/org/argeo/api/slc/ManifestConstants.java b/org.argeo.api.slc/src/org/argeo/api/slc/ManifestConstants.java
new file mode 100644 (file)
index 0000000..8aa7815
--- /dev/null
@@ -0,0 +1,32 @@
+package org.argeo.api.slc;
+
+public enum ManifestConstants {
+       // OSGi
+       BUNDLE_SYMBOLICNAME("Bundle-SymbolicName"), //
+       BUNDLE_VERSION("Bundle-Version"), //
+       BUNDLE_LICENSE("Bundle-License"), //
+       EXPORT_PACKAGE("Export-Package"), //
+       IMPORT_PACKAGE("Import-Package"), //
+       // JAVA
+       AUTOMATIC_MODULE_NAME("Automatic-Module-Name"), //
+       // SLC
+       SLC_CATEGORY("SLC-Category"), //
+       SLC_ORIGIN_M2("SLC-Origin-M2"), //
+       SLC_ORIGIN_M2_MERGE("SLC-Origin-M2-Merge"), //
+       SLC_ORIGIN_M2_REPO("SLC-Origin-M2-Repo"), //
+       SLC_ORIGIN_MANIFEST_NOT_MODIFIED("SLC-Origin-ManifestNotModified"), //
+       SLC_ORIGIN_URI("SLC-Origin-URI"),//
+       ;
+
+       final String value;
+
+       private ManifestConstants(String value) {
+               this.value = value;
+       }
+
+       @Override
+       public String toString() {
+               return value;
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/ModuleSet.java b/org.argeo.api.slc/src/org/argeo/api/slc/ModuleSet.java
new file mode 100644 (file)
index 0000000..1a544df
--- /dev/null
@@ -0,0 +1,8 @@
+package org.argeo.api.slc;
+
+import java.util.Iterator;
+
+/** A set of {@link NameVersion}. */
+public interface ModuleSet {
+       Iterator<? extends NameVersion> nameVersions();
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/NameVersion.java b/org.argeo.api.slc/src/org/argeo/api/slc/NameVersion.java
new file mode 100644 (file)
index 0000000..0101d59
--- /dev/null
@@ -0,0 +1,24 @@
+package org.argeo.api.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. */
+       String getName();
+
+       /** The version of the component. */
+       String getVersion();
+
+       /**
+        * The forward compatible branch of this version, by default it is
+        * [major].[minor].
+        */
+       default String getBranch() {
+               String[] parts = getVersion().split("\\.");
+               if (parts.length < 2)
+                       throw new IllegalStateException("Version " + getVersion() + " cannot be interpreted as branch.");
+               return parts[0] + "." + parts[1];
+       }
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/SlcConstants.java b/org.argeo.api.slc/src/org/argeo/api/slc/SlcConstants.java
new file mode 100644 (file)
index 0000000..d20a5e7
--- /dev/null
@@ -0,0 +1,10 @@
+package org.argeo.api.slc;
+
+/** Constants useful across all SLC components */
+public interface SlcConstants {
+       /** Read-write role. */
+       public final static String ROLE_SLC = "cn=org.argeo.slc.user,ou=roles,ou=node";
+
+       /** Read only unlogged user */
+       public final static String USER_ANONYMOUS = "anonymous";
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/SlcException.java b/org.argeo.api.slc/src/org/argeo/api/slc/SlcException.java
new file mode 100644 (file)
index 0000000..8ced2ac
--- /dev/null
@@ -0,0 +1,17 @@
+package org.argeo.api.slc;
+
+/** Basis for all SLC exceptions. This is an unchecked exception. */
+public class SlcException extends RuntimeException {
+       private static final long serialVersionUID = 6373738619304106445L;
+
+       /** Constructor. */
+       public SlcException(String message) {
+               super(message);
+       }
+
+       /** Constructor. */
+       public SlcException(String message, Throwable e) {
+               super(message, e);
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/SlcNames.java b/org.argeo.api.slc/src/org/argeo/api/slc/SlcNames.java
new file mode 100644 (file)
index 0000000..4ece053
--- /dev/null
@@ -0,0 +1,113 @@
+package org.argeo.api.slc;
+
+/** JCR names used by SLC */
+public interface SlcNames {
+       public final static String SLC_ = "slc:";
+
+       /*
+        * GENERAL
+        */
+       public final static String SLC_UUID = "slc:uuid";
+       public final static String SLC_STATUS = "slc:status";
+       // generic name for result parts of a given test result (slc:testResult)
+       // note that corresponding nodes can be retrieved using
+       // myTestResultNode.getNodes(SLC_RESULT_PART+"*") method
+       public final static String SLC_RESULT_PART = "slc:resultPart";
+       // Fixed name of the child node of a slc:testResult of type
+       // slc:check that aggregate status of all result parts of a given test
+       // result
+       public final static String SLC_AGGREGATED_STATUS = "slc:aggregatedStatus";
+
+       public final static String SLC_TYPE = "slc:type";
+       public final static String SLC_NAME = "slc:name";
+       public final static String SLC_VERSION = "slc:version";
+       public final static String SLC_CATEGORY = "slc:category";
+       public final static String SLC_VALUE = "slc:value";
+       public final static String SLC_ADDRESS = "slc:address";
+       public final static String SLC_METADATA = "slc:metadata";
+
+       public final static String SLC_TIMESTAMP = "slc:timestamp";
+       public final static String SLC_STARTED = "slc:started";
+       public final static String SLC_COMPLETED = "slc:completed";
+
+       public final static String SLC_VM = "slc:vm";
+       /*
+        * SLC RUNTIME
+        */
+       // execution
+       public final static String SLC_SPEC = "slc:spec";
+       public final static String SLC_EXECUTION_SPECS = "slc:executionSpecs";
+       public final static String SLC_FLOW = "slc:flow";
+       public final static String SLC_LOG = "slc:log";
+       public final static String SLC_AGENTS = "slc:agents";
+
+       // spec attribute
+       public final static String SLC_IS_IMMUTABLE = "slc:isImmutable";
+       public final static String SLC_IS_CONSTANT = "slc:isConstant";
+       public final static String SLC_IS_HIDDEN = "slc:isHidden";
+
+       // base directories
+       public final static String SLC_SYSTEM = "slc:system";
+       public final static String SLC_RESULTS = "slc:results";
+       public final static String SLC_MY_RESULTS = "slc:myResults";
+       public final static String SLC_PROCESSES = "slc:processes";
+
+       // result
+       public final static String SLC_SUCCESS = "slc:success";
+       public final static String SLC_MESSAGE = "slc:message";
+       public final static String SLC_TAG = "slc:tag";
+       public final static String SLC_ERROR_MESSAGE = "slc:errorMessage";
+       public final static String SLC_TEST_CASE = "slc:testCase";
+       public final static String SLC_TEST_CASE_TYPE = "slc:testCaseType";
+
+       // diff result
+       public final static String SLC_SUMMARY = "slc:summary";
+       public final static String SLC_ISSUES = "slc:issues";
+
+       /*
+        * SLC REPO
+        */
+       // shared
+       public final static String SLC_URL = "slc:url";
+       public final static String SLC_OPTIONAL = "slc:optional";
+       public final static String SLC_AS_STRING = "slc:asString";
+
+       // origin
+       public final static String SLC_ORIGIN = "slc:origin";
+       public final static String SLC_PROXY = "slc:proxy";
+
+       // slc:artifact
+       public final static String SLC_ARTIFACT_ID = "slc:artifactId";
+       public final static String SLC_GROUP_ID = "slc:groupId";
+       public final static String SLC_GROUP_BASE_ID = "slc:groupBaseId";
+       public final static String SLC_ARTIFACT_VERSION = "slc:artifactVersion";
+       public final static String SLC_ARTIFACT_EXTENSION = "slc:artifactExtension";
+       public final static String SLC_ARTIFACT_CLASSIFIER = "slc:artifactClassifier";
+
+       // slc:jarArtifact
+       public final static String SLC_MANIFEST = "slc:manifest";
+
+       // shared OSGi
+       public final static String SLC_SYMBOLIC_NAME = "slc:symbolic-name";
+       public final static String SLC_BUNDLE_VERSION = "slc:bundle-version";
+
+       // slc:osgiBaseVersion
+       public final static String SLC_MAJOR = "slc:major";
+       public final static String SLC_MINOR = "slc:minor";
+       public final static String SLC_MICRO = "slc:micro";
+       // slc:osgiVersion
+       public final static String SLC_QUALIFIER = "slc:qualifier";
+
+       // slc:exportedPackage
+       public final static String SLC_USES = "slc:uses";
+
+       // slc:modularDistribution
+       public final static String SLC_MODULES = "slc:modules";
+
+       // RPM
+       // slc:rpm
+       public final static String SLC_RPM_VERSION = "slc:rpmVersion";
+       public final static String SLC_RPM_RELEASE = "slc:rpmRelease";
+       public final static String SLC_RPM_ARCH = "slc:rpmArch";
+       public final static String SLC_RPM_ARCHIVE_SIZE = "slc:rpmArchiveSize";
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/SlcTypes.java b/org.argeo.api.slc/src/org/argeo/api/slc/SlcTypes.java
new file mode 100644 (file)
index 0000000..effd3f3
--- /dev/null
@@ -0,0 +1,68 @@
+package org.argeo.api.slc;
+
+/** JCR node types used by SLC */
+public interface SlcTypes {
+
+       public final static String SLC_NAME_VERSION = "slc:nameVersion";
+       public final static String SLC_CATEGORIZED_NAME_VERSION = "slc:categorizedNameVersion";
+
+       public final static String SLC_AGENT_FACTORY = "slc:agentFactory";
+       public final static String SLC_AGENT = "slc:agent";
+       public final static String SLC_MODULE = "slc:module";
+       public final static String SLC_EXECUTION_MODULE = "slc:executionModule";
+       public final static String SLC_EXECUTION_SPEC = "slc:executionSpec";
+       public final static String SLC_EXECUTION_FLOW = "slc:executionFlow";
+       public final static String SLC_PROCESS = "slc:process";
+       public final static String SLC_REALIZED_FLOW = "slc:realizedFlow";
+
+       public final static String SLC_EXECUTION_SPEC_ATTRIBUTE = "slc:executionSpecAttribute";
+       public final static String SLC_PRIMITIVE_SPEC_ATTRIBUTE = "slc:primitiveSpecAttribute";
+       public final static String SLC_REF_SPEC_ATTRIBUTE = "slc:refSpecAttribute";
+
+       public final static String SLC_TEST_RESULT = "slc:testResult";
+       public final static String SLC_CHECK = "slc:check";
+       public final static String SLC_PROPERTY = "slc:property";
+       public final static String SLC_DIFF_RESULT = "slc:diffResult";
+
+       // Node types used for user defined and managed result UI tree
+       public final static String SLC_MY_RESULT_ROOT_FOLDER = "slc:myResultRootFolder";
+       public final static String SLC_RESULT_FOLDER = "slc:resultFolder";
+
+       // Log levels
+       public final static String SLC_LOG_ENTRY = "slc:logEntry";
+       public final static String SLC_LOG_TRACE = "slc:logTrace";
+       public final static String SLC_LOG_DEBUG = "slc:logDebug";
+       public final static String SLC_LOG_INFO = "slc:logInfo";
+       public final static String SLC_LOG_WARNING = "slc:logWarning";
+       public final static String SLC_LOG_ERROR = "slc:logError";
+
+       /*
+        * REPO
+        */
+       public final static String SLC_ARTIFACT = "slc:artifact";
+       public final static String SLC_ARTIFACT_VERSION_BASE = "slc:artifactVersion";
+       public final static String SLC_ARTIFACT_BASE = "slc:artifactBase";
+       public final static String SLC_GROUP_BASE = "slc:groupBase";
+       public final static String SLC_JAR_FILE = "slc:jarFile";
+       public final static String SLC_BUNDLE_ARTIFACT = "slc:bundleArtifact";
+       public final static String SLC_OSGI_VERSION = "slc:osgiVersion";
+       public final static String SLC_JAVA_PACKAGE = "slc:javaPackage";
+       public final static String SLC_EXPORTED_PACKAGE = "slc:exportedPackage";
+       public final static String SLC_IMPORTED_PACKAGE = "slc:importedPackage";
+       public final static String SLC_DYNAMIC_IMPORTED_PACKAGE = "slc:dynamicImportedPackage";
+       public final static String SLC_REQUIRED_BUNDLE = "slc:requiredBundle";
+       public final static String SLC_FRAGMENT_HOST = "slc:fragmentHost";
+
+       // Distribution management
+       // public final static String SLC_CATEGORY = "slc:category";
+       public final static String SLC_MODULAR_DISTRIBUTION_BASE = "slc:modularDistributionBase";
+       public final static String SLC_MODULAR_DISTRIBUTION = "slc:modularDistribution";
+       public final static String SLC_MODULE_COORDINATES = "slc:moduleCoordinates";
+
+       // origin
+       public final static String SLC_KNOWN_ORIGIN = "slc:knownOrigin";
+       public final static String SLC_PROXIED = "slc:proxied";
+
+       // rpm
+       public final static String SLC_RPM = "slc:rpm";
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/StreamReadable.java b/org.argeo.api.slc/src/org/argeo/api/slc/StreamReadable.java
new file mode 100644 (file)
index 0000000..fdda17e
--- /dev/null
@@ -0,0 +1,7 @@
+package org.argeo.api.slc;
+
+import java.io.InputStream;
+
+public interface StreamReadable {
+       public InputStream getInputStream();
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/UnsupportedException.java b/org.argeo.api.slc/src/org/argeo/api/slc/UnsupportedException.java
new file mode 100644 (file)
index 0000000..3a7c766
--- /dev/null
@@ -0,0 +1,54 @@
+package org.argeo.api.slc;
+
+/** Exception for unsupported features or actions. */
+public class UnsupportedException extends SlcException {
+       static final long serialVersionUID = 1l;
+
+       /** Action not supported. */
+       public UnsupportedException() {
+               this("Action not supported");
+       }
+
+       /** Constructor with a message. */
+       public UnsupportedException(String message) {
+               super(message);
+       }
+
+       /**
+        * Constructor generating a message.
+        * 
+        * @param nature
+        *            the nature of the unsupported object
+        * @param obj
+        *            the object itself (its class name will be used in message)
+        */
+       public UnsupportedException(String nature, Object obj) {
+               super("Unsupported " + nature + ": "
+                               + (obj != null ? obj.getClass() : "[object is null]"));
+       }
+
+       /**
+        * Constructor generating a message.
+        * 
+        * @param nature
+        *            the nature of the unsupported object
+        * @param clss
+        *            the class itself (will be used in message)
+        */
+       public UnsupportedException(String nature, Class<?> clss) {
+               super("Unsupported " + nature + ": " + clss);
+       }
+
+       /**
+        * Constructor generating a message.
+        * 
+        * @param nature
+        *            the nature of the unsupported object
+        * @param value
+        *            the problematic value itself
+        */
+       public UnsupportedException(String nature, String value) {
+               super("Unsupported " + nature + ": " + value);
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/WellKnownConstants.java b/org.argeo.api.slc/src/org/argeo/api/slc/WellKnownConstants.java
new file mode 100644 (file)
index 0000000..034c16d
--- /dev/null
@@ -0,0 +1,17 @@
+package org.argeo.api.slc;
+
+/**
+ * Centralises constant values related to software systems, which are well
+ * defined and not expected to change within a major version cycle of SLC, but
+ * which are not necessarily defined in core Java.
+ */
+public interface WellKnownConstants {
+
+       /*
+        * OSGi
+        */
+       final static String OSGI_INSTANCE_AREA = "osgi.instance.area";
+       final static String OSGI_CONFIGURATION_AREA = "osgi.configuration.area";
+
+//     final static String OSGI_HTTP_PORT = "org.osgi.service.http.port";
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/attachment/Attachment.java b/org.argeo.api.slc/src/org/argeo/api/slc/attachment/Attachment.java
new file mode 100644 (file)
index 0000000..1a61bc6
--- /dev/null
@@ -0,0 +1,11 @@
+package org.argeo.api.slc.attachment;
+
+public interface Attachment {
+       public String getUuid();
+
+       public void setUuid(String uuid);
+
+       public String getName();
+
+       public String getContentType();
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/attachment/AttachmentsEnabled.java b/org.argeo.api.slc/src/org/argeo/api/slc/attachment/AttachmentsEnabled.java
new file mode 100644 (file)
index 0000000..45478a2
--- /dev/null
@@ -0,0 +1,5 @@
+package org.argeo.api.slc.attachment;
+
+public interface AttachmentsEnabled {
+       public void addAttachment(Attachment attachment);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/attachment/AttachmentsStorage.java b/org.argeo.api.slc/src/org/argeo/api/slc/attachment/AttachmentsStorage.java
new file mode 100644 (file)
index 0000000..735a44d
--- /dev/null
@@ -0,0 +1,12 @@
+package org.argeo.api.slc.attachment;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public interface AttachmentsStorage {
+       public void retrieveAttachment(Attachment attachment,
+                       OutputStream outputStream);
+
+       /** Does NOT close the provided input stream. */
+       public void storeAttachment(Attachment attachment, InputStream inputStream);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/build/Distribution.java b/org.argeo.api.slc/src/org/argeo/api/slc/build/Distribution.java
new file mode 100644 (file)
index 0000000..b6e9f39
--- /dev/null
@@ -0,0 +1,7 @@
+package org.argeo.api.slc.build;\r
+\r
+/** A packaged software component */\r
+public interface Distribution {\r
+       public String getDistributionId();\r
+\r
+}\r
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/build/License.java b/org.argeo.api.slc/src/org/argeo/api/slc/build/License.java
new file mode 100644 (file)
index 0000000..4bbb8ec
--- /dev/null
@@ -0,0 +1,12 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/build/ModularDistribution.java b/org.argeo.api.slc/src/org/argeo/api/slc/build/ModularDistribution.java
new file mode 100644 (file)
index 0000000..73f194a
--- /dev/null
@@ -0,0 +1,19 @@
+package org.argeo.api.slc.build;
+
+import org.argeo.api.slc.ModuleSet;
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/build/package.html b/org.argeo.api.slc/src/org/argeo/api/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.api.slc/src/org/argeo/api/slc/deploy/DeployEnvironment.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeployEnvironment.java
new file mode 100644 (file)
index 0000000..2f40f3d
--- /dev/null
@@ -0,0 +1,9 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/DeployedSystem.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeployedSystem.java
new file mode 100644 (file)
index 0000000..7c264cc
--- /dev/null
@@ -0,0 +1,18 @@
+package org.argeo.api.slc.deploy;\r
+\r
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/DeployedSystemManager.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeployedSystemManager.java
new file mode 100644 (file)
index 0000000..a142ae5
--- /dev/null
@@ -0,0 +1,5 @@
+package org.argeo.api.slc.deploy;
+
+public interface DeployedSystemManager<T extends DeployedSystem> {
+       public void setDeployedSystem(T deployedSystem);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/deploy/Deployment.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/Deployment.java
new file mode 100644 (file)
index 0000000..8efca64
--- /dev/null
@@ -0,0 +1,13 @@
+package org.argeo.api.slc.deploy;\r
+\r
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/DeploymentData.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/DeploymentData.java
new file mode 100644 (file)
index 0000000..9fcaf76
--- /dev/null
@@ -0,0 +1,5 @@
+package org.argeo.api.slc.deploy;\r
+\r
+public interface DeploymentData {\r
+\r
+}\r
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/deploy/DynamicRuntime.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/DynamicRuntime.java
new file mode 100644 (file)
index 0000000..5e5adc1
--- /dev/null
@@ -0,0 +1,18 @@
+package org.argeo.api.slc.deploy;
+
+import org.argeo.api.slc.NameVersion;
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/InstalledExecutables.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/InstalledExecutables.java
new file mode 100644 (file)
index 0000000..bf416b9
--- /dev/null
@@ -0,0 +1,5 @@
+package org.argeo.api.slc.deploy;
+
+public interface InstalledExecutables extends DeployedSystem {
+       public String getExecutablePath(String key);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/deploy/ModularDeployedSystem.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/ModularDeployedSystem.java
new file mode 100644 (file)
index 0000000..7bca5af
--- /dev/null
@@ -0,0 +1,8 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/Module.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/Module.java
new file mode 100644 (file)
index 0000000..0be609c
--- /dev/null
@@ -0,0 +1,12 @@
+package org.argeo.api.slc.deploy;
+
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/ModuleDescriptor.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/ModuleDescriptor.java
new file mode 100644 (file)
index 0000000..74e0c09
--- /dev/null
@@ -0,0 +1,59 @@
+package org.argeo.api.slc.deploy;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.argeo.api.slc.DefaultNameVersion;
+
+/** The description of a versioned module. */
+public class ModuleDescriptor extends DefaultNameVersion 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.api.slc/src/org/argeo/api/slc/deploy/ModulesManager.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/ModulesManager.java
new file mode 100644 (file)
index 0000000..5654acb
--- /dev/null
@@ -0,0 +1,26 @@
+package org.argeo.api.slc.deploy;
+
+import java.util.List;
+
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/TargetData.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/TargetData.java
new file mode 100644 (file)
index 0000000..7ae0243
--- /dev/null
@@ -0,0 +1,5 @@
+package org.argeo.api.slc.deploy;\r
+\r
+public interface TargetData {\r
+\r
+}\r
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/deploy/VersioningDriver.java b/org.argeo.api.slc/src/org/argeo/api/slc/deploy/VersioningDriver.java
new file mode 100644 (file)
index 0000000..42ed9f0
--- /dev/null
@@ -0,0 +1,33 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/deploy/package.html b/org.argeo.api.slc/src/org/argeo/api/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.api.slc/src/org/argeo/api/slc/execution/AbstractExecutionValue.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/AbstractExecutionValue.java
new file mode 100644 (file)
index 0000000..c16ca37
--- /dev/null
@@ -0,0 +1,8 @@
+package org.argeo.api.slc.execution;
+
+import java.io.Serializable;
+
+/** Value to be used by an execution */
+public abstract class AbstractExecutionValue implements Serializable {
+       private static final long serialVersionUID = 1558444746120706961L;
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/AbstractSpecAttribute.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/AbstractSpecAttribute.java
new file mode 100644 (file)
index 0000000..c48baa3
--- /dev/null
@@ -0,0 +1,73 @@
+package org.argeo.api.slc.execution;
+
+import java.io.Serializable;
+
+/** Canonical implementation of the execution spec attribute booleans. */
+public abstract class AbstractSpecAttribute implements ExecutionSpecAttribute,
+               Serializable {
+       private static final long serialVersionUID = 6494963738891709440L;
+       private Boolean isImmutable = false;
+       private Boolean isConstant = false;
+       private Boolean isHidden = false;
+
+       private String description;
+
+       /** Has to be set at instantiation */
+       public Boolean getIsImmutable() {
+               return isImmutable;
+       }
+
+       public void setIsImmutable(Boolean isImmutable) {
+               this.isImmutable = isImmutable;
+       }
+
+       /** Cannot be overridden at runtime */
+       public Boolean getIsConstant() {
+               return isConstant;
+       }
+
+       public void setIsConstant(Boolean isConstant) {
+               this.isConstant = isConstant;
+       }
+
+       /** Should not be shown to the end user */
+       public Boolean getIsHidden() {
+               return isHidden;
+       }
+
+       public void setIsHidden(Boolean isHidden) {
+               this.isHidden = isHidden;
+       }
+
+       /*
+        * DEPRECATED
+        */
+       /** @deprecated use {@link #getIsImmutable()} instead */
+       public Boolean getIsParameter() {
+               return isImmutable;
+       }
+
+       /** @deprecated use {@link #getIsConstant()} instead */
+       public Boolean getIsFrozen() {
+               return isConstant;
+       }
+
+       /** @deprecated use {@link #setIsImmutable(Boolean)} instead */
+       public void setIsParameter(Boolean isParameter) {
+               this.isImmutable = isParameter;
+       }
+
+       /** @deprecated use {@link #setIsConstant(Boolean)} instead */
+       public void setIsFrozen(Boolean isFrozen) {
+               this.isConstant = isFrozen;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionContext.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionContext.java
new file mode 100644 (file)
index 0000000..201f6e2
--- /dev/null
@@ -0,0 +1,20 @@
+package org.argeo.api.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
+       public void beforeFlow(ExecutionFlow executionFlow);\r
+       \r
+       public void afterFlow(ExecutionFlow executionFlow);\r
+}\r
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlow.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlow.java
new file mode 100644 (file)
index 0000000..c3de07b
--- /dev/null
@@ -0,0 +1,33 @@
+package org.argeo.api.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
+        * exception otherwise.
+        */
+       public Runnable getRunnable();
+
+       /**
+        * The name of this execution flow. Can contains '/' which will be
+        * interpreted by UIs as a hierarchy;
+        */
+       public String getName();
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlowDescriptor.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlowDescriptor.java
new file mode 100644 (file)
index 0000000..9c31f40
--- /dev/null
@@ -0,0 +1,119 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionFlowDescriptorConverter.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionFlowDescriptorConverter.java
new file mode 100644 (file)
index 0000000..dfedc84
--- /dev/null
@@ -0,0 +1,18 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionModule.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModule.java
new file mode 100644 (file)
index 0000000..8f8c8fd
--- /dev/null
@@ -0,0 +1,12 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionModuleDescriptor.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModuleDescriptor.java
new file mode 100644 (file)
index 0000000..bc6a3dd
--- /dev/null
@@ -0,0 +1,64 @@
+package org.argeo.api.slc.execution;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionModulesListener.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModulesListener.java
new file mode 100644 (file)
index 0000000..d2ff928
--- /dev/null
@@ -0,0 +1,16 @@
+package org.argeo.api.slc.execution;
+
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionModulesManager.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionModulesManager.java
new file mode 100644 (file)
index 0000000..42b8e4d
--- /dev/null
@@ -0,0 +1,49 @@
+package org.argeo.api.slc.execution;
+
+import java.util.List;
+
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionProcess.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionProcess.java
new file mode 100644 (file)
index 0000000..68f8d22
--- /dev/null
@@ -0,0 +1,52 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionResources.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionResources.java
new file mode 100644 (file)
index 0000000..6026912
--- /dev/null
@@ -0,0 +1,31 @@
+package org.argeo.api.slc.execution;
+
+import java.io.File;
+import java.nio.file.Path;
+
+/** Provides write access to resources during execution */
+public interface ExecutionResources {
+       /** The base directory where this execution can write */
+       public File getWritableBaseDir();
+
+       /** Allocates a local file in the writable area and return it as a resource. */
+       public Path getWritableResource(String relativePath);
+
+       /**
+        * Allocates a local file in the writable area and return it as a fully
+        * qualified OS path.
+        */
+       public String getWritableOsPath(String relativePath);
+
+       /**
+        * Allocates a local file in the writable area and return it as a {@link File}.
+        */
+       public File getWritableOsFile(String relativePath);
+
+       /**
+        * Returns the resource as a file path. If the resource is not writable it is
+        * copied as a file in the writable area and the path to this local file is
+        * returned.
+        */
+       public String getAsOsPath(Path resource, Boolean overwrite);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpec.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpec.java
new file mode 100644 (file)
index 0000000..079c63b
--- /dev/null
@@ -0,0 +1,29 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionSpecAttribute.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpecAttribute.java
new file mode 100644 (file)
index 0000000..0ca92bf
--- /dev/null
@@ -0,0 +1,53 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionStack.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionStack.java
new file mode 100644 (file)
index 0000000..468a04a
--- /dev/null
@@ -0,0 +1,23 @@
+package org.argeo.api.slc.execution;
+
+/** Deal with nested level of executions using different variables. */
+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.api.slc/src/org/argeo/api/slc/execution/ExecutionStackLevel.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionStackLevel.java
new file mode 100644 (file)
index 0000000..5fb875e
--- /dev/null
@@ -0,0 +1,14 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/ExecutionStep.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionStep.java
new file mode 100644 (file)
index 0000000..b536fe1
--- /dev/null
@@ -0,0 +1,96 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/FlowConfigurationException.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/FlowConfigurationException.java
new file mode 100644 (file)
index 0000000..ddc95d6
--- /dev/null
@@ -0,0 +1,12 @@
+package org.argeo.api.slc.execution;
+
+import org.argeo.api.slc.SlcException;
+
+/** The stack trace of such exceptions does not need to be displayed */
+public class FlowConfigurationException extends SlcException {
+       private static final long serialVersionUID = 8456260596346797321L;
+
+       public FlowConfigurationException(String message) {
+               super(message);
+       }
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/RealizedFlow.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/RealizedFlow.java
new file mode 100644 (file)
index 0000000..202a1a4
--- /dev/null
@@ -0,0 +1,71 @@
+package org.argeo.api.slc.execution;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.argeo.api.slc.DefaultNameVersion;
+import org.argeo.api.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 DefaultNameVersion(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.api.slc/src/org/argeo/api/slc/execution/RefSpecAttribute.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/RefSpecAttribute.java
new file mode 100644 (file)
index 0000000..8096504
--- /dev/null
@@ -0,0 +1,62 @@
+package org.argeo.api.slc.execution;
+
+import java.util.List;
+
+/** A spec attribute whose value is a reference to a full fledged object. */
+public class RefSpecAttribute extends AbstractSpecAttribute implements
+               Cloneable {
+       private static final long serialVersionUID = -3427797452955753574L;
+       private transient Class<?> targetClass = String.class;
+       /** Read only. */
+       private String targetClassName;
+       private transient Object value = null;
+
+       /** List to be chosen from */
+       private List<RefValueChoice> choices = null;
+
+       public Object getValue() {
+               return value;
+       }
+
+       public void setValue(Object value) {
+               this.value = value;
+       }
+
+       /** Default is {@link String} */
+       public Class<?> getTargetClass() {
+               return targetClass;
+       }
+
+       public void setTargetClass(Class<?> targetClass) {
+               this.targetClass = targetClass;
+               this.targetClassName = targetClass.getName();
+       }
+
+       public String getTargetClassName() {
+               return targetClassName;
+       }
+
+       /** @return can be null */
+       public List<RefValueChoice> getChoices() {
+               return choices;
+       }
+
+       public void setChoices(List<RefValueChoice> choices) {
+               this.choices = choices;
+       }
+
+       @Override
+       protected Object clone() throws CloneNotSupportedException {
+               RefSpecAttribute rsa = new RefSpecAttribute();
+               rsa.setTargetClass(targetClass);
+               rsa.setChoices(choices);
+               return rsa;
+       }
+
+       @Override
+       public String toString() {
+               return "Ref spec attribute [" + targetClass + "]"
+                               + (value != null ? "=" + value : "");
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/RefValue.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/RefValue.java
new file mode 100644 (file)
index 0000000..69109ce
--- /dev/null
@@ -0,0 +1,38 @@
+package org.argeo.api.slc.execution;
+
+/** Reference value to be used by an execution */
+public class RefValue extends AbstractExecutionValue {
+       private static final long serialVersionUID = -8951231456757181687L;
+       private String ref;
+       private String type;
+
+       public RefValue() {
+       }
+
+       public RefValue(String ref) {
+               super();
+               this.ref = ref;
+       }
+
+       public String getRef() {
+               return ref;
+       }
+
+       public void setRef(String ref) {
+               this.ref = ref;
+       }
+
+       public String getType() {
+               return type;
+       }
+
+       public void setType(String type) {
+               this.type = type;
+       }
+
+       @Override
+       public String toString() {
+               return "Ref Value [" + type + "=" + ref + "]";
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/RefValueChoice.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/RefValueChoice.java
new file mode 100644 (file)
index 0000000..5d98a24
--- /dev/null
@@ -0,0 +1,35 @@
+package org.argeo.api.slc.execution;
+
+import java.io.Serializable;
+
+/** A choice of ref value to be shown to the end user. */
+public class RefValueChoice implements Serializable {
+       private static final long serialVersionUID = -1133645722307507774L;
+       private String name;
+       private String description;
+
+       public RefValueChoice() {
+       }
+
+       public RefValueChoice(String name, String description) {
+               this.name = name;
+               this.description = description;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/SlcAgent.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/SlcAgent.java
new file mode 100644 (file)
index 0000000..ff7161b
--- /dev/null
@@ -0,0 +1,51 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/execution/SlcAgentCli.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/SlcAgentCli.java
new file mode 100644 (file)
index 0000000..e128dd7
--- /dev/null
@@ -0,0 +1,14 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/package.html b/org.argeo.api.slc/src/org/argeo/api/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.api.slc/src/org/argeo/api/slc/primitive/PrimitiveAccessor.java b/org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveAccessor.java
new file mode 100644 (file)
index 0000000..9b8880f
--- /dev/null
@@ -0,0 +1,22 @@
+package org.argeo.api.slc.primitive;
+
+/** Abstraction of access to primitive values */
+public interface PrimitiveAccessor {
+       public final static String TYPE_STRING = "string";
+       /**
+        * As of Argeo 1, passwords are NOT stored encrypted, just hidden in the UI,
+        * but stored in plain text in JCR. Use keyring instead.
+        */
+       public final static String TYPE_PASSWORD = "password";
+       public final static String TYPE_INTEGER = "integer";
+       public final static String TYPE_LONG = "long";
+       public final static String TYPE_FLOAT = "float";
+       public final static String TYPE_DOUBLE = "double";
+       public final static String TYPE_BOOLEAN = "boolean";
+
+       public String getType();
+
+       public Object getValue();
+
+       public void setValue(Object value);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveSpecAttribute.java b/org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveSpecAttribute.java
new file mode 100644 (file)
index 0000000..404b5f8
--- /dev/null
@@ -0,0 +1,51 @@
+package org.argeo.api.slc.primitive;
+
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.execution.AbstractSpecAttribute;
+
+/**
+ * A spec attribute wrapping a primitive value.
+ * 
+ * @see PrimitiveAccessor
+ */
+public class PrimitiveSpecAttribute extends AbstractSpecAttribute implements
+               PrimitiveAccessor {
+       private static final long serialVersionUID = -566676381839825483L;
+       private String type = "string";
+       private Object value = null;
+
+       public PrimitiveSpecAttribute() {
+       }
+
+       public PrimitiveSpecAttribute(String type, Object value) {
+               this.type = type;
+               this.value = value;
+       }
+
+       public Object getValue() {
+               return value;
+       }
+
+       public void setValue(Object value) {
+               this.value = value;
+       }
+
+       public String getType() {
+               return type;
+       }
+
+       public void setType(String type) {
+               // check whether type is recognized.
+               if (PrimitiveUtils.typeAsClass(type) == null)
+                       throw new SlcException("Unrecognized type " + type);
+               this.type = type;
+
+       }
+
+       @Override
+       public String toString() {
+               return "Primitive spec attribute [" + type + "]"
+                               + (value != null ? "=" + value : "");
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveUtils.java b/org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveUtils.java
new file mode 100644 (file)
index 0000000..bc8445d
--- /dev/null
@@ -0,0 +1,95 @@
+package org.argeo.api.slc.primitive;
+
+/** Converts to and from primitive types. */
+public class PrimitiveUtils {
+       /**
+        * @deprecated Use {@link PrimitiveAccessor#TYPE_STRING} instead
+        */
+       public final static String TYPE_STRING = PrimitiveAccessor.TYPE_STRING;
+       /**
+        * @deprecated Use {@link PrimitiveAccessor#TYPE_INTEGER} instead
+        */
+       public final static String TYPE_INTEGER = PrimitiveAccessor.TYPE_INTEGER;
+       /**
+        * @deprecated Use {@link PrimitiveAccessor#TYPE_LONG} instead
+        */
+       public final static String TYPE_LONG = PrimitiveAccessor.TYPE_LONG;
+       /**
+        * @deprecated Use {@link PrimitiveAccessor#TYPE_FLOAT} instead
+        */
+       public final static String TYPE_FLOAT = PrimitiveAccessor.TYPE_FLOAT;
+       /**
+        * @deprecated Use {@link PrimitiveAccessor#TYPE_DOUBLE} instead
+        */
+       public final static String TYPE_DOUBLE = PrimitiveAccessor.TYPE_DOUBLE;
+       /**
+        * @deprecated Use {@link PrimitiveAccessor#TYPE_BOOLEAN} instead
+        */
+       public final static String TYPE_BOOLEAN = PrimitiveAccessor.TYPE_BOOLEAN;
+
+       private PrimitiveUtils() {
+
+       }
+
+       /** @return the class or null if the provided type is not a primitive */
+       public static Class<?> typeAsClass(String type) {
+               if (PrimitiveAccessor.TYPE_STRING.equals(type))
+                       return String.class;
+               else if (PrimitiveAccessor.TYPE_PASSWORD.equals(type))
+                       return char[].class;
+               else if (PrimitiveAccessor.TYPE_INTEGER.equals(type))
+                       return Integer.class;
+               else if (PrimitiveAccessor.TYPE_LONG.equals(type))
+                       return Long.class;
+               else if (PrimitiveAccessor.TYPE_FLOAT.equals(type))
+                       return Float.class;
+               else if (PrimitiveAccessor.TYPE_DOUBLE.equals(type))
+                       return Double.class;
+               else if (PrimitiveAccessor.TYPE_BOOLEAN.equals(type))
+                       return Boolean.class;
+               else
+                       return null;
+       }
+
+       /** @return the type or null if the provided class is not a primitive */
+       public static String classAsType(Class<?> clss) {
+               if (String.class.isAssignableFrom(clss))
+                       return PrimitiveAccessor.TYPE_STRING;
+               else if (char[].class.isAssignableFrom(clss))
+                       return PrimitiveAccessor.TYPE_PASSWORD;
+               else if (Integer.class.isAssignableFrom(clss))
+                       return PrimitiveAccessor.TYPE_INTEGER;
+               else if (Long.class.isAssignableFrom(clss))
+                       return PrimitiveAccessor.TYPE_LONG;
+               else if (Float.class.isAssignableFrom(clss))
+                       return PrimitiveAccessor.TYPE_FLOAT;
+               else if (Double.class.isAssignableFrom(clss))
+                       return PrimitiveAccessor.TYPE_DOUBLE;
+               else if (Boolean.class.isAssignableFrom(clss))
+                       return PrimitiveAccessor.TYPE_BOOLEAN;
+               else
+                       return null;
+       }
+
+       /** Parse string as an object. Passwords are returned as String.*/
+       public static Object convert(String type, String str) {
+               if (PrimitiveAccessor.TYPE_STRING.equals(type)) {
+                       return str;
+               } else if (PrimitiveAccessor.TYPE_PASSWORD.equals(type)) {
+                       return str;
+               } else if (PrimitiveAccessor.TYPE_INTEGER.equals(type)) {
+                       return (Integer.parseInt(str));
+               } else if (PrimitiveAccessor.TYPE_LONG.equals(type)) {
+                       return (Long.parseLong(str));
+               } else if (PrimitiveAccessor.TYPE_FLOAT.equals(type)) {
+                       return (Float.parseFloat(str));
+               } else if (PrimitiveAccessor.TYPE_DOUBLE.equals(type)) {
+                       return (Double.parseDouble(str));
+               } else if (PrimitiveAccessor.TYPE_BOOLEAN.equals(type)) {
+                       return (Boolean.parseBoolean(str));
+               } else {
+                       return str;
+               }
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveValue.java b/org.argeo.api.slc/src/org/argeo/api/slc/primitive/PrimitiveValue.java
new file mode 100644 (file)
index 0000000..136eaf7
--- /dev/null
@@ -0,0 +1,39 @@
+package org.argeo.api.slc.primitive;
+
+import org.argeo.api.slc.execution.AbstractExecutionValue;
+
+/** Primitive value to be used by an execution. */
+public class PrimitiveValue extends AbstractExecutionValue implements
+               PrimitiveAccessor {
+       private static final long serialVersionUID = 533414290998374166L;
+
+       private String type;
+
+       private Object value;
+
+       public PrimitiveValue() {
+       }
+
+       public PrimitiveValue(String type, Object value) {
+               super();
+               this.type = type;
+               this.value = value;
+       }
+
+       public String getType() {
+               return type;
+       }
+
+       public void setType(String type) {
+               this.type = type;
+       }
+
+       public Object getValue() {
+               return value;
+       }
+
+       public void setValue(Object value) {
+               this.value = value;
+       }
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/ExecutableTestRun.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/ExecutableTestRun.java
new file mode 100644 (file)
index 0000000..49f8098
--- /dev/null
@@ -0,0 +1,7 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/test/IncompatibleTestDataException.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/IncompatibleTestDataException.java
new file mode 100644 (file)
index 0000000..fdced66
--- /dev/null
@@ -0,0 +1,24 @@
+package org.argeo.api.slc.test;\r
+\r
+import org.argeo.api.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.api.slc/src/org/argeo/api/slc/test/TestData.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestData.java
new file mode 100644 (file)
index 0000000..9be3253
--- /dev/null
@@ -0,0 +1,9 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/test/TestDataProvider.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestDataProvider.java
new file mode 100644 (file)
index 0000000..4a8202f
--- /dev/null
@@ -0,0 +1,5 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/test/TestDefinition.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestDefinition.java
new file mode 100644 (file)
index 0000000..729201a
--- /dev/null
@@ -0,0 +1,10 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/test/TestResult.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestResult.java
new file mode 100644 (file)
index 0000000..76e9b7e
--- /dev/null
@@ -0,0 +1,27 @@
+package org.argeo.api.slc.test;
+
+import java.util.Date;
+import java.util.Map;
+
+/** The result of a test */
+public interface TestResult extends TestStatus, TestRunAware {
+       public String getUuid();
+
+       /** Adds a part of the result. */
+       public void addResultPart(TestResultPart part);
+
+       /**
+        * Marks that the collection of test results is completed and free the
+        * related resources (also closing listeners).
+        */
+       public void close();
+
+       /**
+        * The date when this test result was closed. Can be null, which means the
+        * result is not closed.
+        */
+       public Date getCloseDate();
+
+       /** Additional arbitrary meta data */
+       public Map<String, String> getAttributes();
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/TestResultListener.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestResultListener.java
new file mode 100644 (file)
index 0000000..5bce3cf
--- /dev/null
@@ -0,0 +1,10 @@
+package org.argeo.api.slc.test;
+
+/** Listener to the operations on a test result. */
+public interface TestResultListener<T extends TestResult> {
+       /** Notified when a part was added to a test result. */
+       public void resultPartAdded(T testResult, TestResultPart testResultPart);
+
+       /** Stops listening and release the related resources. */
+       public void close(T testResult);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/TestResultPart.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestResultPart.java
new file mode 100644 (file)
index 0000000..f8d2577
--- /dev/null
@@ -0,0 +1,17 @@
+package org.argeo.api.slc.test;
+
+/**
+ * Part of a test result.
+ * 
+ * @see TestResult
+ */
+public interface TestResultPart {
+       /** The status, as defined in {@link TestStatus}. */
+       public Integer getStatus();
+
+       /** The related message. */
+       public String getMessage();
+
+       /** The underlying <code>Exception</code>. Can be null. */
+       public String getExceptionMessage();
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/TestRun.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestRun.java
new file mode 100644 (file)
index 0000000..f0d3b98
--- /dev/null
@@ -0,0 +1,21 @@
+package org.argeo.api.slc.test;
+
+import org.argeo.api.slc.deploy.DeployedSystem;
+
+/** The actual run of a test */
+public interface TestRun {
+       /** Gets UUID */
+       public String getUuid();
+
+       /** Gets the related test definition. */
+       public <T extends TestDefinition> T getTestDefinition();
+
+       /** Gets the related test data */
+       public <T extends TestData> T getTestData();
+
+       /** Gets the related deployed system. */
+       public <T extends DeployedSystem> T getDeployedSystem();
+
+       /** Gets the related result where to record results. */
+       public <T extends TestResult> T getTestResult();
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/TestRunAware.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestRunAware.java
new file mode 100644 (file)
index 0000000..77479f4
--- /dev/null
@@ -0,0 +1,8 @@
+package org.argeo.api.slc.test;
+
+/** Allows a test run to notify other objects. */
+public interface TestRunAware {
+       /** Notifies the current test run. */
+       public void notifyTestRun(TestRun testRun);
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/TestStatus.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/TestStatus.java
new file mode 100644 (file)
index 0000000..763c5b4
--- /dev/null
@@ -0,0 +1,31 @@
+package org.argeo.api.slc.test;
+
+/**
+ * Simple statuses. Ordering of the flags can be relied upon in aggregation: if
+ * one element is failed, the aggregation is failed. Is one element is in ERROR,
+ * the aggregation is in ERROR.
+ * <p>
+ * <ul>
+ * <li>{@link #PASSED}: the test succeeded</li>
+ * <li>{@link #FAILED}: the test could run, but did not reach the expected
+ * result</li>
+ * <li>{@link #ERROR}: an error during the test run prevented to get a
+ * significant information on the tested system.</li>
+ * </ul>
+ * </p>
+ */
+public interface TestStatus {
+       /** The flag for a passed test: 0 */
+       public final static Integer PASSED = 0;
+       /** The flag for a failed test: 1 */
+       public final static Integer FAILED = 1;
+       /**
+        * The flag for a test which could not properly run because of an error
+        * (there is no feedback on the behavior of the tested component): 2
+        */
+       public final static Integer ERROR = 2;
+       public final static String STATUSSTR_PASSED = "PASSED";
+       public final static String STATUSSTR_FAILED = "FAILED";
+       public final static String STATUSSTR_ERROR = "ERROR";
+
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/WritableTestRun.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/WritableTestRun.java
new file mode 100644 (file)
index 0000000..b4bc8a3
--- /dev/null
@@ -0,0 +1,14 @@
+package org.argeo.api.slc.test;
+
+import org.argeo.api.slc.deploy.DeployedSystem;
+
+/** Test run whose various components can be externally set. */
+public interface WritableTestRun extends ExecutableTestRun {
+       public void setDeployedSystem(DeployedSystem deployedSystem);
+
+       public void setTestData(TestData testData);
+
+       public void setTestDefinition(TestDefinition testDefinition);
+
+       public void setTestResult(TestResult testResult);
+}
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/context/ContextAware.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/context/ContextAware.java
new file mode 100644 (file)
index 0000000..44eeb38
--- /dev/null
@@ -0,0 +1,22 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/test/context/ParentContextAware.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/context/ParentContextAware.java
new file mode 100644 (file)
index 0000000..2139726
--- /dev/null
@@ -0,0 +1,9 @@
+package org.argeo.api.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.api.slc/src/org/argeo/api/slc/test/context/package.html b/org.argeo.api.slc/src/org/argeo/api/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.api.slc/src/org/argeo/api/slc/test/package.html b/org.argeo.api.slc/src/org/argeo/api/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/org.argeo.slc.api/.classpath b/org.argeo.slc.api/.classpath
deleted file mode 100644 (file)
index d499d30..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.argeo.slc.api/.gitignore b/org.argeo.slc.api/.gitignore
deleted file mode 100644 (file)
index b83d222..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/target/
diff --git a/org.argeo.slc.api/.project b/org.argeo.slc.api/.project
deleted file mode 100644 (file)
index 301fef6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.api</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.argeo.slc.api/META-INF/.gitignore b/org.argeo.slc.api/META-INF/.gitignore
deleted file mode 100644 (file)
index 4854a41..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/MANIFEST.MF
diff --git a/org.argeo.slc.api/bnd.bnd b/org.argeo.slc.api/bnd.bnd
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.argeo.slc.api/build.properties b/org.argeo.slc.api/build.properties
deleted file mode 100644 (file)
index 07891d9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,.\r
-source..=src/\r
diff --git a/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java
deleted file mode 100644 (file)
index 61ed5eb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-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/CategoryNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/CategoryNameVersion.java
deleted file mode 100644 (file)
index b335996..0000000
+++ /dev/null
@@ -1,25 +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 CategoryNameVersion extends NameVersion {
-       /** The category of the component. */
-       String getCategory();
-
-       static CategoryNameVersion parseCategoryNameVersion(String str) {
-               if (str == null || "".equals(str.trim()))
-                       throw new IllegalArgumentException("At least one character required.");
-               String[] arr = str.trim().split(":");
-               if (arr.length > 3)
-                       throw new IllegalArgumentException(str + " does not respect the [category]:[name]:[version] pattern");
-               DefaultCategoryNameVersion res = new DefaultCategoryNameVersion();
-               res.setCategory(arr[0]);
-               if (arr.length > 1)
-                       res.setName(arr[1]);
-               if (arr.length > 2)
-                       res.setVersion(arr[2]);
-               return res;
-       }
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/Condition.java b/org.argeo.slc.api/src/org/argeo/slc/Condition.java
deleted file mode 100644 (file)
index f476961..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-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/DefaultCategoryNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/DefaultCategoryNameVersion.java
deleted file mode 100644 (file)
index 6506599..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.argeo.slc;
-
-/** Canonical implementation of {@link CategoryNameVersion} */
-public class DefaultCategoryNameVersion extends DefaultNameVersion implements CategoryNameVersion {
-       private String category;
-
-       public DefaultCategoryNameVersion() {
-       }
-
-       public DefaultCategoryNameVersion(String category, String name, String version) {
-               super(name, version);
-               this.category = category;
-       }
-
-       public DefaultCategoryNameVersion(String category, NameVersion nameVersion) {
-               super(nameVersion);
-               this.category = category;
-       }
-
-       @Override
-       public String getCategory() {
-               return category;
-       }
-
-       public void setCategory(String category) {
-               this.category = category;
-       }
-
-       @Override
-       public String toString() {
-               return category + ":" + super.toString();
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java
deleted file mode 100644 (file)
index 61cc66e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.argeo.slc;
-
-
-/** Canonical implementation of {@link NameVersion} */
-public class DefaultNameVersion implements NameVersion,
-               Comparable<NameVersion> {
-       private String name;
-       private String version;
-
-       public DefaultNameVersion() {
-       }
-
-       /** Interprets string in OSGi-like format my.module.name;version=0.0.0 */
-       public DefaultNameVersion(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 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();
-       }
-
-       @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/ManifestConstants.java b/org.argeo.slc.api/src/org/argeo/slc/ManifestConstants.java
deleted file mode 100644 (file)
index 4f43cda..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.argeo.slc;
-
-public enum ManifestConstants {
-       // OSGi
-       BUNDLE_SYMBOLICNAME("Bundle-SymbolicName"), //
-       BUNDLE_VERSION("Bundle-Version"), //
-       BUNDLE_LICENSE("Bundle-License"), //
-       EXPORT_PACKAGE("Export-Package"), //
-       IMPORT_PACKAGE("Import-Package"), //
-       // JAVA
-       AUTOMATIC_MODULE_NAME("Automatic-Module-Name"), //
-       // SLC
-       SLC_CATEGORY("SLC-Category"), //
-       SLC_ORIGIN_M2("SLC-Origin-M2"), //
-       SLC_ORIGIN_M2_MERGE("SLC-Origin-M2-Merge"), //
-       SLC_ORIGIN_M2_REPO("SLC-Origin-M2-Repo"), //
-       SLC_ORIGIN_MANIFEST_NOT_MODIFIED("SLC-Origin-ManifestNotModified"), //
-       SLC_ORIGIN_URI("SLC-Origin-URI"),//
-       ;
-
-       final String value;
-
-       private ManifestConstants(String value) {
-               this.value = value;
-       }
-
-       @Override
-       public String toString() {
-               return value;
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/ModuleSet.java b/org.argeo.slc.api/src/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/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java
deleted file mode 100644 (file)
index 45ce583..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-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. */
-       String getName();
-
-       /** The version of the component. */
-       String getVersion();
-
-       /**
-        * The forward compatible branch of this version, by default it is
-        * [major].[minor].
-        */
-       default String getBranch() {
-               String[] parts = getVersion().split("\\.");
-               if (parts.length < 2)
-                       throw new IllegalStateException("Version " + getVersion() + " cannot be interpreted as branch.");
-               return parts[0] + "." + parts[1];
-       }
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcConstants.java b/org.argeo.slc.api/src/org/argeo/slc/SlcConstants.java
deleted file mode 100644 (file)
index 7da9708..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 = "cn=org.argeo.slc.user,ou=roles,ou=node";
-
-       /** 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
deleted file mode 100644 (file)
index d2e5e2b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.argeo.slc;
-
-/** Basis for all SLC exceptions. This is an unchecked exception. */
-public class SlcException extends RuntimeException {
-       private static final long serialVersionUID = 6373738619304106445L;
-
-       /** Constructor. */
-       public SlcException(String message) {
-               super(message);
-       }
-
-       /** Constructor. */
-       public SlcException(String message, Throwable e) {
-               super(message, e);
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcNames.java b/org.argeo.slc.api/src/org/argeo/slc/SlcNames.java
deleted file mode 100644 (file)
index 557d479..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.argeo.slc;
-
-/** JCR names used by SLC */
-public interface SlcNames {
-       public final static String SLC_ = "slc:";
-
-       /*
-        * GENERAL
-        */
-       public final static String SLC_UUID = "slc:uuid";
-       public final static String SLC_STATUS = "slc:status";
-       // generic name for result parts of a given test result (slc:testResult)
-       // note that corresponding nodes can be retrieved using
-       // myTestResultNode.getNodes(SLC_RESULT_PART+"*") method
-       public final static String SLC_RESULT_PART = "slc:resultPart";
-       // Fixed name of the child node of a slc:testResult of type
-       // slc:check that aggregate status of all result parts of a given test
-       // result
-       public final static String SLC_AGGREGATED_STATUS = "slc:aggregatedStatus";
-
-       public final static String SLC_TYPE = "slc:type";
-       public final static String SLC_NAME = "slc:name";
-       public final static String SLC_VERSION = "slc:version";
-       public final static String SLC_CATEGORY = "slc:category";
-       public final static String SLC_VALUE = "slc:value";
-       public final static String SLC_ADDRESS = "slc:address";
-       public final static String SLC_METADATA = "slc:metadata";
-
-       public final static String SLC_TIMESTAMP = "slc:timestamp";
-       public final static String SLC_STARTED = "slc:started";
-       public final static String SLC_COMPLETED = "slc:completed";
-
-       public final static String SLC_VM = "slc:vm";
-       /*
-        * SLC RUNTIME
-        */
-       // execution
-       public final static String SLC_SPEC = "slc:spec";
-       public final static String SLC_EXECUTION_SPECS = "slc:executionSpecs";
-       public final static String SLC_FLOW = "slc:flow";
-       public final static String SLC_LOG = "slc:log";
-       public final static String SLC_AGENTS = "slc:agents";
-
-       // spec attribute
-       public final static String SLC_IS_IMMUTABLE = "slc:isImmutable";
-       public final static String SLC_IS_CONSTANT = "slc:isConstant";
-       public final static String SLC_IS_HIDDEN = "slc:isHidden";
-
-       // base directories
-       public final static String SLC_SYSTEM = "slc:system";
-       public final static String SLC_RESULTS = "slc:results";
-       public final static String SLC_MY_RESULTS = "slc:myResults";
-       public final static String SLC_PROCESSES = "slc:processes";
-
-       // result
-       public final static String SLC_SUCCESS = "slc:success";
-       public final static String SLC_MESSAGE = "slc:message";
-       public final static String SLC_TAG = "slc:tag";
-       public final static String SLC_ERROR_MESSAGE = "slc:errorMessage";
-       public final static String SLC_TEST_CASE = "slc:testCase";
-       public final static String SLC_TEST_CASE_TYPE = "slc:testCaseType";
-
-       // diff result
-       public final static String SLC_SUMMARY = "slc:summary";
-       public final static String SLC_ISSUES = "slc:issues";
-
-       /*
-        * SLC REPO
-        */
-       // shared
-       public final static String SLC_URL = "slc:url";
-       public final static String SLC_OPTIONAL = "slc:optional";
-       public final static String SLC_AS_STRING = "slc:asString";
-
-       // origin
-       public final static String SLC_ORIGIN = "slc:origin";
-       public final static String SLC_PROXY = "slc:proxy";
-
-       // slc:artifact
-       public final static String SLC_ARTIFACT_ID = "slc:artifactId";
-       public final static String SLC_GROUP_ID = "slc:groupId";
-       public final static String SLC_GROUP_BASE_ID = "slc:groupBaseId";
-       public final static String SLC_ARTIFACT_VERSION = "slc:artifactVersion";
-       public final static String SLC_ARTIFACT_EXTENSION = "slc:artifactExtension";
-       public final static String SLC_ARTIFACT_CLASSIFIER = "slc:artifactClassifier";
-
-       // slc:jarArtifact
-       public final static String SLC_MANIFEST = "slc:manifest";
-
-       // shared OSGi
-       public final static String SLC_SYMBOLIC_NAME = "slc:symbolic-name";
-       public final static String SLC_BUNDLE_VERSION = "slc:bundle-version";
-
-       // slc:osgiBaseVersion
-       public final static String SLC_MAJOR = "slc:major";
-       public final static String SLC_MINOR = "slc:minor";
-       public final static String SLC_MICRO = "slc:micro";
-       // slc:osgiVersion
-       public final static String SLC_QUALIFIER = "slc:qualifier";
-
-       // slc:exportedPackage
-       public final static String SLC_USES = "slc:uses";
-
-       // slc:modularDistribution
-       public final static String SLC_MODULES = "slc:modules";
-
-       // RPM
-       // slc:rpm
-       public final static String SLC_RPM_VERSION = "slc:rpmVersion";
-       public final static String SLC_RPM_RELEASE = "slc:rpmRelease";
-       public final static String SLC_RPM_ARCH = "slc:rpmArch";
-       public final static String SLC_RPM_ARCHIVE_SIZE = "slc:rpmArchiveSize";
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcTypes.java b/org.argeo.slc.api/src/org/argeo/slc/SlcTypes.java
deleted file mode 100644 (file)
index e0b86e6..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.argeo.slc;
-
-/** JCR node types used by SLC */
-public interface SlcTypes {
-
-       public final static String SLC_NAME_VERSION = "slc:nameVersion";
-       public final static String SLC_CATEGORIZED_NAME_VERSION = "slc:categorizedNameVersion";
-
-       public final static String SLC_AGENT_FACTORY = "slc:agentFactory";
-       public final static String SLC_AGENT = "slc:agent";
-       public final static String SLC_MODULE = "slc:module";
-       public final static String SLC_EXECUTION_MODULE = "slc:executionModule";
-       public final static String SLC_EXECUTION_SPEC = "slc:executionSpec";
-       public final static String SLC_EXECUTION_FLOW = "slc:executionFlow";
-       public final static String SLC_PROCESS = "slc:process";
-       public final static String SLC_REALIZED_FLOW = "slc:realizedFlow";
-
-       public final static String SLC_EXECUTION_SPEC_ATTRIBUTE = "slc:executionSpecAttribute";
-       public final static String SLC_PRIMITIVE_SPEC_ATTRIBUTE = "slc:primitiveSpecAttribute";
-       public final static String SLC_REF_SPEC_ATTRIBUTE = "slc:refSpecAttribute";
-
-       public final static String SLC_TEST_RESULT = "slc:testResult";
-       public final static String SLC_CHECK = "slc:check";
-       public final static String SLC_PROPERTY = "slc:property";
-       public final static String SLC_DIFF_RESULT = "slc:diffResult";
-
-       // Node types used for user defined and managed result UI tree
-       public final static String SLC_MY_RESULT_ROOT_FOLDER = "slc:myResultRootFolder";
-       public final static String SLC_RESULT_FOLDER = "slc:resultFolder";
-
-       // Log levels
-       public final static String SLC_LOG_ENTRY = "slc:logEntry";
-       public final static String SLC_LOG_TRACE = "slc:logTrace";
-       public final static String SLC_LOG_DEBUG = "slc:logDebug";
-       public final static String SLC_LOG_INFO = "slc:logInfo";
-       public final static String SLC_LOG_WARNING = "slc:logWarning";
-       public final static String SLC_LOG_ERROR = "slc:logError";
-
-       /*
-        * REPO
-        */
-       public final static String SLC_ARTIFACT = "slc:artifact";
-       public final static String SLC_ARTIFACT_VERSION_BASE = "slc:artifactVersion";
-       public final static String SLC_ARTIFACT_BASE = "slc:artifactBase";
-       public final static String SLC_GROUP_BASE = "slc:groupBase";
-       public final static String SLC_JAR_FILE = "slc:jarFile";
-       public final static String SLC_BUNDLE_ARTIFACT = "slc:bundleArtifact";
-       public final static String SLC_OSGI_VERSION = "slc:osgiVersion";
-       public final static String SLC_JAVA_PACKAGE = "slc:javaPackage";
-       public final static String SLC_EXPORTED_PACKAGE = "slc:exportedPackage";
-       public final static String SLC_IMPORTED_PACKAGE = "slc:importedPackage";
-       public final static String SLC_DYNAMIC_IMPORTED_PACKAGE = "slc:dynamicImportedPackage";
-       public final static String SLC_REQUIRED_BUNDLE = "slc:requiredBundle";
-       public final static String SLC_FRAGMENT_HOST = "slc:fragmentHost";
-
-       // Distribution management
-       // public final static String SLC_CATEGORY = "slc:category";
-       public final static String SLC_MODULAR_DISTRIBUTION_BASE = "slc:modularDistributionBase";
-       public final static String SLC_MODULAR_DISTRIBUTION = "slc:modularDistribution";
-       public final static String SLC_MODULE_COORDINATES = "slc:moduleCoordinates";
-
-       // origin
-       public final static String SLC_KNOWN_ORIGIN = "slc:knownOrigin";
-       public final static String SLC_PROXIED = "slc:proxied";
-
-       // rpm
-       public final static String SLC_RPM = "slc:rpm";
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java b/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java
deleted file mode 100644 (file)
index f1bef22..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-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
deleted file mode 100644 (file)
index aa050e3..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.argeo.slc;
-
-/** Exception for unsupported features or actions. */
-public class UnsupportedException extends SlcException {
-       static final long serialVersionUID = 1l;
-
-       /** Action not supported. */
-       public UnsupportedException() {
-               this("Action not supported");
-       }
-
-       /** Constructor with a message. */
-       public UnsupportedException(String message) {
-               super(message);
-       }
-
-       /**
-        * Constructor generating a message.
-        * 
-        * @param nature
-        *            the nature of the unsupported object
-        * @param obj
-        *            the object itself (its class name will be used in message)
-        */
-       public UnsupportedException(String nature, Object obj) {
-               super("Unsupported " + nature + ": "
-                               + (obj != null ? obj.getClass() : "[object is null]"));
-       }
-
-       /**
-        * Constructor generating a message.
-        * 
-        * @param nature
-        *            the nature of the unsupported object
-        * @param clss
-        *            the class itself (will be used in message)
-        */
-       public UnsupportedException(String nature, Class<?> clss) {
-               super("Unsupported " + nature + ": " + clss);
-       }
-
-       /**
-        * Constructor generating a message.
-        * 
-        * @param nature
-        *            the nature of the unsupported object
-        * @param value
-        *            the problematic value itself
-        */
-       public UnsupportedException(String nature, String value) {
-               super("Unsupported " + nature + ": " + value);
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/WellKnownConstants.java b/org.argeo.slc.api/src/org/argeo/slc/WellKnownConstants.java
deleted file mode 100644 (file)
index f0ce614..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.argeo.slc;
-
-/**
- * Centralises constant values related to software systems, which are well
- * defined and not expected to change within a major version cycle of SLC, but
- * which are not necessarily defined in core Java.
- */
-public interface WellKnownConstants {
-
-       /*
-        * OSGi
-        */
-       final static String OSGI_INSTANCE_AREA = "osgi.instance.area";
-       final static String OSGI_CONFIGURATION_AREA = "osgi.configuration.area";
-
-//     final static String OSGI_HTTP_PORT = "org.osgi.service.http.port";
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/attachment/Attachment.java b/org.argeo.slc.api/src/org/argeo/slc/attachment/Attachment.java
deleted file mode 100644 (file)
index 6573251..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.argeo.slc.attachment;
-
-public interface Attachment {
-       public String getUuid();
-
-       public void setUuid(String uuid);
-
-       public String getName();
-
-       public String getContentType();
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsEnabled.java b/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsEnabled.java
deleted file mode 100644 (file)
index 0b44e5b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.argeo.slc.attachment;
-
-public interface AttachmentsEnabled {
-       public void addAttachment(Attachment attachment);
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsStorage.java b/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsStorage.java
deleted file mode 100644 (file)
index 48cd0e6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.argeo.slc.attachment;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public interface AttachmentsStorage {
-       public void retrieveAttachment(Attachment attachment,
-                       OutputStream outputStream);
-
-       /** Does NOT close the provided input stream. */
-       public void storeAttachment(Attachment attachment, InputStream inputStream);
-}
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
deleted file mode 100644 (file)
index b438a8f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-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
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/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java b/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java
deleted file mode 100644 (file)
index 3c7f625..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-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
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/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java
deleted file mode 100644 (file)
index dd47369..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-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
deleted file mode 100644 (file)
index be28154..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644 (file)
index 411bcb6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644 (file)
index 74be42a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644 (file)
index 18e63f8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644 (file)
index ed29ce2..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644 (file)
index 2d65a71..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644 (file)
index 18fd4fe..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-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
deleted file mode 100644 (file)
index 10973c9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644 (file)
index f1d6642..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.argeo.slc.deploy;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.argeo.slc.DefaultNameVersion;
-
-/** The description of a versioned module. */
-public class ModuleDescriptor extends DefaultNameVersion 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
deleted file mode 100644 (file)
index 1288592..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-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
deleted file mode 100644 (file)
index f1c7e7d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644 (file)
index dba5797..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-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
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/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractExecutionValue.java b/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractExecutionValue.java
deleted file mode 100644 (file)
index 7f63626..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.argeo.slc.execution;
-
-import java.io.Serializable;
-
-/** Value to be used by an execution */
-public abstract class AbstractExecutionValue implements Serializable {
-       private static final long serialVersionUID = 1558444746120706961L;
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractSpecAttribute.java
deleted file mode 100644 (file)
index d720db6..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.argeo.slc.execution;
-
-import java.io.Serializable;
-
-/** Canonical implementation of the execution spec attribute booleans. */
-public abstract class AbstractSpecAttribute implements ExecutionSpecAttribute,
-               Serializable {
-       private static final long serialVersionUID = 6494963738891709440L;
-       private Boolean isImmutable = false;
-       private Boolean isConstant = false;
-       private Boolean isHidden = false;
-
-       private String description;
-
-       /** Has to be set at instantiation */
-       public Boolean getIsImmutable() {
-               return isImmutable;
-       }
-
-       public void setIsImmutable(Boolean isImmutable) {
-               this.isImmutable = isImmutable;
-       }
-
-       /** Cannot be overridden at runtime */
-       public Boolean getIsConstant() {
-               return isConstant;
-       }
-
-       public void setIsConstant(Boolean isConstant) {
-               this.isConstant = isConstant;
-       }
-
-       /** Should not be shown to the end user */
-       public Boolean getIsHidden() {
-               return isHidden;
-       }
-
-       public void setIsHidden(Boolean isHidden) {
-               this.isHidden = isHidden;
-       }
-
-       /*
-        * DEPRECATED
-        */
-       /** @deprecated use {@link #getIsImmutable()} instead */
-       public Boolean getIsParameter() {
-               return isImmutable;
-       }
-
-       /** @deprecated use {@link #getIsConstant()} instead */
-       public Boolean getIsFrozen() {
-               return isConstant;
-       }
-
-       /** @deprecated use {@link #setIsImmutable(Boolean)} instead */
-       public void setIsParameter(Boolean isParameter) {
-               this.isImmutable = isParameter;
-       }
-
-       /** @deprecated use {@link #setIsConstant(Boolean)} instead */
-       public void setIsFrozen(Boolean isFrozen) {
-               this.isConstant = isFrozen;
-       }
-
-       public void setDescription(String description) {
-               this.description = description;
-       }
-
-       public String getDescription() {
-               return description;
-       }
-
-}
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
deleted file mode 100644 (file)
index 46c448f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-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
-       public void beforeFlow(ExecutionFlow executionFlow);\r
-       \r
-       public void afterFlow(ExecutionFlow executionFlow);\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
deleted file mode 100644 (file)
index 7dd3a74..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-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
-        * exception otherwise.
-        */
-       public Runnable getRunnable();
-
-       /**
-        * The name of this execution flow. Can contains '/' which will be
-        * interpreted by UIs as a hierarchy;
-        */
-       public String getName();
-}
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
deleted file mode 100644 (file)
index d38bb85..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-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
deleted file mode 100644 (file)
index 13ff638..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644 (file)
index 11021f6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644 (file)
index cad6efb..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-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
deleted file mode 100644 (file)
index aa0b16d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644 (file)
index 1cedd12..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-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
deleted file mode 100644 (file)
index d894e1c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-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/ExecutionResources.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionResources.java
deleted file mode 100644 (file)
index 9ddbca9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.argeo.slc.execution;
-
-import java.io.File;
-import java.nio.file.Path;
-
-/** Provides write access to resources during execution */
-public interface ExecutionResources {
-       /** The base directory where this execution can write */
-       public File getWritableBaseDir();
-
-       /** Allocates a local file in the writable area and return it as a resource. */
-       public Path getWritableResource(String relativePath);
-
-       /**
-        * Allocates a local file in the writable area and return it as a fully
-        * qualified OS path.
-        */
-       public String getWritableOsPath(String relativePath);
-
-       /**
-        * Allocates a local file in the writable area and return it as a {@link File}.
-        */
-       public File getWritableOsFile(String relativePath);
-
-       /**
-        * Returns the resource as a file path. If the resource is not writable it is
-        * copied as a file in the writable area and the path to this local file is
-        * returned.
-        */
-       public String getAsOsPath(Path resource, Boolean overwrite);
-}
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
deleted file mode 100644 (file)
index 0037b6d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644 (file)
index 39f87d9..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-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
deleted file mode 100644 (file)
index 0a15e33..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.argeo.slc.execution;
-
-/** Deal with nested level of executions using different variables. */
-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
deleted file mode 100644 (file)
index 790404b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-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
deleted file mode 100644 (file)
index 47c6918..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-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/FlowConfigurationException.java b/org.argeo.slc.api/src/org/argeo/slc/execution/FlowConfigurationException.java
deleted file mode 100644 (file)
index d476483..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.argeo.slc.execution;
-
-import org.argeo.slc.SlcException;
-
-/** The stack trace of such exceptions does not need to be displayed */
-public class FlowConfigurationException extends SlcException {
-       private static final long serialVersionUID = 8456260596346797321L;
-
-       public FlowConfigurationException(String message) {
-               super(message);
-       }
-}
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
deleted file mode 100644 (file)
index c1290a9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.argeo.slc.execution;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.argeo.slc.DefaultNameVersion;
-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 DefaultNameVersion(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/RefSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RefSpecAttribute.java
deleted file mode 100644 (file)
index b9bded0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.argeo.slc.execution;
-
-import java.util.List;
-
-/** A spec attribute whose value is a reference to a full fledged object. */
-public class RefSpecAttribute extends AbstractSpecAttribute implements
-               Cloneable {
-       private static final long serialVersionUID = -3427797452955753574L;
-       private transient Class<?> targetClass = String.class;
-       /** Read only. */
-       private String targetClassName;
-       private transient Object value = null;
-
-       /** List to be chosen from */
-       private List<RefValueChoice> choices = null;
-
-       public Object getValue() {
-               return value;
-       }
-
-       public void setValue(Object value) {
-               this.value = value;
-       }
-
-       /** Default is {@link String} */
-       public Class<?> getTargetClass() {
-               return targetClass;
-       }
-
-       public void setTargetClass(Class<?> targetClass) {
-               this.targetClass = targetClass;
-               this.targetClassName = targetClass.getName();
-       }
-
-       public String getTargetClassName() {
-               return targetClassName;
-       }
-
-       /** @return can be null */
-       public List<RefValueChoice> getChoices() {
-               return choices;
-       }
-
-       public void setChoices(List<RefValueChoice> choices) {
-               this.choices = choices;
-       }
-
-       @Override
-       protected Object clone() throws CloneNotSupportedException {
-               RefSpecAttribute rsa = new RefSpecAttribute();
-               rsa.setTargetClass(targetClass);
-               rsa.setChoices(choices);
-               return rsa;
-       }
-
-       @Override
-       public String toString() {
-               return "Ref spec attribute [" + targetClass + "]"
-                               + (value != null ? "=" + value : "");
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/RefValue.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RefValue.java
deleted file mode 100644 (file)
index 02be2a6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.argeo.slc.execution;
-
-/** Reference value to be used by an execution */
-public class RefValue extends AbstractExecutionValue {
-       private static final long serialVersionUID = -8951231456757181687L;
-       private String ref;
-       private String type;
-
-       public RefValue() {
-       }
-
-       public RefValue(String ref) {
-               super();
-               this.ref = ref;
-       }
-
-       public String getRef() {
-               return ref;
-       }
-
-       public void setRef(String ref) {
-               this.ref = ref;
-       }
-
-       public String getType() {
-               return type;
-       }
-
-       public void setType(String type) {
-               this.type = type;
-       }
-
-       @Override
-       public String toString() {
-               return "Ref Value [" + type + "=" + ref + "]";
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/RefValueChoice.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RefValueChoice.java
deleted file mode 100644 (file)
index c4c403e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.argeo.slc.execution;
-
-import java.io.Serializable;
-
-/** A choice of ref value to be shown to the end user. */
-public class RefValueChoice implements Serializable {
-       private static final long serialVersionUID = -1133645722307507774L;
-       private String name;
-       private String description;
-
-       public RefValueChoice() {
-       }
-
-       public RefValueChoice(String name, String description) {
-               this.name = name;
-               this.description = description;
-       }
-
-       public String getName() {
-               return name;
-       }
-
-       public void setName(String name) {
-               this.name = name;
-       }
-
-       public String getDescription() {
-               return description;
-       }
-
-       public void setDescription(String description) {
-               this.description = description;
-       }
-
-}
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
deleted file mode 100644 (file)
index 039724f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-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
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/org.argeo.slc.api/src/org/argeo/slc/package.html b/org.argeo.slc.api/src/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/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveAccessor.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveAccessor.java
deleted file mode 100644 (file)
index b3f87ba..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.argeo.slc.primitive;
-
-/** Abstraction of access to primitive values */
-public interface PrimitiveAccessor {
-       public final static String TYPE_STRING = "string";
-       /**
-        * As of Argeo 1, passwords are NOT stored encrypted, just hidden in the UI,
-        * but stored in plain text in JCR. Use keyring instead.
-        */
-       public final static String TYPE_PASSWORD = "password";
-       public final static String TYPE_INTEGER = "integer";
-       public final static String TYPE_LONG = "long";
-       public final static String TYPE_FLOAT = "float";
-       public final static String TYPE_DOUBLE = "double";
-       public final static String TYPE_BOOLEAN = "boolean";
-
-       public String getType();
-
-       public Object getValue();
-
-       public void setValue(Object value);
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveSpecAttribute.java
deleted file mode 100644 (file)
index cc3ee67..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.argeo.slc.primitive;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.AbstractSpecAttribute;
-
-/**
- * A spec attribute wrapping a primitive value.
- * 
- * @see PrimitiveAccessor
- */
-public class PrimitiveSpecAttribute extends AbstractSpecAttribute implements
-               PrimitiveAccessor {
-       private static final long serialVersionUID = -566676381839825483L;
-       private String type = "string";
-       private Object value = null;
-
-       public PrimitiveSpecAttribute() {
-       }
-
-       public PrimitiveSpecAttribute(String type, Object value) {
-               this.type = type;
-               this.value = value;
-       }
-
-       public Object getValue() {
-               return value;
-       }
-
-       public void setValue(Object value) {
-               this.value = value;
-       }
-
-       public String getType() {
-               return type;
-       }
-
-       public void setType(String type) {
-               // check whether type is recognized.
-               if (PrimitiveUtils.typeAsClass(type) == null)
-                       throw new SlcException("Unrecognized type " + type);
-               this.type = type;
-
-       }
-
-       @Override
-       public String toString() {
-               return "Primitive spec attribute [" + type + "]"
-                               + (value != null ? "=" + value : "");
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveUtils.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveUtils.java
deleted file mode 100644 (file)
index 679e808..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.argeo.slc.primitive;
-
-/** Converts to and from primitive types. */
-public class PrimitiveUtils {
-       /**
-        * @deprecated Use {@link PrimitiveAccessor#TYPE_STRING} instead
-        */
-       public final static String TYPE_STRING = PrimitiveAccessor.TYPE_STRING;
-       /**
-        * @deprecated Use {@link PrimitiveAccessor#TYPE_INTEGER} instead
-        */
-       public final static String TYPE_INTEGER = PrimitiveAccessor.TYPE_INTEGER;
-       /**
-        * @deprecated Use {@link PrimitiveAccessor#TYPE_LONG} instead
-        */
-       public final static String TYPE_LONG = PrimitiveAccessor.TYPE_LONG;
-       /**
-        * @deprecated Use {@link PrimitiveAccessor#TYPE_FLOAT} instead
-        */
-       public final static String TYPE_FLOAT = PrimitiveAccessor.TYPE_FLOAT;
-       /**
-        * @deprecated Use {@link PrimitiveAccessor#TYPE_DOUBLE} instead
-        */
-       public final static String TYPE_DOUBLE = PrimitiveAccessor.TYPE_DOUBLE;
-       /**
-        * @deprecated Use {@link PrimitiveAccessor#TYPE_BOOLEAN} instead
-        */
-       public final static String TYPE_BOOLEAN = PrimitiveAccessor.TYPE_BOOLEAN;
-
-       private PrimitiveUtils() {
-
-       }
-
-       /** @return the class or null if the provided type is not a primitive */
-       public static Class<?> typeAsClass(String type) {
-               if (PrimitiveAccessor.TYPE_STRING.equals(type))
-                       return String.class;
-               else if (PrimitiveAccessor.TYPE_PASSWORD.equals(type))
-                       return char[].class;
-               else if (PrimitiveAccessor.TYPE_INTEGER.equals(type))
-                       return Integer.class;
-               else if (PrimitiveAccessor.TYPE_LONG.equals(type))
-                       return Long.class;
-               else if (PrimitiveAccessor.TYPE_FLOAT.equals(type))
-                       return Float.class;
-               else if (PrimitiveAccessor.TYPE_DOUBLE.equals(type))
-                       return Double.class;
-               else if (PrimitiveAccessor.TYPE_BOOLEAN.equals(type))
-                       return Boolean.class;
-               else
-                       return null;
-       }
-
-       /** @return the type or null if the provided class is not a primitive */
-       public static String classAsType(Class<?> clss) {
-               if (String.class.isAssignableFrom(clss))
-                       return PrimitiveAccessor.TYPE_STRING;
-               else if (char[].class.isAssignableFrom(clss))
-                       return PrimitiveAccessor.TYPE_PASSWORD;
-               else if (Integer.class.isAssignableFrom(clss))
-                       return PrimitiveAccessor.TYPE_INTEGER;
-               else if (Long.class.isAssignableFrom(clss))
-                       return PrimitiveAccessor.TYPE_LONG;
-               else if (Float.class.isAssignableFrom(clss))
-                       return PrimitiveAccessor.TYPE_FLOAT;
-               else if (Double.class.isAssignableFrom(clss))
-                       return PrimitiveAccessor.TYPE_DOUBLE;
-               else if (Boolean.class.isAssignableFrom(clss))
-                       return PrimitiveAccessor.TYPE_BOOLEAN;
-               else
-                       return null;
-       }
-
-       /** Parse string as an object. Passwords are returned as String.*/
-       public static Object convert(String type, String str) {
-               if (PrimitiveAccessor.TYPE_STRING.equals(type)) {
-                       return str;
-               } else if (PrimitiveAccessor.TYPE_PASSWORD.equals(type)) {
-                       return str;
-               } else if (PrimitiveAccessor.TYPE_INTEGER.equals(type)) {
-                       return (Integer.parseInt(str));
-               } else if (PrimitiveAccessor.TYPE_LONG.equals(type)) {
-                       return (Long.parseLong(str));
-               } else if (PrimitiveAccessor.TYPE_FLOAT.equals(type)) {
-                       return (Float.parseFloat(str));
-               } else if (PrimitiveAccessor.TYPE_DOUBLE.equals(type)) {
-                       return (Double.parseDouble(str));
-               } else if (PrimitiveAccessor.TYPE_BOOLEAN.equals(type)) {
-                       return (Boolean.parseBoolean(str));
-               } else {
-                       return str;
-               }
-       }
-
-}
diff --git a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveValue.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveValue.java
deleted file mode 100644 (file)
index 0c2bf23..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.argeo.slc.primitive;
-
-import org.argeo.slc.execution.AbstractExecutionValue;
-
-/** Primitive value to be used by an execution. */
-public class PrimitiveValue extends AbstractExecutionValue implements
-               PrimitiveAccessor {
-       private static final long serialVersionUID = 533414290998374166L;
-
-       private String type;
-
-       private Object value;
-
-       public PrimitiveValue() {
-       }
-
-       public PrimitiveValue(String type, Object value) {
-               super();
-               this.type = type;
-               this.value = value;
-       }
-
-       public String getType() {
-               return type;
-       }
-
-       public void setType(String type) {
-               this.type = type;
-       }
-
-       public Object getValue() {
-               return value;
-       }
-
-       public void setValue(Object value) {
-               this.value = value;
-       }
-
-}
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
deleted file mode 100644 (file)
index f18196a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-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
deleted file mode 100644 (file)
index de5d900..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-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
deleted file mode 100644 (file)
index 47973ad..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-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
deleted file mode 100644 (file)
index 754a3df..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644 (file)
index c7bfeac..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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
deleted file mode 100644 (file)
index 767b286..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.argeo.slc.test;
-
-import java.util.Date;
-import java.util.Map;
-
-/** The result of a test */
-public interface TestResult extends TestStatus, TestRunAware {
-       public String getUuid();
-
-       /** Adds a part of the result. */
-       public void addResultPart(TestResultPart part);
-
-       /**
-        * Marks that the collection of test results is completed and free the
-        * related resources (also closing listeners).
-        */
-       public void close();
-
-       /**
-        * The date when this test result was closed. Can be null, which means the
-        * result is not closed.
-        */
-       public Date getCloseDate();
-
-       /** Additional arbitrary meta data */
-       public Map<String, String> getAttributes();
-}
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
deleted file mode 100644 (file)
index c2ad8ed..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.argeo.slc.test;
-
-/** Listener to the operations on a test result. */
-public interface TestResultListener<T extends TestResult> {
-       /** Notified when a part was added to a test result. */
-       public void resultPartAdded(T testResult, TestResultPart testResultPart);
-
-       /** Stops listening and release the related resources. */
-       public void close(T testResult);
-}
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
deleted file mode 100644 (file)
index ec984f9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.argeo.slc.test;
-
-/**
- * Part of a test result.
- * 
- * @see TestResult
- */
-public interface TestResultPart {
-       /** The status, as defined in {@link TestStatus}. */
-       public Integer getStatus();
-
-       /** The related message. */
-       public String getMessage();
-
-       /** The underlying <code>Exception</code>. Can be null. */
-       public String getExceptionMessage();
-}
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
deleted file mode 100644 (file)
index a3e8aeb..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.argeo.slc.test;
-
-import org.argeo.slc.deploy.DeployedSystem;
-
-/** The actual run of a test */
-public interface TestRun {
-       /** Gets UUID */
-       public String getUuid();
-
-       /** Gets the related test definition. */
-       public <T extends TestDefinition> T getTestDefinition();
-
-       /** Gets the related test data */
-       public <T extends TestData> T getTestData();
-
-       /** Gets the related deployed system. */
-       public <T extends DeployedSystem> T getDeployedSystem();
-
-       /** Gets the related result where to record results. */
-       public <T extends TestResult> T getTestResult();
-}
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
deleted file mode 100644 (file)
index 5458559..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.argeo.slc.test;
-
-/** Allows a test run to notify other objects. */
-public interface TestRunAware {
-       /** Notifies the current test run. */
-       public void notifyTestRun(TestRun testRun);
-
-}
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
deleted file mode 100644 (file)
index a5e10d3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.argeo.slc.test;
-
-/**
- * Simple statuses. Ordering of the flags can be relied upon in aggregation: if
- * one element is failed, the aggregation is failed. Is one element is in ERROR,
- * the aggregation is in ERROR.
- * <p>
- * <ul>
- * <li>{@link #PASSED}: the test succeeded</li>
- * <li>{@link #FAILED}: the test could run, but did not reach the expected
- * result</li>
- * <li>{@link #ERROR}: an error during the test run prevented to get a
- * significant information on the tested system.</li>
- * </ul>
- * </p>
- */
-public interface TestStatus {
-       /** The flag for a passed test: 0 */
-       public final static Integer PASSED = 0;
-       /** The flag for a failed test: 1 */
-       public final static Integer FAILED = 1;
-       /**
-        * The flag for a test which could not properly run because of an error
-        * (there is no feedback on the behavior of the tested component): 2
-        */
-       public final static Integer ERROR = 2;
-       public final static String STATUSSTR_PASSED = "PASSED";
-       public final static String STATUSSTR_FAILED = "FAILED";
-       public final static String STATUSSTR_ERROR = "ERROR";
-
-}
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
deleted file mode 100644 (file)
index 1a2ab23..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.argeo.slc.test;
-
-import org.argeo.slc.deploy.DeployedSystem;
-
-/** Test run whose various components can be externally set. */
-public interface WritableTestRun extends ExecutableTestRun {
-       public void setDeployedSystem(DeployedSystem deployedSystem);
-
-       public void setTestData(TestData testData);
-
-       public void setTestDefinition(TestDefinition testDefinition);
-
-       public void setTestResult(TestResult testResult);
-}
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
deleted file mode 100644 (file)
index d2cd86f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-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
deleted file mode 100644 (file)
index b4044f7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-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
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/org.argeo.slc.api/src/org/argeo/slc/test/package.html b/org.argeo.slc.api/src/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
index 263e792e0bc638c316a2b018f96efcd892945e5c..971fb50316959e6ab2ebce7b3e6e8155b43bdf24 100644 (file)
@@ -1,6 +1,6 @@
 Bundle-Activator: org.argeo.slc.internal.runtime.osgi.SlcInitActivator
 
 Import-Package: \
-org.argeo.slc.deploy,\
+org.argeo.api.slc.deploy,\
 org.apache.commons.exec.*;resolution:=optional,\
 *
\ No newline at end of file
index feec64f186cfaa13750b855a316d350fde28a277..ad33f4a5088ac39557e8b4209dd072167eef72b1 100644 (file)
@@ -1,6 +1,6 @@
 package org.argeo.slc.cms.deploy;
 
-import org.argeo.slc.deploy.DeployedSystem;
+import org.argeo.api.slc.deploy.DeployedSystem;
 
 public interface CmsDeployedSystem extends DeployedSystem {
 
index 17cecd829660f0874c729e3fca3ad93f72bb76d2..844c9e7a040fba3c282ff10618dd0a06c4d53a00 100644 (file)
@@ -2,7 +2,7 @@ package org.argeo.slc.cms.deploy;
 
 import java.util.List;
 
-import org.argeo.slc.deploy.DeploymentData;
+import org.argeo.api.slc.deploy.DeploymentData;
 
 public interface CmsDeploymentData extends DeploymentData {
        List<String> getModulesToActivate(int startLevel);
index 8e8d147ce244cdab6e0ffa1c0165c80df5644834..eee2f8b795f50644260c42c8c66fba12fe4ec900 100644 (file)
@@ -2,7 +2,7 @@ package org.argeo.slc.cms.deploy;
 
 import java.nio.file.Path;
 
-import org.argeo.slc.deploy.TargetData;
+import org.argeo.api.slc.deploy.TargetData;
 
 public interface CmsTargetData extends TargetData {
        Path getInstanceData();
index 25d57b897955f03a194f4d45d514272f97afaebc..6417e86391a841f20bfce9e1c0aef1f7048b5543 100644 (file)
@@ -1,12 +1,12 @@
 package org.argeo.slc.cms.deploy.osgi;
 
-import org.argeo.slc.build.Distribution;
-import org.argeo.slc.build.ModularDistribution;
+import org.argeo.api.slc.build.Distribution;
+import org.argeo.api.slc.build.ModularDistribution;
+import org.argeo.api.slc.deploy.DeploymentData;
+import org.argeo.api.slc.deploy.TargetData;
 import org.argeo.slc.cms.deploy.CmsDeployedSystem;
 import org.argeo.slc.cms.deploy.CmsDeploymentData;
 import org.argeo.slc.cms.deploy.CmsTargetData;
-import org.argeo.slc.deploy.DeploymentData;
-import org.argeo.slc.deploy.TargetData;
 import org.osgi.framework.BundleContext;
 
 /** A deployed OSGi-based Argeo CMS system. */
index f6e55caef9ae31ce58ab440d4a616589f43b17de..38974a013ce9846d74ab7ed2a1fa692a6aac1412 100644 (file)
@@ -16,18 +16,18 @@ import org.argeo.api.a2.A2Source;
 import org.argeo.api.a2.FsA2Source;
 import org.argeo.api.init.InitConstants;
 import org.argeo.api.init.RuntimeContext;
+import org.argeo.api.slc.WellKnownConstants;
+import org.argeo.api.slc.build.Distribution;
+import org.argeo.api.slc.deploy.DeployedSystem;
+import org.argeo.api.slc.deploy.Deployment;
+import org.argeo.api.slc.deploy.DeploymentData;
+import org.argeo.api.slc.deploy.TargetData;
 import org.argeo.init.osgi.OsgiRuntimeContext;
-import org.argeo.slc.WellKnownConstants;
-import org.argeo.slc.build.Distribution;
 import org.argeo.slc.cms.deploy.CmsDeployedSystem;
 import org.argeo.slc.cms.deploy.CmsDeploymentData;
 import org.argeo.slc.cms.deploy.CmsTargetData;
 import org.argeo.slc.cms.deploy.SimpleCmsDeploymentData;
 import org.argeo.slc.cms.distribution.A2Distribution;
-import org.argeo.slc.deploy.DeployedSystem;
-import org.argeo.slc.deploy.Deployment;
-import org.argeo.slc.deploy.DeploymentData;
-import org.argeo.slc.deploy.TargetData;
 
 /** The process of deploying an OSGi based Argeo CMS system. */
 public class OsgiCmsDeployment implements Deployment {
index 435d2d6f5c29f86e807492461192994a55c96938..f0401af537ce7b1d84f4a4be4cf70e391bedab82 100644 (file)
@@ -9,11 +9,11 @@ import org.argeo.api.a2.A2Component;
 import org.argeo.api.a2.A2Contribution;
 import org.argeo.api.a2.A2Module;
 import org.argeo.api.a2.A2Source;
-import org.argeo.slc.CategoryNameVersion;
-import org.argeo.slc.DefaultCategoryNameVersion;
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.build.Distribution;
-import org.argeo.slc.build.ModularDistribution;
+import org.argeo.api.slc.CategoryNameVersion;
+import org.argeo.api.slc.DefaultCategoryNameVersion;
+import org.argeo.api.slc.NameVersion;
+import org.argeo.api.slc.build.Distribution;
+import org.argeo.api.slc.build.ModularDistribution;
 
 public class A2Distribution implements ModularDistribution {
        private List<A2Source> a2Sources = new ArrayList<>();
index 9e90bce8f23790f1574b4ede189f52f508635b11..2a56628f1fafedc65e4c3aa813f5cd0480352598 100644 (file)
@@ -1,7 +1,7 @@
 package org.argeo.slc.cms.distribution;
 
 import org.argeo.api.a2.A2Module;
-import org.argeo.slc.build.Distribution;
+import org.argeo.api.slc.build.Distribution;
 
 public class A2ModuleDistribution implements Distribution {
        private A2Module a2Module;
index 149665cdf425897957c5dad2e5fea1720e2c7251..257e53d3567d52daff7a0531cec61087d64cec74 100644 (file)
@@ -2,11 +2,11 @@ package org.argeo.slc.runtime;
 
 import java.util.Map;
 
-import org.argeo.slc.execution.ExecutionContext;
-import org.argeo.slc.execution.ExecutionFlow;
-import org.argeo.slc.execution.ExecutionFlowDescriptorConverter;
-import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.execution.RealizedFlow;
+import org.argeo.api.slc.execution.ExecutionContext;
+import org.argeo.api.slc.execution.ExecutionFlow;
+import org.argeo.api.slc.execution.ExecutionFlowDescriptorConverter;
+import org.argeo.api.slc.execution.ExecutionModulesManager;
+import org.argeo.api.slc.execution.RealizedFlow;
 
 /** Provides the base feature of an execution module manager. */
 public abstract class AbstractExecutionModulesManager implements
index 31b5396cf3ad551ba07c52503971db04be931cff..1a9dd78ff67ac66f301f07214cdc4fc603344119 100644 (file)
@@ -11,13 +11,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import org.argeo.slc.DefaultNameVersion;
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionModuleDescriptor;
-import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.SlcAgent;
+import org.argeo.api.slc.DefaultNameVersion;
+import org.argeo.api.slc.NameVersion;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.execution.ExecutionModuleDescriptor;
+import org.argeo.api.slc.execution.ExecutionModulesManager;
+import org.argeo.api.slc.execution.ExecutionProcess;
+import org.argeo.api.slc.execution.SlcAgent;
 
 /** Implements the base methods of an SLC agent. */
 public class DefaultAgent implements SlcAgent {
index dbe1d7f6e296055d3c6ee3bc8eb71e2c63a68c8f..97d4c616ecdcaa4bf611e8a9b5820b0af88fe5dc 100644 (file)
@@ -8,15 +8,15 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.argeo.slc.DefaultNameVersion;
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionFlowDescriptor;
-import org.argeo.slc.execution.ExecutionModuleDescriptor;
-import org.argeo.slc.execution.ExecutionSpec;
-import org.argeo.slc.execution.ExecutionSpecAttribute;
-import org.argeo.slc.execution.SlcAgent;
-import org.argeo.slc.execution.SlcAgentCli;
+import org.argeo.api.slc.DefaultNameVersion;
+import org.argeo.api.slc.NameVersion;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.execution.ExecutionFlowDescriptor;
+import org.argeo.api.slc.execution.ExecutionModuleDescriptor;
+import org.argeo.api.slc.execution.ExecutionSpec;
+import org.argeo.api.slc.execution.ExecutionSpecAttribute;
+import org.argeo.api.slc.execution.SlcAgent;
+import org.argeo.api.slc.execution.SlcAgentCli;
 
 /**
  * Authenticates thread and executes synchronously a command line execution.
index 9e31306adf765d2c35c9f2d0ed3c3fa20ff9652f..07d044b77beb5c06e47e15f2b70bc11743b502e7 100644 (file)
@@ -10,11 +10,11 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionContext;
-import org.argeo.slc.execution.ExecutionFlow;
-import org.argeo.slc.execution.ExecutionSpec;
-import org.argeo.slc.execution.ExecutionSpecAttribute;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.execution.ExecutionContext;
+import org.argeo.api.slc.execution.ExecutionFlow;
+import org.argeo.api.slc.execution.ExecutionSpec;
+import org.argeo.api.slc.execution.ExecutionSpecAttribute;
 
 /** Default implementation of an execution flow. */
 public class DefaultExecutionFlow implements ExecutionFlow {
index 16790a4dcd5fd3e7339de41ba80863dfdea5e405..d0b2b42d64d123d25cb0bfff003a1f6cb9b1b0f7 100644 (file)
@@ -6,10 +6,10 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.argeo.slc.execution.ExecutionSpec;
-import org.argeo.slc.execution.ExecutionSpecAttribute;
-import org.argeo.slc.execution.RefSpecAttribute;
-import org.argeo.slc.execution.RefValueChoice;
+import org.argeo.api.slc.execution.ExecutionSpec;
+import org.argeo.api.slc.execution.ExecutionSpecAttribute;
+import org.argeo.api.slc.execution.RefSpecAttribute;
+import org.argeo.api.slc.execution.RefValueChoice;
 
 /** Spring based implementation of execution specifications. */
 public class DefaultExecutionSpec implements ExecutionSpec, Serializable {
index b30d51788a8ac9be0b974002bb58aeedc08bbcfa..fd0f1f76f214ea7b4170603d2200bcc40f0bd41f 100644 (file)
@@ -5,10 +5,10 @@ import java.util.Map;
 import java.util.Stack;
 import java.util.UUID;
 
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionFlow;
-import org.argeo.slc.execution.ExecutionSpecAttribute;
-import org.argeo.slc.execution.ExecutionStack;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.execution.ExecutionFlow;
+import org.argeo.api.slc.execution.ExecutionSpecAttribute;
+import org.argeo.api.slc.execution.ExecutionStack;
 
 /** Canonical implementation of an execution stack. */
 public class DefaultExecutionStack implements ExecutionStack {
index 9e98685dd3518e7f78bdc3b9161b319f38f7b92e..7e43dd13c901afa0ef3712620261bf23c667ae25 100644 (file)
@@ -4,9 +4,9 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.execution.RealizedFlow;
+import org.argeo.api.slc.execution.ExecutionProcess;
+import org.argeo.api.slc.execution.ExecutionStep;
+import org.argeo.api.slc.execution.RealizedFlow;
 
 /** Canonical implementation of an {@link ExecutionProcess} as a bean. */
 public class DefaultProcess implements ExecutionProcess {
index 7e0e7377852f67dc0da0514c9019c84de85d400f..9e2f0681907007b7645a949c1d89c07929613afa 100644 (file)
@@ -12,11 +12,11 @@ import java.util.List;
 
 import javax.security.auth.Subject;
 
-import org.argeo.slc.execution.ExecutionFlowDescriptor;
-import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.execution.FlowConfigurationException;
-import org.argeo.slc.execution.RealizedFlow;
+import org.argeo.api.slc.execution.ExecutionFlowDescriptor;
+import org.argeo.api.slc.execution.ExecutionModulesManager;
+import org.argeo.api.slc.execution.ExecutionStep;
+import org.argeo.api.slc.execution.FlowConfigurationException;
+import org.argeo.api.slc.execution.RealizedFlow;
 
 /** Thread of a single execution */
 public class ExecutionThread extends Thread {
index 2e29438e360901bc5079d67a3913c5144da140e0..911e95aaa305681e05f4c210efb59307086a1300 100644 (file)
@@ -3,12 +3,12 @@ package org.argeo.slc.runtime;
 import java.lang.System.Logger.Level;
 import java.util.Stack;
 
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionFlow;
-import org.argeo.slc.execution.ExecutionSpecAttribute;
-import org.argeo.slc.execution.RefSpecAttribute;
-import org.argeo.slc.primitive.PrimitiveSpecAttribute;
-import org.argeo.slc.primitive.PrimitiveUtils;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.execution.ExecutionFlow;
+import org.argeo.api.slc.execution.ExecutionSpecAttribute;
+import org.argeo.api.slc.execution.RefSpecAttribute;
+import org.argeo.api.slc.primitive.PrimitiveSpecAttribute;
+import org.argeo.api.slc.primitive.PrimitiveUtils;
 
 /** Manage parameters that need to be set during the instantiation of a flow */
 public class InstantiationManager {
index 1bbf9d12857a3bb554491aff8625125aa8e8f008..8df7caa8e081a065106be68c2c0733156e5bc4ea 100644 (file)
@@ -13,11 +13,11 @@ import java.util.Set;
 
 import javax.security.auth.Subject;
 
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.execution.RealizedFlow;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.execution.ExecutionModulesManager;
+import org.argeo.api.slc.execution.ExecutionProcess;
+import org.argeo.api.slc.execution.ExecutionStep;
+import org.argeo.api.slc.execution.RealizedFlow;
 
 /**
  * Main thread coordinating an {@link ExecutionProcess}, launching parallel or
index 79f38d77b48c686480d32b9695ba578be5771eba..b1792ba4598253a58e71d19e4b14df305488262d 100644 (file)
@@ -3,8 +3,8 @@ package org.argeo.slc.runtime;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionStep;
+import org.argeo.api.slc.execution.ExecutionProcess;
+import org.argeo.api.slc.execution.ExecutionStep;
 
 /** The thread group attached to a given {@link SlcExecution}. */
 public class ProcessThreadGroup extends ThreadGroup {
index 2bb48b8fa007fd354cb3de374b44c3b7605cef85..aa12d78a1284221b3917dcc24c9cbc3317576312 100644 (file)
@@ -1,6 +1,6 @@
 package org.argeo.slc.runtime.tasks;
 
-import org.argeo.slc.test.TestResult;
+import org.argeo.api.slc.test.TestResult;
 
 public class CloseTestResult implements Runnable {
        private TestResult testResult;
index 6695313a34c3cbb9bb33d62fe18d1a6cf0b2ab45..290f2160f8c56f33b9941b1a1e68e85c74f891ed 100644 (file)
@@ -7,7 +7,7 @@ import java.lang.System.Logger.Level;
 import java.nio.file.Path;
 
 import org.apache.commons.io.FileUtils;
-import org.argeo.slc.SlcException;
+import org.argeo.api.slc.SlcException;
 
 public class Echo implements Runnable {
        private final static Logger defaultLogger = System.getLogger(Echo.class.getName());
index 08eb804ccb1554dc79a05350c79f7a810f1a2651..0a634cf1a6a5071d0c70abd3bcfcae30b1f407e3 100644 (file)
@@ -1,6 +1,6 @@
 package org.argeo.slc.runtime.tasks;
 
-import org.argeo.slc.SlcException;
+import org.argeo.api.slc.SlcException;
 
 /** Conditional execution */
 public class If implements Runnable {
index c89f2b81422c735a3900b806a5ffcee89fdbd58c..36f357e5f4404072d5b29a6831c35d4e098f7460 100644 (file)
@@ -11,7 +11,7 @@ import java.util.Map;
 import java.util.Properties;
 
 import org.apache.commons.io.IOUtils;
-import org.argeo.slc.SlcException;
+import org.argeo.api.slc.SlcException;
 
 /** A Java Virtual Machine process. */
 public class JvmProcess extends SystemCall {
index d421cd2f214e196bbd66900cfb52a1eca5108cf5..07c67c3a1b4dcc814b58ae0b20b1464ea480a6a8 100644 (file)
@@ -39,12 +39,12 @@ import org.apache.commons.exec.PumpStreamHandler;
 import org.apache.commons.exec.ShutdownHookProcessDestroyer;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.UnsupportedException;
-import org.argeo.slc.execution.ExecutionResources;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.UnsupportedException;
+import org.argeo.api.slc.execution.ExecutionResources;
+import org.argeo.api.slc.test.TestResult;
+import org.argeo.api.slc.test.TestStatus;
 import org.argeo.slc.runtime.test.SimpleResultPart;
-import org.argeo.slc.test.TestResult;
-import org.argeo.slc.test.TestStatus;
 
 /** Execute an OS specific system call. */
 public class SystemCall implements Runnable {
index ec6261d6818f8dcd4066e22c5dc70a3c7a6b472f..8c570243a7b6b50b14a04ad0d3bb97796317bef5 100644 (file)
@@ -1,6 +1,6 @@
 package org.argeo.slc.runtime.test;
 
-import org.argeo.slc.test.TestData;
+import org.argeo.api.slc.test.TestData;
 
 public class BasicTestData implements TestData {
        private Object expected;
index 3bc49f611a96f92e122c209e518a9c439d6c3505..fae387306e71d9b50f721366d04b2be600096351 100644 (file)
@@ -1,13 +1,13 @@
 package org.argeo.slc.runtime.test;
 
-import org.argeo.slc.SlcException;
-import org.argeo.slc.test.IncompatibleTestDataException;
-import org.argeo.slc.test.TestData;
-import org.argeo.slc.test.TestDefinition;
-import org.argeo.slc.test.TestResult;
-import org.argeo.slc.test.TestRun;
-import org.argeo.slc.test.TestStatus;
-import org.argeo.slc.test.context.ContextAware;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.test.IncompatibleTestDataException;
+import org.argeo.api.slc.test.TestData;
+import org.argeo.api.slc.test.TestDefinition;
+import org.argeo.api.slc.test.TestResult;
+import org.argeo.api.slc.test.TestRun;
+import org.argeo.api.slc.test.TestStatus;
+import org.argeo.api.slc.test.context.ContextAware;
 
 /** Understands basic test data and context aware test data. */
 public class BasicTestDefinition implements TestDefinition {
index 96ce5e1bfb8fbfcc7d247470fa1bc3bef78f8ce7..f3c52fad4787335ef23aaf9718f10fc02ead2a04 100644 (file)
@@ -3,10 +3,10 @@ package org.argeo.slc.runtime.test;
 import java.util.Map;
 import java.util.TreeMap;
 
-import org.argeo.slc.test.TestResult;
-import org.argeo.slc.test.TestStatus;
-import org.argeo.slc.test.context.ContextAware;
-import org.argeo.slc.test.context.ParentContextAware;
+import org.argeo.api.slc.test.TestResult;
+import org.argeo.api.slc.test.TestStatus;
+import org.argeo.api.slc.test.context.ContextAware;
+import org.argeo.api.slc.test.context.ParentContextAware;
 
 /** Utilities for comparing and synchronising contexts. */
 public class ContextUtils {
index 7ba74646331283d97667807794473197e549b1d9..f77fa9f395be041ff0abd14a1b55acf7383c2088 100644 (file)
@@ -2,10 +2,10 @@ package org.argeo.slc.runtime.test;
 
 import java.io.Serializable;
 
-import org.argeo.slc.test.TestResultPart;
-import org.argeo.slc.test.TestRun;
-import org.argeo.slc.test.TestRunAware;
-import org.argeo.slc.test.TestStatus;
+import org.argeo.api.slc.test.TestResultPart;
+import org.argeo.api.slc.test.TestRun;
+import org.argeo.api.slc.test.TestRunAware;
+import org.argeo.api.slc.test.TestStatus;
 
 /**
  * <p>
index 88f0a24b0b2b2e181f0138b74540bbfbfe9c6401..649e5d390f6ef661c786b958d9bd2d5ae78151a1 100644 (file)
@@ -7,10 +7,10 @@ import java.util.TreeMap;
 import java.util.UUID;
 import java.util.Vector;
 
-import org.argeo.slc.SlcException;
-import org.argeo.slc.test.TestResult;
-import org.argeo.slc.test.TestResultPart;
-import org.argeo.slc.test.TestRun;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.test.TestResult;
+import org.argeo.api.slc.test.TestResultPart;
+import org.argeo.api.slc.test.TestRun;
 
 /**
  * Basic implementation of a test result containing only a list of result parts.
index bc0145295be9b3c80fb2042947352e52d4cde3f4..44737931d79d1320b04e0e571fe17fb45e660823 100644 (file)
@@ -2,12 +2,12 @@ package org.argeo.slc.runtime.test;
 
 import java.util.UUID;
 
-import org.argeo.slc.deploy.DeployedSystem;
-import org.argeo.slc.test.ExecutableTestRun;
-import org.argeo.slc.test.TestData;
-import org.argeo.slc.test.TestDefinition;
-import org.argeo.slc.test.TestResult;
-import org.argeo.slc.test.WritableTestRun;
+import org.argeo.api.slc.deploy.DeployedSystem;
+import org.argeo.api.slc.test.ExecutableTestRun;
+import org.argeo.api.slc.test.TestData;
+import org.argeo.api.slc.test.TestDefinition;
+import org.argeo.api.slc.test.TestResult;
+import org.argeo.api.slc.test.WritableTestRun;
 
 /**
  * A basic bean implementation of a <code>WritableTestRun</code>, holding
index 5275d0f5410ec43974b634660ee2e96e99868f2f..87409d42c883996fb4d7f548b32225481c6d8cad 100644 (file)
@@ -1,7 +1,7 @@
 package org.argeo.slc.runtime.test;
 
-import org.argeo.slc.SlcException;
-import org.argeo.slc.test.TestStatus;
+import org.argeo.api.slc.SlcException;
+import org.argeo.api.slc.test.TestStatus;
 
 public abstract class SlcTestUtils {
        public static String statusToString(Integer status) {
index 872f1a5ab3bb4acd24a7ec2af0d0e9cd9d0c4de9..e5d8c7b2f27c0fd4f1eae2369b593ca4b1aef5a1 100644 (file)
@@ -1,8 +1,8 @@
 package org.argeo.slc.runtime.test;
 
-import org.argeo.slc.UnsupportedException;
-import org.argeo.slc.test.TestData;
-import org.argeo.slc.test.TestDataProvider;
+import org.argeo.api.slc.UnsupportedException;
+import org.argeo.api.slc.test.TestData;
+import org.argeo.api.slc.test.TestDataProvider;
 
 /** Utilities for dealing with test datas. */
 public class TestDataUtils {