|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<RestUtils>
com.ibm.btt.cs.rest.resource.RestUtils
public enum RestUtils
Enum Constant Summary | |
---|---|
INSTANCE
|
Method Summary | |
---|---|
int |
checkSession(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Check if BTT Session is established or not |
static JSONArray |
convertToArray(IndexedCollection ic,
java.util.Locale loc,
java.lang.String convType)
Convert given Indexed Collection basing on give Locale and conversion type to JSONArray |
KeyedCollection |
convertToFlatKeyedCollection(JSONObject jo)
Convert the JSONObject to KeyedCollection in flat format |
IndexedCollection |
convertToIndexedCollection(JSONArray ja)
Convert the indexed collection to JSONArray |
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 given Context basing on give Locale and conversion type to JSONObject then return it as String |
static JSONObject |
convertToJson(KeyedCollection kc,
java.util.Locale loc,
java.lang.String convType)
Convert given KeyedCollection basing on give Locale and conversion type to JSONObject |
KeyedCollection |
convertToKeyedCollection(JSONObject jo)
Convert the JSONObject to KeyedCollection |
KeyedCollection |
convertToKeyedCollection(JSONObject jo,
java.lang.String name)
* Convert the keyed collection to JSONObject |
void |
convertToStringJSON(JSONObject json)
|
void |
convertToStringJSONArray(JSONArray json)
|
JSONObject |
establishSession(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Establish a new BTT session then return the session context |
JSONObject |
executeFlow(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
java.lang.String flowName,
java.lang.String procId,
JSONObject flowParams)
Execute processor/flow with give processor/flow id or instance id, and necessary parameters, then return the flow context at current state |
JSONObject |
executeOperation(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
java.lang.String operationName,
JSONObject operationParams)
Execute the operation of give name with specified parameters, then return the operation context as JSONObject |
JSONArray |
filterJSONArray(JSONArray arr,
Filter given JSONArray basing on given parameters. |
java.lang.String |
getCurrentSessionId(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Find current BTT session id from BTT Channel Driver |
Context |
getFlowContext(javax.servlet.http.HttpServletRequest req,
java.lang.String flowName,
java.lang.String procId)
|
JSONObject |
getFlowContext(java.lang.String sid,
java.lang.String flowName,
java.lang.String procId)
Return processor/flow context by given session id, flow id and instance id. |
JSONObject |
getFlowContextJSON(javax.servlet.http.HttpServletRequest req,
java.lang.String flowName,
java.lang.String procId)
Return the specific processor/flow context by given http request, flow id and instance id |
java.lang.Object |
getHierarchyContextData(JSONObject json,
java.lang.String[] datanames)
Return hierarchy context as JSONObject or JSONArray by given datanames |
java.lang.String |
getJSONP(java.lang.String callback,
JSONArray json)
Return JSONP String for given JSONArray |
JSONObject |
getOperationContext(javax.servlet.http.HttpServletRequest req,
java.lang.String operationName)
Return Operation Context by give http request and operation name. |
JSONObject |
getOperationContext(java.lang.String sid,
java.lang.String operationName)
Return Operation Context by given session id and operation name |
Context |
getSessionContext(javax.servlet.http.HttpServletRequest req)
Find current session context |
Context |
getSessionContext(java.lang.String sid)
Find session context for specified session id |
JSONObject |
getSessionContextJSON(javax.servlet.http.HttpServletRequest req)
Return current session context as JSON Object |
JSONObject |
getSessionContextJSON(java.lang.String sid)
Get current session context for specified session id |
JSONObject |
paginateJSONArray(JSONArray input,
int start,
int end)
Extract a set of JSONArray by given pagination parameters, then return them inside a JSONObject |
BTTServerOperation |
readOperation(java.lang.String operationName)
Read Operation definition |
Processor |
readProcessor(java.lang.String processorName)
Read processor/flow definition |
boolean |
removeFlowContext(javax.servlet.http.HttpServletRequest req,
java.lang.String flowName,
java.lang.String procId)
Destroy the flow/processor context, find the context by processor id, then remove it out of HtmlProcessorManager context table. |
boolean |
removeHierarchyContextData(JSONObject json,
java.lang.String[] datanames)
Delete specified context data |
boolean |
removeOperationContext(javax.servlet.http.HttpServletRequest req,
java.lang.String operationName)
Set specified context data value to null |
void |
setFlowContext(javax.servlet.http.HttpServletRequest req,
java.lang.String flowName,
java.lang.String procId,
JSONObject json)
Set processor/flow Context for specified processor/flow id and instance id |
void |
setOperationContext(javax.servlet.http.HttpServletRequest req,
java.lang.String operationName,
JSONObject json)
Set session context for specified operation |
void |
setSessionContext(javax.servlet.http.HttpServletRequest req,
JSONObject json)
Set session context |
JSONArray |
sortJSONArray(JSONArray arr,
java.lang.String params)
Sort JSONArray members basing on give sorting parameters. |
boolean |
updateHierarchyContextData(JSONObject json,
java.lang.String[] datanames,
java.lang.Object value)
Update the hierarchy context data with given value |
static RestUtils |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static RestUtils[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final RestUtils INSTANCE
Method Detail |
---|
public static RestUtils[] values()
for (RestUtils c : RestUtils.values()) System.out.println(c);
public static RestUtils valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic static JSONArray convertToArray(IndexedCollection ic, java.util.Locale loc, java.lang.String convType)
ic
- loc
- convType
-
public static java.lang.String convertToJson(Context ctx, java.util.Locale loc, java.lang.String convType)
ctx
- loc
- convType
-
public static JSONObject convertToJson(KeyedCollection kc, java.util.Locale loc, java.lang.String convType)
kc
- loc
- convType
-
public int checkSession(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws java.lang.Exception
req
- resp
-
java.lang.Exception
public KeyedCollection convertToFlatKeyedCollection(JSONObject jo)
jo
-
public IndexedCollection convertToIndexedCollection(JSONArray ja)
ic
- the indexed collection
public IndexedCollection convertToIndexedCollection(JSONArray ja, java.lang.String name)
ic
- the indexed collection
public KeyedCollection convertToKeyedCollection(JSONObject jo)
jo
- the JSONObject
public KeyedCollection convertToKeyedCollection(JSONObject jo, java.lang.String name)
kc
- the keyed collection
public void convertToStringJSON(JSONObject json) throws JSONException
json
-
JSONException
public void convertToStringJSONArray(JSONArray json) throws JSONException
json
-
JSONException
public JSONObject establishSession(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws java.lang.Exception
req
- resp
-
java.lang.Exception
public JSONObject executeFlow(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String flowName, java.lang.String procId, JSONObject flowParams) throws java.lang.Exception
req
- resp
- flowName
- procId
- flowParams
-
java.lang.Exception
public JSONObject executeOperation(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String operationName, JSONObject operationParams) throws java.lang.Exception
req
- resp
- operationName
- operationParams
-
java.lang.Exception
public JSONArray filterJSONArray(JSONArray arr,params) throws java.lang.Exception
arr
- params
-
java.lang.Exception
public java.lang.String getCurrentSessionId(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws java.lang.Exception
req
- resp
-
java.lang.Exception
public JSONObject getFlowContextJSON(javax.servlet.http.HttpServletRequest req, java.lang.String flowName, java.lang.String procId) throws java.lang.Exception
req
- flowName
- procId
-
java.lang.Exception
public Context getFlowContext(javax.servlet.http.HttpServletRequest req, java.lang.String flowName, java.lang.String procId) throws java.lang.Exception
req
- flowName
- procId
-
java.lang.Exception
public JSONObject getFlowContext(java.lang.String sid, java.lang.String flowName, java.lang.String procId) throws java.lang.Exception
sid
- flowName
- procId
-
java.lang.Exception
public java.lang.Object getHierarchyContextData(JSONObject json, java.lang.String[] datanames) throws java.lang.Exception
json
- datanames
-
java.lang.Exception
public java.lang.String getJSONP(java.lang.String callback, JSONArray json)
callback
- json
-
public JSONObject getOperationContext(javax.servlet.http.HttpServletRequest req, java.lang.String operationName) throws java.lang.Exception
req
- operationName
-
java.lang.Exception
public JSONObject getOperationContext(java.lang.String sid, java.lang.String operationName) throws java.lang.Exception
sid
- operationName
-
java.lang.Exception
public Context getSessionContext(javax.servlet.http.HttpServletRequest req) throws java.lang.Exception
req
-
java.lang.Exception
public Context getSessionContext(java.lang.String sid) throws java.lang.Exception
sid
-
java.lang.Exception
public JSONObject getSessionContextJSON(javax.servlet.http.HttpServletRequest req) throws java.lang.Exception
req
-
java.lang.Exception
public JSONObject getSessionContextJSON(java.lang.String sid) throws java.lang.Exception
sid
-
java.lang.Exception
public JSONObject paginateJSONArray(JSONArray input, int start, int end) throws JSONException
input
- start
- end
-
JSONException
public BTTServerOperation readOperation(java.lang.String operationName) throws DSEInvalidRequestException
operationName
-
DSEInvalidRequestException
public Processor readProcessor(java.lang.String processorName) throws DSEInvalidRequestException
processorName
-
DSEInvalidRequestException
public boolean removeFlowContext(javax.servlet.http.HttpServletRequest req, java.lang.String flowName, java.lang.String procId) throws java.lang.Exception
req
- the original HttpServletRequestflowName
- the name of the processor/flowprocId
- the id of the processor/flow instance
java.lang.Exception
public boolean removeHierarchyContextData(JSONObject json, java.lang.String[] datanames) throws java.lang.Exception
json
- datanames
-
java.lang.Exception
public boolean removeOperationContext(javax.servlet.http.HttpServletRequest req, java.lang.String operationName)
req
- operationName
-
public void setFlowContext(javax.servlet.http.HttpServletRequest req, java.lang.String flowName, java.lang.String procId, JSONObject json) throws java.lang.Exception
req
- flowName
- procId
- json
-
java.lang.Exception
public void setOperationContext(javax.servlet.http.HttpServletRequest req, java.lang.String operationName, JSONObject json) throws java.lang.Exception
req
- operationName
- json
-
java.lang.Exception
public void setSessionContext(javax.servlet.http.HttpServletRequest req, JSONObject json) throws java.lang.Exception
req
- json
-
java.lang.Exception
public JSONArray sortJSONArray(JSONArray arr, java.lang.String params) throws java.lang.Exception
arr
- params
-
java.lang.Exception
public boolean updateHierarchyContextData(JSONObject json, java.lang.String[] datanames, java.lang.Object value) throws java.lang.Exception
json
- datanames
- value
-
java.lang.Exception
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |