Class WmDownloadModel


  • public class WmDownloadModel
    extends Object
    Author:
    johntd
    • Field Detail

      • DOWNLOAD_MODEL_KEY

        public static final String DOWNLOAD_MODEL_KEY
        KEY for setting this onject on the model
        See Also:
        Constant Field Values
      • WM_DOWNLOAD_VIEWNAME

        public static final String WM_DOWNLOAD_VIEWNAME
        viewname to indicate a download the download viewresolver will check this exact name before resolving the downloadview
        See Also:
        Constant Field Values
    • Constructor Detail

      • WmDownloadModel

        public WmDownloadModel()
    • Method Detail

      • setDownloadInputStream

        public void setDownloadInputStream​(InputStream inputStream)
        set the inputstream to be downloaded. this stream is the input source for he viewresolver to send to the client
        Parameters:
        inputStream - open inputsteam to send to the client
      • getDownloadInputStream

        public InputStream getDownloadInputStream()
        get the input source for the download view resolver
        Returns:
        open inputstream
      • setContentType

        public void setContentType​(String contentType)
        Sets the content type for this download.
        Parameters:
        contentType - contenttype
      • getContentType

        public String getContentType()
        get the content type form this download.
        Returns:
        contenttype as String
      • setHeaders

        public void setHeaders​(HashMap<String,​String> headers)
        set http headers for this download
        Parameters:
        headers -
      • getHeaders

        public HashMap<String,​String> getHeaders()
        get the http header to be set for this download
        Returns:
        hashmap holding the optional header, never null