Class SessionTemporaryFiles

java.lang.Object
org.bgerp.model.file.tmp.SessionTemporaryFiles

public class SessionTemporaryFiles extends Object
Temporary files not persisted in the regular file storage
  • Constructor Details

    • SessionTemporaryFiles

      public SessionTemporaryFiles()
  • Method Details

    • upload

      public static int upload(DynActionForm form) throws FileNotFoundException, IOException
      Uploads tmp file
      Parameters:
      form -
      Returns:
      ID of the uploaded tmp file
      Throws:
      FileNotFoundException
      IOException
    • getFiles

      public static Map<Integer,FileInfo> getFiles(DynActionForm form, String paramName) throws BGMessageException
      Uploaded tmp files for persisting
      Parameters:
      form - the form
      paramName - the http request param name
      Returns:
      found tmp files, key - ID
      Throws:
      BGMessageException - duplicated tmp files were found
    • deleteFiles

      public static void deleteFiles(DynActionForm form, Set<Integer> ids)
      Deletes tmp files after persisting those
      Parameters:
      form - the request form, with the session
      ids - the tmp file IDs
    • deleteFiles

      public static void deleteFiles(javax.servlet.http.HttpSession session)
      Deletes tmp files on session close
      Parameters:
      session - the session