|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.caplin.keymaster.servlet.JavaScriptFormatter com.caplin.keymaster.servlet.HTMLFormatter
public class HTMLFormatter
This ResponseFormatter is specially designed to link in with SL4B. It wraps JavaScriptFormatter responses in HTML so it can be loaded in an embedded IFRAME.
Constructor Summary | |
---|---|
HTMLFormatter()
|
Method Summary | |
---|---|
String |
formatErrorResponse(javax.servlet.http.HttpServletRequest request,
String errorMessage)
This method formats an error response into a proper format for JavaScript applications that use an HTML response. |
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 HTMLFormatter()
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. SL4B) expecting an HTML type response. 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
formatResponse
in class JavaScriptFormatter
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. SL4B) expecting an HTML type response. 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
formatResponse
in class JavaScriptFormatter
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 applications that use an HTML response.
formatErrorResponse
in interface ResponseFormatter
formatErrorResponse
in class JavaScriptFormatter
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 |