at.knowcenter.wag.egov.egiz.web
Class LocalRequestHelper

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.web.LocalRequestHelper

public abstract class LocalRequestHelper
extends Object

Contains commonly used helper functions for the local request procedure.

Author:
wprinz

Field Summary
static String LOCAL_CONNECTION_PAGE_JSP
          The resource of the local connection 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 makeStringHTMLReady(String input)
           
static void prepareDispatchToLocalConnectionPage(LocalRequest local_request, HttpServletRequest request, HttpServletResponse response)
          Prepares the dispatch to the local data connection page.
static void processLocalSign(SessionInformation si, HttpServletRequest request, HttpServletResponse response)
          Sets up the local sign procedure.
static void processLocalVerify(SessionInformation 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

LOCAL_CONNECTION_PAGE_JSP

public static final String LOCAL_CONNECTION_PAGE_JSP
The resource of the local connection page jsp.

See Also:
Constant Field Values

REDIRECT_REFRESH_PAGE_JSP

public static final String REDIRECT_REFRESH_PAGE_JSP
The resource of the redirect refresh page jsp.

See Also:
Constant Field Values
Constructor Detail

LocalRequestHelper

public LocalRequestHelper()
Method Detail

processLocalSign

public static void processLocalSign(SessionInformation si,
                                    HttpServletRequest request,
                                    HttpServletResponse response)
                             throws IOException,
                                    PresentableException
Sets up the local sign procedure.

Parameters:
response - The HttpServletResponse the local request page is written to.
Throws:
IOException - Forwarded exception.
PresentableException - Forwarded exception.

processLocalVerify

public static void processLocalVerify(SessionInformation si,
                                      List holders_to_verify,
                                      HttpServletRequest request,
                                      HttpServletResponse response)
                               throws SignatureException,
                                      NormalizeException,
                                      IOException,
                                      ConnectorFactoryException
Sets up the local verify procedure.

Parameters:
response - The HttpServletResponse the local request page is written to.
Throws:
SignatureException - Forwarded exception.
NormalizeException - Forwarded exception.
IOException - Forwarded exception.
ConnectorFactoryException - Forwarded exception.

formatBKUOkResponse

protected static void formatBKUOkResponse(HttpServletResponse response)
                                   throws IOException
Formats the OK response from the web application back to the local BKU.

As stated in the BKU tutorial, this response must be plain text "". Otherwise BKU will assume a failure.

Parameters:
response - The HttpServletResponse to answer to.
Throws:
IOException - Forwarded exception.

prepareDispatchToLocalConnectionPage

public static void prepareDispatchToLocalConnectionPage(LocalRequest local_request,
                                                        HttpServletRequest request,
                                                        HttpServletResponse response)
                                                 throws IOException,
                                                        SignatureException,
                                                        NormalizeException
Prepares the dispatch to the local data connection page.

The calling servlet just has to dispatch to the jsp after calling this method.

Parameters:
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.
Throws:
IOException - Forwarded exception.
SignatureException - Forwarded exception.
NormalizeException - Forwarded exception.

makeStringHTMLReady

public static String makeStringHTMLReady(String input)


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.