From 3fada6cef21c9b16467177d866df778203b51b4d Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 5 Dec 2019 09:52:48 +0100 Subject: some code code-style modifications active code-quality checks! --- .../core/impl/idp/process/ProcessEngineImpl.java | 58 ++++++++++++---------- 1 file changed, 32 insertions(+), 26 deletions(-) (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java') diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java index fefcf331..9274ea81 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java @@ -25,8 +25,17 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; + +import org.apache.commons.collections4.IterableUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; + import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.api.data.EAAFConstants; +import at.gv.egiz.eaaf.core.api.data.EaafConstants; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluationContext; import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluator; @@ -42,17 +51,10 @@ import at.gv.egiz.eaaf.core.impl.idp.process.model.ProcessNode; import at.gv.egiz.eaaf.core.impl.idp.process.model.StartEvent; import at.gv.egiz.eaaf.core.impl.idp.process.model.TaskInfo; import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition; -import org.apache.commons.collections4.IterableUtils; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.slf4j.MDC; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; /** - * Process engine implementation allowing starting and continuing processes as well as providing - * means for cleanup actions. + * Process engine implementation allowing starting and continuing processes as + * well as providing means for cleanup actions. */ public class ProcessEngineImpl implements ProcessEngine { @@ -93,8 +95,8 @@ public class ProcessEngineImpl implements ProcessEngine { * Sets the process definitions. * * @param processDefinitions The process definitions. - * @throws IllegalArgumentException In case the process definitions contain definitions with the - * same identifier. + * @throws IllegalArgumentException In case the process definitions contain + * definitions with the same identifier. */ public void setProcessDefinitions(final Iterable processDefinitions) { this.processDefinitions.clear(); @@ -108,7 +110,8 @@ public class ProcessEngineImpl implements ProcessEngine { } /** - * Sets an expression evaluator that should be used to process transition condition expressions. + * Sets an expression evaluator that should be used to process transition + * condition expressions. * * @param transitionConditionExpressionEvaluator The expression evaluator. */ @@ -117,7 +120,6 @@ public class ProcessEngineImpl implements ProcessEngine { this.transitionConditionExpressionEvaluator = transitionConditionExpressionEvaluator; } - @Override public String createProcessInstance(final String processDefinitionId, final ExecutionContext executionContext) throws ProcessExecutionException { @@ -220,7 +222,7 @@ public class ProcessEngineImpl implements ProcessEngine { pi.setState(ProcessInstanceState.STARTED); // put pending-request ID on execution-context because it could be changed - pi.getExecutionContext().put(EAAFConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID, + pi.getExecutionContext().put(EaafConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID, pendingReq.getPendingRequestId()); execute(pi, pendingReq); @@ -238,15 +240,15 @@ public class ProcessEngineImpl implements ProcessEngine { } } - /** * Instantiates a task implementation given by a {@link TaskInfo}. * * @param ti The task info. - * @return A Task implementation or {@code null} if the task info does not reference any task - * implementing classes. - * @throws ProcessExecutionException Thrown in case of error (when the referenced class does not - * implement {@link Task} for instance). + * @return A Task implementation or {@code null} if the task info does not + * reference any task implementing classes. + * @throws ProcessExecutionException Thrown in case of error (when the + * referenced class does not implement + * {@link Task} for instance). */ private Task createTaskInstance(final TaskInfo ti) throws ProcessExecutionException { final String clazz = StringUtils.trimToNull(ti.getTaskImplementingClass()); @@ -283,7 +285,7 @@ public class ProcessEngineImpl implements ProcessEngine { /** * Starts/executes a given process instance. * - * @param pi The process instance. + * @param pi The process instance. * @param pendingReq current pending request * @throws ProcessExecutionException Thrown in case of error. */ @@ -404,7 +406,8 @@ public class ProcessEngineImpl implements ProcessEngine { * Persists a {@link ProcessInstance} to the database. * * @param processInstance The object to persist. - * @throws MOADatabaseException Thrown if an error occurs while accessing the database. + * @throws MOADatabaseException Thrown if an error occurs while accessing the + * database. */ private void saveOrUpdateProcessInstance(final ProcessInstance processInstance) throws EaafException { @@ -431,9 +434,10 @@ public class ProcessEngineImpl implements ProcessEngine { * Load a {@link ProcessInstance} with a certain id from the database. * * @param processInstanceId The process instance id - * @return The process instance corresponding to the id or {@code null} if no such object is - * found. - * @throws MOADatabaseException Thrown if an error occurs while accessing the database. + * @return The process instance corresponding to the id or {@code null} if no + * such object is found. + * @throws MOADatabaseException Thrown if an error occurs while accessing the + * database. */ private ProcessInstance loadProcessInstance(final String processInstanceId) throws EaafException { @@ -462,7 +466,9 @@ public class ProcessEngineImpl implements ProcessEngine { /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.process.ProcessEngine#deleteProcessInstance(java.lang.String) + * @see + * at.gv.egovernment.moa.id.process.ProcessEngine#deleteProcessInstance(java. + * lang.String) */ @Override public void deleteProcessInstance(final String processInstanceId) -- cgit v1.2.3