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

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by at.knowcenter.wag.egov.egiz.web.Sign
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class Sign
extends HttpServlet

This method is the sign servlet for the pdf-as web application. It takes get and post requests fill out jsp templates and give the user feedback about the results of the sign process

Author:
wlackner, wprinz
See Also:
Serialized Form

Nested Class Summary
protected  class Sign.SignPreviewInfo
          This class is just used to put the pdf byte array into the session.
 
Field Summary
protected static String AUTH
          Authorisation marker for the http header string.
protected static String AUTH_BASIC
          Authorisation marker for the http header string.
 
Constructor Summary
Sign()
           
 
Method Summary
protected  void dispatch(HttpServletRequest request, HttpServletResponse response, String resource)
           
protected static void dispatch(HttpServletRequest request, HttpServletResponse response, String resource, ServletContext context)
           
 void dispatchToPreview(String document_text, String connector, String mode, String signature_type, String submit_url, HttpServletRequest request, HttpServletResponse response)
           
 void doGet(HttpServletRequest request, HttpServletResponse response)
           
 void doPost(HttpServletRequest request, HttpServletResponse response)
           
static void finishSign(SessionInformation si, HttpServletRequest request, HttpServletResponse response, ServletContext context)
           
static String formatFileName(String file_name)
          Formats the file name so that it is suitable for content disposition.
static String formatFileNameForSignResult(String file_name, SignResult sign_result)
          Formats the file name according to the SignResult.
static void prepareDispatchToErrorPage(PresentableException pe, HttpServletRequest request)
           
static void prepareSign(SessionInformation si)
           
static void returnSignResponse(SessionInformation si, HttpServletResponse response)
          Returns the data in the SignResult with proper content disposition.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTH

protected static final String AUTH
Authorisation marker for the http header string.

See Also:
Constant Field Values

AUTH_BASIC

protected static final String AUTH_BASIC
Authorisation marker for the http header string.

See Also:
Constant Field Values
Constructor Detail

Sign

public Sign()
Method Detail

dispatch

protected void dispatch(HttpServletRequest request,
                        HttpServletResponse response,
                        String resource)
                 throws ServletException,
                        IOException
Throws:
ServletException
IOException

dispatch

protected static void dispatch(HttpServletRequest request,
                               HttpServletResponse response,
                               String resource,
                               ServletContext context)
                        throws ServletException,
                               IOException
Throws:
ServletException
IOException

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

prepareSign

public static void prepareSign(SessionInformation si)
                        throws PresentableException
Throws:
PresentableException

finishSign

public static void finishSign(SessionInformation si,
                              HttpServletRequest request,
                              HttpServletResponse response,
                              ServletContext context)
                       throws PresentableException,
                              IOException,
                              ServletException
Throws:
PresentableException
IOException
ServletException

prepareDispatchToErrorPage

public static void prepareDispatchToErrorPage(PresentableException pe,
                                              HttpServletRequest request)

dispatchToPreview

public void dispatchToPreview(String document_text,
                              String connector,
                              String mode,
                              String signature_type,
                              String submit_url,
                              HttpServletRequest request,
                              HttpServletResponse response)
                       throws ServletException,
                              IOException
Throws:
ServletException
IOException

formatFileName

public static String formatFileName(String file_name)
Formats the file name so that it is suitable for content disposition.

Parameters:
file_name - The file name.
Returns:
Returns the formatted file name.

formatFileNameForSignResult

public static String formatFileNameForSignResult(String file_name,
                                                 SignResult sign_result)
Formats the file name according to the SignResult.

Parameters:
file_name - The file name.
sign_result - The sign result.
Returns:
Returns the formatted file name.

returnSignResponse

public static void returnSignResponse(SessionInformation si,
                                      HttpServletResponse response)
                               throws IOException
Returns the data in the SignResult with proper content disposition.

Parameters:
si - SessionInformation.
response - The servlet response.
Throws:
IOException - The IO Exception.


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