Class ExportBeanHelper


  • public class ExportBeanHelper
    extends java.lang.Object
    The ExportBeanHelper is a helper for exporting
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • EXPORT_BASE_RESULT_FLAGS

        public static final int EXPORT_BASE_RESULT_FLAGS
        Since:
        MicroStrategy Web 9.0.1
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExportBeanHelper

        public ExportBeanHelper()
        Constructor to create an instance of the helper.
        Initializes all internal properties with default values.
        Since:
        MicroStrategy Web 8.0.0
    • Method Detail

      • reset

        public void reset()
        Resets the values set by the setters on the helper.
        Since:
        MicroStrategy Web 8.0.0
      • isPlaintextFormat

        public static boolean isPlaintextFormat​(java.lang.String exportFormatName)
        Deprecated.
        this can be determined from ExportFormat object of the ExportBean
        Parameters:
        exportFormatName - the export format name
        Returns:
        true if the exporting style is plaintext.
      • setFileName

        public void setFileName​(java.lang.String fileName)
        Overrides the filename used in the setupExportHeaders method.
        Parameters:
        fileName - The new filename to use for the export.
        Since:
        MicroStrategy Web 8.0.0
      • setContentType

        public void setContentType​(java.lang.String contentType)
        Overrides the content type used in the setupExportHeaders method.
        Parameters:
        contentType - The new content type to use for the export.
        Since:
        MicroStrategy Web 8.0.0
      • setFileExtension

        public void setFileExtension​(java.lang.String fileExtension)
        Overrides the file extension to use for the setupExportHeaders method.
        Parameters:
        fileExtension - The file extension to use for the export.
        Since:
        MicroStrategy Web 8.0.0
      • setForceDownload

        public void setForceDownload​(java.lang.Boolean forceDownload)
      • setCharSet

        public void setCharSet​(java.lang.String charSet)
        Overrides the charset to use for the setupExportHeaders method.
        Parameters:
        charSet - The charset to use for the export.
        Since:
        MicroStrategy Web 8.0.0
      • setMaxFileSize

        public void setMaxFileSize​(int maxFileSize)
        Sets the max filename size for the setupExportHeaders method.
        Parameters:
        maxFileSize - The maximum file size for the setupExportHeaders method.
        Since:
        MicroStrategy Web 8.0.0
      • setCodePage

        public void setCodePage​(int codePage)
        Sets the code page to use when generating export headers. If this is not sent, then the code page will be based on the export type and locale.
        Parameters:
        codePage - The code page to use when generating export headers.
        Since:
        MicroStrategy Web 8.0.0
      • setExportFormat

        public void setExportFormat​(ExportFormat exportFormat)
        Sets the export format to be used when the Export operation gets called.
        Parameters:
        exportFormat - The ExportFormat being used in the export.
        Since:
        MicroStrategy Web 8.0.0
      • setupExportHeaders

        public java.lang.String setupExportHeaders​(AppContext appContext)
        This method will setup the headers for the export operation. These headers include the content type, character set, code page, and similar attributes in the header of the export operation.
        Parameters:
        appContext - The AppContext object.
        Returns:
        The charSet being used in the export.
        Since:
        MicroStrategy Web 8.0.0
      • setupExportHeaders

        public java.lang.String setupExportHeaders​(AppContext appContext,
                                                   MarkupOutput mo)
        This method will setup the headers for the export operation. These headers include the content type, character set, code page, and similar attributes in the header of the export operation.
        Parameters:
        appContext - The AppContext object.
        mo - The MarkupOutput object. If this is provided, then the content type will be set on it.
        Returns:
        The charSet being used in the export.
        Since:
        MicroStrategy Web 8.0.0
      • setContentDispositionHTTPHeaderForExporting

        public static void setContentDispositionHTTPHeaderForExporting​(java.lang.String fileName,
                                                                       java.lang.String fileExtension,
                                                                       boolean forceDownload,
                                                                       ContainerServices cServ,
                                                                       BrowserSettings browserSettings,
                                                                       int maxFileSize)
      • isFlashOnPdfFormat

        public static boolean isFlashOnPdfFormat​(AppContext appContext)
        Whether the flash exported report would be using PDF format (false if MHT)
        This is based on a Project Configuration setting.
        Parameters:
        appContext - The Application context
        Returns:
        Whether the flash exported report would be using PDF format (false if MHT)
      • getDisplayableReportName

        public static java.lang.String getDisplayableReportName​(java.lang.String fileName,
                                                                boolean encodeSpace)
        Cleans the file name. Replaces parameters that can cause problems on the file system.
        Parameters:
        fileName - String to clean
        Returns:
        file name
        Since:
        MicroStrategy Web 8.0.1
      • getDisplayableReportName

        public static java.lang.String getDisplayableReportName​(java.lang.String fileName,
                                                                java.util.List<java.lang.String> escapeStrings)
        Cleans the file name. Replaces parameters that can cause problems on the file system.
        Parameters:
        fileName - String to clean
        escapeStrings - List, An arrayList of String that won't be encoded.
        Returns:
        file name
        Since:
        MicroStrategy Web 10.9
      • getExportActionFormName

        public static java.lang.String getExportActionFormName​(java.lang.String servletName,
                                                               java.lang.String uniqueID,
                                                               java.lang.String suggestedFileName,
                                                               boolean redirect)
        Since:
        MicroStrategy Web 9.0.0
      • getExportAnchorTarget

        public static java.lang.String getExportAnchorTarget​(WebComponent wc)
        Since:
        MicroStrategy Web 9.0.1
      • getExportReportResultFlags

        public static int getExportReportResultFlags​(ReportBean rb)
        Since:
        MicroStrategy Web 9.0.1