summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/AbstractAuthSourceServlet.java
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/impl/idp/process/springweb/AbstractAuthSourceServlet.java
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/impl/idp/process/springweb/AbstractAuthSourceServlet.java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/AbstractAuthSourceServlet.java81
1 files changed, 52 insertions, 29 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/AbstractAuthSourceServlet.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/AbstractAuthSourceServlet.java
index cc899641..bd352bef 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/AbstractAuthSourceServlet.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/AbstractAuthSourceServlet.java
@@ -21,9 +21,7 @@ package at.gv.egiz.eaaf.core.impl.idp.process.springweb;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
-import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
-import at.gv.egiz.eaaf.core.api.idp.process.ProcessEngine;
-import at.gv.egiz.eaaf.core.impl.idp.process.ProcessInstance;
+
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
@@ -31,10 +29,14 @@ import org.springframework.beans.factory.NoUniqueBeanDefinitionException;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
+import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
+import at.gv.egiz.eaaf.core.api.idp.process.ProcessEngine;
+import at.gv.egiz.eaaf.core.impl.idp.process.ProcessInstance;
+
/**
- * Abstract HttpServlet that provides means for retrieving the process engine (Spring Web required)
- * as well as retrieving the underlying process instance and execution context evaluating a certain
- * request parameter.
+ * Abstract HttpServlet that provides means for retrieving the process engine
+ * (Spring Web required) as well as retrieving the underlying process instance
+ * and execution context evaluating a certain request parameter.
*
* @author tknall
*
@@ -46,7 +48,8 @@ public abstract class AbstractAuthSourceServlet extends HttpServlet {
private ProcessEngine processEngine;
/**
- * Returns the name of the request parameter representing the respective instance id.
+ * Returns the name of the request parameter representing the respective
+ * instance id.
* <p/>
* Default is {@code processInstanceId}.
*
@@ -60,11 +63,16 @@ public abstract class AbstractAuthSourceServlet extends HttpServlet {
* Returns the underlying process engine instance.
*
* @return The process engine (never {@code null}).
- * @throws NoSuchBeanDefinitionException if no {@link ProcessEngine} bean was found.
- * @throws NoUniqueBeanDefinitionException if more than one {@link ProcessEngine} bean was found.
- * @throws BeansException if a problem getting the {@link ProcessEngine} bean occurred.
- * @throws IllegalStateException if the Spring WebApplicationContext was not found, which means
- * that the servlet is used outside a Spring web environment.
+ * @throws NoSuchBeanDefinitionException if no {@link ProcessEngine} bean was
+ * found.
+ * @throws NoUniqueBeanDefinitionException if more than one
+ * {@link ProcessEngine} bean was found.
+ * @throws BeansException if a problem getting the
+ * {@link ProcessEngine} bean occurred.
+ * @throws IllegalStateException if the Spring WebApplicationContext
+ * was not found, which means that the
+ * servlet is used outside a Spring web
+ * environment.
*/
public synchronized ProcessEngine getProcessEngine() {
if (processEngine == null) {
@@ -73,7 +81,7 @@ public abstract class AbstractAuthSourceServlet extends HttpServlet {
if (ctx == null) {
throw new IllegalStateException(
"Unable to find Spring WebApplicationContext. "
- + "Servlet needs to be executed within a Spring web environment.");
+ + "Servlet needs to be executed within a Spring web environment.");
}
processEngine = ctx.getBean(ProcessEngine.class);
}
@@ -86,13 +94,20 @@ public abstract class AbstractAuthSourceServlet extends HttpServlet {
*
* @param request The HttpServletRequest.
* @return The process instance (never {@code null}).
- * @throws NoSuchBeanDefinitionException if no {@link ProcessEngine} bean was found.
- * @throws NoUniqueBeanDefinitionException if more than one {@link ProcessEngine} bean was found.
- * @throws BeansException if a problem getting the {@link ProcessEngine} bean occurred.
- * @throws IllegalStateException if the Spring WebApplicationContext was not found, which means
- * that the servlet is used outside a Spring web environment.
- * @throws IllegalArgumentException in case the process instance id referenced by the request
- * parameter {@link #getProcessInstanceIdParameterName()} does not exist.
+ * @throws NoSuchBeanDefinitionException if no {@link ProcessEngine} bean was
+ * found.
+ * @throws NoUniqueBeanDefinitionException if more than one
+ * {@link ProcessEngine} bean was found.
+ * @throws BeansException if a problem getting the
+ * {@link ProcessEngine} bean occurred.
+ * @throws IllegalStateException if the Spring WebApplicationContext
+ * was not found, which means that the
+ * servlet is used outside a Spring web
+ * environment.
+ * @throws IllegalArgumentException in case the process instance id
+ * referenced by the request parameter
+ * {@link #getProcessInstanceIdParameterName()}
+ * does not exist.
*/
public ProcessInstance getProcessInstance(final HttpServletRequest request) {
final String processInstanceId =
@@ -105,18 +120,26 @@ public abstract class AbstractAuthSourceServlet extends HttpServlet {
}
/**
- * Retrieves the execution context for the respective process instance referenced by the request
- * parameter {@link #getProcessInstanceIdParameterName()}.
+ * Retrieves the execution context for the respective process instance
+ * referenced by the request parameter
+ * {@link #getProcessInstanceIdParameterName()}.
*
* @param request The HttpServletRequest.
* @return The execution context (never {@code null}).
- * @throws NoSuchBeanDefinitionException if no {@link ProcessEngine} bean was found.
- * @throws NoUniqueBeanDefinitionException if more than one {@link ProcessEngine} bean was found.
- * @throws BeansException if a problem getting the {@link ProcessEngine} bean occurred.
- * @throws IllegalStateException if the Spring WebApplicationContext was not found, which means
- * that the servlet is used outside a Spring web environment.
- * @throws IllegalArgumentException in case the process instance id referenced by the request
- * parameter {@link #getProcessInstanceIdParameterName()} does not exist.
+ * @throws NoSuchBeanDefinitionException if no {@link ProcessEngine} bean was
+ * found.
+ * @throws NoUniqueBeanDefinitionException if more than one
+ * {@link ProcessEngine} bean was found.
+ * @throws BeansException if a problem getting the
+ * {@link ProcessEngine} bean occurred.
+ * @throws IllegalStateException if the Spring WebApplicationContext
+ * was not found, which means that the
+ * servlet is used outside a Spring web
+ * environment.
+ * @throws IllegalArgumentException in case the process instance id
+ * referenced by the request parameter
+ * {@link #getProcessInstanceIdParameterName()}
+ * does not exist.
*/
public ExecutionContext getExecutionContext(final HttpServletRequest request) {
return getProcessInstance(request).getExecutionContext();