Class ProcessUploadedFile

    • Constructor Detail

      • ProcessUploadedFile

        public ProcessUploadedFile()
    • Method Detail

      • 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)
      • uploadFile

        protected void uploadFile​(VariablesSecureApp vars,
                                  javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response,
                                  org.codehaus.jettison.json.JSONObject paramValues)
                           throws Exception
        Throws:
        Exception
      • readAndReturnResult

        protected void readAndReturnResult​(javax.servlet.http.HttpServletResponse response,
                                           org.codehaus.jettison.json.JSONObject paramValues)
                                    throws Exception
        Throws:
        Exception
      • clearBeforeImport

        protected abstract void clearBeforeImport​(String ownerId,
                                                  org.codehaus.jettison.json.JSONObject paramValues)
        This method is called when the parameter import mode is set to import and replace. In that case the current content should be removed. The ownerId is the id of the parent record.
      • doProcessFile

        protected abstract ProcessUploadedFile.UploadResult doProcessFile​(org.codehaus.jettison.json.JSONObject paramValues,
                                                                          File file)
                                                                   throws Exception
        Is called to process the content of the uploaded file. The results should be returned in the uploadResult object.
        Throws:
        Exception