org.opencrx.application.document
Class DocumentScannerServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opencrx.application.document.DocumentScannerServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class DocumentScannerServlet
extends HttpServlet

The DocumentScannerServlet scans a directory and its sub-directories. File names are of the form name { "#" folder name } "." extension. Files with the same name are mapped to the same Document. Documents are assigned to the document folders specified by the # separated folder list. Successfully imported files are removed so the import directory should not be as import directory only and not as document archive.

See Also:
Serialized Form

Constructor Summary
DocumentScannerServlet()
           
 
Method Summary
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
           
protected  void handleRequest(HttpServletRequest req, HttpServletResponse res)
           
 void init(ServletConfig config)
           
 void scanDocuments(String id, String providerName, String segmentName, HttpServletRequest req, HttpServletResponse res)
           
 
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, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentScannerServlet

public DocumentScannerServlet()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

scanDocuments

public void scanDocuments(String id,
                          String providerName,
                          String segmentName,
                          HttpServletRequest req,
                          HttpServletResponse res)
                   throws IOException
Throws:
IOException

handleRequest

protected void handleRequest(HttpServletRequest req,
                             HttpServletResponse res)
                      throws ServletException,
                             IOException
Throws:
ServletException
IOException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException


This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.