Class FileManager


  • public class FileManager
    extends Object
    Facade on LogicalDOC for file browsing from HTML editor.
    Since:
    6.8.1
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • FileManager

        public FileManager​(javax.servlet.ServletContext servletContext,
                           javax.servlet.http.HttpServletRequest request)
                    throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
    • Method Detail

      • error

        public org.json.JSONObject error​(String msg)
      • getError

        public org.json.JSONObject getError()
      • setGetVar

        public boolean setGetVar​(String var,
                                 String value)
      • getInfo

        public org.json.JSONObject getInfo()
      • getFolder

        public org.json.JSONObject getFolder()
                                      throws com.logicaldoc.core.PersistenceException
        Throws:
        com.logicaldoc.core.PersistenceException
      • getFolderTree

        public org.json.JSONObject getFolderTree()
                                          throws com.logicaldoc.core.PersistenceException
        Same as getFolder but this one only put children folders, not files
        Returns:
        the tree in JSON representation
        Throws:
        com.logicaldoc.core.PersistenceException - error at data layer
      • rename

        public org.json.JSONObject rename()
      • delete

        public org.json.JSONObject delete()
      • add

        public org.json.JSONObject add()
      • addFolder

        public org.json.JSONObject addFolder()
      • download

        public void download​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             String suffix)
      • preview

        public void preview​(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
      • getDocumentRoot

        public String getDocumentRoot()
      • contains

        public boolean contains​(String where,
                                String what)