cziegeler    2002/07/15 07:10:35

  Modified:    .        Tag: cocoon_2_0_3_branch changes.xml
               src/java/org/apache/cocoon/components/notification Tag:
                        cocoon_2_0_3_branch Notifier.java
               src/java/org/apache/cocoon/components/request Tag:
                        cocoon_2_0_3_branch
                        MaybeUploadRequestFactoryImpl.java
                        MultipartRequestFactoryImpl.java
               src/java/org/apache/cocoon/components/request/multipart Tag:
                        cocoon_2_0_3_branch FilePart.java
                        FilePartArray.java FilePartFile.java
                        MultipartRequestWrapper.java
  Log:
  Fixing javadocs and applying patch
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.138.2.34 +4 -3      xml-cocoon2/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/changes.xml,v
  retrieving revision 1.138.2.33
  retrieving revision 1.138.2.34
  diff -u -r1.138.2.33 -r1.138.2.34
  --- changes.xml       15 Jul 2002 10:23:14 -0000      1.138.2.33
  +++ changes.xml       15 Jul 2002 14:10:35 -0000      1.138.2.34
  @@ -39,8 +39,9 @@
    </devs>
   
    <release version="@version@" date="@date@">
  -  <action dev="CZ" type="add">
  -     PLACEHOLDER
  +  <action dev="CZ" type="fix" fixes-bug="10254" due-to="Stuart Roebuck" 
due-to-email="[EMAIL PROTECTED] ">
  +   Applied patch for MaybeUploadRequestFactoryImpl which sets the timeout for a 
session to
  +   infinite during an upload and restores it afterwards.
     </action>
    </release>
    <release version="2.0.3" date="July 15 2002">
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.3   +3 -3      
xml-cocoon2/src/java/org/apache/cocoon/components/notification/Notifier.java
  
  Index: Notifier.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/notification/Notifier.java,v
  retrieving revision 1.6.2.2
  retrieving revision 1.6.2.3
  diff -u -r1.6.2.2 -r1.6.2.3
  --- Notifier.java     28 Jun 2002 13:17:37 -0000      1.6.2.2
  +++ Notifier.java     15 Jul 2002 14:10:35 -0000      1.6.2.3
  @@ -78,7 +78,7 @@
      * @param outputStream The output stream the notification is written to
      *        This could be <code>null</code>.
      * @deprecated There is no way in which this method could understand what 
mime/type to use. Instead use void notify(Notifying n, OutputStream outputStream, 
String mimetype), where the mime/type is requested.
  -   * @see notify(Notifying n, OutputStream outputStream, String mimetype)
  +   * @see #notify(Notifying n, OutputStream, String)
      */
     public static String notify(Notifying n, OutputStream outputStream) throws 
IOException {
       notify(n, outputStream, "text/html") ;
  @@ -144,7 +144,7 @@
     /**
      * Generate notification information in XML format.
      * @deprecated Using a ContentHandler doesn't mean that a mimetype cannot be 
specified; it could be svg or 
  -   * @see notify(Notifying n, ContentHandler ch, String mimetype)
  +   * @see #notify(Notifying, ContentHandler, String)
      */
     public static void notify(Notifying n, ContentHandler ch) throws SAXException {
       notify(n, ch, "text/xml");
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +16 -1     
xml-cocoon2/src/java/org/apache/cocoon/components/request/MaybeUploadRequestFactoryImpl.java
  
  Index: MaybeUploadRequestFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/MaybeUploadRequestFactoryImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- MaybeUploadRequestFactoryImpl.java        12 Mar 2002 14:26:59 -0000      1.2
  +++ MaybeUploadRequestFactoryImpl.java        15 Jul 2002 14:10:35 -0000      1.2.2.1
  @@ -53,6 +53,7 @@
   import uk.co.weft.maybeupload.MaybeUploadRequestWrapper;
   
   import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpSession;
   import java.io.File;
   import java.util.Map;
   import java.util.Vector;
  @@ -83,7 +84,16 @@
           }
   
           if (contentType.startsWith("multipart/form-data")) {
  +            int oldInterval = -1;
  +            HttpSession session = null;
               try {
  +                 // Change the session timeout to infinite whilst the upload takes 
place,
  +                 // to prevent a timeout occuring during a long upload.
  +                 session = req.getSession(false);
  +                 if ( null != session) {
  +                     oldInterval = session.getMaxInactiveInterval();
  +                     session.setMaxInactiveInterval( -1 );
  +                 }
                   req = new MaybeUploadRequestWrapperEx(request,
                                            saveUploadedFilesToDisk,
                                            uploadDirectory,
  @@ -92,6 +102,11 @@
                                            maxUploadSize);
               } catch (Exception e) {
                   req = request;
  +            } finally {
  +                if ( null != session) {
  +                    // Reinstate the old session timeout interval upon completion 
or failure.
  +                    session.setMaxInactiveInterval(oldInterval);
  +                }
               }
           }
   
  
  
  
  1.1.2.1   +3 -3      
xml-cocoon2/src/java/org/apache/cocoon/components/request/MultipartRequestFactoryImpl.java
  
  Index: MultipartRequestFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/MultipartRequestFactoryImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- MultipartRequestFactoryImpl.java  27 Feb 2002 20:21:22 -0000      1.1
  +++ MultipartRequestFactoryImpl.java  15 Jul 2002 14:10:35 -0000      1.1.2.1
  @@ -76,7 +76,7 @@
        * @param silentlyRename
        * @param maxUploadSize
        *
  -     * @return
  +     * @return the request
        */
       public HttpServletRequest getServletRequest(HttpServletRequest request,
                                                   boolean saveUploadedFilesToDisk,
  @@ -112,7 +112,7 @@
        * @param request
        * @param name
        *
  -     * @return
  +     * @return the object
        */
       public Object get(HttpServletRequest request, String name) {
           // FIXME We should get rid of this instanceof test
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +1 -6      
xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/FilePart.java
  
  Index: FilePart.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/FilePart.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- FilePart.java     23 May 2002 12:01:46 -0000      1.1.2.1
  +++ FilePart.java     15 Jul 2002 14:10:35 -0000      1.1.2.2
  @@ -73,7 +73,6 @@
       /**
        * Returns the part headers
        *
  -     * @return
        */
       public Map getHeaders() {
           return headers;
  @@ -82,14 +81,12 @@
       /**
        * Returns the filename
        *
  -     * @return
        */
       public abstract String getFileName();
   
       /**
        * Returns the filepath
        *
  -     * @return
        */
       public String getFilePath() {
           return (String) headers.get("filename");
  @@ -98,7 +95,6 @@
       /**
        * Returns the mime type (or null if unknown)
        *
  -     * @return
        */
       public String getMimeType() {
           return (String) headers.get("content-type");
  @@ -107,7 +103,6 @@
       /**
        * Returns an InputStream containing the file data
        *
  -     * @return
        *
        * @throws Exception
        */
  
  
  
  1.1.2.2   +1 -3      
xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/FilePartArray.java
  
  Index: FilePartArray.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/FilePartArray.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- FilePartArray.java        23 May 2002 12:01:46 -0000      1.1.2.1
  +++ FilePartArray.java        15 Jul 2002 14:10:35 -0000      1.1.2.2
  @@ -79,7 +79,6 @@
       /**
        * Returns the filename
        *
  -     * @return
        */
       public String getFileName() {
   
  @@ -91,7 +90,6 @@
       /**
        * Returns a (ByteArray)InputStream containing the file data
        *
  -     * @return
        *
        * @throws Exception
        */
  
  
  
  1.1.2.2   +1 -4      
xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/FilePartFile.java
  
  Index: FilePartFile.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/FilePartFile.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- FilePartFile.java 23 May 2002 12:01:46 -0000      1.1.2.1
  +++ FilePartFile.java 15 Jul 2002 14:10:35 -0000      1.1.2.2
  @@ -80,7 +80,6 @@
       /**
        * Returns the filename
        *
  -     * @return
        */
       public String getFileName() {
           return file.getName();
  @@ -89,7 +88,6 @@
       /**
        * Returns the file
        *
  -     * @return
        */
       public File getFile() {
           return file;
  @@ -98,7 +96,6 @@
       /**
        * Returns a (ByteArray)InputStream containing the file data
        *
  -     * @return
        *
        * @throws Exception
        */
  
  
  
  1.2.2.1   +1 -50     
xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/MultipartRequestWrapper.java
  
  Index: MultipartRequestWrapper.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/MultipartRequestWrapper.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- MultipartRequestWrapper.java      5 Apr 2002 11:04:24 -0000       1.2
  +++ MultipartRequestWrapper.java      15 Jul 2002 14:10:35 -0000      1.2.2.1
  @@ -118,7 +118,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public Object get(String name) {
   
  @@ -157,7 +156,6 @@
       /**
        * Method getParameterNames
        *
  -     * @return
        */
       public Enumeration getParameterNames() {
   
  @@ -173,7 +171,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public String getParameter(String name) {
   
  @@ -196,7 +193,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public String[] getParameterValues(String name) {
   
  @@ -225,7 +221,6 @@
       /**
        * Method getRequest
        *
  -     * @return
        */
       public HttpServletRequest getRequest() {
           return request;
  @@ -236,7 +231,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public Object getAttribute(String name) {
           return request.getAttribute(name);
  @@ -245,7 +239,6 @@
       /**
        * Method getAttributeNames
        *
  -     * @return
        */
       public Enumeration getAttributeNames() {
           return request.getAttributeNames();
  @@ -254,7 +247,6 @@
       /**
        * Method getCharacterEncoding
        *
  -     * @return
        */
       public String getCharacterEncoding() {
           return request.getCharacterEncoding();
  @@ -263,7 +255,6 @@
       /**
        * Method getContentLength
        *
  -     * @return
        */
       public int getContentLength() {
           return request.getContentLength();
  @@ -272,7 +263,6 @@
       /**
        * Method getContentType
        *
  -     * @return
        */
       public String getContentType() {
           return request.getContentType();
  @@ -281,7 +271,6 @@
       /**
        * Method getInputStream
        *
  -     * @return
        *
        * @throws IOException
        */
  @@ -292,7 +281,6 @@
       /**
        * Method getProtocol
        *
  -     * @return
        */
       public String getProtocol() {
           return request.getProtocol();
  @@ -301,7 +289,6 @@
       /**
        * Method getScheme
        *
  -     * @return
        */
       public String getScheme() {
           return request.getScheme();
  @@ -310,7 +297,6 @@
       /**
        * Method getServerName
        *
  -     * @return
        */
       public String getServerName() {
           return request.getServerName();
  @@ -319,7 +305,6 @@
       /**
        * Method getServerPort
        *
  -     * @return
        */
       public int getServerPort() {
           return request.getServerPort();
  @@ -328,7 +313,6 @@
       /**
        * Method getReader
        *
  -     * @return
        *
        * @throws IOException
        */
  @@ -339,7 +323,6 @@
       /**
        * Method getRemoteAddr
        *
  -     * @return
        */
       public String getRemoteAddr() {
           return request.getRemoteAddr();
  @@ -348,7 +331,6 @@
       /**
        * Method getRemoteHost
        *
  -     * @return
        */
       public String getRemoteHost() {
           return request.getRemoteHost();
  @@ -376,7 +358,6 @@
       /**
        * Method getLocale
        *
  -     * @return
        */
       public Locale getLocale() {
           return request.getLocale();
  @@ -385,7 +366,6 @@
       /**
        * Method getLocales
        *
  -     * @return
        */
       public Enumeration getLocales() {
           return request.getLocales();
  @@ -394,7 +374,6 @@
       /**
        * Method isSecure
        *
  -     * @return
        */
       public boolean isSecure() {
           return request.isSecure();
  @@ -405,7 +384,6 @@
        *
        * @param path
        *
  -     * @return
        */
       public RequestDispatcher getRequestDispatcher(String path) {
           return request.getRequestDispatcher(path);
  @@ -416,7 +394,6 @@
        *
        * @param path
        *
  -     * @return
        */
       public String getRealPath(String path) {
           return request.getRealPath(path);
  @@ -425,7 +402,6 @@
       /**
        * Method getAuthType
        *
  -     * @return
        */
       public String getAuthType() {
           return request.getAuthType();
  @@ -434,7 +410,6 @@
       /**
        * Method getCookies
        *
  -     * @return
        */
       public Cookie[] getCookies() {
           return request.getCookies();
  @@ -445,7 +420,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public long getDateHeader(String name) {
           return request.getDateHeader(name);
  @@ -456,7 +430,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public String getHeader(String name) {
           return request.getHeader(name);
  @@ -467,7 +440,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public Enumeration getHeaders(String name) {
           return request.getHeaders(name);
  @@ -476,7 +448,6 @@
       /**
        * Method getHeaderNames
        *
  -     * @return
        */
       public Enumeration getHeaderNames() {
           return request.getHeaderNames();
  @@ -487,7 +458,6 @@
        *
        * @param name
        *
  -     * @return
        */
       public int getIntHeader(String name) {
           return request.getIntHeader(name);
  @@ -496,7 +466,6 @@
       /**
        * Method getMethod
        *
  -     * @return
        */
       public String getMethod() {
           return request.getMethod();
  @@ -505,7 +474,6 @@
       /**
        * Method getPathInfo
        *
  -     * @return
        */
       public String getPathInfo() {
           return request.getPathInfo();
  @@ -514,7 +482,6 @@
       /**
        * Method getPathTranslated
        *
  -     * @return
        */
       public String getPathTranslated() {
           return request.getPathTranslated();
  @@ -523,7 +490,6 @@
       /**
        * Method getContextPath
        *
  -     * @return
        */
       public String getContextPath() {
           return request.getContextPath();
  @@ -532,7 +498,6 @@
       /**
        * Method getQueryString
        *
  -     * @return
        */
       public String getQueryString() {
           return request.getQueryString();
  @@ -541,7 +506,6 @@
       /**
        * Method getRemoteUser
        *
  -     * @return
        */
       public String getRemoteUser() {
           return request.getRemoteUser();
  @@ -552,7 +516,6 @@
        *
        * @param role
        *
  -     * @return
        */
       public boolean isUserInRole(String role) {
           return request.isUserInRole(role);
  @@ -561,7 +524,6 @@
       /**
        * Method getUserPrincipal
        *
  -     * @return
        */
       public Principal getUserPrincipal() {
           return request.getUserPrincipal();
  @@ -570,7 +532,6 @@
       /**
        * Method getRequestedSessionId
        *
  -     * @return
        */
       public String getRequestedSessionId() {
           return request.getRequestedSessionId();
  @@ -579,7 +540,6 @@
       /**
        * Method getRequestURI
        *
  -     * @return
        */
       public String getRequestURI() {
           return request.getRequestURI();
  @@ -588,7 +548,6 @@
       /**
        * Method getServletPath
        *
  -     * @return
        */
       public String getServletPath() {
           return request.getServletPath();
  @@ -599,7 +558,6 @@
        *
        * @param create
        *
  -     * @return
        */
       public HttpSession getSession(boolean create) {
           return request.getSession(create);
  @@ -608,7 +566,6 @@
       /**
        * Method getSession
        *
  -     * @return
        */
       public HttpSession getSession() {
           return request.getSession();
  @@ -617,7 +574,6 @@
       /**
        * Method isRequestedSessionIdValid
        *
  -     * @return
        */
       public boolean isRequestedSessionIdValid() {
           return request.isRequestedSessionIdValid();
  @@ -626,7 +582,6 @@
       /**
        * Method isRequestedSessionIdFromCookie
        *
  -     * @return
        */
       public boolean isRequestedSessionIdFromCookie() {
           return request.isRequestedSessionIdFromCookie();
  @@ -635,7 +590,6 @@
       /**
        * Method isRequestedSessionIdFromURL
        *
  -     * @return
        */
       public boolean isRequestedSessionIdFromURL() {
           return request.isRequestedSessionIdFromURL();
  @@ -644,7 +598,6 @@
       /**
        * Method isRequestedSessionIdFromUrl
        *
  -     * @return
        */
       public boolean isRequestedSessionIdFromUrl() {
           return request.isRequestedSessionIdFromURL();
  @@ -653,7 +606,6 @@
       /**
        * Method getParameterMap
        *
  -     * @return
        */
       public Map getParameterMap() {
           // FIXME:
  @@ -672,7 +624,6 @@
       /**
        * Method getRequestURL
        *
  -     * @return
        */
       public StringBuffer getRequestURL() {
           // FIXME:
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to