atg.servlet
Class RestHttpServletResponseWrapper

java.lang.Object
  extended by atg.servlet.DynamoHttpServletResponse
      extended by atg.servlet.RestHttpServletResponseWrapper
All Implemented Interfaces:
AddHeaderHttpServletResponse, atg.servlet.CharacterEncodable, javax.servlet.http.HttpServletResponse, javax.servlet.ServletResponse

public class RestHttpServletResponseWrapper
extends DynamoHttpServletResponse

This class wraps the dynamo response and is used when handling rest requests for form submits.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String IGNORE_REDIRECT
          redirects to this location will be ignored, no warning displayed
 
Fields inherited from class atg.servlet.DynamoHttpServletResponse
REQUEST_ID
 
Fields inherited from interface javax.servlet.http.HttpServletResponse
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY
 
Constructor Summary
RestHttpServletResponseWrapper(DynamoHttpServletResponse pResponse)
          Constructor
 
Method Summary
 void addCookie(javax.servlet.http.Cookie pCookie)
          Uses the given HTTP response message to assign a new value to a browser-specific cookie.
 void addCookieToBuffer(javax.servlet.http.Cookie pCookie)
          Adds a cookie to the CookieBuffer.
 void addDateHeader(java.lang.String pName, long pValue)
          Adds a field to the response header with a given name and date-valued field.
 void addHeader(java.lang.String pName, java.lang.String pValue)
          Adds a field to the response header with a given name and value.
 void addIntHeader(java.lang.String pName, int pValue)
          Adds a field to the response header with a given name and integer value.
 boolean containsHeader(java.lang.String pName)
          Returns true if the response message header has a field with the specified name.
 java.lang.String encodeRedirectUrl(java.lang.String pUrl)
          Deprecated.  
 java.lang.String encodeRedirectURL(java.lang.String pUrl)
          Encodes the specified URL for use in the sendRedirect method or, if encoding is not needed, returns the URL unchanged.
 java.lang.String encodeUrl(java.lang.String pUrl)
          Deprecated.  
 java.lang.String encodeURL(java.lang.String pUrl)
          Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged.
 boolean equals(java.lang.Object pObj)
           
 void flushBuffer()
          Forces any content in the buffer to be written to the client.
 int getBufferSize()
          Returns the actual buffer size used for the response.
 java.lang.String getCharacterEncoding()
          Returns the character encoding used for writing text to the body of this response.
 java.lang.String getContentType()
          Gets the content type for this response.
 boolean getContentTypeSet()
           
 boolean getDoExitTracking()
           
 java.util.Dictionary getHeaders()
          Returns a Dictionary of the headers that have been set so far.
 java.util.Enumeration getHeaders(java.lang.String pHeaderName)
          Returns all the values of the specified request header as an Enumeration of objects.
 java.util.Locale getLocale()
          Returns the locale assigned to the response.
 atg.servlet.LocaleToCharsetMapper getLocaleToCharsetMapper()
          Returns the LocaleToCharsetMapper property
 DynamoHttpServletResponse getOriginalResponse()
           
 javax.servlet.ServletOutputStream getOutputStream()
          Returns an output stream for writing response data.
 javax.servlet.http.HttpServletResponse getResponse()
          Returns the HttpServletResponse property
 int getStatus()
          Returns the status code sent through this response object.
 javax.servlet.ServletResponseWrapper getWrapper()
          Returns the ServletResponseWrapper wrapping this request.
 java.io.PrintWriter getWriter()
          Returns the print writer for writing text response data
 int hashCode()
           
 boolean isCommitted()
          Returns a boolean indicating if the response has been committed.
 boolean isResponseComplete()
          Returns true if we know that a complete response has already been sent.
 boolean isWriterUsed()
          Returns true if the print writer has been set or used in this request
 void reset()
          Clears any data that exists in the buffer as well as the status code and headers.
 void resetBuffer()
          Clears the content of the underlying buffer in the response without clearing headers or status code.
 void sendError(int pCode)
          Sends an error response to the client using the specified status code and a default message.
 void sendError(int pCode, java.lang.String pMessage)
          Sends an error response to the client using the specified status code and descriptive message.
 void sendLocalRedirect(java.lang.String pLocation, DynamoHttpServletRequest pRequest)
          Intercepts the sendLocalRedirect call and throws a RestRuntimeException.
 void sendRedirect(java.lang.String pLocation)
          Intercepts the sendRedirect call and throws a RestRuntimeException.
 void setBufferSize(int pBufferSize)
          Sets the preferred buffer size for the body of the response.
 void setCharacterEncoding(java.lang.String pCharset)
           
 void setContentLength(int pLength)
          Sets the content length for this response.
 void setContentType(java.lang.String pContentType)
          Sets the content type for this response.
 void setContentTypeSet(boolean pContentTypeSet)
          Sets the property ContentTypeSet.
 void setDateHeader(java.lang.String pName, long pValue)
          Adds a field to the response header with a given name and date-valued field.
 void setDoExitTracking(boolean pDoExitTracking)
          Sets the property doExitTracking.
 void setHeader(java.lang.String pName, java.lang.String pValue)
          Adds a field to the response header with a given name and value.
 void setIntHeader(java.lang.String pName, int pValue)
          Adds a field to the response header with a given name and integer value.
 void setLocale(java.util.Locale pLocale)
          Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate.
 void setLocaleToCharsetMapper(atg.servlet.LocaleToCharsetMapper pMapper)
          Sets the LocaleToCharsetMapper property
 void setOriginalResponse(DynamoHttpServletResponse pOriginalResponse)
           
 void setOutputStream(javax.servlet.ServletOutputStream pOutputStream)
          Sets the output stream property.
 void setRequest(DynamoHttpServletRequest pRequest)
          Sets the servlet request corresponding to the response for this method.
 void setResponse(javax.servlet.http.HttpServletResponse pResponse)
          Sets the HttpServletResponse property
 void setStatus(int pCode)
          Sets the status code and a default message for this response.
 void setStatus(int pCode, java.lang.String pMessage)
          Deprecated.  
 boolean setStrictOutputAccess(boolean pStrict)
          StrictOutputAccess controls whether the Servlet 2.2 behavior of restricting access to PrintWriters and OuputStreams is imposed.
 void setWrapper(javax.servlet.ServletResponseWrapper pWrapper)
          Sets the ServletResponseWrapper wrapping this request.
 void setWriter(java.io.PrintWriter pWriter)
          Sets the writer for use by subsequent requests.
 java.lang.String toString()
           
 
Methods inherited from class atg.servlet.DynamoHttpServletResponse
addCookieAsHeader, encodeLocalRedirectURL, getCookieString, isOutputStreamRetrieved, isOutputStreamUsed, sendRedirect, setAllowChangeHeadersDuringInclude
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


IGNORE_REDIRECT

public static final java.lang.String IGNORE_REDIRECT
redirects to this location will be ignored, no warning displayed

See Also:
Constant Field Values
Constructor Detail

RestHttpServletResponseWrapper

public RestHttpServletResponseWrapper(DynamoHttpServletResponse pResponse)
Constructor

Method Detail

getOriginalResponse

public DynamoHttpServletResponse getOriginalResponse()
Returns:
the value of originalResponse

setOriginalResponse

public void setOriginalResponse(DynamoHttpServletResponse pOriginalResponse)
Parameters:
pOriginalResponse - the originalResponse to set

addCookie

public void addCookie(javax.servlet.http.Cookie pCookie)
Description copied from class: DynamoHttpServletResponse
Uses the given HTTP response message to assign a new value to a browser-specific cookie. Updates the response to restrict caching of sensitive cookie-related data.

Specified by:
addCookie in interface javax.servlet.http.HttpServletResponse
Overrides:
addCookie in class DynamoHttpServletResponse
Parameters:
pCookie -
See Also:
DynamoHttpServletResponse.addCookie(javax.servlet.http.Cookie)

addCookieToBuffer

public void addCookieToBuffer(javax.servlet.http.Cookie pCookie)
Description copied from class: DynamoHttpServletResponse
Adds a cookie to the CookieBuffer. See atg.servlet.http.CookieBuffer

Overrides:
addCookieToBuffer in class DynamoHttpServletResponse
Parameters:
pCookie -
See Also:
DynamoHttpServletResponse.addCookieToBuffer(javax.servlet.http.Cookie)

addDateHeader

public void addDateHeader(java.lang.String pName,
                          long pValue)
Description copied from class: DynamoHttpServletResponse
Adds a field to the response header with a given name and date-valued field. The date is specified in terms of milliseconds since the epoch. If the field has already been set, then an additional header is created for the new value. The containsHeader method can be used to test for the presence of a header before setting its value.

Specified by:
addDateHeader in interface AddHeaderHttpServletResponse
Specified by:
addDateHeader in interface javax.servlet.http.HttpServletResponse
Overrides:
addDateHeader in class DynamoHttpServletResponse
Parameters:
pName -
pValue -
See Also:
DynamoHttpServletResponse.addDateHeader(java.lang.String, long)

addHeader

public void addHeader(java.lang.String pName,
                      java.lang.String pValue)
Description copied from class: DynamoHttpServletResponse
Adds a field to the response header with a given name and value. If the field has already been set, then an additional header is created for the new value. The containsHeader method can be used to test for the presence of a header before setting its value.

Specified by:
addHeader in interface AddHeaderHttpServletResponse
Specified by:
addHeader in interface javax.servlet.http.HttpServletResponse
Overrides:
addHeader in class DynamoHttpServletResponse
Parameters:
pName -
pValue -
See Also:
DynamoHttpServletResponse.addHeader(java.lang.String, java.lang.String)

addIntHeader

public void addIntHeader(java.lang.String pName,
                         int pValue)
Description copied from class: DynamoHttpServletResponse
Adds a field to the response header with a given name and integer value. If the field has already been set, then an additional header is created for the new value. The containsHeader method can be used to test for the presence of a header before setting its value.

Specified by:
addIntHeader in interface AddHeaderHttpServletResponse
Specified by:
addIntHeader in interface javax.servlet.http.HttpServletResponse
Overrides:
addIntHeader in class DynamoHttpServletResponse
Parameters:
pName -
pValue -
See Also:
DynamoHttpServletResponse.addIntHeader(java.lang.String, int)

containsHeader

public boolean containsHeader(java.lang.String pName)
Description copied from class: DynamoHttpServletResponse
Returns true if the response message header has a field with the specified name.

Specified by:
containsHeader in interface javax.servlet.http.HttpServletResponse
Overrides:
containsHeader in class DynamoHttpServletResponse
Parameters:
pName -
Returns:
See Also:
DynamoHttpServletResponse.containsHeader(java.lang.String)

encodeRedirectUrl

public java.lang.String encodeRedirectUrl(java.lang.String pUrl)
Deprecated. 

Description copied from class: DynamoHttpServletResponse
Encodes the specified URL for use in the sendRedirect method or, if encoding is not needed, returns the URL unchanged. The implementation of this method should include the logic to determine whether the session ID needs to be encoded in the URL. Because the rules for making this determination differ from those used to decide whether to encode a normal link, this method is seperate from the encodeUrl method.

All URLs sent to the HttpServletResponse.sendRedirect method should be run through this method. Otherwise, URL rewriting canont be used with browsers which do not support cookies.

Specified by:
encodeRedirectUrl in interface javax.servlet.http.HttpServletResponse
Overrides:
encodeRedirectUrl in class DynamoHttpServletResponse
Parameters:
pUrl -
Returns:
See Also:
DynamoHttpServletResponse.encodeRedirectUrl(java.lang.String)

encodeRedirectURL

public java.lang.String encodeRedirectURL(java.lang.String pUrl)
Description copied from class: DynamoHttpServletResponse
Encodes the specified URL for use in the sendRedirect method or, if encoding is not needed, returns the URL unchanged. The implementation of this method should include the logic to determine whether the session ID needs to be encoded in the URL. Because the rules for making this determination differ from those used to decide whether to encode a normal link, this method is seperate from the encodeUrl method.

All URLs sent to the HttpServletResponse.sendRedirect method should be run through this method. Otherwise, URL rewriting canont be used with browsers which do not support cookies.

Specified by:
encodeRedirectURL in interface javax.servlet.http.HttpServletResponse
Overrides:
encodeRedirectURL in class DynamoHttpServletResponse
Parameters:
pUrl -
Returns:
See Also:
DynamoHttpServletResponse.encodeRedirectURL(java.lang.String)

encodeUrl

public java.lang.String encodeUrl(java.lang.String pUrl)
Deprecated. 

Description copied from class: DynamoHttpServletResponse
Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method should include the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary.

All URLs emitted by a Servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.

Specified by:
encodeUrl in interface javax.servlet.http.HttpServletResponse
Overrides:
encodeUrl in class DynamoHttpServletResponse
Parameters:
pUrl -
Returns:
See Also:
DynamoHttpServletResponse.encodeUrl(java.lang.String)

encodeURL

public java.lang.String encodeURL(java.lang.String pUrl)
Description copied from class: DynamoHttpServletResponse
Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method should include the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary.

All URLs emitted by a Servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.

Specified by:
encodeURL in interface javax.servlet.http.HttpServletResponse
Overrides:
encodeURL in class DynamoHttpServletResponse
Parameters:
pUrl -
Returns:
See Also:
DynamoHttpServletResponse.encodeURL(java.lang.String)

equals

public boolean equals(java.lang.Object pObj)
Overrides:
equals in class java.lang.Object
Parameters:
pObj -
Returns:
See Also:
Object.equals(java.lang.Object)

flushBuffer

public void flushBuffer()
                 throws java.io.IOException
Description copied from class: DynamoHttpServletResponse
Forces any content in the buffer to be written to the client. A call to this method automatically commits the response, meaning the status code and headers will be written.

Specified by:
flushBuffer in interface javax.servlet.ServletResponse
Overrides:
flushBuffer in class DynamoHttpServletResponse
Throws:
java.io.IOException
See Also:
DynamoHttpServletResponse.flushBuffer()

getBufferSize

public int getBufferSize()
Description copied from class: DynamoHttpServletResponse
Returns the actual buffer size used for the response. If no buffering is used, this method returns 0.

Specified by:
getBufferSize in interface javax.servlet.ServletResponse
Overrides:
getBufferSize in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getBufferSize()

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Description copied from class: DynamoHttpServletResponse
Returns the character encoding used for writing text to the body of this response. This is based on the current content type of the response (using the ; charset=xxx) value.

Specified by:
getCharacterEncoding in interface atg.servlet.CharacterEncodable
Specified by:
getCharacterEncoding in interface javax.servlet.ServletResponse
Overrides:
getCharacterEncoding in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getCharacterEncoding()

getContentType

public java.lang.String getContentType()
Description copied from class: DynamoHttpServletResponse
Gets the content type for this response.

Specified by:
getContentType in interface javax.servlet.ServletResponse
Overrides:
getContentType in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getContentType()

getContentTypeSet

public boolean getContentTypeSet()
Overrides:
getContentTypeSet in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getContentTypeSet()

getDoExitTracking

public boolean getDoExitTracking()
Overrides:
getDoExitTracking in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getDoExitTracking()

getHeaders

public java.util.Dictionary getHeaders()
Description copied from class: DynamoHttpServletResponse
Returns a Dictionary of the headers that have been set so far. String headers will have values of Strings, int headers will have values of Integers, and date headers will have values of Longs.

Overrides:
getHeaders in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getHeaders()

getHeaders

public java.util.Enumeration getHeaders(java.lang.String pHeaderName)
Description copied from class: DynamoHttpServletResponse
Returns all the values of the specified request header as an Enumeration of objects. The objects returned may be a Strings, Integers, or Longs, depending on whether setHeader, setIntHeader, or setDateHeader was used.

Some headers, such as Set-Cookie can be sent to clients as several headers each with a different value rather than sending the header as a comma separated list.

If the request did not include any headers of the specified name, this method returns an empty Enumeration. The header name is case insensitive. You can use this method with any request header.

Overrides:
getHeaders in class DynamoHttpServletResponse
Parameters:
pHeaderName -
Returns:
See Also:
DynamoHttpServletResponse.getHeaders(java.lang.String)

getLocale

public java.util.Locale getLocale()
Description copied from class: DynamoHttpServletResponse
Returns the locale assigned to the response.

Specified by:
getLocale in interface javax.servlet.ServletResponse
Overrides:
getLocale in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getLocale()

getLocaleToCharsetMapper

public atg.servlet.LocaleToCharsetMapper getLocaleToCharsetMapper()
Description copied from class: DynamoHttpServletResponse
Returns the LocaleToCharsetMapper property

Overrides:
getLocaleToCharsetMapper in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getLocaleToCharsetMapper()

getOutputStream

public javax.servlet.ServletOutputStream getOutputStream()
                                                  throws java.io.IOException
Description copied from class: DynamoHttpServletResponse
Returns an output stream for writing response data.

Specified by:
getOutputStream in interface javax.servlet.ServletResponse
Overrides:
getOutputStream in class DynamoHttpServletResponse
Returns:
Throws:
java.io.IOException
See Also:
DynamoHttpServletResponse.getOutputStream()

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Description copied from class: DynamoHttpServletResponse
Returns the HttpServletResponse property

Overrides:
getResponse in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getResponse()

getStatus

public int getStatus()
Description copied from class: DynamoHttpServletResponse
Returns the status code sent through this response object. If no status code has been set explicitly, SC_STATUS_OK is sent.

Overrides:
getStatus in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getStatus()

getWrapper

public javax.servlet.ServletResponseWrapper getWrapper()
Description copied from class: DynamoHttpServletResponse
Returns the ServletResponseWrapper wrapping this request. If there are multiple wrappers created in the course of executing the pipeline or filter chain this should be the outermost such wrapper.

Overrides:
getWrapper in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.getWrapper()

getWriter

public java.io.PrintWriter getWriter()
                              throws java.io.IOException
Description copied from class: DynamoHttpServletResponse
Returns the print writer for writing text response data

Specified by:
getWriter in interface javax.servlet.ServletResponse
Overrides:
getWriter in class DynamoHttpServletResponse
Returns:
Throws:
java.io.IOException
See Also:
DynamoHttpServletResponse.getWriter()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
See Also:
Object.hashCode()

isCommitted

public boolean isCommitted()
Description copied from class: DynamoHttpServletResponse
Returns a boolean indicating if the response has been committed. A commited response has already had its status code and headers written.

Specified by:
isCommitted in interface javax.servlet.ServletResponse
Overrides:
isCommitted in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.isCommitted()

isResponseComplete

public boolean isResponseComplete()
Description copied from class: DynamoHttpServletResponse
Returns true if we know that a complete response has already been sent. This is typically only true if a redirect has been sent through this response.

Overrides:
isResponseComplete in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.isResponseComplete()

isWriterUsed

public boolean isWriterUsed()
Description copied from class: DynamoHttpServletResponse
Returns true if the print writer has been set or used in this request

Overrides:
isWriterUsed in class DynamoHttpServletResponse
Returns:
See Also:
DynamoHttpServletResponse.isWriterUsed()

reset

public void reset()
Description copied from class: DynamoHttpServletResponse
Clears any data that exists in the buffer as well as the status code and headers. If the response has been committed, this method throws an IllegalStateException.

Specified by:
reset in interface javax.servlet.ServletResponse
Overrides:
reset in class DynamoHttpServletResponse
See Also:
DynamoHttpServletResponse.reset()

resetBuffer

public void resetBuffer()
Description copied from class: DynamoHttpServletResponse
Clears the content of the underlying buffer in the response without clearing headers or status code. If the response has been committed, this method throws an IllegalStateException.

Specified by:
resetBuffer in interface javax.servlet.ServletResponse
Overrides:
resetBuffer in class DynamoHttpServletResponse
See Also:
DynamoHttpServletResponse.resetBuffer()

sendError

public void sendError(int pCode,
                      java.lang.String pMessage)
               throws java.io.IOException
Description copied from class: DynamoHttpServletResponse
Sends an error response to the client using the specified status code and descriptive message.

Specified by:
sendError in interface javax.servlet.http.HttpServletResponse
Overrides:
sendError in class DynamoHttpServletResponse
Parameters:
pCode -
pMessage -
Throws:
java.io.IOException
See Also:
DynamoHttpServletResponse.sendError(int, java.lang.String)

sendError

public void sendError(int pCode)
               throws java.io.IOException
Description copied from class: DynamoHttpServletResponse
Sends an error response to the client using the specified status code and a default message.

Specified by:
sendError in interface javax.servlet.http.HttpServletResponse
Overrides:
sendError in class DynamoHttpServletResponse
Parameters:
pCode -
Throws:
java.io.IOException
See Also:
DynamoHttpServletResponse.sendError(int)

sendLocalRedirect

public void sendLocalRedirect(java.lang.String pLocation,
                              DynamoHttpServletRequest pRequest)
                       throws java.io.IOException
Intercepts the sendLocalRedirect call and throws a RestRuntimeException.

Overrides:
sendLocalRedirect in class DynamoHttpServletResponse
Parameters:
pLocation -
pRequest -
Throws:
java.io.IOException
See Also:
DynamoHttpServletResponse.sendLocalRedirect(java.lang.String, atg.servlet.DynamoHttpServletRequest)

sendRedirect

public void sendRedirect(java.lang.String pLocation)
                  throws java.io.IOException
Intercepts the sendRedirect call and throws a RestRuntimeException.

Specified by:
sendRedirect in interface javax.servlet.http.HttpServletResponse
Overrides:
sendRedirect in class DynamoHttpServletResponse
Parameters:
pLocation -
Throws:
java.io.IOException
See Also:
DynamoHttpServletResponse.sendRedirect(java.lang.String)

setBufferSize

public void setBufferSize(int pBufferSize)
Description copied from class: DynamoHttpServletResponse
Sets the preferred buffer size for the body of the response. The servlet container will use a buffer at least as large as the size requested. The actual buffer size used can be found using getBufferSize.

A larger buffer allows more content to be written before anything is actually sent, thus providing the servlet with more time to set appropriate status codes and headers. A smaller buffer decreases server memory load and allows the client to start receiving data more quickly. This method must be called before any response body content is written; if content has been written, this method throws an IllegalStateException.

Specified by:
setBufferSize in interface javax.servlet.ServletResponse
Overrides:
setBufferSize in class DynamoHttpServletResponse
Parameters:
pBufferSize -
See Also:
DynamoHttpServletResponse.setBufferSize(int)

setCharacterEncoding

public void setCharacterEncoding(java.lang.String pCharset)
Specified by:
setCharacterEncoding in interface javax.servlet.ServletResponse
Overrides:
setCharacterEncoding in class DynamoHttpServletResponse
Parameters:
pCharset -
See Also:
DynamoHttpServletResponse.setCharacterEncoding(java.lang.String)

setContentLength

public void setContentLength(int pLength)
Description copied from class: DynamoHttpServletResponse
Sets the content length for this response.

Specified by:
setContentLength in interface javax.servlet.ServletResponse
Overrides:
setContentLength in class DynamoHttpServletResponse
Parameters:
pLength -
See Also:
DynamoHttpServletResponse.setContentLength(int)

setContentType

public void setContentType(java.lang.String pContentType)
Description copied from class: DynamoHttpServletResponse
Sets the content type for this response. Depending on the content type the appropriate URL SessionID Specifier is set.

Specified by:
setContentType in interface javax.servlet.ServletResponse
Overrides:
setContentType in class DynamoHttpServletResponse
Parameters:
pContentType -
See Also:
DynamoHttpServletResponse.setContentType(java.lang.String)

setContentTypeSet

public void setContentTypeSet(boolean pContentTypeSet)
Description copied from class: DynamoHttpServletResponse
Sets the property ContentTypeSet. This property indicates whether or not the content type of the response has been set to correspond to the file. It is used to implement a performance optimization to avoid setting this multiple times when doing recursive include of the PageCompileServlet. This value gets set to false when the request starts and also when the response is reset. It gets set to true in the PageCompileServlet when the content type is defined and if it is true, prevents the PageCompileServlet from setting this and the dynamic content type header again.

Overrides:
setContentTypeSet in class DynamoHttpServletResponse
Parameters:
pContentTypeSet -
See Also:
DynamoHttpServletResponse.setContentTypeSet(boolean)

setDateHeader

public void setDateHeader(java.lang.String pName,
                          long pValue)
Description copied from class: DynamoHttpServletResponse
Adds a field to the response header with a given name and date-valued field. The date is specified in terms of milliseconds since the epoch. If the date field had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Specified by:
setDateHeader in interface javax.servlet.http.HttpServletResponse
Overrides:
setDateHeader in class DynamoHttpServletResponse
Parameters:
pName -
pValue -
See Also:
DynamoHttpServletResponse.setDateHeader(java.lang.String, long)

setDoExitTracking

public void setDoExitTracking(boolean pDoExitTracking)
Description copied from class: DynamoHttpServletResponse
Sets the property doExitTracking. This property indicates whether or not exit tracking should be done during sendLocalRedirect.

Overrides:
setDoExitTracking in class DynamoHttpServletResponse
Parameters:
pDoExitTracking -
See Also:
DynamoHttpServletResponse.setDoExitTracking(boolean)

setHeader

public void setHeader(java.lang.String pName,
                      java.lang.String pValue)
Description copied from class: DynamoHttpServletResponse
Adds a field to the response header with a given name and value. If the field had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Specified by:
setHeader in interface javax.servlet.http.HttpServletResponse
Overrides:
setHeader in class DynamoHttpServletResponse
Parameters:
pName -
pValue -
See Also:
DynamoHttpServletResponse.setHeader(java.lang.String, java.lang.String)

setIntHeader

public void setIntHeader(java.lang.String pName,
                         int pValue)
Description copied from class: DynamoHttpServletResponse
Adds a field to the response header with a given name and integer value. If the field had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Specified by:
setIntHeader in interface javax.servlet.http.HttpServletResponse
Overrides:
setIntHeader in class DynamoHttpServletResponse
Parameters:
pName -
pValue -
See Also:
DynamoHttpServletResponse.setIntHeader(java.lang.String, int)

setLocale

public void setLocale(java.util.Locale pLocale)
Description copied from class: DynamoHttpServletResponse
Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate. This method should be called before a call to #getWriter. By default, the response locale is the default locale for the server.

Specified by:
setLocale in interface javax.servlet.ServletResponse
Overrides:
setLocale in class DynamoHttpServletResponse
Parameters:
pLocale -
See Also:
DynamoHttpServletResponse.setLocale(java.util.Locale)

setLocaleToCharsetMapper

public void setLocaleToCharsetMapper(atg.servlet.LocaleToCharsetMapper pMapper)
Description copied from class: DynamoHttpServletResponse
Sets the LocaleToCharsetMapper property

Overrides:
setLocaleToCharsetMapper in class DynamoHttpServletResponse
Parameters:
pMapper -
See Also:
DynamoHttpServletResponse.setLocaleToCharsetMapper(atg.servlet.LocaleToCharsetMapper)

setOutputStream

public void setOutputStream(javax.servlet.ServletOutputStream pOutputStream)
Description copied from class: DynamoHttpServletResponse
Sets the output stream property. This method should be used with care, and whether to also call setWriter should be considered.

Overrides:
setOutputStream in class DynamoHttpServletResponse
Parameters:
pOutputStream -
See Also:
DynamoHttpServletResponse.setOutputStream(javax.servlet.ServletOutputStream)

setRequest

public void setRequest(DynamoHttpServletRequest pRequest)
Description copied from class: DynamoHttpServletResponse
Sets the servlet request corresponding to the response for this method.

Overrides:
setRequest in class DynamoHttpServletResponse
Parameters:
pRequest -
See Also:
DynamoHttpServletResponse.setRequest(atg.servlet.DynamoHttpServletRequest)

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse pResponse)
Description copied from class: DynamoHttpServletResponse
Sets the HttpServletResponse property

Overrides:
setResponse in class DynamoHttpServletResponse
Parameters:
pResponse -
See Also:
DynamoHttpServletResponse.setResponse(javax.servlet.http.HttpServletResponse)

setStatus

public void setStatus(int pCode,
                      java.lang.String pMessage)
Deprecated. 

Description copied from class: DynamoHttpServletResponse
Sets the status code and message for this response.

Specified by:
setStatus in interface javax.servlet.http.HttpServletResponse
Overrides:
setStatus in class DynamoHttpServletResponse
Parameters:
pCode -
pMessage -
See Also:
DynamoHttpServletResponse.setStatus(int, java.lang.String)

setStatus

public void setStatus(int pCode)
Description copied from class: DynamoHttpServletResponse
Sets the status code and a default message for this response.

Specified by:
setStatus in interface javax.servlet.http.HttpServletResponse
Overrides:
setStatus in class DynamoHttpServletResponse
Parameters:
pCode -
See Also:
DynamoHttpServletResponse.setStatus(int)

setStrictOutputAccess

public boolean setStrictOutputAccess(boolean pStrict)
Description copied from class: DynamoHttpServletResponse
StrictOutputAccess controls whether the Servlet 2.2 behavior of restricting access to PrintWriters and OuputStreams is imposed.

Overrides:
setStrictOutputAccess in class DynamoHttpServletResponse
Parameters:
pStrict -
Returns:
See Also:
DynamoHttpServletResponse.setStrictOutputAccess(boolean)

setWrapper

public void setWrapper(javax.servlet.ServletResponseWrapper pWrapper)
Description copied from class: DynamoHttpServletResponse
Sets the ServletResponseWrapper wrapping this request. If there are multiple wrappers created in the course of executing the pipeline or filter chain this should be the outermost such wrapper.

Overrides:
setWrapper in class DynamoHttpServletResponse
Parameters:
pWrapper -
See Also:
DynamoHttpServletResponse.setWrapper(javax.servlet.ServletResponseWrapper)

setWriter

public void setWriter(java.io.PrintWriter pWriter)
Description copied from class: DynamoHttpServletResponse
Sets the writer for use by subsequent requests. Writers are used when the characters sent to the browser are different than the simple unicode representation (i.e. not us-ascii). This method should be used with care.

Overrides:
setWriter in class DynamoHttpServletResponse
Parameters:
pWriter -
See Also:
DynamoHttpServletResponse.setWriter(java.io.PrintWriter)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
See Also:
Object.toString()