deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.enterprise.control.ajax
Class ResponseHandler

java.lang.Object
  extended by org.deegree.enterprise.control.ajax.ResponseHandler

public class ResponseHandler
extends java.lang.Object

Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
ResponseHandler(javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 javax.servlet.http.HttpServletResponse getHttpServletResponse()
           
 void setContentLength(int length)
          sets content length
 void setContentType(java.lang.String contentType)
          sets content type
 void setLocale(java.util.Locale locale)
          sets locale/character encoding
(package private)  void setXSLT(XSLTDocument xslt)
          sets an xslt script that will be used if a XML document will be written; - writeAndClose(XMLFragment)
 void writeAndClose(boolean emitClassName, java.lang.Object value)
          'text/plain; charset=utf-8' will be used as default if no content-type has been set.
 void writeAndClose(java.lang.String value)
          write a string result back to the client and closes the output stream.
 void writeAndClose(XMLFragment value)
          write a XML result back to the client (if a xslt script has been set the document will be transformed first) and closes the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseHandler

ResponseHandler(javax.servlet.http.HttpServletResponse response)
Parameters:
response -
Method Detail

setContentType

public void setContentType(java.lang.String contentType)
sets content type

Parameters:
contentType -

setLocale

public void setLocale(java.util.Locale locale)
sets locale/character encoding

Parameters:
locale -

setContentLength

public void setContentLength(int length)
sets content length

Parameters:
length -

setXSLT

void setXSLT(XSLTDocument xslt)
sets an xslt script that will be used if a XML document will be written; - writeAndClose(XMLFragment)

Parameters:
xslt -

writeAndClose

public void writeAndClose(java.lang.String value)
                   throws java.io.IOException
write a string result back to the client and closes the output stream. 'text/plain; charset=utf-8' will be used as default if no content-type has been set.

Parameters:
value -
Throws:
java.io.IOException

writeAndClose

public void writeAndClose(XMLFragment value)
                   throws java.io.IOException
write a XML result back to the client (if a xslt script has been set the document will be transformed first) and closes the output stream.
'text/plain; charset=utf-8' will be used as default if no content-type has been set.

Parameters:
value -
Throws:
java.io.IOException

writeAndClose

public void writeAndClose(boolean emitClassName,
                          java.lang.Object value)
                   throws java.io.IOException
'text/plain; charset=utf-8' will be used as default if no content-type has been set.

Parameters:
emitClassName -
value -
Throws:
java.io.IOException

getHttpServletResponse

public javax.servlet.http.HttpServletResponse getHttpServletResponse()
Returns:
original HttpServletResponse object

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org