Class WSFileDownload


  • public class WSFileDownload
    extends java.lang.Object
    Class used to hold information for file download into a file provider.
    Author:
    Christopher Mindus
    • Constructor Summary

      Constructors 
      Constructor Description
      WSFileDownload​(java.net.URL url, java.lang.Object id, java.lang.String description)
      Constructs an instance of a file to download.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable getException()
      Gets the exception from the download process or when writing the file.
      java.io.File getFile()
      Gets the download file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WSFileDownload

        public WSFileDownload​(java.net.URL url,
                              java.lang.Object id,
                              java.lang.String description)
        Constructs an instance of a file to download.
        Parameters:
        url - The URL of the file to download.
        id - The ID used for database identification, Long or String, null when database is not used.

        This value depends on the URNResourceType. The types are:

        • Long: COMMON_DATABASE_PERSISTENT: Common database persistent files.
        • String: APPLICATION_DATABASE_PERSISTENT: Application ID database persistent files.
        • Long: GROUP_DATABASE_FILES: Group ID database persistent files.
        • Long: USER_DATABASE_FILES: User ID database persistent files.
        description - Description of file, used to store in e.g. database, max 128 characters long.
    • Method Detail

      • getFile

        public java.io.File getFile()
        Gets the download file.
        Returns:
        The file, or null if an exception occurred.
      • getException

        public java.lang.Throwable getException()
        Gets the exception from the download process or when writing the file.
        Returns:
        The exception, or null if no error occurred.