You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by gs...@apache.org on 2007/10/15 22:18:41 UTC
svn commit: r584893 [6/10] - in
/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: ./ ajax/
ajax/form/ ajax/markup/html/navigation/paging/ application/ behavior/
feedback/ markup/ markup/html/ markup/html/body/ markup/html/border/
markup/htm...
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java Mon Oct 15 13:18:27 2007
@@ -70,14 +70,14 @@
/**
* Mock servlet request. Implements all of the methods from the standard HttpServletRequest class
* plus helper methods to aid setting up a request.
- *
+ *
* @author Chris Turner
*/
public class MockHttpServletRequest implements HttpServletRequest
{
/**
* A holder class for an uploaded file.
- *
+ *
* @author Frank Bille (billen)
*/
private class UploadedFile
@@ -88,7 +88,7 @@
/**
* Construct.
- *
+ *
* @param fieldName
* @param file
* @param contentType
@@ -184,7 +184,7 @@
/**
* Create the request using the supplied session object.
- *
+ *
* @param application
* The application that this request is for
* @param session
@@ -203,7 +203,7 @@
/**
* Add a new cookie.
- *
+ *
* @param cookie
* The cookie
*/
@@ -215,7 +215,7 @@
/**
* Add an uploaded file to the request. Use this to simulate a file that has been uploaded to a
* field.
- *
+ *
* @param fieldName
* The fieldname of the upload field.
* @param file
@@ -255,7 +255,7 @@
/**
* Add a header to the request.
- *
+ *
* @param name
* The name of the header to add
* @param value
@@ -274,7 +274,7 @@
/**
* Get an attribute.
- *
+ *
* @param name
* The attribute name
* @return The value, or null
@@ -286,7 +286,7 @@
/**
* Get the names of all of the values.
- *
+ *
* @return The names
*/
public Enumeration getAttributeNames()
@@ -298,7 +298,7 @@
/**
* Get the auth type.
- *
+ *
* @return The auth type
*/
public String getAuthType()
@@ -308,7 +308,7 @@
/**
* Get the current character encoding.
- *
+ *
* @return The character encoding
*/
public String getCharacterEncoding()
@@ -317,8 +317,8 @@
}
/**
- * true will force Request genarate multiPart ContentType and ContentLength
- *
+ * true will force Request generate multiPart ContentType and ContentLength
+ *
* @param useMultiPartContentType
*/
public void setUseMultiPartContentType(boolean useMultiPartContentType)
@@ -330,7 +330,7 @@
/**
* Return the length of the content. This is always -1 except if useMultiPartContentType set as
* true. Then the length will be the length of the generated request.
- *
+ *
* @return -1 if useMultiPartContentType is false. Else the length of the generated request.
*/
public int getContentLength()
@@ -346,7 +346,7 @@
/**
* If useMultiPartContentType set as true return the correct content-type.
- *
+ *
* @return The correct multipart content-type if useMultiPartContentType is true. Else null.
*/
public String getContentType()
@@ -362,7 +362,7 @@
/**
* Get the context path. For this mock implementation the name of the application is always
* returned.
- *
+ *
* @return The context path
*/
public String getContextPath()
@@ -372,7 +372,7 @@
/**
* Get all of the cookies for this request.
- *
+ *
* @return The cookies
*/
public Cookie[] getCookies()
@@ -387,7 +387,7 @@
/**
* Get the given header as a date.
- *
+ *
* @param name
* The header name
* @return The date, or -1 if header not found
@@ -416,7 +416,7 @@
/**
* Get the given header value.
- *
+ *
* @param name
* The header name
* @return The header value or null
@@ -436,7 +436,7 @@
/**
* Get the names of all of the headers.
- *
+ *
* @return The header names
*/
public Enumeration getHeaderNames()
@@ -446,7 +446,7 @@
/**
* Get enumeration of all header values with the given name.
- *
+ *
* @param name
* The name
* @return The header values
@@ -464,7 +464,7 @@
/**
* Returns an input stream if there has been added some uploaded files. Use
* {@link #addFile(String, File, String)} to add some uploaded files.
- *
+ *
* @return The input stream
* @throws IOException
* If an I/O related problem occurs
@@ -500,7 +500,7 @@
/**
* Get the given header as an int.
- *
+ *
* @param name
* The header name
* @return The header value or -1 if header not found
@@ -520,7 +520,7 @@
/**
* Get the locale of the request. Attempts to decode the Accept-Language header and if not found
* returns the default locale of the JVM.
- *
+ *
* @return The locale
*/
public Locale getLocale()
@@ -557,7 +557,7 @@
/**
* Return all the accepted locales. This implementation always returns just one.
- *
+ *
* @return The locales
*/
public Enumeration getLocales()
@@ -569,7 +569,7 @@
/**
* Get the method.
- *
+ *
* @return The method
*/
public String getMethod()
@@ -579,7 +579,7 @@
/**
* Get the request parameter with the given name.
- *
+ *
* @param name
* The parameter name
* @return The parameter value, or null
@@ -591,7 +591,7 @@
/**
* Get the map of all of the parameters.
- *
+ *
* @return The parameters
*/
public Map getParameterMap()
@@ -601,7 +601,7 @@
/**
* Get the names of all of the parameters.
- *
+ *
* @return The parameter names
*/
public Enumeration getParameterNames()
@@ -611,7 +611,7 @@
/**
* Get the values for the given parameter.
- *
+ *
* @param name
* The name of the parameter
* @return The return values
@@ -638,7 +638,7 @@
/**
* Get the path info.
- *
+ *
* @return The path info
*/
public String getPathInfo()
@@ -648,7 +648,7 @@
/**
* Always returns null.
- *
+ *
* @return null
*/
public String getPathTranslated()
@@ -658,7 +658,7 @@
/**
* Get the protocol.
- *
+ *
* @return Always HTTP/1.1
*/
public String getProtocol()
@@ -668,7 +668,7 @@
/**
* Get the query string part of the request.
- *
+ *
* @return The query string
*/
public String getQueryString()
@@ -706,7 +706,7 @@
/**
* This feature is not implemented at this time as we are not supporting binary servlet input.
* This functionality may be added in the future.
- *
+ *
* @return The reader
* @throws IOException
* If an I/O related problem occurs
@@ -718,7 +718,7 @@
/**
* Deprecated method - should not be used.
- *
+ *
* @param name
* The name
* @return The path
@@ -731,7 +731,7 @@
/**
* Get the remote address of the client.
- *
+ *
* @return Always 127.0.0.1
*/
public String getRemoteAddr()
@@ -741,7 +741,7 @@
/**
* Get the remote host.
- *
+ *
* @return Always localhost
*/
public String getRemoteHost()
@@ -751,7 +751,7 @@
/**
* Get the name of the remote user from the REMOTE_USER header.
- *
+ *
* @return The name of the remote user
*/
public String getRemoteUser()
@@ -760,9 +760,9 @@
}
/**
- * Return a dummy dispatcher that just records that dispatch has occured without actually doing
+ * Return a dummy dispatcher that just records that dispatch has occurred without actually doing
* anything.
- *
+ *
* @param name
* The name to dispatch to
* @return The dispatcher
@@ -774,7 +774,7 @@
/**
* Get the requested session id. Always returns the id of the current session.
- *
+ *
* @return The session id
*/
public String getRequestedSessionId()
@@ -785,7 +785,7 @@
/**
* Returns context path and servlet path concatenated, typically
* /applicationClassName/applicationClassName
- *
+ *
* @return The path value
* @see javax.servlet.http.HttpServletRequest#getRequestURI()
*/
@@ -800,7 +800,7 @@
/**
* Try to build a rough URL.
- *
+ *
* @return The url
*/
public StringBuffer getRequestURL()
@@ -824,7 +824,7 @@
/**
* Get the scheme.
- *
+ *
* @return Always http
*/
public String getScheme()
@@ -834,7 +834,7 @@
/**
* Get the server name.
- *
+ *
* @return Always localhost
*/
public String getServerName()
@@ -844,7 +844,7 @@
/**
* Get the server port.
- *
+ *
* @return Always 80
*/
public int getServerPort()
@@ -855,7 +855,7 @@
/**
* The servlet path may either be the application name or /. For test purposes we always return
* the servlet name.
- *
+ *
* @return The servlet path
*/
public String getServletPath()
@@ -865,7 +865,7 @@
/**
* Get the sessions.
- *
+ *
* @return The session
*/
public HttpSession getSession()
@@ -875,7 +875,7 @@
/**
* Get the session.
- *
+ *
* @param b
* Ignored, there is always a session
* @return The session
@@ -887,7 +887,7 @@
/**
* Get the user principal.
- *
+ *
* @return A user principal
*/
public Principal getUserPrincipal()
@@ -936,7 +936,7 @@
/**
* Check whether session id is from a cookie. Always returns true.
- *
+ *
* @return Always true
*/
public boolean isRequestedSessionIdFromCookie()
@@ -946,7 +946,7 @@
/**
* Check whether session id is from a url rewrite. Always returns false.
- *
+ *
* @return Always false
*/
public boolean isRequestedSessionIdFromUrl()
@@ -956,7 +956,7 @@
/**
* Check whether session id is from a url rewrite. Always returns false.
- *
+ *
* @return Always false
*/
public boolean isRequestedSessionIdFromURL()
@@ -966,7 +966,7 @@
/**
* Check whether the session id is valid.
- *
+ *
* @return Always true
*/
public boolean isRequestedSessionIdValid()
@@ -976,7 +976,7 @@
/**
* Always returns false.
- *
+ *
* @return Always false
*/
public boolean isSecure()
@@ -986,7 +986,7 @@
/**
* NOT IMPLEMENTED.
- *
+ *
* @param name
* The role name
* @return Always false
@@ -998,7 +998,7 @@
/**
* Remove the given attribute.
- *
+ *
* @param name
* The name of the attribute
*/
@@ -1009,7 +1009,7 @@
/**
* Set the given attribute.
- *
+ *
* @param name
* The attribute name
* @param o
@@ -1022,7 +1022,7 @@
/**
* Set the auth type.
- *
+ *
* @param authType
* The auth type
*/
@@ -1033,7 +1033,7 @@
/**
* Set the character encoding.
- *
+ *
* @param encoding
* The character encoding
* @throws UnsupportedEncodingException
@@ -1046,7 +1046,7 @@
/**
* Set the cookies.
- *
+ *
* @param theCookies
* The cookies
*/
@@ -1061,7 +1061,7 @@
/**
* Set the method.
- *
+ *
* @param method
* The method
*/
@@ -1072,7 +1072,7 @@
/**
* Set a parameter.
- *
+ *
* @param name
* The name
* @param value
@@ -1085,7 +1085,7 @@
/**
* Sets a map of parameters.
- *
+ *
* @param parameters
* the parameters to set
*/
@@ -1096,8 +1096,8 @@
/**
* Set the path that this request is supposed to be serving. The path is relative to the web
- * application root and should start with a / charater
- *
+ * application root and should start with a / character
+ *
* @param path
*/
public void setPath(final String path)
@@ -1107,7 +1107,7 @@
/**
* Set the complete url for this request. The url will be analyzed.
- *
+ *
* @param url
*/
public void setURL(String url)
@@ -1142,8 +1142,8 @@
}
/**
- * Initialise the request parameters to point to the given bookmarkable page.
- *
+ * Initialize the request parameters to point to the given bookmarkable page.
+ *
* @param page
* The page to point to
* @param params
@@ -1157,8 +1157,8 @@
}
/**
- * Initialise the request parameters to point to the given component.
- *
+ * Initialize the request parameters to point to the given component.
+ *
* @param component
* The component
*/
@@ -1216,10 +1216,10 @@
}
/**
- * Initialise the request parameters to point to the given form component. The additional map
+ * Initialize the request parameters to point to the given form component. The additional map
* should contain mappings between individual components that appear in the form and the string
* value that should be submitted for each of these components.
- *
+ *
* @param form
* The for to send the request to
* @param values
@@ -1266,9 +1266,9 @@
}
/**
- * Initialise the request parameters from the given redirect string that redirects back to a
+ * Initialize the request parameters from the given redirect string that redirects back to a
* particular component for display.
- *
+ *
* @param redirect
* The redirect string to display from
*/
@@ -1289,7 +1289,7 @@
// (WICKET-702)
url = getContextPath() + getServletPath() + "/" + redirect;
- // Remove occurences of ".." from the path
+ // Remove occurrences of ".." from the path
url = RequestUtils.removeDoubleDots(url);
log.info("Redirecting to " + url);
}
@@ -1322,7 +1322,7 @@
/**
* Build the request based on the uploaded files and the parameters.
- *
+ *
* @return The request as a string.
*/
private byte[] buildRequest()
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletResponse.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletResponse.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletResponse.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletResponse.java Mon Oct 15 13:18:27 2007
@@ -41,7 +41,7 @@
/**
* Mock servlet response. Implements all of the methods from the standard HttpServletResponse class
* plus helper methods to aid viewing the generated response.
- *
+ *
* @author Chris Turner
*/
public class MockHttpServletResponse implements HttpServletResponse
@@ -88,7 +88,7 @@
/**
* Add a cookie to the response.
- *
+ *
* @param cookie
* The cookie to add
*/
@@ -99,7 +99,7 @@
/**
* Add a date header.
- *
+ *
* @param name
* The header value
* @param l
@@ -113,7 +113,7 @@
/**
* Add the given header value, including an additional entry if one already exists.
- *
+ *
* @param name
* The name for the header
* @param value
@@ -132,7 +132,7 @@
/**
* Add an int header value.
- *
+ *
* @param name
* The header name
* @param i
@@ -145,7 +145,7 @@
/**
* Check if the response contains the given header name.
- *
+ *
* @param name
* The name to check
* @return Whether header in response or not
@@ -158,7 +158,7 @@
/**
* Encode the redirectLocation URL. Does no changes as this test implementation uses cookie
* based url tracking.
- *
+ *
* @param url
* The url to encode
* @return The encoded url
@@ -171,7 +171,7 @@
/**
* Encode the redirectLocation URL. Does no changes as this test implementation uses cookie
* based url tracking.
- *
+ *
* @param url
* The url to encode
* @return The encoded url
@@ -182,8 +182,8 @@
}
/**
- * Encode thr URL. Does no changes as this test implementation uses cookie based url tracking.
- *
+ * Encode the URL. Does no changes as this test implementation uses cookie based url tracking.
+ *
* @param url
* The url to encode
* @return The encoded url
@@ -194,8 +194,8 @@
}
/**
- * Encode thr URL. Does no changes as this test implementation uses cookie based url tracking.
- *
+ * Encode the URL. Does no changes as this test implementation uses cookie based url tracking.
+ *
* @param url
* The url to encode
* @return The encoded url
@@ -207,7 +207,7 @@
/**
* Flush the buffer.
- *
+ *
* @throws IOException
*/
public void flushBuffer() throws IOException
@@ -216,7 +216,7 @@
/**
* Get the binary content that was written to the servlet stream.
- *
+ *
* @return The binary content
*/
public byte[] getBinaryContent()
@@ -226,7 +226,7 @@
/**
* Return the current buffer size
- *
+ *
* @return The buffer size
*/
public int getBufferSize()
@@ -247,7 +247,7 @@
/**
* Get the character encoding of the response.
- *
+ *
* @return The character encoding
*/
public String getCharacterEncoding()
@@ -257,7 +257,7 @@
/**
* Get the response code for this request.
- *
+ *
* @return The response code
*/
public int getCode()
@@ -267,7 +267,7 @@
/**
* Get all of the cookies that have been added to the response.
- *
+ *
* @return The collection of cookies
*/
public Collection getCookies()
@@ -277,7 +277,7 @@
/**
* Get the text document that was written as part of this response.
- *
+ *
* @return The document
*/
public String getDocument()
@@ -294,7 +294,7 @@
/**
* Get the error message.
- *
+ *
* @return The error message, or null if no message
*/
public String getErrorMessage()
@@ -304,7 +304,7 @@
/**
* Return the value of the given named header.
- *
+ *
* @param name
* The header name
* @return The value, or null
@@ -324,7 +324,7 @@
/**
* Get the names of all of the headers.
- *
+ *
* @return The header names
*/
public Set getHeaderNames()
@@ -334,7 +334,7 @@
/**
* Get the encoded locale
- *
+ *
* @return The locale
*/
public Locale getLocale()
@@ -344,7 +344,7 @@
/**
* Get the output stream for writing binary data from the servlet.
- *
+ *
* @return The binary output stream.
*/
public ServletOutputStream getOutputStream()
@@ -359,7 +359,7 @@
/**
* Get the location that was redirected to.
- *
+ *
* @return The redirect location, or null if not a redirect
*/
public String getRedirectLocation()
@@ -369,7 +369,7 @@
/**
* Get the status code.
- *
+ *
* @return The status code
*/
public int getStatus()
@@ -379,7 +379,7 @@
/**
* Get the print writer for writing text output for this response.
- *
+ *
* @return The writer
* @throws IOException
* Not used
@@ -434,7 +434,7 @@
/**
* Always returns false.
- *
+ *
* @return Always false
*/
public boolean isCommitted()
@@ -444,7 +444,7 @@
/**
* Return whether the servlet returned an error code or not.
- *
+ *
* @return Whether an error occurred or not
*/
public boolean isError()
@@ -454,7 +454,7 @@
/**
* Check whether the response was redirected or not.
- *
+ *
* @return Whether the state was redirected or not
*/
public boolean isRedirect()
@@ -463,7 +463,7 @@
}
/**
- * Delegate to initialise method.
+ * Delegate to initialize method.
*/
public void reset()
{
@@ -487,7 +487,7 @@
/**
* Send an error code. This implementation just sets the internal error state information.
- *
+ *
* @param code
* The code
* @throws IOException
@@ -501,7 +501,7 @@
/**
* Send an error code. This implementation just sets the internal error state information.
- *
+ *
* @param code
* The error code
* @param msg
@@ -518,7 +518,7 @@
/**
* Indicate sending of a redirectLocation to a particular named resource. This implementation
* just keeps hold of the redirectLocation info and makes it available for query.
- *
+ *
* @param location
* The location to redirectLocation to
* @throws IOException
@@ -531,7 +531,7 @@
/**
* Method ignored.
- *
+ *
* @param size
* The size
*/
@@ -541,7 +541,7 @@
/**
* Set the character encoding.
- *
+ *
* @param characterEncoding
* The character encoding
*/
@@ -552,7 +552,7 @@
/**
* Set the content length.
- *
+ *
* @param length
* The length
*/
@@ -563,7 +563,7 @@
/**
* Set the content type.
- *
+ *
* @param type
* The content type
*/
@@ -579,7 +579,7 @@
/**
* Set a date header.
- *
+ *
* @param name
* The header name
* @param l
@@ -611,7 +611,7 @@
/**
* Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'" or "EEE, dd-MMM-yy HH:mm:ss 'GMT'"for
* cookies
- *
+ *
* @param buf
* @param calendar
* @param cookie
@@ -680,7 +680,7 @@
/**
* Set the given header value.
- *
+ *
* @param name
* The name for the header
* @param value
@@ -695,7 +695,7 @@
/**
* Set an int header value.
- *
+ *
* @param name
* The header name
* @param i
@@ -708,7 +708,7 @@
/**
* Set the locale in the response header.
- *
+ *
* @param locale
* The locale
*/
@@ -719,7 +719,7 @@
/**
* Set the status for this response.
- *
+ *
* @param status
* The status
*/
@@ -730,7 +730,7 @@
/**
* Set the status for this response.
- *
+ *
* @param status
* The status
* @param msg
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockServletContext.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockServletContext.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockServletContext.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockServletContext.java Mon Oct 15 13:18:27 2007
@@ -51,7 +51,7 @@
* value allows all of the resource location functionality to work as in a fully functioning web
* application. This value is not set then not resource location functionality will work and instead
* null will always be returned.
- *
+ *
* @author Chris Turner
*/
public class MockServletContext implements ServletContext
@@ -70,11 +70,11 @@
private File webappRoot;
/**
- * Create the mock object. As part of the creation, the context ets the root directory where web
+ * Create the mock object. As part of the creation, the context sets the root directory where web
* application content is stored. This must be an ABSOLUTE directory relative to where the tests
* are being executed. For example: <code>System.getProperty("user.dir") +
* "/src/webapp"</code>
- *
+ *
* @param application
* The application that this context is for
* @param path
@@ -115,7 +115,7 @@
/**
* Add an init parameter.
- *
+ *
* @param name
* The parameter name
* @param value
@@ -129,8 +129,8 @@
// Configuration methods
/**
- * Add a new recognised mime type.
- *
+ * Add a new recognized mime type.
+ *
* @param fileExtension
* The file extension (e.g. "jpg")
* @param mimeType
@@ -143,7 +143,7 @@
/**
* Get an attribute with the given name.
- *
+ *
* @param name
* The attribute name
* @return The value, or null
@@ -155,7 +155,7 @@
/**
* Get all of the attribute names.
- *
+ *
* @return The attribute names
*/
public Enumeration getAttributeNames()
@@ -167,7 +167,7 @@
/**
* Get the context for the given URL path
- *
+ *
* @param name
* The url path
* @return Always returns this
@@ -179,7 +179,7 @@
/**
* Get the init parameter with the given name.
- *
+ *
* @param name
* The name
* @return The parameter, or null if no such parameter
@@ -191,7 +191,7 @@
/**
* Get the name of all of the init parameters.
- *
+ *
* @return The init parameter names
*/
public Enumeration getInitParameterNames()
@@ -209,8 +209,8 @@
/**
* Get the mime type for the given file. Uses a hardcoded map of mime types set at
- * initialisation time.
- *
+ * Initialization time.
+ *
* @param name
* The name to get the mime type for
* @return The mime type
@@ -238,7 +238,7 @@
/**
* Wicket does not use the RequestDispatcher, so this implementation just returns a dummy value.
- *
+ *
* @param name
* The name of the servlet or JSP
* @return The dispatcher
@@ -250,7 +250,7 @@
/**
* Get the real file path of the given resource name.
- *
+ *
* @param name
* The name
* @return The real path or null
@@ -280,7 +280,7 @@
/**
* Wicket does not use the RequestDispatcher, so this implementation just returns a dummy value.
- *
+ *
* @param name
* The name of the resource to get the dispatcher for
* @return The dispatcher
@@ -305,7 +305,7 @@
/**
* Get the URL for a particular resource that is relative to the web app root directory.
- *
+ *
* @param name
* The name of the resource to get
* @return The resource, or null if resource not found
@@ -337,7 +337,7 @@
/**
* Get an input stream for a particular resource that is relative to the web app root directory.
- *
+ *
* @param name
* The name of the resource to get
* @return The input stream for the resource, or null of resource is not found
@@ -376,7 +376,7 @@
/**
* Get the resource paths starting from the web app root directory and then relative to the the
* given name.
- *
+ *
* @param name
* The starting name
* @return The set of resource paths at this location
@@ -443,7 +443,7 @@
/**
* Get the server info.
- *
+ *
* @return The server info
*/
public String getServerInfo()
@@ -453,7 +453,7 @@
/**
* NOT USED - Servlet Spec requires that this always returns null.
- *
+ *
* @param name
* Not used
* @return null
@@ -467,7 +467,7 @@
/**
* Return the name of the servlet context.
- *
+ *
* @return The name
*/
public String getServletContextName()
@@ -477,7 +477,7 @@
/**
* NOT USED - Servlet spec requires that this always returns null.
- *
+ *
* @return null
*/
public Enumeration getServletNames()
@@ -487,7 +487,7 @@
/**
* NOT USED - Servlet spec requires that this always returns null.
- *
+ *
* @return null
*/
public Enumeration getServlets()
@@ -497,7 +497,7 @@
/**
* As part of testing we always log to the console.
- *
+ *
* @param e
* The exception to log
* @param msg
@@ -510,7 +510,7 @@
/**
* As part of testing we always log to the console.
- *
+ *
* @param msg
* The message to log
*/
@@ -521,7 +521,7 @@
/**
* As part of testing we always log to the console.
- *
+ *
* @param msg
* The message to log
* @param cause
@@ -534,7 +534,7 @@
/**
* Remove an attribute with the given name.
- *
+ *
* @param name
* The name
*/
@@ -545,7 +545,7 @@
/**
* Set an attribute.
- *
+ *
* @param name
* The name of the attribute
* @param o
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java Mon Oct 15 13:18:27 2007
@@ -60,8 +60,8 @@
* processRequestCycle() to do all the normal work of a Wicket request.
* <p>
* Between calling setupRequestAndResponse() and processRequestCycle() you can get hold of any of
- * the objects for initialisation. The servlet request object has some handy convenience methods for
- * initialising the request to invoke certain types of pages and components.
+ * the objects for initialization. The servlet request object has some handy convenience methods for
+ * Initializing the request to invoke certain types of pages and components.
* <p>
* After completion of processRequestCycle() you will probably just be testing component states.
* However, you also have full access to the response document (or binary data) and result codes via
@@ -72,7 +72,7 @@
* <li>This harness is SINGLE THREADED - there is only one global session. For multi-threaded
* testing you must do integration testing with a full tester server.
* </ul>
- *
+ *
* @author Chris Turner
*/
public class MockWebApplication
@@ -116,7 +116,7 @@
/**
* Create the mock http tester that can be used for testing.
- *
+ *
* @param application
* The wicket application object
* @param path
@@ -213,7 +213,7 @@
/**
* Used to create a new mock servlet context.
- *
+ *
* @param path
* The absolute path on disk to the web tester contents (e.g. war root) - may be null
* @return ServletContext
@@ -225,7 +225,7 @@
/**
* Gets the application object.
- *
+ *
* @return Wicket application
*/
public final WebApplication getApplication()
@@ -235,7 +235,7 @@
/**
* Get the page that was just rendered by the last request cycle processing.
- *
+ *
* @return The last rendered page
*/
public Page getLastRenderedPage()
@@ -245,7 +245,7 @@
/**
* Get the page that was previously
- *
+ *
* @return The last rendered page
*/
public Page getPreviousRenderedPage()
@@ -255,7 +255,7 @@
/**
* Get the request object so that we can apply configurations to it.
- *
+ *
* @return The request object
*/
public MockHttpServletRequest getServletRequest()
@@ -265,7 +265,7 @@
/**
* Get the response object so that we can apply configurations to it.
- *
+ *
* @return The response object
*/
public MockHttpServletResponse getServletResponse()
@@ -275,7 +275,7 @@
/**
* Get the session object so that we can apply configurations to it.
- *
+ *
* @return The session object
*/
public MockHttpSession getServletSession()
@@ -285,7 +285,7 @@
/**
* Get the wicket request object.
- *
+ *
* @return The wicket request object
*/
public WebRequest getWicketRequest()
@@ -295,7 +295,7 @@
/**
* Get the wicket response object.
- *
+ *
* @return The wicket response object
*/
public WebResponse getWicketResponse()
@@ -305,7 +305,7 @@
/**
* Get the wicket session.
- *
+ *
* @return The wicket session object
*/
public WebSession getWicketSession()
@@ -315,7 +315,7 @@
/**
* Initialize a new WebRequestCycle and all its dependent objects
- *
+ *
* @param component
*/
public void processRequestCycle(final Component component)
@@ -333,7 +333,7 @@
/**
* Initialize a new WebRequestCycle and all its dependent objects
- *
+ *
* @param pageClass
*/
public void processRequestCycle(final Class pageClass)
@@ -361,7 +361,7 @@
/**
* Create and process the request cycle using the current request and response information.
- *
+ *
* @param cycle
*/
public void processRequestCycle(WebRequestCycle cycle)
@@ -378,7 +378,7 @@
}
/**
- *
+ *
* @param cycle
*/
private void postProcessRequestCycle(WebRequestCycle cycle)
@@ -416,7 +416,7 @@
}
/**
- *
+ *
* @param cycle
* @return Last page
*/
@@ -465,7 +465,7 @@
/**
* Create and process the request cycle using the current request and response information.
- *
+ *
* @return A new and initialized WebRequestCyle
*/
public WebRequestCycle createRequestCycle()
@@ -487,7 +487,7 @@
/**
* Reset the request and the response back to a starting state and recreate the necessary wicket
* request, response and session objects. The request and response objects can be accessed and
- * initialised at this point.
+ * Initialized at this point.
*/
public WebRequestCycle setupRequestAndResponse()
{
@@ -505,7 +505,7 @@
/**
* Gets the parameters to be set on the next request.
- *
+ *
* @return the parameters to be set on the next request
*/
public Map getParametersForNextRequest()
@@ -515,7 +515,7 @@
/**
* Sets the parameters to be set on the next request.
- *
+ *
* @param parametersForNextRequest
* the parameters to be set on the next request
*/
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestLogger.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestLogger.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestLogger.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestLogger.java Mon Oct 15 13:18:27 2007
@@ -51,12 +51,12 @@
* target and what {@link IRequestTarget} was the response target. It also
* records what session data was touched for this and how long the request did
* take.
- *
+ *
* To view this information live see the {@link InspectorBug} that shows the
* {@link InspectorPage} with the {@link LiveSessionsPage}
- *
+ *
* @author jcompagner
- *
+ *
* @since 1.2
*/
public class RequestLogger implements IRequestLogger
@@ -69,7 +69,7 @@
* This interface can be implemented in a custom session object. to give an
* object that has more information for the current session (state of
* session).
- *
+ *
* @author jcompagner
*/
public interface ISessionLogInfo
@@ -79,7 +79,7 @@
* If you use the request logger log functionality then this object
* should have a nice String representation. So make sure that the
* toString() is implemented for the returned object.
- *
+ *
* @return The custom object stored in the request loggers current
* request.
*/
@@ -232,7 +232,7 @@
{
// log the error and let the request logging continue (this is what happens in the
// detach phase of the request cycle anyway. This provides better diagnostics).
- log.error("Exception while determining the size of the session in the request logger: "
+ log.error("Exception while determining the size of the session in the request logger: "
+ e.getMessage(), e);
}
}
@@ -487,7 +487,7 @@
/**
* This class hold the information one request of a session has.
- *
+ *
* @author jcompagner
*/
public static class SessionData implements IClusterable, Comparable
@@ -504,14 +504,14 @@
/**
* Construct.
- *
+ *
* @param sessionId
*/
public SessionData(String sessionId)
{
this.sessionId = sessionId;
- this.startDate = System.currentTimeMillis();
- this.numberOfRequests = 1;
+ startDate = System.currentTimeMillis();
+ numberOfRequests = 1;
}
/**
@@ -573,9 +573,9 @@
void addTimeTaken(long time)
{
- this.lastActive = System.currentTimeMillis();
- this.numberOfRequests++;
- this.totalTimeTaken += time;
+ lastActive = System.currentTimeMillis();
+ numberOfRequests++;
+ totalTimeTaken += time;
}
void setSessionInfo(Object sessionInfo)
@@ -585,7 +585,7 @@
void setSessionSize(long size)
{
- this.sessionSize = size;
+ sessionSize = size;
}
public int compareTo(Object sd)
@@ -597,7 +597,7 @@
/**
* This class hold the information one request of a session has.
- *
+ *
* @author jcompagner
*/
public static class RequestData implements IClusterable
@@ -628,7 +628,7 @@
/**
* @param activeRequest
- * The number of active request when this request happend
+ * The number of active request when this request happened
*/
public void setActiveRequest(int activeRequest)
{
@@ -636,7 +636,7 @@
}
/**
- * @return The number of active request when this request happend
+ * @return The number of active request when this request happened
*/
public int getActiveRequest()
{
@@ -654,7 +654,7 @@
/**
* Set the session info object of the session for this request.
- *
+ *
* @param sessionInfo
*/
public void setSessionInfo(Object sessionInfo)
@@ -707,7 +707,7 @@
*/
public void addResponseTarget(String target)
{
- this.responseTarget = target;
+ responseTarget = target;
}
/**
@@ -715,7 +715,7 @@
*/
public void addEventTarget(String target)
{
- this.eventTarget = target;
+ eventTarget = target;
}
/**
@@ -724,7 +724,7 @@
public void setTimeTaken(long timeTaken)
{
this.timeTaken = timeTaken;
- this.startDate = System.currentTimeMillis() - timeTaken;
+ startDate = System.currentTimeMillis() - timeTaken;
}
/**
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java Mon Oct 15 13:18:27 2007
@@ -34,7 +34,7 @@
/**
* Decode the provided queryString as a series of key/ value pairs and set
* them in the provided value map.
- *
+ *
* @param queryString
* string to decode, uses '&' to separate parameters and '=' to
* separate key from value
@@ -67,7 +67,7 @@
}
/**
- * Remove occurences of ".." from the path
+ * Remove occurrences of ".." from the path
* @param path
* @return
*/
@@ -105,7 +105,7 @@
/**
* Does a URLDecoder.decode() in UTF-8
- * @param servletPath
+ * @param path
* @return
*/
public static String decode(String path)
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java Mon Oct 15 13:18:27 2007
@@ -65,14 +65,14 @@
* <p>
* If you want to use a filter specific configuration, e.g. using init parameters from the
* {@link javax.servlet.FilterConfig} object, you should override the init() method. For example:
- *
+ *
* <pre>
* public void init() {
* String webXMLParameter = getInitParameter("myWebXMLParameter");
* URL schedulersConfig = getServletContext().getResource("/WEB-INF/schedulers.xml");
* ...
* </pre>
- *
+ *
* @see WicketFilter
* @see org.apache.wicket.settings.IApplicationSettings
* @see org.apache.wicket.settings.IDebugSettings
@@ -86,7 +86,7 @@
* @see javax.servlet.Filter
* @see javax.servlet.FilterConfig
* @see javax.servlet.ServletContext
- *
+ *
* @author Jonathan Locke
* @author Chris Turner
* @author Johan Compagner
@@ -146,7 +146,7 @@
/**
* Gets an init parameter from the filter's context.
- *
+ *
* @param key
* the key to search for
* @return the value of the filter init parameter
@@ -166,7 +166,7 @@
* Gets the default request cycle processor (with lazy initialization). This is the
* {@link IRequestCycleProcessor} that will be used by {@link RequestCycle}s when custom
* implementations of the request cycle do not provide their own customized versions.
- *
+ *
* @return the default request cycle processor
*/
public final IRequestCycleProcessor getRequestCycleProcessor()
@@ -181,7 +181,7 @@
/**
* Gets the servlet context for this application. Use this to get references to absolute paths,
* global web.xml parameters (<context-param>), etc.
- *
+ *
* @return The servlet context for this application
*/
public final ServletContext getServletContext()
@@ -198,10 +198,10 @@
/**
* Gets the prefix for storing variables in the actual session (typically {@link HttpSession}
* for this application instance.
- *
+ *
* @param request
* the request
- *
+ *
* @return the prefix for storing variables in the actual session
*/
public String getSessionAttributePrefix(final WebRequest request)
@@ -252,7 +252,7 @@
/**
* Mounts an encoder at the given path.
- *
+ *
* @param encoder
* the encoder that will be used for this mount
*/
@@ -268,7 +268,7 @@
/**
* Mounts all bookmarkable pages at the given path.
- *
+ *
* @param path
* the path to mount the bookmarkable page class on
* @param packageName
@@ -286,7 +286,7 @@
/**
* Mounts a bookmarkable page class to the given path.
- *
+ *
* @param path
* the path to mount the bookmarkable page class on
* @param bookmarkablePageClass
@@ -299,7 +299,7 @@
/**
* Mounts a bookmarkable page class to the given pagemap and path.
- *
+ *
* @param path
* the path to mount the bookmarkable page class on
* @param pageMapName
@@ -316,7 +316,7 @@
/**
* Mounts a shared resource class to the given path.
- *
+ *
* @param path
* the path to mount the resource class on
* @param resourceKey
@@ -339,7 +339,7 @@
/**
* Create new Wicket Session object. Note, this method is not called if you registered your own
* ISessionFactory with the Application.
- *
+ *
* @return The created session
* @deprecated see {@link WebApplication#newSession(Request, Response)}.
*/
@@ -352,7 +352,7 @@
/**
* Create new Wicket Session object. Note, this method is not called if you registered your own
* ISessionFactory with the Application.
- *
+ *
* @param request
* @return The created session
* @deprecated {@link WebApplication#newSession(Request, Response)}.
@@ -389,7 +389,7 @@
/**
* THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.
- *
+ *
* @param wicketFilter
* The wicket filter instance for this application
*/
@@ -401,7 +401,7 @@
/**
* Unmounts whatever encoder is mounted at a given path.
- *
+ *
* @param path
* the path of the encoder to unmount
*/
@@ -450,11 +450,11 @@
/**
* THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.
- *
+ *
* Internal initialization. First determine the deployment mode. First check the system property
* -Dwicket.configuration. If it does not exist check the servlet init parameter (
* <code><init-param><param-name>configuration</param-name></code>). If not
- * found check the servlet context init paramert
+ * found check the servlet context init parameter
* <code><context-param><param-name6gt;configuration</param-name></code>). If
* the parameter is "development" (which is default), settings appropriate for development are
* set. If it's "deployment" , deployment settings are used. If development is specified and a
@@ -533,10 +533,10 @@
/**
* Gets a new request cycle processor for web requests. May be replaced by subclasses which wish
* to use their own implementation of IRequestCycleProcessor.
- *
+ *
* NOTE this can't be moved to application as portlets use two different request cycle
* processors, and hence have two different methods for them, depending on the kind of request.
- *
+ *
* @return IRequestCycleProcessor
*/
protected IRequestCycleProcessor newRequestCycleProcessor()
@@ -555,7 +555,7 @@
/**
* Create a new WebRequest. Subclasses of WebRequest could e.g. decode and obfuscated URL which
* has been encoded by an appropriate WebResponse.
- *
+ *
* @param servletRequest
* @return a WebRequest object
*/
@@ -568,7 +568,7 @@
* Create a WebResponse. Subclasses of WebRequest could e.g. encode wicket's default URL and
* hide the details from the user. A appropriate WebRequest must be implemented and configured
* to decode the encoded URL.
- *
+ *
* @param servletResponse
* @return a WebResponse object
*/
@@ -588,7 +588,7 @@
/**
* Add a buffered response to the redirect buffer.
- *
+ *
* @param sessionId
* the session id
* @param bufferId
@@ -650,10 +650,10 @@
/**
* Returns the redirect map where the buffered render pages are stored in and removes it
* immediately.
- *
+ *
* @param sessionId
* the session id
- *
+ *
* @param bufferId
* the id of the buffer as passed in as a request parameter
* @return the buffered response or null if not found (when this request is on a different box
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java Mon Oct 15 13:18:27 2007
@@ -40,7 +40,7 @@
* bookmarkable pages as well as non-bookmarkable component interfaces. The protected handleRender
* method is the internal entrypoint which takes care of the details of rendering a response to an
* HTTP request.
- *
+ *
* @see RequestCycle
* @author Jonathan Locke
* @author Johan Compagner
@@ -60,9 +60,9 @@
/**
* Constructor which simply passes arguments to superclass for storage there. This instance will
* be set as the current one for this thread.
- *
+ *
* @param application
- * The applicaiton
+ * The application
* @param request
* The request
* @param response
@@ -83,7 +83,7 @@
* {@link #onRuntimeException(Page, RuntimeException)} is not called unless you deliberately put
* effort in it to make it work.</strong>
* </p>
- *
+ *
* @see org.apache.wicket.RequestCycle#getProcessor()
*/
public IRequestCycleProcessor getProcessor()
@@ -120,7 +120,7 @@
* directly, but work with setResponsePage instead. This method is part of Wicket's internal
* behavior and should only be used when you want to circumvent the normal framework behavior
* and issue the redirect directly.
- *
+ *
* @param page
* The page to redirect to
*/
@@ -183,7 +183,7 @@
// Set the final character encoding before calling close
servletResponse.setCharacterEncoding(currentResponse.getCharacterEncoding());
- // close it so that the reponse is fixed and encoded from
+ // close it so that the response is fixed and encoded from
// here on.
servletResponse.close();
@@ -272,7 +272,7 @@
/**
* If it's an ajax request we always redirect.
- *
+ *
* @see org.apache.wicket.RequestCycle#isRedirect()
*/
public final boolean isRedirect()
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java Mon Oct 15 13:18:27 2007
@@ -39,7 +39,7 @@
/**
* Default request processor implementation for normal web applications.
- *
+ *
* @author eelcohillenius
*/
public class WebRequestCycleProcessor extends AbstractRequestCycleProcessor
@@ -166,7 +166,7 @@
// absolutely sure this is a great way to go, but it seems to have been
// established as the default way of doing things. If we ever want to
// tighten the algorithm up, it should be combined by going back to
- // mountless paths so that requests with Wicket parameters like
+ // unmounted paths so that requests with Wicket parameters like
// 'bookmarkablePage' are always created and resolved in the same
// fashion. There is a test for this in UrlMountingTest.
if (target == null)
@@ -203,7 +203,7 @@
if (target == null)
{
- // if we get here, we have no regconized Wicket target, and thus
+ // if we get here, we have no recognized Wicket target, and thus
// regard this as a external (non-wicket) resource request on
// this server
return resolveExternalResource(requestCycle);
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java Mon Oct 15 13:18:27 2007
@@ -28,7 +28,7 @@
/**
* A session subclass for the HTTP protocol.
- *
+ *
* @author Jonathan Locke
*/
public class WebSession extends Session
@@ -63,9 +63,9 @@
/**
* Constructor. Note that {@link RequestCycle} is not available until this constructor returns.
- *
+ *
* @deprecated Use #WebSession(Request) instead
- *
+ *
* @param application
* The application
* @param request
@@ -78,9 +78,9 @@
/**
* Constructor. Note that {@link RequestCycle} is not available until this constructor returns.
- *
+ *
* @deprecated Use #WebSession(Request)
- *
+ *
* @param application
* The application
* @param request
@@ -93,7 +93,7 @@
/**
* Constructor. Note that {@link RequestCycle} is not available until this constructor returns.
- *
+ *
* @param request
* The current request
*/
@@ -134,7 +134,7 @@
if (currentPageId.equals(lockedPageId) && currentVersion == lockedVersion)
{
- // we don't allow tis request
+ // we don't allow this request
return false;
}
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java Mon Oct 15 13:18:27 2007
@@ -55,7 +55,7 @@
/**
* Filter for initiating handling of Wicket requests.
- *
+ *
* @author jcompagner
*/
public class WicketFilter implements Filter
@@ -99,17 +99,17 @@
* Value should be true
*/
private final String PORTLET_ONLY_FILTER = "portletOnlyFilter";
-
+
/* init marker if running in a portlet container context */
private Boolean portletContextAvailable;
-
+
/* Delegate for handling Portlet specific filtering. Not instantiated if not running in a portlet container context */
private WicketFilterPortletContext filterPortletContext;
-
+
/* Flag if this filter may only process request from within a Portlet context.
*/
private boolean portletOnlyFilter;
-
+
/**
* Servlet cleanup.
*/
@@ -131,7 +131,7 @@
{
HttpServletRequest httpServletRequest;
HttpServletResponse httpServletResponse;
-
+
boolean inPortletContext = false;
if (filterPortletContext != null)
{
@@ -151,7 +151,7 @@
chain.doFilter(request, response);
return;
}
-
+
String relativePath = getRelativePath(httpServletRequest);
if (isWicketRequest(relativePath))
@@ -199,7 +199,7 @@
/**
* Handles servlet page requests.
- *
+ *
* @param servletRequest
* Servlet request object
* @param servletResponse
@@ -302,14 +302,14 @@
}
// Create a response object and set the output encoding according to
- // wicket's application setttings.
+ // wicket's application settings.
response = webApplication.newWebResponse(servletResponse);
response.setAjax(request.isAjax());
response.setCharacterEncoding(webApplication.getRequestCycleSettings()
.getResponseRequestEncoding());
createRequestContext(request, response);
-
+
// Create request cycle
final RequestCycle cycle = webApplication.newRequestCycle(request, response);
@@ -359,7 +359,7 @@
/**
* Returns a relative path from an HttpServletRequest Use this to resolve a Wicket request.
- *
+ *
* @param request
* @return Path requested, minus query string, context path, and filterPath. Relative, no
* leading '/'.
@@ -401,7 +401,7 @@
}
/**
- *
+ *
* @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
*/
public void init(FilterConfig filterConfig) throws ServletException
@@ -472,7 +472,7 @@
Application.set(webApplication);
// Call internal init method of web application for default
- // initialisation
+ // initialization
webApplication.internalInit();
// Call init method of web application
@@ -487,8 +487,8 @@
// Give the application the option to log that it is started
webApplication.logStarted();
- this.portletOnlyFilter = Boolean.valueOf(filterConfig.getInitParameter(PORTLET_ONLY_FILTER)).booleanValue();
-
+ portletOnlyFilter = Boolean.valueOf(filterConfig.getInitParameter(PORTLET_ONLY_FILTER)).booleanValue();
+
if ( portletContextAvailable == null )
{
try
@@ -504,7 +504,7 @@
}
if (filterPortletContext != null)
{
- filterPortletContext.initFilter(filterConfig, this.webApplication);
+ filterPortletContext.initFilter(filterConfig, webApplication);
}
}
finally
@@ -529,7 +529,7 @@
new RequestContext();
}
}
-
+
private String getFilterPath(String filterName, InputStream is) throws ServletException
{
String prefix = servletMode ? "servlet" : "filter";
@@ -537,7 +537,7 @@
String name = prefix + "-name";
// Filter mappings look like this:
- //
+ //
// <filter-mapping> <filter-name>WicketFilter</filter-name>
// <url-pattern>/*</url-pattern> <...> <filter-mapping>
try
@@ -633,7 +633,7 @@
/**
* Is this a Wicket request?
- *
+ *
* @param relativePath
* The relativePath
* @return True if this is a Wicket request
@@ -663,7 +663,7 @@
/**
* If the response has not already a 'lastModified' header set and if 'lastModified' >= 0 than
* set the response header accordingly.
- *
+ *
* @param resp
* @param lastModified
*/
@@ -681,12 +681,12 @@
/**
* Creates the web application factory instance.
- *
+ *
* If no APP_FACT_PARAM is specified in web.xml ContextParamWebApplicationFactory will be used
* by default.
- *
+ *
* @see ContextParamWebApplicationFactory
- *
+ *
* @return application factory instance
*/
protected IWebApplicationFactory getApplicationFactory()
@@ -778,7 +778,7 @@
/**
* Strip trailing '*' and keep leading '/'
- *
+ *
* @param result
* @return
*/
@@ -789,7 +789,7 @@
/**
* Gets the last modified time stamp for the given request.
- *
+ *
* @param servletRequest
* @return The last modified time stamp
*/
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java Mon Oct 15 13:18:27 2007
@@ -26,9 +26,9 @@
/**
* Lightweight document parser for HTML. This parser is only intended to process
- * well formed and simple HTML of the kind that would generally be utilised
+ * well formed and simple HTML of the kind that would generally be utilized
* during testing.
- *
+ *
* @author Chris Turner
*/
public class HtmlDocumentParser
@@ -72,7 +72,7 @@
/**
* Create the parser for the current document.
- *
+ *
* @param document
* The document to parse
*/
@@ -86,7 +86,7 @@
/**
* Get the attributes of the tag.
- *
+ *
* @return The attributes
*/
public Map getAttributes()
@@ -96,7 +96,7 @@
/**
* Get the comment.
- *
+ *
* @return The comment
*/
public String getComment()
@@ -108,7 +108,7 @@
* Iterates through the document searching for tokens. Returns the type of
* token that was found. If an unexpected token was encountered then the
* parser writes this fact to the console and continues
- *
+ *
* @return The token that was found
*/
public int getNextToken()
@@ -130,7 +130,7 @@
/**
* Get the tag name.
- *
+ *
* @return The tag name
*/
public String getTag()
@@ -140,7 +140,7 @@
/**
* Get the text.
- *
+ *
* @return The text
*/
public String getText()
@@ -150,7 +150,7 @@
/**
* Extract attributes from the given string.
- *
+ *
* @param attributeString
* The string
* @return The map of attributes
@@ -197,7 +197,7 @@
/**
* Process a directive starting at the current position.
- *
+ *
* @return The token found
*/
private int processDirective()
@@ -265,7 +265,7 @@
/**
* Process text up to the next token.
- *
+ *
* @return The token code
*/
private int processText()
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java Mon Oct 15 13:18:27 2007
@@ -33,7 +33,7 @@
* HTML (which should not be a problem during testing). In particular it expects
* tags to be matched and that the following tags with optional close tags are
* actually closed: p, td, th, li and option.
- *
+ *
* @author Chris Turner
*/
public class HtmlDocumentValidator
@@ -57,7 +57,7 @@
* Add a root element to the validator. This will generally be the HTML
* element to which all children are added. However, it may also be other
* elements to represent comments or similar.
- *
+ *
* @param e
* The element to add
*/
@@ -69,7 +69,7 @@
/**
* Check whether the supplied document is valid against the spec that has
* been built up within the validator.
- *
+ *
* @param document
* The document to validate
* @return Whether the document is valid or not
@@ -151,7 +151,7 @@
* Set whether to skip comments of not when validating. The default is true.
* If this is set to false then Comment elements must be added to represent
* each comment to be validated.
- *
+ *
* @param skipComments
* Whether to skip comments or not
*/
@@ -161,8 +161,8 @@
}
/**
- * Check whether the open close tag eas actually expected to have children.
- *
+ * Check whether the open close tag was actually expected to have children.
+ *
* @return Whether valid or not
*/
private boolean checkOpenCloseTag()
@@ -179,7 +179,7 @@
/**
* Check if the supplied tag is one that expects to be closed or not.
- *
+ *
* @param tag
* The tag
* @return Whether the tag requires closing or not
@@ -261,7 +261,7 @@
/**
* Save the new open tag state and find the iterator to continue to use for
* processing.
- *
+ *
* @param iteratorStack
* The current stack of iterators
* @param expectedElements
@@ -284,7 +284,7 @@
/**
* Validate the close tag that was found.
- *
+ *
* @param tagNameStack
* The stack of tag names
* @param parser
@@ -341,7 +341,7 @@
/**
* Validate the comment token that was found.
- *
+ *
* @param expectedElements
* The iterator of expected elements
* @param parser
@@ -385,7 +385,7 @@
/**
* Validate the tag token that was found.
- *
+ *
* @param expectedElements
* The iterator of expected elements
* @param parser
@@ -473,7 +473,7 @@
/**
* Validate the text token that was found.
- *
+ *
* @param expectedElements
* The iterator of expected elements
* @param parser
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java Mon Oct 15 13:18:27 2007
@@ -51,14 +51,14 @@
* <p>
* {@link DiskPageStore} allows to set maximum size for pagemap file and maximum size for session.
* If the maximum size for session is exceeded, the last recently used pagemap file is removed.
- *
+ *
* @author Matej Knopp
*/
public class DiskPageStore extends AbstractPageStore implements ISerializationAwarePageStore
{
/**
* Each PageMap is represented by this class.
- *
+ *
* @author Matej Knopp
*/
protected static class PageMapEntry
@@ -94,7 +94,7 @@
/**
* Represents a session,
- *
+ *
* @author Matej Knopp
*/
protected class SessionEntry
@@ -138,7 +138,7 @@
/**
* Returns a {@link PageMapEntry} for specified pagemap. If the create attribute is set and
* the pagemap does not exist, new {@link PageMapEntry} will be created.
- *
+ *
* @param pageMapName
* @param create
* @return
@@ -169,7 +169,7 @@
/**
* Removes the pagemap entry and deletes the file.
- *
+ *
* @param entry
*/
private void removePageMapEntry(PageMapEntry entry)
@@ -180,7 +180,7 @@
/**
* Removes the specified pagemap and deletes the file.
- *
+ *
* @param pageMapName
*/
public synchronized void removePageMap(String pageMapName)
@@ -194,7 +194,7 @@
/**
* Saves the serialized page to appropriate pagemap file.
- *
+ *
* @param page
*/
public synchronized void savePage(SerializedPage page)
@@ -241,7 +241,7 @@
/**
* Removes the page from pagemap file.
- *
+ *
* @param pageMapName
* @param pageId
*/
@@ -256,7 +256,7 @@
/**
* Loads the part of pagemap file specified by the given PageWindow.
- *
+ *
* @param window
* @param pageMapFileName
* @return
@@ -290,7 +290,7 @@
/**
* Loads the specified page data.
- *
+ *
* @param pageMapName
* @param id
* @param versionNumber
@@ -332,7 +332,7 @@
/**
* Returns true if the given page exists for specified pageMap
- *
+ *
* @param pageMapName
* @param pageId
* @param versionNumber
@@ -349,7 +349,7 @@
/**
* Returns the folder for the specified sessions. If the folder doesn't exist and the create
* flag is set, the folder will be created.
- *
+ *
* @param sessionId
* @param create
* @return
@@ -368,7 +368,7 @@
/**
* Utility method for creating a directory
- *
+ *
* @param file
*/
private void mkdirs(File file)
@@ -396,8 +396,8 @@
/**
* Returns the file name for specified pagemap. If the session folder (folder that contains the
- * file) does not exist and createSessionFolder is true, the folder will becreated.
- *
+ * file) does not exist and createSessionFolder is true, the folder will be created.
+ *
* @param sessionId
* @param pageMapName
* @param createSessionFolder
@@ -414,7 +414,7 @@
/**
* Return maximum pagemap file size (in bytes).
- *
+ *
* @return
*/
protected int getMaxSizePerPageMap()
@@ -427,7 +427,7 @@
/**
* Returns maximum size per session (in bytes). After the session exceeds this size, appropriate
* number of last recently used pagemap files will be removed.
- *
+ *
* @return
*/
protected int getMaxSizePerSession()
@@ -441,7 +441,7 @@
/**
* Returns the "root" file store folder.
- *
+ *
* @return
*/
protected File getFileStoreFolder()
@@ -453,7 +453,7 @@
/**
* Creates a new {@link DiskPageStore} instance.
- *
+ *
* @param fileStoreFolder
* folder in which the session folders containing pagemap files will be stored
* @param maxSizePerPagemap
@@ -507,7 +507,7 @@
/**
* Creates a new {@link DiskPageStore} instance.
- *
+ *
* @param maxSizePerPagemap
* the maximum size of pagemap file (in bytes)
* @param maxSizePerSession
@@ -515,7 +515,7 @@
* @param fileChannelPoolCapacity
* the maximum number of concurrently opened files (higher number improves
* performance under heavy load).
- *
+ *
*/
public DiskPageStore(int maxSizePerPagemap, int maxSizePerSession, int fileChannelPoolCapacity)
{
@@ -548,7 +548,7 @@
/**
* Returns the SessionEntry for session with given id. If the entry does not yet exist and the
* createIfDoesNotExist attribute is set, new SessionEntry will be created.
- *
+ *
* @param sessionId
* @param createIfDoesNotExist
* @return
@@ -619,7 +619,7 @@
/**
* Removes the page (or entire pagemap) from specified session.
- *
+ *
* @param entry
* @param pageMap
* @param id
@@ -667,7 +667,7 @@
/**
* Stores the serialized pages. The storing is done either immediately (in synchronous mode) or
* it's scheduled to be stored by the worker thread.
- *
+ *
* @param sessionId
* @param pages
*/
@@ -691,7 +691,7 @@
/**
* Hook for processing serialized pages (e.g. sending those across cluster)
- *
+ *
* @param sessionId
* @param pages
*/
@@ -740,7 +740,7 @@
}
}
- // map from session id to serializedpage list
+ // map from session id to serialized page list
// this contains lists for all active sessions
private final Map /* <String, List<SerializedPage>> */pagesToSaveAll = new ConcurrentHashMap();
@@ -750,7 +750,7 @@
/**
* Returns the list of pages to be saved for the specified session id. If the list is not found,
* new list is created.
- *
+ *
* @param sessionId
* @return
*/
@@ -774,7 +774,7 @@
/**
* Saves all entries from the specified list.
- *
+ *
* @param sessionId
* @param list
*/
@@ -793,7 +793,7 @@
/**
* Schedules the pages to be saved by the worker thread.
- *
+ *
* @param sessionId
* @param pages
*/
@@ -814,7 +814,7 @@
/**
* Worker thread that saves the serialized pages. Saving pages in the separate thread results in
* smoother performance under load.
- *
+ *
* @author Matej Knopp
*/
private class PageSavingThread implements Runnable
@@ -892,7 +892,7 @@
/**
* Returns the amount time in milliseconds for the saving thread to sleep between checking
* whether there are pending serialized pages to be saved.
- *
+ *
* @return
*/
protected int getSavingThreadSleepTime()
@@ -903,7 +903,7 @@
/**
* Returns whether the {@link DiskPageStore} should work in synchronous or asynchronous mode.
* Asynchronous mode uses a worker thread to save pages, which results in smoother performance.
- *
+ *
* @return
*/
protected boolean isSynchronous()
@@ -916,7 +916,7 @@
/**
* Sets the number of last recently serialized pages kept in cache. The cache is used to aid
* performance on session replication.
- *
+ *
* @param lastRecentlySerializedPagesCacheSize
*/
public void setLastRecentlySerializedPagesCacheSize(int lastRecentlySerializedPagesCacheSize)
@@ -951,7 +951,7 @@
/**
* Store the serialized page in the request metadata,.
- *
+ *
* @param sessionId
* @param page
* @param pagesList
@@ -977,7 +977,7 @@
}
/**
- *
+ *
* @author Matej Knopp
*/
private static class SerializedPageWithSession implements Serializable
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/FileChannelPool.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/FileChannelPool.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/FileChannelPool.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/FileChannelPool.java Mon Oct 15 13:18:27 2007
@@ -45,7 +45,7 @@
* Note that under certain circumstances (when there are no empty slots in pool) the initial
* capacity can be exceeded (more files are opened then the specified capacity is). If this happens,
* a warning is written to log, as this probably means that there is a problem with page store.
- *
+ *
* @author Matej Knopp
*/
public class FileChannelPool
@@ -61,7 +61,7 @@
/**
* Construct.
- *
+ *
* @param capacity
* Maximum number of opened file channels.
*/
@@ -79,7 +79,7 @@
/**
* Creates a new file channel with specified file name.
- *
+ *
* @param fileName
* @param createIfDoesNotExist
* in case the file does not exist this parameter determines if the file should be
@@ -153,11 +153,11 @@
/**
* Returns a channel for given file. If the file doesn't exist, the createIfDoesNotExit
- * attribute specifies if the file should be crated.
- *
+ * attribute specifies if the file should be created.
+ *
* Do NOT call close on the returned chanel. Instead call
* {@link #returnFileChannel(FileChannel)}
- *
+ *
* @param fileName
* @param createIfDoesNotExist
* @return
@@ -207,7 +207,7 @@
/**
* Returns the channel to the pool. It is necessary to call this for every channel obtained by
* calling {@link #getFileChannel(String, boolean)}.
- *
+ *
* @param channel
*/
public synchronized void returnFileChannel(FileChannel channel)
@@ -267,7 +267,7 @@
* Closes the file channel with given name and removes it from pool. Also removes the file from
* file system. If the channel is in use, the pool first waits until the chanel is returned to
* the pool and then closes it.
- *
+ *
* @param name
*/
public synchronized void closeAndDeleteFileChannel(String name)
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/PageWindowManager.java Mon Oct 15 13:18:27 2007
@@ -28,14 +28,14 @@
* The pages are stored inside the file in a cyclic way. Newer pages are placed after older ones,
* until the maximum file size is reached. After that, the next page is stored in the beginning of
* the file.
- *
+ *
* @author Matej Knopp
*/
public class PageWindowManager
{
/**
* Contains information about a page inside the file.
- *
+ *
* @author Matej Knopp
*/
private static class PageWindowInternal
@@ -56,7 +56,7 @@
// list of PageWindowInternal objects
private final List /* <PageWindowInternal> */windows = new ArrayList();
- // map from page id to list of pagewindow indices (refering to the windows
+ // map from page id to list of pagewindow indices (referring to the windows
// list) - to improve searching speed
// the index must be cleaned when the instances in the windows list
// change their indexes (e.g. items are shifted on page window removal)
@@ -170,7 +170,7 @@
/**
* Returns the index of the given page in the {@link #windows} list.
- *
+ *
* @param pageId
* @param versionNumber
* @param ajaxVersionNumber
@@ -197,9 +197,9 @@
private int indexPointer = -1;
/**
- * Increments the {@link #indexPointer}. If the maximum file size has ben reeched, the
+ * Increments the {@link #indexPointer}. If the maximum file size has been reached, the
* {@link #indexPointer} is set to 0.
- *
+ *
* @return
*/
private int incrementIndexPointer()
@@ -218,7 +218,7 @@
/**
* Returns the offset in file of the window on given index. The offset is counted by getting the
* previous page offset and adding the previous page size to it.
- *
+ *
* @param index
* @return
*/
@@ -238,7 +238,7 @@
/**
* Splits the window with given index to two windows. First of those will have size specified by
* the argument, the other one will fill up the rest of the original window.
- *
+ *
* @param index
* @param size
*/
@@ -271,7 +271,7 @@
/**
* Merges the window with given index with the next window. The resulting window will have size
* of the two windows summed together.
- *
+ *
* @param index
*/
private void mergeWindowWithNext(int index)
@@ -289,10 +289,10 @@
/**
* Adjusts the window on given index to the specified size. If the new size is smaller than the
- * window size, the window will be splitted. Otherwise the window will be merged with as many
+ * window size, the window will be split. Otherwise the window will be merged with as many
* subsequent window as necessary. In case the window is last window in the file, the size will
* be adjusted without splitting or merging.
- *
+ *
* @param index
* @param size
*/
@@ -338,7 +338,7 @@
* Allocates window on given index with to size. If the index is pointing to existing window,
* the window size will be adjusted. Otherwise a new window with appropriated size will be
* created.
- *
+ *
* @param index
* @param size
* @return
@@ -375,7 +375,7 @@
/**
* Public (read only) version of page window.
- *
+ *
* @author Matej Knopp
*/
public static class PageWindow
@@ -384,7 +384,7 @@
/**
* Construct.
- *
+ *
* @param pageWindowInternal
*/
private PageWindow(PageWindowInternal pageWindowInternal)
@@ -435,7 +435,7 @@
/**
* Creates and returns a new page window for given page.
- *
+ *
* @param pageId
* @param versionNumber
* @param ajaxVersionNumber
@@ -473,7 +473,7 @@
/**
* Returns the page window for given page or null if no window was found.
- *
+ *
* @param pageId
* @param versionNumber
* @param ajaxVersionNumber
@@ -494,7 +494,7 @@
/**
* Removes the page window for given page.
- *
+ *
* @param pageId
* @param versionNumber
* @param ajaxVersionNumber
@@ -524,7 +524,7 @@
/**
* Removes all page windows for given page. Removes all page versions.
- *
+ *
* @param pageId
*/
public void removePage(int pageId)
@@ -553,7 +553,7 @@
/**
* Returns last n saved page windows.
- *
+ *
* @param count
* @return
*/
@@ -591,7 +591,7 @@
/**
* Creates a new PageWindowManager.
- *
+ *
* @param maxSize
* maximum page size. After this size is exceeded, the pages will be saved starting
* at the beginning of file
@@ -603,7 +603,7 @@
/**
* Returns the size of all saved pages
- *
+ *
* @return
*/
public int getTotalSize()
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/SimpleSynchronousFilePageStore.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/SimpleSynchronousFilePageStore.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/SimpleSynchronousFilePageStore.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/SimpleSynchronousFilePageStore.java Mon Oct 15 13:18:27 2007
@@ -37,9 +37,9 @@
* Very simple page store that uses separate file for each serialized page
* instance. Also this store doesn't use any worker threads.
* <p>
- * This store is for demonstration purposes only and will perfom badly in
+ * This store is for demonstration purposes only and will perform badly in
* production.
- *
+ *
* @author Matej Knopp
*/
public class SimpleSynchronousFilePageStore extends AbstractPageStore
@@ -49,7 +49,7 @@
/**
* Construct.
- *
+ *
* @param workDir
*/
public SimpleSynchronousFilePageStore(File workDir)
@@ -96,7 +96,7 @@
* it search for the correct file. The search traverses the session folder
* which is inefficient and should not be used in production. It's good to
* manage/cache this information in page store implementations.
- *
+ *
* @param sessionDir
* @param pageMapName
* @param pageId
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java?rev=584893&r1=584892&r2=584893&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java Mon Oct 15 13:18:27 2007
@@ -66,17 +66,17 @@
public static final String WICKET_PORTLET_PROPERTIES = WicketPortlet.class.getName().replace('.', '/')+".properties";
public static final String WICKET_FILTER_PATH = WicketPortlet.class.getName() + ".FILTERPATH";
public static final String WICKET_FILTER_QUERY = WicketPortlet.class.getName() + ".FILTERQUERY";
-
+
/**
* Name of portlet init parameter for Action page
*/
public static final String PARAM_ACTION_PAGE = "actionPage";
/**
- * Name of portlet init parameterfor Custom page
+ * Name of portlet init parameter for Custom page
*/
public static final String PARAM_CUSTOM_PAGE = "customPage";
/**
- * Name of portlet init parameterfor Edit page
+ * Name of portlet init parameter for Edit page
*/
public static final String PARAM_EDIT_PAGE = "editPage";
/**
@@ -92,7 +92,7 @@
private PortletResourceURLFactory resourceURLFactory;
private String wicketFilterPath;
private String wicketFilterQuery;
- private HashMap defaultPages = new HashMap();
+ private final HashMap defaultPages = new HashMap();
public void init(PortletConfig config) throws PortletException
{
@@ -129,7 +129,7 @@
}
throw new PortletException("Initialization failure", e);
}
-
+
String resourceURLFactoryClassName = getPortletResourceURLFactoryClassNameParameter(config);
if (resourceURLFactoryClassName == null)
{
@@ -161,31 +161,31 @@
}
throw new PortletException("Initialization failure", e);
}
-
+
wicketFilterPath = buildWicketFilterPath(config.getInitParameter(WICKET_FILTER_PATH_PARAM));
wicketFilterQuery = buildWicketFilterQuery(wicketFilterPath);
-
+
defaultPages.put(PARAM_VIEW_PAGE,config.getInitParameter(PARAM_VIEW_PAGE));
defaultPages.put(PARAM_ACTION_PAGE,config.getInitParameter(PARAM_ACTION_PAGE));
defaultPages.put(PARAM_CUSTOM_PAGE,config.getInitParameter(PARAM_CUSTOM_PAGE));
defaultPages.put(PARAM_HELP_PAGE,config.getInitParameter(PARAM_HELP_PAGE));
defaultPages.put(PARAM_EDIT_PAGE,config.getInitParameter(PARAM_EDIT_PAGE));
-
+
validateDefaultPages(defaultPages, wicketFilterPath, wicketFilterQuery);
}
-
+
public void destroy()
{
resourceURLFactory = null;
servletContextProvider = null;
super.destroy();
}
-
+
protected String getDefaultPage(String pageType)
{
return (String)defaultPages.get(pageType);
}
-
+
protected String buildWicketFilterPath(String filterPath)
{
if (filterPath == null || filterPath.length() == 0)
@@ -209,7 +209,7 @@
}
return filterPath;
}
-
+
protected String buildWicketFilterQuery(String wicketFilterPath)
{
if (wicketFilterPath.equals("/"))
@@ -221,7 +221,7 @@
return wicketFilterPath.substring(0,wicketFilterPath.length()-1)+"?";
}
}
-
+
protected String fixWicketUrl(String url, String wicketFilterPath, String wicketFilterQuery)
{
if (url == null)
@@ -240,10 +240,10 @@
// correct url: path?query -> path/?query
url = wicketFilterPath + "?" + url.substring(wicketFilterQuery.length());
}
- }
+ }
return url;
}
-
+
protected void validateDefaultPages(Map defaultPages, String wicketFilterPath, String wicketFilterQuery)
{
String viewPage = fixWicketUrl((String)defaultPages.get(PARAM_VIEW_PAGE), wicketFilterPath, wicketFilterQuery);
@@ -259,7 +259,7 @@
defaultPage = fixWicketUrl(defaultPage, wicketFilterPath, wicketFilterQuery);
defaultPages.put(PARAM_ACTION_PAGE, defaultPage.startsWith(wicketFilterPath) ? defaultPage : viewPage);
}
-
+
defaultPage = (String)defaultPages.get(PARAM_CUSTOM_PAGE);
if (defaultPage == null)
{
@@ -270,7 +270,7 @@
defaultPage = fixWicketUrl(defaultPage, wicketFilterPath, wicketFilterQuery);
defaultPages.put(PARAM_CUSTOM_PAGE, defaultPage.startsWith(wicketFilterPath) ? defaultPage : viewPage);
}
-
+
defaultPage = (String)defaultPages.get(PARAM_HELP_PAGE);
if (defaultPage == null)
{
@@ -291,7 +291,7 @@
{
defaultPage = fixWicketUrl(defaultPage, wicketFilterPath, wicketFilterQuery);
defaultPages.put(PARAM_EDIT_PAGE, defaultPage.startsWith(wicketFilterPath) ? defaultPage : viewPage);
- }
+ }
}
protected Properties getWicketPortletProperties(Properties properties) throws PortletException
@@ -314,7 +314,7 @@
}
return properties;
}
-
+
protected String getContextProviderClassNameParameter(PortletConfig config)
{
return config.getInitParameter(PARAM_SERVLET_CONTEXT_PROVIDER);
@@ -347,22 +347,22 @@
{
return getServletContextProvider().getHttpServletResponse(portlet, response);
}
-
+
protected String getWicketConfigParameter(PortletRequest request, String paramName, String defaultValue)
{
return defaultValue;
}
-
+
protected String getWicketUrlPortletParameter(PortletRequest request)
{
return WICKET_URL_PORTLET_PARAMETER;
}
-
+
protected String getWicketFilterPath()
{
return wicketFilterPath;
}
-
+
protected String getWicketURL(PortletRequest request, String pageType, String defaultPage)
{
String wicketURL = null;
@@ -417,15 +417,15 @@
String wicketURL = null;
String wicketFilterPath = null;
String wicketFilterQuery = null;
-
+
request.setAttribute(WICKET_URL_PORTLET_PARAMETER_ATTR, getWicketUrlPortletParameter(request));
-
+
wicketURL = getWicketURL(request, pageType, getDefaultPage(pageType));
- wicketFilterPath = getWicketConfigParameter(request, WICKET_FILTER_PATH, this.wicketFilterPath);
+ wicketFilterPath = getWicketConfigParameter(request, WICKET_FILTER_PATH, this.wicketFilterPath);
wicketFilterQuery = getWicketConfigParameter(request, WICKET_FILTER_QUERY, this.wicketFilterQuery);
-
+
boolean actionRequest = ACTION_REQUEST.equals(requestType);
-
+
WicketResponseState responseState = new WicketResponseState();
request.setAttribute(RESPONSE_STATE_ATTR, responseState);
@@ -518,7 +518,7 @@
}
}
}
-
+
protected void processActionResponseState(String wicketURL, String wicketFilterPath, String wicketFilterQuery, ActionRequest request, ActionResponse response, WicketResponseState responseState) throws PortletException, IOException
{
if ( responseState.getRedirectLocation() != null )