Package org.bgerp.model.file.tmp

# 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 Summary

  Constructors
  Constructor
  Description
  `SessionTemporaryFiles()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `deleteFiles(javax.servlet.http.HttpSession session)`
  Delete tmp files on session close
  `static void`
  `deleteFiles(DynActionForm form, Set<Integer> ids)`
  Delete tmp files after persisting those
  `static Map<Integer,FileInfo>`
  `getFiles(DynActionForm form, String paramName)`
  Uploaded tmp files for persisting
  `static int`
  `upload(DynActionForm form)`
  Upload tmp file

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SessionTemporaryFiles

    public SessionTemporaryFiles()

- ## Method Details

  - ### upload

    public static int upload(DynActionForm form) throws FileNotFoundException, IOException
    Upload tmp file
    Parameters:
      `form` -
    Returns:
    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:
    Throws:
      `BGMessageException` - duplicated tmp files were found

  - ### deleteFiles

    public static void deleteFiles(DynActionForm form, Set<Integer> ids)
    Delete 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)
    Delete tmp files on session close
    Parameters:
      `session` - the session