|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.caplin.keymaster.servlet.JavaScriptFormatter
public class JavaScriptFormatter
This ResponseFormatter is specially designed to link in with RTSL, RTML and WebSheet. It will produce one of two messages if no major errors occur. The two messages are:
Constructor Summary | |
---|---|
JavaScriptFormatter()
|
Method Summary | |
---|---|
String |
formatErrorResponse(javax.servlet.http.HttpServletRequest request,
String errorMessage)
This method formats an error response into a proper format for JavaScript. |
String |
formatResponse(javax.servlet.http.HttpServletRequest request,
String token)
This method will encode a response suitable for JavaScript type applications (e.g. |
String |
formatResponse(javax.servlet.http.HttpServletRequest request,
String token,
UserCredentialsProvider provider)
This method will encode a response suitable for JavaScript type applications (e.g. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaScriptFormatter()
Method Detail |
---|
public String formatResponse(javax.servlet.http.HttpServletRequest request, String token)
This method will encode a response suitable for JavaScript type applications (e.g. RTSL). Token will have a password that the calling application can use to access a Caplin Liberator source. The HttpServletRequest object must contain both a username and a sourceid parameter.
formatResponse
in interface ResponseFormatter
request
- the request object that has been sent to the servlet calling class. This should contain all
the required parameterstoken
- the token used to access a Liberator source.
public String formatResponse(javax.servlet.http.HttpServletRequest request, String token, UserCredentialsProvider provider)
This method will encode a response suitable for JavaScript type applications (e.g. RTSL). Token will have a password that the calling application can use to access a Caplin Liberator source. The HttpServletRequest object must contain both a username and a sourceid parameter, unless httpUserOverride is set to true, in which case the username parameter will be ignored.
formatResponse
in interface AdvancedResponseFormatter
request
- the request object that has been sent to the servlet calling class. This should contain all
the required parameterstoken
- the token used to access a Liberator source.httpUserOverride
- allow the standard HTTP remote user to override any parameter username value.
Should the call to HttpServletRequest.getRemoteUser()
return null, then an error
response will be sent regardless of whether username has been specified as part of the URL
request parameters.
public String formatErrorResponse(javax.servlet.http.HttpServletRequest request, String errorMessage)
This method formats an error response into a proper format for JavaScript.
formatErrorResponse
in interface ResponseFormatter
request
- needs to contain the source id or else a source id of 0000 will be returned in the formatted response.errorMessage
- contains the cause of the error.
ResponseFormatter.formatErrorResponse(javax.servlet.http.HttpServletRequest, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |