org.zkoss.zk.au
Class AuWriters

java.lang.Object
  extended by org.zkoss.zk.au.AuWriters

public class AuWriters
extends java.lang.Object

Utilities to instantiate an implmentation of AuWriter.

Since:
3.0.1
Author:
tomyeh

Field Summary
static java.lang.String CONTENT_TYPE
          The content type of the output.
 
Constructor Summary
AuWriters()
           
 
Method Summary
static java.lang.Class getImplementationClass()
          Returns the implementation class of AuWriter that will be used to generate the output to the client.
static JSONObject getJSONOutput(JSONArray rs)
          Returns a JSON object representing the output that will be sent to the client.
static AuWriter newInstance()
          Creates an instance of AuWriter.
static void setImplementationClass(java.lang.Class cls)
          Sets the implementation class of AuWriter that will be used to generate the output to the client.
static JSONArray toJSON(AuResponse response)
          Converts a response to a JSON object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
The content type of the output.

Since:
3.5.0
See Also:
Constant Field Values
Constructor Detail

AuWriters

public AuWriters()
Method Detail

getImplementationClass

public static java.lang.Class getImplementationClass()
Returns the implementation class of AuWriter that will be used to generate the output to the client.

Default: HttpAuWriter.


setImplementationClass

public static void setImplementationClass(java.lang.Class cls)
Sets the implementation class of AuWriter that will be used to generate the output to the client.


newInstance

public static AuWriter newInstance()
                            throws UiException
Creates an instance of AuWriter.

Throws:
UiException

getJSONOutput

public static JSONObject getJSONOutput(JSONArray rs)
Returns a JSON object representing the output that will be sent to the client.

You could add the responses to the given array by invoking toJSON(org.zkoss.zk.au.AuResponse).

Parameters:
rs - the array to hold the responses. To output a response, invoke toJSON(org.zkoss.zk.au.AuResponse) as follows: rs.add(AuWriters.toJSON(response)).
Since:
5.0.5

toJSON

public static JSONArray toJSON(AuResponse response)
Converts a response to a JSON object.

Since:
5.0.5


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo