portals-portalapps-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1620489 - in /portals/applications/webcontent/trunk: portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/ reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/
Date Tue, 26 Aug 2014 00:24:05 GMT
Author: woonsan
Date: Tue Aug 26 00:24:05 2014
New Revision: 1620489

URL: http://svn.apache.org/r1620489
Log:
APA-66: better class naming

Added:
    portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/GenericReverseProxyPortlet.java
      - copied, changed from r1620488, portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/DefaultReverseProxyPortlet.java
    portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/GenericReverseProxyServlet.java
      - copied, changed from r1620488, portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/DefaultReverseProxyServlet.java
Removed:
    portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/DefaultReverseProxyPortlet.java
    portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/DefaultReverseProxyServlet.java
Modified:
    portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
    portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java

Copied: portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/GenericReverseProxyPortlet.java
(from r1620488, portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/DefaultReverseProxyPortlet.java)
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/GenericReverseProxyPortlet.java?p2=portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/GenericReverseProxyPortlet.java&p1=portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/DefaultReverseProxyPortlet.java&r1=1620488&r2=1620489&rev=1620489&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/DefaultReverseProxyPortlet.java
(original)
+++ portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/GenericReverseProxyPortlet.java
Tue Aug 26 00:24:05 2014
@@ -27,12 +27,12 @@ import org.apache.portals.applications.w
 import org.apache.portals.applications.webcontent2.proxy.impl.ProxyContext;
 import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
 
-public class DefaultReverseProxyPortlet extends GenericVelocityPortlet
+public class GenericReverseProxyPortlet extends GenericVelocityPortlet
 {
 
     private ReverseProxyService proxyService;
 
-    public DefaultReverseProxyPortlet()
+    public GenericReverseProxyPortlet()
     {
         super();
     }

Modified: portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java?rev=1620489&r1=1620488&r2=1620489&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
(original)
+++ portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
Tue Aug 26 00:24:05 2014
@@ -29,7 +29,7 @@ import org.apache.portals.applications.w
 import org.apache.portals.applications.webcontent2.proxy.util.ProxyCommandUtils;
 import org.apache.portals.applications.webcontent2.proxy.util.YamlConfigUtils;
 
-public class SimpleReverseProxyPortlet extends DefaultReverseProxyPortlet
+public class SimpleReverseProxyPortlet extends GenericReverseProxyPortlet
 {
 
     public static final String MAPPINGS_PARAM_NAME = "mappings";

Copied: portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/GenericReverseProxyServlet.java
(from r1620488, portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/DefaultReverseProxyServlet.java)
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/GenericReverseProxyServlet.java?p2=portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/GenericReverseProxyServlet.java&p1=portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/DefaultReverseProxyServlet.java&r1=1620488&r2=1620489&rev=1620489&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/DefaultReverseProxyServlet.java
(original)
+++ portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/GenericReverseProxyServlet.java
Tue Aug 26 00:24:05 2014
@@ -41,9 +41,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Default reverse proxy servlet implementation as an example.
+ * Generic reverse proxy servlet invoking {@link ReverseProxyService} injected.
  */
-public class DefaultReverseProxyServlet extends HttpServlet
+public class GenericReverseProxyServlet extends HttpServlet
 {
 
     private static final long serialVersionUID = 1L;
@@ -57,11 +57,11 @@ public class DefaultReverseProxyServlet 
                                           HttpOptions.METHOD_NAME,
                                           HttpTrace.METHOD_NAME));
 
-    private static Logger log = LoggerFactory.getLogger(DefaultReverseProxyServlet.class);
+    private static Logger log = LoggerFactory.getLogger(GenericReverseProxyServlet.class);
 
     private ReverseProxyService proxyService;
 
-    public DefaultReverseProxyServlet()
+    public GenericReverseProxyServlet()
     {
     }
 
@@ -78,7 +78,7 @@ public class DefaultReverseProxyServlet 
     @Override
     protected void service(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
     {
-        if (!AVAILABLE_HTTP_METHOD_SET.contains(request.getMethod()))
+        if (!isAllowedHttpMethod(request))
         {
             super.service(request, response);
         }
@@ -121,4 +121,8 @@ public class DefaultReverseProxyServlet 
         }
     }
 
+    protected boolean isAllowedHttpMethod(HttpServletRequest request)
+    {
+        return AVAILABLE_HTTP_METHOD_SET.contains(request.getMethod());
+    }
 }

Modified: portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java?rev=1620489&r1=1620488&r2=1620489&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java
(original)
+++ portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java
Tue Aug 26 00:24:05 2014
@@ -32,7 +32,7 @@ import org.apache.portals.applications.w
 /**
  * Simple reverse proxy servlet implementation as an example.
  */
-public class SimpleReverseProxyServlet extends DefaultReverseProxyServlet
+public class SimpleReverseProxyServlet extends GenericReverseProxyServlet
 {
 
     private static final long serialVersionUID = 1L;



Mime
View raw message