Author: apetrelli
Date: Sun Jul 22 11:10:03 2007
New Revision: 558517

URL: http://svn.apache.org/viewvc?view=rev&rev=558517
Log:
STR-3075
Code cleanup in Struts 1/Tiles 2 integration module done.

Modified:
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/RedeployableActionServlet.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesPlugin.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesRequestProcessor.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/DefinitionDispatcherAction.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/ReloadDefinitionsAction.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/TilesAction.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/ActionPreparer.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/StrutsPreparerFactory.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/UrlPreparer.java
    
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/util/PlugInConfigContextAdapter.java

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/RedeployableActionServlet.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/RedeployableActionServlet.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/RedeployableActionServlet.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/RedeployableActionServlet.java
 Sun Jul 22 11:10:03 2007
@@ -54,8 +54,13 @@
  * @since 1.2.1
  */
 public class RedeployableActionServlet extends ActionServlet {
+
+    /**
+     * The request processor for Tiles definitions.
+     */
     private TilesRequestProcessor tileProcessor;
 
+    /** [EMAIL PROTECTED] */
     protected synchronized RequestProcessor
             getRequestProcessor(ModuleConfig config) throws ServletException {
 
@@ -65,8 +70,8 @@
         }
 
         // reset the request processor
-        String requestProcessorKey = Globals.REQUEST_PROCESSOR_KEY +
-                config.getPrefix();
+        String requestProcessorKey = Globals.REQUEST_PROCESSOR_KEY
+                + config.getPrefix();
         getServletContext().removeAttribute(requestProcessorKey);
 
         // create a new request processor instance

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesPlugin.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesPlugin.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesPlugin.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesPlugin.java
 Sun Jul 22 11:10:03 2007
@@ -82,11 +82,19 @@
 // TODO Complete the plugin to be module-aware.
 public class TilesPlugin implements PlugIn {
 
-    private static final Map<String, String> MODULE_AWARE_DEFAULTS =
-        new HashMap<String, String>();
+    /**
+     * Defaults form Tiles 2 configuration in case of a module-aware
+     * configuration.
+     */
+    private static final Map < String, String > MODULE_AWARE_DEFAULTS =
+        new HashMap < String, String > ();
 
-    private static final Map<String, String> NO_MODULE_DEFAULTS =
-        new HashMap<String, String>();
+    /**
+     * Defaults form Tiles 2 configuration in case of a configuration without
+     * modules.
+     */
+    private static final Map < String, String > NO_MODULE_DEFAULTS =
+        new HashMap < String, String > ();
 
     static {
         NO_MODULE_DEFAULTS.put(TilesContainerFactory
@@ -123,13 +131,13 @@
      * The plugin config object provided by the ActionServlet initializing
      * this plugin.
      */
-    protected PlugInConfig currentPlugInConfigObject=null;
-    
+    protected PlugInConfig currentPlugInConfigObject = null;
+
     /**
      * The plugin config object adapted to become a context-like object, that
      * exposes init parameters methods.
      */
-    protected PlugInConfigContextAdapter 
currentPlugInConfigContextAdapter=null;
+    protected PlugInConfigContextAdapter currentPlugInConfigContextAdapter = 
null;
 
     /**
      * Get the module aware flag.
@@ -165,13 +173,13 @@
      */
     public void init(ActionServlet servlet, ModuleConfig moduleConfig)
         throws ServletException {
-        
+
         currentPlugInConfigContextAdapter = new PlugInConfigContextAdapter(
                 this.currentPlugInConfigObject, servlet.getServletContext());
 
         // Set RequestProcessor class
         this.initRequestProcessorClass(moduleConfig);
-        
+
         // Initialize Tiles
         try {
             TilesContainerFactory factory;
@@ -189,22 +197,23 @@
                             container);
                 }
                 if (container instanceof 
KeyedDefinitionsFactoryTilesContainer) {
-                       KeyedDefinitionsFactoryTilesContainer keyedContainer =
-                               (KeyedDefinitionsFactoryTilesContainer) 
container;
-                       // If we have a definition factory for the current 
module prefix
-                       // then we are trying to re-initialize the same module, 
and it is
-                       // wrong!
+                    KeyedDefinitionsFactoryTilesContainer keyedContainer =
+                        (KeyedDefinitionsFactoryTilesContainer) container;
+                    // If we have a definition factory for the current module
+                    // prefix then we are trying to re-initialize the same 
module,
+                    // and it is wrong!
                     if (keyedContainer.getProperDefinitionsFactory(moduleConfig
-                                                       .getPrefix()) != null) {
-                               throw new ServletException("Tiles definitions 
factory for module '"
-                                                                               
+ moduleConfig.getPrefix()
-                                                                               
+ "' has already been configured");
-                       }
+                            .getPrefix()) != null) {
+                        throw new ServletException("Tiles definitions factory 
for module '"
+                                        + moduleConfig.getPrefix()
+                                        + "' has already been configured");
+                    }
                     if (factory instanceof 
KeyedDefinitionsFactoryTilesContainerFactory) {
                         DefinitionsFactory defsFactory =
                             ((KeyedDefinitionsFactoryTilesContainerFactory) 
factory)
                             
.createDefinitionsFactory(currentPlugInConfigContextAdapter);
-                        Map<String, String> initParameters = new 
HashMap<String, String>();
+                        Map < String, String > initParameters =
+                            new HashMap < String, String > ();
                         String param = (String) currentPlugInConfigObject
                                 .getProperties().get(BasicTilesContainer
                                         .DEFINITIONS_CONFIG);
@@ -275,7 +284,7 @@
         String configProcessorClassname = ctrlConfig.getProcessorClass();
 
         // Check if specified classname exist
-        Class<?> configProcessorClass;
+        Class < ? > configProcessorClass;
         try {
             configProcessorClass =
                 RequestUtils.applicationClass(configProcessorClassname);
@@ -304,7 +313,7 @@
         }
 
         // Check if specified request processor is compatible with Tiles.
-        Class<?> tilesProcessorClass = TilesRequestProcessor.class;
+        Class < ? > tilesProcessorClass = TilesRequestProcessor.class;
         if (!tilesProcessorClass.isAssignableFrom(configProcessorClass)) {
             // Not compatible
             String msg =
@@ -324,31 +333,35 @@
     public void setCurrentPlugInConfigObject(PlugInConfig plugInConfigObject) {
         this.currentPlugInConfigObject = plugInConfigObject;
     }
-    
+
+    /**
+     * Extracts the definitions factory key according to the module prefix.
+     */
     public static class ModuleKeyExtractor implements KeyExtractor {
 
+        /** [EMAIL PROTECTED] */
         public String getDefinitionsFactoryKey(TilesRequestContext request) {
             String retValue = null;
-            
+
             if (request instanceof ServletTilesRequestContext) {
-               HttpServletRequest servletRequest =
-                       (HttpServletRequest)((ServletTilesRequestContext) 
request).getRequest(); 
+                HttpServletRequest servletRequest =
+                    (HttpServletRequest) ((ServletTilesRequestContext) 
request).getRequest();
                 ModuleConfig config = 
ModuleUtils.getInstance().getModuleConfig(
                         servletRequest);
 
                 if (config == null) {
                     // ModuleConfig not found in current request. Select it.
                     ModuleUtils.getInstance().selectModule(servletRequest,
-                               
servletRequest.getSession().getServletContext());
+                            servletRequest.getSession().getServletContext());
                     config = 
ModuleUtils.getInstance().getModuleConfig(servletRequest);
                 }
-                
+
                 if (config != null) {
                     retValue = config.getPrefix();
                 }
             }
             return retValue;
         }
-        
+
     }
 }

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesRequestProcessor.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesRequestProcessor.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesRequestProcessor.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/TilesRequestProcessor.java
 Sun Jul 22 11:10:03 2007
@@ -62,7 +62,10 @@
      * Commons Logging instance.
      */
     protected static Log log = LogFactory.getLog(TilesRequestProcessor.class);
-    
+
+    /**
+     * The used servlet context.
+     */
     protected ServletContext servletContext;
 
     /**
@@ -88,6 +91,10 @@
      * @param definitionName Definition name to insert.
      * @param request Current page request.
      * @param response Current page response.
+     * @throws IOException If something goes wrong during writing the
+     * definition.
+     * @throws ServletException If something goes wrong during the evaluation
+     * of the definition
      * @return <code>true</code> if the method has processed uri as a
      * definition name, <code>false</code> otherwise.
      */
@@ -103,9 +110,9 @@
             log.debug("Tiles container not found, so pass to next command.");
             return false;
         }
-        
+
         boolean retValue = false;
-        
+
         if (container.isValidDefinition(definitionName, request, response)) {
             retValue = response.isCommitted();
             try {
@@ -120,7 +127,7 @@
                 log.debug("Cannot find definition '" + definitionName + "'");
             }
         }
-        
+
         return retValue;
     }
 
@@ -131,6 +138,10 @@
      * @param uri Uri or Definition name to forward.
      * @param request Current page request.
      * @param response Current page response.
+     * @throws IOException If something goes wrong during writing the
+     * definition.
+     * @throws ServletException If something goes wrong during the evaluation
+     * of the definition
      */
     protected void doForward(
         String uri,
@@ -209,6 +220,10 @@
      * @param uri Module-relative URI to forward to.
      * @param request Current page request.
      * @param response Current page response.
+     * @throws IOException If something goes wrong during writing the
+     * definition.
+     * @throws ServletException If something goes wrong during the evaluation
+     * of the definition
      * @since Struts 1.1
      */
     protected void internalModuleRelativeForward(
@@ -233,6 +248,10 @@
      * @param uri Module-relative URI to forward to.
      * @param request Current page request.
      * @param response Current page response.
+     * @throws IOException If something goes wrong during writing the
+     * definition.
+     * @throws ServletException If something goes wrong during the evaluation
+     * of the definition
      * @since Struts 1.1
      */
     protected void internalModuleRelativeInclude(

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/DefinitionDispatcherAction.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/DefinitionDispatcherAction.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/DefinitionDispatcherAction.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/DefinitionDispatcherAction.java
 Sun Jul 22 11:10:03 2007
@@ -79,8 +79,9 @@
      * @param request The HTTP request we are processing
      * @param response The HTTP response we are creating
      *
-     * @exception Exception if the application business logic throws
+     * @throws Exception if the application business logic throws
      *  an exception
+     * @return The forward object..
      * @since Struts 1.1
      */
     public ActionForward execute(

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/ReloadDefinitionsAction.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/ReloadDefinitionsAction.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/ReloadDefinitionsAction.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/ReloadDefinitionsAction.java
 Sun Jul 22 11:10:03 2007
@@ -56,16 +56,16 @@
      * @param request The HTTP request we are processing
      * @param response The HTTP response we are creating
      *
-     * @exception Exception if the application business logic throws
+     * @throws Exception if the application business logic throws
      *  an exception
+     * @return The forward object.
      * @since Struts 1.1
      */
     public ActionForward execute(ActionMapping mapping,
                                  ActionForm form,
                                  HttpServletRequest request,
                                  HttpServletResponse response)
-        throws Exception
-    {
+        throws Exception {
         response.setContentType("text/plain");
         PrintWriter writer = response.getWriter();
 

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/TilesAction.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/TilesAction.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/TilesAction.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/actions/TilesAction.java
 Sun Jul 22 11:10:03 2007
@@ -54,8 +54,9 @@
      * @param request The HTTP request we are processing.
      * @param response The HTTP response we are creating.
      *
-     * @exception Exception if the application business logic throws
+     * @throws Exception if the application business logic throws
      *  an exception
+     * @return The forward object.
      * @since Struts 1.1
      */
     public ActionForward execute(
@@ -67,7 +68,7 @@
 
         // Try to retrieve tile context
         AttributeContext context = 
TilesAccess.getContainer(request.getSession()
-                       .getServletContext()).getAttributeContext(request, 
response);
+                .getServletContext()).getAttributeContext(request, response);
         if (context == null) {
             throw new ServletException(
                 "Can't find Tile context for '"
@@ -91,8 +92,9 @@
      * @param request The HTTP request we are processing.
      * @param response The HTTP response we are creating.
      *
-     * @exception Exception if the application business logic throws
+     * @throws Exception if the application business logic throws
      *  an exception
+     * @return The forward object.
      * @since Struts 1.1
      */
     public ActionForward execute(

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
 Sun Jul 22 11:10:03 2007
@@ -51,14 +51,16 @@
  *
  *
  */
-public class TilesPreProcessor implements Command
-{
+public class TilesPreProcessor implements Command {
 
 
     // ------------------------------------------------------ Instance 
Variables
 
 
-    private static final Log log = LogFactory.getLog(TilesPreProcessor.class);
+    /**
+     * The logging object.
+     */
+    private static final Log LOG = LogFactory.getLog(TilesPreProcessor.class);
 
     // ---------------------------------------------------------- Public 
Methods
 
@@ -79,6 +81,7 @@
      *
      * @param context The <code>Context</code> for the current request
      *
+     * @throws Exception If something goes wrong.
      * @return <code>false</code> in most cases, but true if we determine
      * that we're processing in "include" mode.
      */
@@ -87,34 +90,33 @@
         // Is there a Tiles Definition to be processed?
         ServletActionContext sacontext = (ServletActionContext) context;
         ForwardConfig forwardConfig = sacontext.getForwardConfig();
-        if (forwardConfig == null || forwardConfig.getPath() == null)
-        {
+        if (forwardConfig == null || forwardConfig.getPath() == null) {
             // this is not a serious error, so log at low priority
-            log.debug("No forwardConfig or no path, so pass to next command.");
+            LOG.debug("No forwardConfig or no path, so pass to next command.");
             return (false);
         }
 
 
         TilesContainer container = TilesAccess.getContainer(sacontext
-                       .getContext());
+                .getContext());
         if (container == null) {
-            log.debug("Tiles container not found, so pass to next command.");
+            LOG.debug("Tiles container not found, so pass to next command.");
             return false;
         }
-        
+
         if (container.isValidDefinition(forwardConfig.getPath(),
                 sacontext.getRequest(), sacontext.getResponse())) {
-               container.render(forwardConfig.getPath(), 
+            container.render(forwardConfig.getPath(),
                     sacontext.getRequest(), sacontext.getResponse());
             sacontext.setForwardConfig(null);
         } else {
             // ignore not found
-               if (log.isDebugEnabled()) {
-                       log.debug("Cannot find definition '" + 
forwardConfig.getPath()
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Cannot find definition '" + forwardConfig.getPath()
                         + "'");
-               }
+            }
         }
-        
+
         return false;
     }
 }

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/ActionPreparer.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/ActionPreparer.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/ActionPreparer.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/ActionPreparer.java
 Sun Jul 22 11:10:03 2007
@@ -48,6 +48,7 @@
         this.action = action;
     }
 
+    /** [EMAIL PROTECTED] */
     public void execute(TilesRequestContext tilesContext,
             AttributeContext attributeContext) throws PreparerException {
         if (tilesContext instanceof ServletTilesRequestContext) {

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/StrutsPreparerFactory.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/StrutsPreparerFactory.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/StrutsPreparerFactory.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/StrutsPreparerFactory.java
 Sun Jul 22 11:10:03 2007
@@ -28,14 +28,17 @@
 import org.apache.tiles.util.ClassUtil;
 
 /**
+ * Factory used to instantiate preparers in a Struts 1 / Tiles 2 environment.
+ *
  * @version $Rev$ $Date$
  */
 public class StrutsPreparerFactory extends BasicPreparerFactory {
 
+    /** [EMAIL PROTECTED] */
     @Override
     protected ViewPreparer createPreparer(String name) throws TilesException {
         ViewPreparer retValue;
-        
+
         if (name.startsWith("/")) {
             retValue = new UrlPreparer(name);
         } else {
@@ -46,7 +49,7 @@
                 retValue = super.createPreparer(name);
             }
         }
-        
+
         return retValue;
     }
 

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/UrlPreparer.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/UrlPreparer.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/UrlPreparer.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/preparer/UrlPreparer.java
 Sun Jul 22 11:10:03 2007
@@ -38,19 +38,28 @@
  * @version $Rev$ $Date$
  */
 public class UrlPreparer implements ViewPreparer {
-    
+
+    /**
+     * The URL to be used as a preparer.
+     */
     private String url;
 
+    /**
+     * Constructor.
+     * 
+     * @param url The URL to be used as a preparer.
+     */
     public UrlPreparer(String url) {
         this.url = url;
     }
 
+    /** [EMAIL PROTECTED] */
     public void execute(TilesRequestContext tilesContext,
             AttributeContext attributeContext) throws PreparerException {
-        
+
         if (tilesContext instanceof ServletTilesRequestContext) {
             ServletTilesRequestContext servletTilesContext =
-                (ServletTilesRequestContext) tilesContext; 
+                (ServletTilesRequestContext) tilesContext;
             HttpServletRequest request = servletTilesContext.getRequest();
             HttpServletResponse response = servletTilesContext.getResponse();
             RequestDispatcher rd = request.getSession().getServletContext()
@@ -59,7 +68,7 @@
                 throw new PreparerException(
                     "Controller can't find url '" + url + "'.");
             }
-    
+
             try {
                 rd.include(request, response);
             } catch (ServletException e) {

Modified: 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/util/PlugInConfigContextAdapter.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/util/PlugInConfigContextAdapter.java?view=diff&rev=558517&r1=558516&r2=558517
==============================================================================
--- 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/util/PlugInConfigContextAdapter.java
 (original)
+++ 
struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/util/PlugInConfigContextAdapter.java
 Sun Jul 22 11:10:03 2007
@@ -47,28 +47,29 @@
      * The internal plugin config object.
      */
     private PlugInConfig plugInConfigObject;
-    
+
     /**
      * The servlet context.
      */
     private ServletContext rootContext;
-    
+
     /**
      * The set of all parameter names.
      */
-    private Set<String> parameterNames;
+    private Set < String > parameterNames;
 
     /**
      * Constructor.
      *
      * @param plugInConfigObject The plugin config object to use.
+     * @param servletContext The servlet context to use.
      */
     @SuppressWarnings("unchecked")
     public PlugInConfigContextAdapter(PlugInConfig plugInConfigObject,
             ServletContext servletContext) {
         this.plugInConfigObject = plugInConfigObject;
         this.rootContext = servletContext;
-        parameterNames = new LinkedHashSet<String>();
+        parameterNames = new LinkedHashSet < String > ();
         
parameterNames.addAll(this.plugInConfigObject.getProperties().keySet());
         CollectionUtils.addAll(parameterNames, this.rootContext
                 .getInitParameterNames());
@@ -82,13 +83,13 @@
      */
     public String getInitParameter(String parameterName) {
         String retValue;
-        
+
         retValue = (String) plugInConfigObject.getProperties()
                 .get(parameterName);
         if (retValue == null) {
             retValue = rootContext.getInitParameter(parameterName);
         }
-        
+
         return retValue;
     }
 
@@ -103,97 +104,119 @@
     }
 
     // The rest of the methods are wrapping implementations of the interface.
-    
+
+    /** [EMAIL PROTECTED] */
     public ServletContext getContext(String string) {
         return rootContext.getContext(string);
     }
 
+    /** [EMAIL PROTECTED] */
     public int getMajorVersion() {
         return rootContext.getMajorVersion();
     }
 
+    /** [EMAIL PROTECTED] */
     public int getMinorVersion() {
         return rootContext.getMinorVersion();
     }
 
+    /** [EMAIL PROTECTED] */
     public String getMimeType(String string) {
         return rootContext.getMimeType(string);
     }
 
+    /** [EMAIL PROTECTED] */
     @SuppressWarnings("unchecked")
     public Set getResourcePaths(String string) {
         return rootContext.getResourcePaths(string);
     }
 
+    /** [EMAIL PROTECTED] */
     public URL getResource(String string) throws MalformedURLException {
         return rootContext.getResource(string);
     }
 
+    /** [EMAIL PROTECTED] */
     public InputStream getResourceAsStream(String string) {
         return rootContext.getResourceAsStream(string);
     }
 
+    /** [EMAIL PROTECTED] */
     public RequestDispatcher getRequestDispatcher(String string) {
         return rootContext.getRequestDispatcher(string);
     }
 
+    /** [EMAIL PROTECTED] */
     public RequestDispatcher getNamedDispatcher(String string) {
         return rootContext.getNamedDispatcher(string);
     }
 
+    /** [EMAIL PROTECTED] */
     @SuppressWarnings("deprecation")
     public Servlet getServlet(String string) throws ServletException {
         return rootContext.getServlet(string);
     }
 
+    /** [EMAIL PROTECTED] */
     @SuppressWarnings({ "deprecation", "unchecked" })
     public Enumeration getServlets() {
         return rootContext.getServlets();
     }
 
+    /** [EMAIL PROTECTED] */
     @SuppressWarnings({ "deprecation", "unchecked" })
     public Enumeration getServletNames() {
         return rootContext.getServletNames();
     }
 
+    /** [EMAIL PROTECTED] */
     public void log(String string) {
         rootContext.log(string);
     }
 
+    /** [EMAIL PROTECTED] */
     @SuppressWarnings("deprecation")
     public void log(Exception exception, String string) {
         rootContext.log(exception, string);
     }
 
+    /** [EMAIL PROTECTED] */
     public void log(String string, Throwable throwable) {
         rootContext.log(string, throwable);
     }
 
+    /** [EMAIL PROTECTED] */
     public String getRealPath(String string) {
         return rootContext.getRealPath(string);
     }
 
+    /** [EMAIL PROTECTED] */
     public String getServerInfo() {
         return rootContext.getServerInfo();
     }
 
+    /** [EMAIL PROTECTED] */
     public Object getAttribute(String string) {
         return rootContext.getAttribute(string);
     }
 
+    /** [EMAIL PROTECTED] */
     @SuppressWarnings("unchecked")
     public Enumeration getAttributeNames() {
         return rootContext.getAttributeNames();
     }
 
+    /** [EMAIL PROTECTED] */
     public void setAttribute(String string, Object object) {
         rootContext.setAttribute(string, object);
     }
 
+    /** [EMAIL PROTECTED] */
     public void removeAttribute(String string) {
         rootContext.removeAttribute(string);
     }
 
+    /** [EMAIL PROTECTED] */
     public String getServletContextName() {
         return rootContext.getServletContextName();
     }


Reply via email to