at.knowcenter.wag.egov.egiz.web.servlets
Class VerifyServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
at.knowcenter.wag.egov.egiz.web.servlets.VerifyServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- public class VerifyServlet
- extends HttpServlet
This method is the verify 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 verify process.
- Author:
- wlackner, wprinz
- See Also:
- Serialized Form
| 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 |
VerifyServlet
public VerifyServlet()
dispatch
protected void dispatch(HttpServletRequest request,
HttpServletResponse response,
String resource)
throws ServletException,
IOException
- Throws:
ServletException
IOException
dispatchToResults
protected void dispatchToResults(List results,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Throws:
ServletException
IOException
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Processes the verify upload.
- Throws:
ServletException
IOException- See Also:
HttpServlet.doPost(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
retrieveUploadedDataFromRequest
protected VerifyServlet.UploadedData retrieveUploadedDataFromRequest(HttpServletRequest request)
throws ServletException,
UnsupportedEncodingException,
org.apache.commons.fileupload.FileUploadException,
PDFDocumentException
- Throws:
ServletException
UnsupportedEncodingException
org.apache.commons.fileupload.FileUploadException
PDFDocumentException
convertUploadToDataSource
protected DataSource convertUploadToDataSource(org.apache.commons.fileupload.FileItem upload_fi)
throws PDFDocumentException
- Throws:
PDFDocumentException
extractSignatureHolders
protected List extractSignatureHolders(DataSource dataSource)
throws PresentableException
- Throws:
PresentableException
extractExtension
public static String extractExtension(String file_name)
- Extracts the extension from a file name string.
The extension of a file name is whatever text follows the last '.'.
- Parameters:
file_name - The file name.
- Returns:
- Returns the extension. If the file name ends with the '.', then an
empty string is returned. If the file name doesn't contain any '.'
or file_name is null, null is returned.
debugVerifyResults
protected static int debugVerifyResults(List results)
throws SettingNotFoundException
- Formats the verification results for debugging. Returns 0 if no error occurs or the sum of all error-codes.
- Parameters:
results -
- Throws:
SettingNotFoundException - Forwarded exception.
isPDF
public boolean isPDF(byte[] data)
Copyright © 2006-2010. All Rights Reserved.