Class TabAttachments

    • Constructor Detail

      • TabAttachments

        public TabAttachments()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig config)
        Description copied from class: HttpBaseServlet
        Loads basic configuration settings that this class and all that extend it require to function properly. Also instantiates XmlEngine object. This method is called upon load of the class, which is configured to be loaded upon start of the application server. See also web.xml (load-on-startup).
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class HttpSecureAppServlet
      • doPost

        public void doPost​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws IOException,
                           javax.servlet.ServletException
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        IOException
        javax.servlet.ServletException
      • post

        public void post​(VariablesSecureApp vars,
                         javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws IOException,
                         javax.servlet.ServletException
        Throws:
        IOException
        javax.servlet.ServletException
      • getAttachmentDirectoryForNewAttachments

        @Deprecated
        public static String getAttachmentDirectoryForNewAttachments​(String tableID,
                                                                     String recordID)
        Provides the directory in which the attachment has to be stored. For example for tableId "259", recordId "0F3A10E019754BACA5844387FB37B0D5", the file directory returned is "259/0F3/A10/E01/975/4BA/CA5/844/387/FB3/7B0/D5". In case 'SaveAttachmentsOldWay' preference is enabled then the file directory returned is "259-0F3A10E019754BACA5844387FB37B0D5"
        Parameters:
        tableID - UUID of the table
        recordID - UUID of the record
        Returns:
        file directory to save the attachment
      • getAttachmentDirectory

        @Deprecated
        public static String getAttachmentDirectory​(String tableID,
                                                    String recordID,
                                                    String fileName)
        Provides the directory in which the attachment is stored. For example for tableId "259", recordId "0F3A10E019754BACA5844387FB37B0D5", and fileName "test.txt" the file directory returned is "259/0F3/A10/E01/975/4BA/CA5/844/387/FB3/7B0/D5". In case 'SaveAttachmentsOldWay' preference is enabled then the file directory returned is "259-0F3A10E019754BACA5844387FB37B0D5"
        Parameters:
        tableID - UUID of the table
        recordID - UUID of the record
        fileName - Name of the file
        Returns:
        file directory in which the attachment is stored
      • getPath

        @Deprecated
        public static String getPath​(String fileDirectory)
        Provides the value to be saved in path field in c_file. The path field is used to get the location of the attachment. For example 259/0F3/A10/E01/975/4BA/CA5/844/387/FB3/7B0/D5. This path is relative to the attachments folder
        Parameters:
        fileDirectory - the directory that is retrieved from getFileDirectory()
        Returns:
        value to be saved in path in c_file