|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectat.knowcenter.wag.egov.egiz.web.LocalRequestHelper
Contains commonly used helper functions for the local request procedure.
| Field Summary | |
static String |
LOCAL_CONNECTION_PAGE_JSP
The resource of the local connection page jsp. |
protected static org.apache.commons.logging.Log |
logger
The logger. |
static String |
NULL_REQUEST_PAGE_JSP
The resource of the null request page jsp. |
static String |
REDIRECT_REFRESH_PAGE_JSP
The resource of the redirect refresh page jsp. |
| Constructor Summary | |
LocalRequestHelper()
|
|
| Method Summary | |
protected static void |
formatBKUOkResponse(HttpServletResponse response)
Formats the OK response from the web application back to the local BKU. |
static String |
getConnectorValueFromProfile(SettingsReader settings,
String profile,
String key)
Reads the configuration entry given by the key, first from the given profile, if not found from the defaults. |
static String |
getLocalContextAddress(HttpServletRequest request,
HttpServletResponse response)
|
static String |
getLocalServerAddress(HttpServletRequest request,
HttpServletResponse response)
|
static String |
getLocalServiceAddress(String profile,
String device)
Returns the URL for accessing the local service. |
static String |
makeStringHTMLReady(String input)
|
static void |
prepareDispatchToLocalConnectionPage(LocalRequest local_request,
HttpServletRequest request,
HttpServletResponse response)
Prepares the dispatch to the local data connection page. |
static String |
processLocalSign(SignSessionInformation si,
HttpServletRequest request,
HttpServletResponse response)
Sets up the local sign procedure. |
static String |
processLocalVerify(VerifySessionInformation si,
List holders_to_verify,
HttpServletRequest request,
HttpServletResponse response)
Sets up the local verify procedure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.commons.logging.Log logger
public static final String NULL_REQUEST_PAGE_JSP
public static final String LOCAL_CONNECTION_PAGE_JSP
public static final String REDIRECT_REFRESH_PAGE_JSP
| Constructor Detail |
public LocalRequestHelper()
| Method Detail |
public static String processLocalSign(SignSessionInformation si,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
PresentableException
response - The HttpServletResponse the local request page is written to.
IOException - Forwarded exception.
PresentableException - Forwarded exception.
public static String processLocalVerify(VerifySessionInformation si,
List holders_to_verify,
HttpServletRequest request,
HttpServletResponse response)
throws SignatureException,
NormalizeException,
IOException,
ConnectorFactoryException,
SettingsException,
ConnectorException
response - The HttpServletResponse the local request page is written to.
SignatureException - Forwarded exception.
NormalizeException - Forwarded exception.
IOException - Forwarded exception.
ConnectorFactoryException - Forwarded exception.
SettingsException
ConnectorException
protected static void formatBKUOkResponse(HttpServletResponse response)
throws IOException
As stated in the BKU tutorial, this response must be plain text "
response - The HttpServletResponse to answer to.
IOException - Forwarded exception.
public static void prepareDispatchToLocalConnectionPage(LocalRequest local_request,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
SignatureException,
NormalizeException
The calling servlet just has to dispatch to the jsp after calling this method.
local_request - The local request. Basically this contains the local service's
target URL and the XML request string.response - The HttpServletResponse to write this page to.
IOException - Forwarded exception.
SignatureException - Forwarded exception.
NormalizeException - Forwarded exception.public static String makeStringHTMLReady(String input)
public static String getLocalServerAddress(HttpServletRequest request,
HttpServletResponse response)
public static String getLocalContextAddress(HttpServletRequest request,
HttpServletResponse response)
public static String getLocalServiceAddress(String profile,
String device)
throws SettingsException
This information is taken from the profile and if not defined from the defaults.
E.g. http://127.0.0.1:3495/http-security-layer-request
profile - The profile to take the data from.device - The service device to be accessed. E.g. bku.
SettingsException - F.e.
public static String getConnectorValueFromProfile(SettingsReader settings,
String profile,
String key)
settings - The settings.profile - The profile.key - The configuration key.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||