|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.cs.rest.resource.BaseResource
public class BaseResource
The base resource class with some common methods
Constructor Summary | |
---|---|
BaseResource()
|
Method Summary | |
---|---|
void |
checkNavigationAuthorization(javax.servlet.http.HttpServletRequest req,
java.lang.String processorName,
java.lang.String procId,
java.lang.String nextEvent)
|
void |
checkOperationAuthorization(javax.servlet.http.HttpServletRequest req,
java.lang.String operationName)
|
void |
checkProcessorAuthorization(javax.servlet.http.HttpServletRequest req,
java.lang.String processorName,
java.lang.String procId)
|
void |
checkRequestAuthorization(javax.servlet.http.HttpServletRequest req)
|
void |
filterRequest(javax.servlet.http.HttpServletRequest req,
ChannelContext cc,
Context ctx,
java.lang.Object requestData)
Filter the request input data using specified SecurityAdvice. |
void |
filterResponse(javax.servlet.http.HttpServletRequest req,
ChannelContext cc,
Context ctx,
java.lang.Object responseData)
Filter the response data using specified SecurityAdvice. |
JSONArray |
getCrossFieldErrorMessages(Context ctx)
Retrieve the cross fields validation error messages from specified Context |
SecurityAdvice |
getSecurityAdvice()
Initialize SecurityDelegate from btt.xml configuration for REST channel |
JSONArray |
getSingleFieldErrorMessages(Context ctx)
Retrieve the validation error message of all single field from specified Context |
boolean |
validateContext(Context ctx,
KeyedCollection kc,
java.lang.String convType,
boolean ignoreContextTable)
Validate new context data against the context, return true for valid, return false for any mismatch, error or exceptions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseResource()
Method Detail |
---|
public boolean validateContext(Context ctx, KeyedCollection kc, java.lang.String convType, boolean ignoreContextTable) throws DSEObjectNotFoundException, DSEInvalidArgumentException, DSEInvalidRequestException, java.lang.CloneNotSupportedException
ctx
- the contextkc
- the data to be validatedconvType
- the conversion type
DSEObjectNotFoundException
DSEInvalidArgumentException
java.lang.CloneNotSupportedException
DSEInvalidRequestException
public JSONArray getCrossFieldErrorMessages(Context ctx) throws DSEObjectNotFoundException
ctx
- the context containing any validation errors messages
DSEObjectNotFoundException
public JSONArray getSingleFieldErrorMessages(Context ctx) throws DSEInvalidRequestException, DSEObjectNotFoundException, JSONException
ctx
- the context containing validation messages
DSEInvalidRequestException
DSEObjectNotFoundException
JSONException
public SecurityAdvice getSecurityAdvice()
public void checkRequestAuthorization(javax.servlet.http.HttpServletRequest req) throws ForbiddenException, UnauthorizedException
req
-
ForbiddenException
UnauthorizedException
public void checkOperationAuthorization(javax.servlet.http.HttpServletRequest req, java.lang.String operationName) throws ForbiddenException, UnauthorizedException
req
- operationName
-
ForbiddenException
UnauthorizedException
public void checkProcessorAuthorization(javax.servlet.http.HttpServletRequest req, java.lang.String processorName, java.lang.String procId) throws ForbiddenException, UnauthorizedException
req
- processorName
- procId
-
ForbiddenException
UnauthorizedException
public void checkNavigationAuthorization(javax.servlet.http.HttpServletRequest req, java.lang.String processorName, java.lang.String procId, java.lang.String nextEvent) throws ForbiddenException, UnauthorizedException
req
- processorName
- procId
- nextEvent
-
ForbiddenException
UnauthorizedException
public void filterRequest(javax.servlet.http.HttpServletRequest req, ChannelContext cc, Context ctx, java.lang.Object requestData)
req
- the original HttpServletRequestcc
- the BTT ChannelContext dealing with this requestctx
- the Context of the session, operation or processorrequestData
- the payload of the request, it would be a JSON object of POST
requestpublic void filterResponse(javax.servlet.http.HttpServletRequest req, ChannelContext cc, Context ctx, java.lang.Object responseData)
req
- the original HttpServletRequest producing the responsecc
- the ChannelContext dealing with the request and responsectx
- the Context of session, operation or processorresponseData
- the JSON data to be returned to client
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |