You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Ben Alex <be...@acegi.com.au> on 2004/05/13 09:42:05 UTC

Change to org.apache.slide.webdav.WebdavServletConfig

Hi

WebdavServletConfig is a critical class for WebdavServlet and its method
handlers. Unfortunately WebdavServletConfig is a concrete class with a
non-public constructor, and all of its instance variables are private.

I need to override the way WebdavServletConfig is configured. At present my
only option is to write a subclass of WebdavServletConfig, put it in the
same package as WebdavServletConfig, and then copy most of the code to the
subclass (using the super's methods isn't much of an option, as I want to
replace the configuration AND there are no mutators for the private instance
variables).

Would it be possible to have the following diff applied to CVS, which
provides considerably more flexibility in how WebdavServletConfig can be
customised?:

--- WebdavServletConfig.java	2004-02-11 22:30:27.000000000 +1100
+++ REVISEDWebdavServletConfig.java	2004-05-13 17:28:12.674172800 +1000
@@ -70,7 +70,7 @@
     /**
      * The wrapped ServletConfig.
      */
-    private ServletConfig config;
+    protected ServletConfig config;
     
     
     /**
@@ -85,31 +85,31 @@
      * Because the Slide WebdavServlet is usually deployed as default
servlet, 
      * this setting defaults to <code>true</code>
      */
-    private boolean isDefaultServlet = true;
+    protected boolean isDefaultServlet = true;
     
     
     /**
      * Default MIME type of resources.
      */
-    private String defaultMimeType = "text/plain";
+    protected String defaultMimeType = "text/plain";
     
     
     /**
      * Depth limit. To limit tree browsing when using depth = infinity.
      */
-    private int depthLimit = 3;
+    protected int depthLimit = 3;
     
     
     /**
      * Default MIME type of resources.
      */
-    private String scope = "";
+    protected String scope = "";
     
     
     /**
      * Class name of the WebdavMethodFactory.
      */
-    private String methodFactory;
+    protected String methodFactory;
     
     
     // -----------------------------------------------------------
Construction
@@ -120,7 +120,7 @@
      *
      * @param config the ServletConfig to wrap
      */
-    WebdavServletConfig(ServletConfig config) {
+    public WebdavServletConfig(ServletConfig config) {
         
         this.config = config;


Thanks
Ben


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org