IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.cs.ajax
Class AjaxUtils

java.lang.Object
  extended by com.ibm.btt.cs.ajax.AjaxUtils

public class AjaxUtils
extends java.lang.Object


Constructor Summary
AjaxUtils()
           
 
Method Summary
static JSONArray convertToArray(IndexedCollection ic, java.util.Locale loc, java.lang.String convType)
          Convert the indexed collection to JSONArray
static KeyedCollection convertToFlatKeyedCollection(JSONObject jo)
          Convert the JSONObject to KeyedCollection in flat format
static IndexedCollection convertToIndexedCollection(JSONArray ja)
          Convert the indexed collection to JSONArray
static IndexedCollection convertToIndexedCollection(JSONArray ja, java.lang.String name)
          Convert the indexed collection to JSONArray
static java.lang.String convertToJson(Context ctx, java.util.Locale loc, java.lang.String convType)
          Convert the BTT context object to JSON String
static JSONObject convertToJson(KeyedCollection kc, java.util.Locale loc, java.lang.String convType)
          * Convert the keyed collection to JSONObject
static KeyedCollection convertToKeyedCollection(JSONObject jo)
          Convert the JSONObject to KeyedCollection
static KeyedCollection convertToKeyedCollection(JSONObject jo, java.lang.String name)
          * Convert the keyed collection to JSONObject
static JSONArray convertToOrderedArray(IndexedCollection ic, java.util.Locale loc, java.lang.String convType)
          Convert the indexed collection to JSONArray and keep the order of the attributes in JOSN the same as the elements in KeyedCollection
static JSONObject convertToOrderedJson(KeyedCollection kc, java.util.Locale loc, java.lang.String convType)
          * Convert the keyed collection to JSONObject and keep the order of the attributes in JOSN the same as the elements in KeyedCollection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxUtils

public AjaxUtils()
Method Detail

convertToJson

public static java.lang.String convertToJson(Context ctx,
                                             java.util.Locale loc,
                                             java.lang.String convType)
Convert the BTT context object to JSON String

Parameters:
ctx - the BTT context object
loc - locale info of the user
Returns:
the converted JSON String

convertToJson

public static JSONObject convertToJson(KeyedCollection kc,
                                       java.util.Locale loc,
                                       java.lang.String convType)
* Convert the keyed collection to JSONObject

Parameters:
kc - the keyed collection
loc - locale info of the user
Returns:
the converted JSON object

convertToOrderedJson

public static JSONObject convertToOrderedJson(KeyedCollection kc,
                                              java.util.Locale loc,
                                              java.lang.String convType)
* Convert the keyed collection to JSONObject and keep the order of the attributes in JOSN the same as the elements in KeyedCollection

Parameters:
kc - the keyed collection
loc - locale info of the user
Returns:
the converted JSON object

convertToArray

public static JSONArray convertToArray(IndexedCollection ic,
                                       java.util.Locale loc,
                                       java.lang.String convType)
Convert the indexed collection to JSONArray

Parameters:
ic - the indexed collection
loc - locale info of the user
Returns:
the JSONArray

convertToOrderedArray

public static JSONArray convertToOrderedArray(IndexedCollection ic,
                                              java.util.Locale loc,
                                              java.lang.String convType)
Convert the indexed collection to JSONArray and keep the order of the attributes in JOSN the same as the elements in KeyedCollection

Parameters:
ic - the indexed collection
loc - locale info of the user
Returns:
the JSONArray

convertToKeyedCollection

public static KeyedCollection convertToKeyedCollection(JSONObject jo)
Convert the JSONObject to KeyedCollection

Parameters:
jo - the JSONObject
Returns:
the converted JSON object

convertToFlatKeyedCollection

public static KeyedCollection convertToFlatKeyedCollection(JSONObject jo)
Convert the JSONObject to KeyedCollection in flat format

Parameters:
jo -
Returns:

convertToKeyedCollection

public static KeyedCollection convertToKeyedCollection(JSONObject jo,
                                                       java.lang.String name)
* Convert the keyed collection to JSONObject

Parameters:
kc - the keyed collection
Returns:
the converted JSON object

convertToIndexedCollection

public static IndexedCollection convertToIndexedCollection(JSONArray ja)
Convert the indexed collection to JSONArray

Parameters:
ic - the indexed collection
Returns:
the JSONArray

convertToIndexedCollection

public static IndexedCollection convertToIndexedCollection(JSONArray ja,
                                                           java.lang.String name)
Convert the indexed collection to JSONArray

Parameters:
ic - the indexed collection
Returns:
the JSONArray

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011