]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableDataNode.java
Rename SLC Core into SLC Spring.
[gpl/argeo-slc.git] / org.argeo.slc.spring / src / org / argeo / slc / core / execution / generator / RunnableDataNode.java
diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableDataNode.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableDataNode.java
new file mode 100644 (file)
index 0000000..51843dc
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+ * Copyright (C) 2007-2012 Argeo GmbH\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.core.execution.generator;\r
+\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+/**\r
+ * Stores information relative to a Runnable.\r
+ * Allows to structure the information as a tree, each node\r
+ * storing data as a Map.\r
+ */\r
+public interface RunnableDataNode {\r
+\r
+       /**\r
+        * @return a Map containing the data associated with this node.\r
+        * Data associated with parent nodes are expected\r
+        * to be contained in the returned Map\r
+        */\r
+       public Map<String, Object> getData();   \r
+\r
+       /**\r
+        * @return the name of the bean to create.\r
+        * Can be null if no bean shall be created for the \r
+        * <code>RunnableDataNode</code> (e.g. is is a sub-node)\r
+        */\r
+       public String getBeanName();\r
+       \r
+       /**\r
+        * @return the path of the flow bean to create.\r
+        * Can be null if the bean to created is not an\r
+        * <code>ExecutionFlow</code> or if no bean shall be created for the \r
+        * <code>RunnableDataNode</code> (e.g. is is a sub-node)\r
+        */\r
+       public String getPath();\r
+               \r
+       /**\r
+        * @return whether the <code>RunnableDataNode</code> has\r
+        * children or not.\r
+        * Expected to be equivalent to <code>getChildren().empty()</code>\r
+        */\r
+       public boolean isLeaf();\r
+\r
+       /**\r
+        * @return the list of <code>RunnableDataNode</code> children.\r
+        * Can be empty. Shall not be null.\r
+        */\r
+       public List<RunnableDataNode> getChildren();\r
+       \r
+       /**\r
+        * @return the <code>RunnableDataNode</code> parent.\r
+        * Can be null if no parent is defined (top node).\r
+        */\r
+       public RunnableDataNode getParent();\r
+       \r
+       /**\r
+        * Sets the <code>RunnableDataNode</code> parent\r
+        * @param parent\r
+        */\r
+       public void setParent(RunnableDataNode parent); \r
+}\r