Interface SWTBrowserContext

  • All Superinterfaces:
    GUIContext, SWTContext

    public interface SWTBrowserContext
    extends SWTContext
    The SWTBrowserContext provides a SWTContext and allows to deploy content for downloading either as local file or as download from a webservice. This allows for instance to display a PDF-file directly in a Browser widget that may be embedded in a normal SWT-context. The advantage of this is the support from a rich client environment as well as a web client environment: The rich client provides a local file URL, in case of a web client, the corresponding web server deploys the designated content internally and provides a publicly available URL for download.
    Author:
    Ulrich Kreher
    • Method Detail

      • deployForDownload

        URL deployForDownload​(UDTValue content,
                              String filePrefix,
                              String fileSuffix)
        Provides the contents of the designated UDT-value as a file for download and returns the URL (including the filename) which allows to download the file.
        Parameters:
        content - The content for the file to be provided as download.
        filePrefix - The simple file prefix of the file. If it is null, a random UUID is created.
        fileSuffix - the file extension to provide the designated content.
        Returns:
        The URI that allows to download the designated content with the designated file name.