cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevend...@apache.org
Subject svn commit: r1159787 - /cocoon/cocoon3/trunk/cocoon-controller/src/main/java/org/apache/cocoon/controller/SpringControllerComponent.java
Date Fri, 19 Aug 2011 21:00:28 GMT
Author: stevendolg
Date: Fri Aug 19 21:00:28 2011
New Revision: 1159787

URL: http://svn.apache.org/viewvc?rev=1159787&view=rev
Log:
Fixed some warnings.

Modified:
    cocoon/cocoon3/trunk/cocoon-controller/src/main/java/org/apache/cocoon/controller/SpringControllerComponent.java

Modified: cocoon/cocoon3/trunk/cocoon-controller/src/main/java/org/apache/cocoon/controller/SpringControllerComponent.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-controller/src/main/java/org/apache/cocoon/controller/SpringControllerComponent.java?rev=1159787&r1=1159786&r2=1159787&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-controller/src/main/java/org/apache/cocoon/controller/SpringControllerComponent.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-controller/src/main/java/org/apache/cocoon/controller/SpringControllerComponent.java
Fri Aug 19 21:00:28 2011
@@ -26,20 +26,21 @@ import org.apache.cocoon.pipeline.compon
 import org.apache.cocoon.pipeline.component.CachingPipelineComponent;
 import org.apache.cocoon.pipeline.component.Finisher;
 import org.apache.cocoon.pipeline.component.Starter;
-import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 
 public class SpringControllerComponent extends AbstractPipelineComponent implements Starter,
Finisher,
-ApplicationContextAware, CachingPipelineComponent {
+        ApplicationContextAware, CachingPipelineComponent {
+
+    private static final String BEAN_NAME_PREFIX = Controller.class.getName() + "/";
 
     private ApplicationContext applicationContext;
     private String beanName;
-    private Map<String, ? extends Object> configuration;
+    private String selector;
+
     private Controller controller;
+    private Map<String, ? extends Object> configuration;
     private OutputStream outputStream;
-    private Map<String, Object> parameters;
-    private String selector;
 
     /**
      * {@inheritDoc}
@@ -61,7 +62,7 @@ ApplicationContextAware, CachingPipeline
 
     /**
      * {@inheritDoc}
-     *
+     * 
      * @see org.apache.cocoon.pipeline.component.Finisher#getContentType()
      */
     public String getContentType() {
@@ -70,16 +71,16 @@ ApplicationContextAware, CachingPipeline
 
     /**
      * {@inheritDoc}
-     *
+     * 
      * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
      */
-    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
{
+    public void setApplicationContext(ApplicationContext applicationContext) {
         this.applicationContext = applicationContext;
     }
 
     /**
      * {@inheritDoc}
-     *
+     * 
      * @see org.apache.cocoon.pipeline.component.PipelineComponent#setConfiguration(java.util.Map)
      */
     @Override
@@ -105,10 +106,7 @@ ApplicationContextAware, CachingPipeline
      */
     @Override
     public void setup(Map<String, Object> parameters) {
-        this.parameters = parameters;
-
-        this.controller = this.applicationContext.getBean(
-                Controller.class.getName() + "/" + this.beanName, Controller.class);
-        this.controller.setup(this.selector, this.parameters, this.configuration);
+        this.controller = this.applicationContext.getBean(BEAN_NAME_PREFIX + this.beanName,
Controller.class);
+        this.controller.setup(this.selector, parameters, this.configuration);
     }
 }



Mime
View raw message