summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process
diff options
context:
space:
mode:
authorThomas <thomas.lenz@egiz.gv.at>2019-12-05 09:52:48 +0100
committerThomas <thomas.lenz@egiz.gv.at>2019-12-05 09:52:48 +0100
commit3fada6cef21c9b16467177d866df778203b51b4d (patch)
tree8fe8ed37b6ee9fe35a1e035ceba6c68808328415 /eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process
parent95b21a826e5d81fdeabcf4673a9e87047edaec9d (diff)
downloadEAAF-Components-3fada6cef21c9b16467177d866df778203b51b4d.tar.gz
EAAF-Components-3fada6cef21c9b16467177d866df778203b51b4d.tar.bz2
EAAF-Components-3fada6cef21c9b16467177d866df778203b51b4d.zip
some code code-style modifications
active code-quality checks!
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java5
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java8
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java64
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java19
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java6
5 files changed, 59 insertions, 43 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java
index 7315dbf1..8f66afff 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java
@@ -21,11 +21,12 @@ package at.gv.egiz.eaaf.core.api.idp.process;
import java.io.Serializable;
import java.util.Map;
-import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition;
+import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition;
/**
- * Context used for evaluation of condition expressions set for {@linkplain Transition Transitions}.
+ * Context used for evaluation of condition expressions set for
+ * {@linkplain Transition Transitions}.
*
* @author tknall
*
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java
index 7fa67ae4..18e4533e 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java
@@ -29,11 +29,13 @@ public interface ExpressionEvaluator {
/**
* Evaluates a given {@code expression} returning a boolean value.
*
- * @param expressionContext The context which can be used for evaluation of the expression.
- * @param expression The expression resulting in a boolean (must not be {@code null}).
+ * @param expressionContext The context which can be used for evaluation of the
+ * expression.
+ * @param expression The expression resulting in a boolean (must not be
+ * {@code null}).
* @return A boolean value.
* @throws IllegalArgumentException In case of an invalid {@code expression}.
- * @throws NullPointerException In case of a {@code null} expression.
+ * @throws NullPointerException In case of a {@code null} expression.
*/
boolean evaluate(ExpressionEvaluationContext expressionContext, String expression);
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java
index d4c221e0..302deae4 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java
@@ -19,8 +19,8 @@
package at.gv.egiz.eaaf.core.api.idp.process;
-
import java.io.InputStream;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException;
import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParserException;
@@ -35,64 +35,71 @@ import at.gv.egiz.eaaf.core.impl.idp.process.model.ProcessDefinition;
public interface ProcessEngine {
/**
- * Registers a new process definition. Note that existing definitions with the same identifier
- * will be replaced.
+ * Registers a new process definition. Note that existing definitions with the
+ * same identifier will be replaced.
*
* @param processDefinition The process definition to be registered.
*/
void registerProcessDefinition(ProcessDefinition processDefinition);
/**
- * Registers a new process definition given as {@link InputStream}. Note that existing definitions
- * with the same identifier will be replaced.
+ * Registers a new process definition given as {@link InputStream}. Note that
+ * existing definitions with the same identifier will be replaced.
*
- * @param processDefinitionInputStream The input stream to the definition to be registered.
+ * @param processDefinitionInputStream The input stream to the definition to be
+ * registered.
* @return The process definition's identifier.
- * @throws ProcessDefinitionParserException Thrown in case of an error parsing the process
- * definition.
+ * @throws ProcessDefinitionParserException Thrown in case of an error parsing
+ * the process definition.
*/
String registerProcessDefinition(InputStream processDefinitionInputStream)
throws ProcessDefinitionParserException;
/**
- * Creates a process instance according to the referenced process definition, persists it into the
- * database and returns it identifier.
+ * Creates a process instance according to the referenced process definition,
+ * persists it into the database and returns it identifier.
* <p/>
- * Note that the method returns the identifier of a process instance which will be needed in order
- * to start a process or to continue process execution after asynchronous task execution (refer to
- * {@link #start(String)} and {@link #signal(String)} for further information).
+ * Note that the method returns the identifier of a process instance which will
+ * be needed in order to start a process or to continue process execution after
+ * asynchronous task execution (refer to {@link #start(String)} and
+ * {@link #signal(String)} for further information).
*
- * @param processDefinitionId The identifier of the respective process definition.
- * @param executionContext The execution context (may be {@code null}).
+ * @param processDefinitionId The identifier of the respective process
+ * definition.
+ * @param executionContext The execution context (may be {@code null}).
* @return The id of the newly created process instance (never {@code null}).
* @throws ProcessExecutionException Thrown in case of error, e.g. when a
- * {@code processDefinitionId} is referenced that does not exist.
+ * {@code processDefinitionId} is referenced
+ * that does not exist.
*/
String createProcessInstance(String processDefinitionId, ExecutionContext executionContext)
throws ProcessExecutionException;
/**
- * Creates a process instance according to the referenced process definition, persists it into the
- * database and returns it identifier.
+ * Creates a process instance according to the referenced process definition,
+ * persists it into the database and returns it identifier.
* <p/>
- * Note that the method returns the identifier of a process instance which will be needed in order
- * to start a process or to continue process execution after asynchronous task execution (refer to
- * {@link #start(String)} and {@link #signal(String)} for further information).
+ * Note that the method returns the identifier of a process instance which will
+ * be needed in order to start a process or to continue process execution after
+ * asynchronous task execution (refer to {@link #start(String)} and
+ * {@link #signal(String)} for further information).
*
- * @param processDefinitionId The identifier of the respective process definition.
+ * @param processDefinitionId The identifier of the respective process
+ * definition.
* @return The id of the newly created process instance (never {@code null}).
* @throws ProcessExecutionException Thrown in case of error, e.g. when a
- * {@code processDefinitionId} is referenced that does not exist.
+ * {@code processDefinitionId} is referenced
+ * that does not exist.
*/
String createProcessInstance(String processDefinitionId) throws ProcessExecutionException;
-
/**
* Delete a process instance.
*
* @param processInstanceId The identifier of the respective process.
* @throws ProcessExecutionException Thrown in case of error, e.g. when a
- * {@code processInstanceId} is referenced that does not exist.
+ * {@code processInstanceId} is referenced
+ * that does not exist.
*/
void deleteProcessInstance(String processInstanceId) throws ProcessExecutionException;
@@ -101,8 +108,10 @@ public interface ProcessEngine {
*
* @param processInstanceId The process instance id.
* @return The process instance (never {@code null}).
- * @throws IllegalArgumentException In case the process instance does not/no longer exist.
- * @throws RuntimeException In case the process instance could not be retrieved from persistence.
+ * @throws IllegalArgumentException In case the process instance does not/no
+ * longer exist.
+ * @throws RuntimeException In case the process instance could not be
+ * retrieved from persistence.
*/
ProcessInstance getProcessInstance(String processInstanceId);
@@ -114,7 +123,6 @@ public interface ProcessEngine {
*/
void start(IRequest pendingReq) throws ProcessExecutionException;
-
/**
* Resumes process execution after an asynchronous task has been executed.
*
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java
index 641eeab8..6de53432 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java
@@ -30,25 +30,30 @@ public interface ProcessInstanceStoreDao {
* Stores a {@link ProcessInstance} defined by {@code pIStore} in the database.
*
* @param piStore the {@link ProcessInstanceStore} to persist.
- * @throws EaafStorageException is thrown if a problem occurs while accessing the database.
+ * @throws EaafStorageException is thrown if a problem occurs while accessing
+ * the database.
*/
void saveOrUpdate(ProcessInstanceStore piStore) throws EaafException;
/**
- * Returns a {@link ProcessInstanceStore}, defined by {@code processInstanceID} from the database,
- * or {@code null} if the object could not be found.
+ * Returns a {@link ProcessInstanceStore}, defined by {@code processInstanceID}
+ * from the database, or {@code null} if the object could not be found.
*
- * @param processInstanceId the id of the {@code ProcessInstanceStore} to retrieve.
+ * @param processInstanceId the id of the {@code ProcessInstanceStore} to
+ * retrieve.
* @return a ProcessInstanceStore, or {@code null}.
- * @throws EaafStorageException is thrown if a problem occurs while accessing the database.
+ * @throws EaafStorageException is thrown if a problem occurs while accessing
+ * the database.
*/
ProcessInstanceStore load(String processInstanceId) throws EaafException;
/**
- * Deletes the {@link ProcessInstance} corresponding with the {@code processInstanceId}.
+ * Deletes the {@link ProcessInstance} corresponding with the
+ * {@code processInstanceId}.
*
* @param processInstanceId the id of the {@code ProcessInstance} to be deleted.
- * @throws EaafStorageException is thrown if a problem occurs while accessing the database.
+ * @throws EaafStorageException is thrown if a problem occurs while accessing
+ * the database.
*/
void remove(String processInstanceId) throws EaafException;
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java
index 06573403..a1fd49e5 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java
@@ -22,7 +22,6 @@ package at.gv.egiz.eaaf.core.api.idp.process;
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
-
/**
* Represents a single task to be performed upon process execution.
*
@@ -34,9 +33,10 @@ public interface Task {
/**
* Executes this task.
*
- * @param pendingReq Provides the current processed protocol request
+ * @param pendingReq Provides the current processed protocol request
* @param executionContext Provides execution related information.
- * @return The pending-request object, because Process-management works recursive
+ * @return The pending-request object, because Process-management works
+ * recursive
* @throws Exception An exception upon task execution.
*/
IRequest execute(IRequest pendingReq, ExecutionContext executionContext)