incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r495074 - in /incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal: config/dispatch/ util/ webapp/
Date Thu, 11 Jan 2007 01:14:03 GMT
Author: awiner
Date: Wed Jan 10 17:14:02 2007
New Revision: 495074

URL: http://svn.apache.org/viewvc?view=rev&rev=495074
Log:
Some coding standards cleanup
- wrap some very long lines
- fix some indents
- fix the name of a package-private variable)

Modified:
    incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchRenderResponse.java
    incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java
    incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchServletResponse.java
    incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/ExternalContextUtils.java
    incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java

Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchRenderResponse.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchRenderResponse.java?view=diff&rev=495074&r1=495073&r2=495074
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchRenderResponse.java
(original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchRenderResponse.java
Wed Jan 10 17:14:02 2007
@@ -46,7 +46,7 @@
         String charset = (matcher.groupCount() > 1) ? matcher.group(2) : null; 
         
         // capture the content type on the request
-        _request.setAttribute(DispatchResponseConfiguratorImpl._CONTENT_TYPE_KEY, contentType);
+        _request.setAttribute(DispatchResponseConfiguratorImpl.__CONTENT_TYPE_KEY, contentType);
   
         // TODO: use Agent APIs when available
         if ("application/xhtml+xml".equals(contentType))

Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java?view=diff&rev=495074&r1=495073&r2=495074
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java
(original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java
Wed Jan 10 17:14:02 2007
@@ -43,9 +43,6 @@
 public class DispatchResponseConfiguratorImpl extends Configurator
 {
 
-  /* (non-Javadoc)
-   * @see org.apache.myfaces.trinidad.config.GenericConfigurator#getExternalContext(javax.faces.context.ExternalContext)
-   */
   @Override
   public ExternalContext getExternalContext(ExternalContext externalContext)
   {
@@ -76,7 +73,7 @@
     FacesContext context)
   {
     Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
-    return (String) requestMap.get(_CONTENT_TYPE_KEY);
+    return (String) requestMap.get(__CONTENT_TYPE_KEY);
   }
   
   private class ServletExternalContext extends ExternalContextDecorator
@@ -86,9 +83,6 @@
       _ec = ec;
     }
     
-    /* (non-Javadoc)
-     * @see org.apache.myfaces.trinidadinternal.context.ExternalContextDecorator#getRequest()
-     */
     @Override
     public Object getResponse()
     {
@@ -100,9 +94,6 @@
       return _response;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.myfaces.trinidadinternal.context.ExternalContextDecorator#getExternalContext()
-     */
     @Override
     protected ExternalContext getExternalContext()
     {
@@ -120,31 +111,23 @@
       _ec = ec;
     }
   
-    /* (non-Javadoc)
-     * @see org.apache.myfaces.trinidadinternal.context.ExternalContextDecorator#getContext()
-     */
     @Override
     public Object getContext()
     {
       return _getPortletContext();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.myfaces.trinidadinternal.context.ExternalContextDecorator#getResponse()
-     */
     @Override
     public Object getResponse()
     {
       return _getRenderResponse();
     }
     
-    /* (non-Javadoc)
-     * @see org.apache.myfaces.trinidadinternal.context.ExternalContextDecorator#dispatch(java.lang.String)
-     */
     @Override
     public void dispatch(String path) throws IOException
     {
-      final PortletRequestDispatcher requestDispatcher = ((PortletContext)getContext()).getRequestDispatcher(path);

+      final PortletRequestDispatcher requestDispatcher =
+        ((PortletContext)getContext()).getRequestDispatcher(path); 
       try
       {
         requestDispatcher.include((RenderRequest)getRequest(), (RenderResponse)getResponse());
@@ -162,9 +145,6 @@
       }   
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.myfaces.trinidadinternal.context.ExternalContextDecorator#getExternalContext()
-     */
     @Override
     protected ExternalContext getExternalContext()
     {
@@ -200,10 +180,6 @@
    * @param context
    * @return
    */
-  // FIXME: AdamWiner: I don't get how this could be applied
-  // twice - that would be a bug in the configurator system,
-  // and should be handled at that layer, not in individual
-  // configurators
   static public boolean isApplied(ExternalContext context)
   {
     return (context.getRequestMap().get(_APPLIED)!=null);
@@ -218,6 +194,8 @@
     context.getRequestMap().put(_APPLIED, Boolean.TRUE);
   }
   
-  static private final String _APPLIED = DispatchResponseConfiguratorImpl.class.getName()+".APPLIED";
-  static final String _CONTENT_TYPE_KEY = DispatchResponseConfiguratorImpl.class.getName()
+ ".CONTENT_TYPE";
+  static private final String _APPLIED =
+    DispatchResponseConfiguratorImpl.class.getName()+".APPLIED";
+  static final String __CONTENT_TYPE_KEY = 
+    DispatchResponseConfiguratorImpl.class.getName() + ".CONTENT_TYPE";
 }

Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchServletResponse.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchServletResponse.java?view=diff&rev=495074&r1=495073&r2=495074
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchServletResponse.java
(original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchServletResponse.java
Wed Jan 10 17:14:02 2007
@@ -45,7 +45,7 @@
         String charset = (matcher.groupCount() > 1) ? matcher.group(2) : null; 
         
         // capture the content type on the request
-        _request.setAttribute(DispatchResponseConfiguratorImpl._CONTENT_TYPE_KEY, contentType);
+        _request.setAttribute(DispatchResponseConfiguratorImpl.__CONTENT_TYPE_KEY, contentType);
   
         // TODO: use Agent APIs when available
         if ("application/xhtml+xml".equals(contentType))

Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/ExternalContextUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/ExternalContextUtils.java?view=diff&rev=495074&r1=495073&r2=495074
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/ExternalContextUtils.java
(original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/ExternalContextUtils.java
Wed Jan 10 17:14:02 2007
@@ -25,8 +25,8 @@
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
- * This provides some functionality for determining some things about the native request
object that
- * is not provided by the base utils.
+ * This provides some functionality for determining some things about the
+ * native request object that is not provided by the base utils.
  * 
  * @author Scott O'Bryan (latest modification by $Author$)
  * @version $Revision$ $Date$

Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java?view=diff&rev=495074&r1=495073&r2=495074
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
(original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
Wed Jan 10 17:14:02 2007
@@ -82,28 +82,25 @@
 
   public void init(FilterConfig filterConfig) throws ServletException
   {
-      _servletContext = filterConfig.getServletContext();
+    _servletContext = filterConfig.getServletContext();
             
-      //There is some functionality that still might require servlet-only filter services.
-      _filters = ClassLoaderUtils.getServices(TrinidadFilterImpl.class.getName());
-      for(Filter f:_filters)
-      {
-        f.init(filterConfig);
-      }
+    //There is some functionality that still might require servlet-only filter services.
+    _filters = ClassLoaderUtils.getServices(TrinidadFilterImpl.class.getName());
+    for(Filter f:_filters)
+    {
+      f.init(filterConfig);
+    }
   }
 
   public void destroy()
   {
-      //Destroy filter services
-      for(Filter f:_filters)
-      {
-          f.destroy();
-      }
-      _filters = null;
-      
-      //=-= Scott O'Bryan =-=
-      //Configurator services are destroyed by the Context Listener
-      
+    //Destroy filter services
+    for(Filter f:_filters)
+    {
+      f.destroy();
+    }
+
+    _filters = null;
   }
 
   @SuppressWarnings("unchecked")
@@ -125,7 +122,8 @@
     config.beginRequest(externalContext);
     
     //To maintain backward compatibilty, wrap the request at the filter level
-    Map<String, String[]> addedParams = (Map<String, String[]>) externalContext.getRequestMap().get(FileUploadConfiguratorImpl._PARAMS);
+    Map<String, String[]> addedParams = (Map<String, String[]>) externalContext.getRequestMap().
+      get(FileUploadConfiguratorImpl._PARAMS);
     
     if(addedParams != null)
     {
@@ -201,7 +199,8 @@
     // Set up a PseudoFacesContext with the actual request and response
     // so that RequestContext can be more functional in the interval
     // between now and when the FacesServlet starts.
-    PseudoFacesContext pfc = new PseudoFacesContext(new ServletExternalContext(_servletContext,
request, response));
+    PseudoFacesContext pfc = new PseudoFacesContext(
+      new ServletExternalContext(_servletContext, request, response));
     _PSEUDO_FACES_CONTEXT.set(pfc);
     try
     {
@@ -306,5 +305,6 @@
     protected PseudoFacesContext initialValue() { return null; }
   };
 
-  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(TrinidadFilterImpl.class);
+  private static final TrinidadLogger _LOG =
+    TrinidadLogger.createTrinidadLogger(TrinidadFilterImpl.class);
 }



Mime
View raw message