at.gv.egiz.pdfas.web.helper
Class SignServletHelper

java.lang.Object
  extended byat.gv.egiz.pdfas.web.helper.SignServletHelper

public class SignServletHelper
extends Object

Author:
wprinz

Constructor Summary
SignServletHelper()
           
 
Method Summary
static void disableBrowserCacheForResponse(HttpServletResponse response)
           
static void dispatch(HttpServletRequest request, HttpServletResponse response, String resource, ServletContext context)
           
static void finishSign(SignSessionInformation si, HttpServletRequest request, HttpServletResponse response, ServletContext context)
          Finishes the sign.
static String formatFileNameForSignResult(String file_name, String mimeType)
          Formats the file name according to the SignResult.
static void prepareSign(SignSessionInformation si)
          Prepares the sign.
static void returnSignResponse(SignSessionInformation si, HttpServletRequest request, HttpServletResponse response)
          Returns the data in the SignResult with proper content disposition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignServletHelper

public SignServletHelper()
Method Detail

dispatch

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

prepareSign

public static void prepareSign(SignSessionInformation si)
                        throws PresentableException
Prepares the sign.

This prepares the data for both being signed or being previewed.

Parameters:
si - The SessionInformation to be prepared.
Throws:
PresentableException - f.e.

finishSign

public static void finishSign(SignSessionInformation si,
                              HttpServletRequest request,
                              HttpServletResponse response,
                              ServletContext context)
                       throws PresentableException,
                              IOException,
                              ServletException
Finishes the sign.

For non local connectors this concludes the sign process, signs the document and returns the result. For local connectors this initializes the local sign process and redirects to following servlets.

Parameters:
si - The SessionInformation.
request - The servlet request for dispatching.
response - The servlet response for dispatching.
context - The servlet context for dispatching.
Throws:
PresentableException - f.e.
IOException - f. e.
ServletException - f. e.

returnSignResponse

public static void returnSignResponse(SignSessionInformation si,
                                      HttpServletRequest request,
                                      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.

disableBrowserCacheForResponse

public static void disableBrowserCacheForResponse(HttpServletResponse response)

formatFileNameForSignResult

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

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


Copyright © 2006-2010. All Rights Reserved.