org.exist.cocoon
Class CocoonResponseWrapper

java.lang.Object
  extended by org.exist.cocoon.CocoonResponseWrapper
All Implemented Interfaces:
ResponseWrapper

public class CocoonResponseWrapper
extends Object
implements ResponseWrapper

Author:
Wolfgang Meier (wolfgang@exist-db.org)

Constructor Summary
CocoonResponseWrapper(org.apache.cocoon.environment.Response response)
           
 
Method Summary
 void addCookie(org.apache.cocoon.environment.Cookie arg0)
           
 void addCookie(String name, String value)
           
 void addCookie(String name, String value, int maxAge)
           
 void addCookie(String name, String value, int maxAge, boolean secure)
           
 void addDateHeader(String arg0, long arg1)
           
 void addHeader(String arg0, String arg1)
           
 void addIntHeader(String arg0, int arg1)
           
 boolean containsHeader(String arg0)
           
 org.apache.cocoon.environment.Cookie createCookie(String arg0, String arg1)
           
 String encodeURL(String arg0)
           
 void flushBuffer()
          Does nothing!
 String getCharacterEncoding()
           
 long getDateHeader(String name)
           
 Locale getLocale()
           
 OutputStream getOutputStream()
           
 boolean isCommitted()
           
 void sendRedirect(String arg0)
           
 void setContentType(String contentType)
           
 void setDateHeader(String name, long arg1)
           
 void setHeader(String arg0, String arg1)
           
 void setIntHeader(String arg0, int arg1)
           
 void setLocale(Locale arg0)
           
 void setStatusCode(int arg0)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CocoonResponseWrapper

public CocoonResponseWrapper(org.apache.cocoon.environment.Response response)
Method Detail

addCookie

public void addCookie(String name,
                      String value)
Specified by:
addCookie in interface ResponseWrapper
Parameters:
name - Name of the Cookie
value - Value of the Cookie

addCookie

public void addCookie(String name,
                      String value,
                      int maxAge)
Specified by:
addCookie in interface ResponseWrapper
Parameters:
name - Name of the Cookie
value - Value of the Cookie
maxAge - MaxAge of the Cookie

addCookie

public void addCookie(String name,
                      String value,
                      int maxAge,
                      boolean secure)
Specified by:
addCookie in interface ResponseWrapper
Parameters:
name - Name of the Cookie
value - Value of the Cookie
maxAge - MaxAge of the Cookie
secure - security of the Cookie

addCookie

public void addCookie(org.apache.cocoon.environment.Cookie arg0)
Parameters:
arg0 -

setContentType

public void setContentType(String contentType)
Specified by:
setContentType in interface ResponseWrapper
Parameters:
contentType - Content Type of the response

addDateHeader

public void addDateHeader(String arg0,
                          long arg1)
Specified by:
addDateHeader in interface ResponseWrapper
Parameters:
arg0 -
arg1 -

addHeader

public void addHeader(String arg0,
                      String arg1)
Specified by:
addHeader in interface ResponseWrapper
Parameters:
arg0 -
arg1 -

addIntHeader

public void addIntHeader(String arg0,
                         int arg1)
Specified by:
addIntHeader in interface ResponseWrapper
Parameters:
arg0 -
arg1 -

containsHeader

public boolean containsHeader(String arg0)
Specified by:
containsHeader in interface ResponseWrapper
Parameters:
arg0 -
Returns:
A boolean value indicating whether it contains the header name.

createCookie

public org.apache.cocoon.environment.Cookie createCookie(String arg0,
                                                         String arg1)
Parameters:
arg0 -
arg1 -

encodeURL

public String encodeURL(String arg0)
Specified by:
encodeURL in interface ResponseWrapper
Parameters:
arg0 -
Returns:
The encoded value

flushBuffer

public void flushBuffer()
                 throws IOException
Does nothing!

Specified by:
flushBuffer in interface ResponseWrapper
Throws:
IOException

getCharacterEncoding

public String getCharacterEncoding()
Specified by:
getCharacterEncoding in interface ResponseWrapper
Returns:
Returns the default character encoding

getLocale

public Locale getLocale()
Specified by:
getLocale in interface ResponseWrapper
Returns:
Returns the default locale

setDateHeader

public void setDateHeader(String name,
                          long arg1)
Specified by:
setDateHeader in interface ResponseWrapper
Parameters:
name -
arg1 -

getDateHeader

public long getDateHeader(String name)
Specified by:
getDateHeader in interface ResponseWrapper
Returns:
the value of Date Header corresponding to given name, 0 if none has been set.

isCommitted

public boolean isCommitted()
Specified by:
isCommitted in interface ResponseWrapper
Returns:
returns isCommitted

setHeader

public void setHeader(String arg0,
                      String arg1)
Specified by:
setHeader in interface ResponseWrapper
Parameters:
arg0 -
arg1 -

setIntHeader

public void setIntHeader(String arg0,
                         int arg1)
Specified by:
setIntHeader in interface ResponseWrapper
Parameters:
arg0 -
arg1 -

setStatusCode

public void setStatusCode(int arg0)
Specified by:
setStatusCode in interface ResponseWrapper
Parameters:
arg0 -

setLocale

public void setLocale(Locale arg0)
Specified by:
setLocale in interface ResponseWrapper
Parameters:
arg0 -

sendRedirect

public void sendRedirect(String arg0)
                  throws IOException
Specified by:
sendRedirect in interface ResponseWrapper
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Specified by:
getOutputStream in interface ResponseWrapper
Throws:
IOException


Copyright (C) Wolfgang Meier. All rights reserved.