Class UploadServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.logicaldoc.web.UploadServlet
All Implemented Interfaces:
SessionListener, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class UploadServlet extends javax.servlet.http.HttpServlet implements SessionListener
This servlet is responsible for document resource upload. It receives the document resource and uploads it in LogicalDOC, inside the document's folder.
Since:
4.5
Author:
Matteo Caruso - LogicalDOC
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor of the object.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Removes all the uploaded files from session and file system.
    static void
    cleanUploads(javax.servlet.http.HttpSession httpSession)
    Removes all the uploaded files from session and file system.
    static Map<String,File>
    Retrieves the map containing the files uploaded in the current session
    static Map<String,File>
    getUploads(javax.servlet.http.HttpServletRequest request)
    Retrieves the map containing the files uploaded in the current reqeust
    void
     
    void
     

    Methods inherited from class javax.servlet.http.HttpServlet

    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

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • UploadServlet

      public UploadServlet()
      Constructor of the object.
  • Method Details

    • getUploads

      public static Map<String,File> getUploads(String sid)
      Retrieves the map containing the files uploaded in the current session
      Parameters:
      sid - The current session ID
      Returns:
      the files map where the key is the original file name and the value is the real file
    • getUploads

      public static Map<String,File> getUploads(javax.servlet.http.HttpServletRequest request)
      Retrieves the map containing the files uploaded in the current reqeust
      Parameters:
      request - The current request
      Returns:
      the files map where the key is the original file name and the value is the real file
    • cleanUploads

      public static void cleanUploads(String sid)
      Removes all the uploaded files from session and file system.
      Parameters:
      sid - The current session ID
    • cleanUploads

      public static void cleanUploads(javax.servlet.http.HttpSession httpSession)
      Removes all the uploaded files from session and file system.
      Parameters:
      httpSession - The current session
    • onSessionCreated

      public void onSessionCreated(Session session)
      Specified by:
      onSessionCreated in interface SessionListener
    • onSessionClosed

      public void onSessionClosed(Object sid)
      Specified by:
      onSessionClosed in interface SessionListener