Author: koen.aers(a)jboss.com
Date: 2008-07-28 09:56:22 -0400 (Mon, 28 Jul 2008)
New Revision: 9355
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath
trunk/flow/plugins/org.jboss.tools.flow.common.core/.project
trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/
trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs
trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/
trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF
trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java
Log:
initial upload
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath
(rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath 2008-07-28 13:56:22 UTC
(rev 9355)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target"/>
+</classpath>
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/.project
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/.project
(rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/.project 2008-07-28 13:56:22 UTC
(rev 9355)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.flow.common.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,7 @@
+#Mon Jul 28 15:25:33 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Core Plug-in
+Bundle-SymbolicName: org.jboss.tools.flow.common.core
+Bundle-Version: 1.0.0
+Bundle-Vendor: JBoss, a Division of Red Hat
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties
(rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = target/
+bin.includes = META-INF/,\
+ .
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,56 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Represents a connection between two nodes in a workflow.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris
Verlaenen</a>
+ */
+public interface Connection {
+
+ /**
+ * Returns the from node of the connection.
+ * @return the from node of the connection.
+ */
+ Node getFrom();
+
+ /**
+ * Returns the to node of the connection
+ * @return the to node of the connection
+ */
+ Node getTo();
+
+ /**
+ * Returns the type of the connection at the from node
+ *
+ * @return the type of the connection at the from node
+ */
+ String getFromType();
+
+ /**
+ * Returns the type of the connection at the to node
+ *
+ * @return the type of the connection at the to node
+ */
+ String getToType();
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,99 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Represents a some process definition.
+ * A process has a name and a unique id.
+ * When a new version of a process is created, the name stays the same,
+ * but the id and the version of the process should be different.
+ * Different types of processes could be defined (e.g. RuleFlow).
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris
Verlaenen</a>
+ */
+public interface Flow extends NodeContainer {
+
+ /**
+ * Sets the id of this process.
+ * The id should uniquely identify this process.
+ * @param id the id of the process
+ */
+ void setId(String id);
+
+ /**
+ * Returns the id of this process.
+ * @return the id of this process
+ */
+ String getId();
+
+ /**
+ * Sets the name of this process.
+ * @param name the name of this process
+ */
+ void setName(String name);
+
+ /**
+ * Returns the name of this process.
+ * If no name is specified, null is returned.
+ * @return the name of this process
+ */
+ String getName();
+
+ /**
+ * Sets the version of this process.
+ * @param version the version of this process
+ */
+ void setVersion(String version);
+
+ /**
+ * Returns the version of this process.
+ * If no version is specified, null is returned.
+ * @return the version of this process
+ */
+ String getVersion();
+
+ /**
+ * Sets the type of this process.
+ * @param type the type of this process
+ */
+ void setType(String type);
+
+ /**
+ * Returns the type of this process.
+ * @return the type of this process
+ */
+ String getType();
+
+ /**
+ * Sets the package name of this RuleFlow process
+ *
+ * @param packageName the package name of this RuleFlow process
+ */
+ void setPackageName(String packageName);
+
+ /**
+ * Returns the package name of this RuleFlow process
+ *
+ * @return the package name of this RuleFlow process
+ */
+ String getPackageName();
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,91 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represents a node in a workflow process.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris
Verlaenen</a>
+ */
+public interface Node {
+
+ /**
+ * Returns the id of the node
+ *
+ * @return the id of the node
+ */
+ long getId();
+
+ /**
+ * Method for setting the id of the node
+ *
+ * @param id the id of the node
+ */
+ void setId(long id);
+
+ /**
+ * Returns the name of the node
+ *
+ * @return the name of the node
+ */
+ String getName();
+
+ /**
+ * Method for setting the name of the node
+ *
+ * @param name the name of the node
+ */
+ void setName(String name);
+
+ /**
+ * Returns the incoming connections
+ *
+ * @return the incoming connections
+ */
+ Map<String, List<Connection>> getIncomingConnections();
+
+ /**
+ * Returns the outgoing connections
+ *
+ * @return the outgoing connections
+ */
+ Map<String, List<Connection>> getOutgoingConnections();
+
+ void addIncomingConnection(String type, Connection connection);
+
+ void addOutgoingConnection(String type, Connection connection);
+
+ void removeIncomingConnection(String type, Connection connection);
+
+ void removeOutgoingConnection(String type, Connection connection);
+
+ List<Connection> getIncomingConnections(String type);
+
+ List<Connection> getOutgoingConnections(String type);
+
+ NodeContainer getNodeContainer();
+
+ void setNodeContainer(NodeContainer nodeContainer);
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,45 @@
+package org.jboss.tools.flow.common.core;
+
+/**
+ * A container of nodes.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris
Verlaenen</a>
+ */
+public interface NodeContainer {
+
+ /**
+ * Returns the nodes of this node container.
+ *
+ * @return the nodes of this node container
+ */
+ Node[] getNodes();
+
+ /**
+ * Returns the node with the given id
+ *
+ * @param id
+ * the node id
+ * @return the node with the given id
+ * @throws IllegalArgumentException
+ * if an unknown id is passed
+ */
+ Node getNode(long id);
+
+ /**
+ * Method for adding a node to this node container.
+ * Note that the node will get an id unique for this node container.
+ *
+ * @param node the node to be added
+ * @throws IllegalArgumentException if <code>node</code> is null
+ */
+ void addNode(Node node);
+
+ /**
+ * Method for removing a node from this node container
+ *
+ * @param node the node to be removed
+ * @throws IllegalArgumentException if <code>node</code> is null or
unknown
+ */
+ void removeNode(Node node);
+
+}
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java 2008-07-28
13:56:22 UTC (rev 9355)
@@ -0,0 +1,27 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/**
+ * Represents a RuleFlow process.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris
Verlaenen</a>
+ */
+public interface WorkflowProcess extends Flow, NodeContainer {
+
+}