Class ExportFormat

  • All Implemented Interfaces:
    ConfigurationElement, ConfigurationFile, java.lang.Cloneable

    public class ExportFormat
    extends AbstractConfigurationElement
    Defines the properties of a single export format supported by the application. The application presents this export-format to the user when the export functionality is used.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • ATT_FILE_EXTENSION

        public static final java.lang.String ATT_FILE_EXTENSION
        See Also:
        Constant Field Values
      • ATT_EXPORT_FORMAT_TYPE

        public static final java.lang.String ATT_EXPORT_FORMAT_TYPE
        Since:
        MicroStrategy Web 8.0.0
        See Also:
        Constant Field Values
      • ATT_PAGE_NAME

        public static final java.lang.String ATT_PAGE_NAME
        Since:
        MicroStrategy Web 8.0.0
        See Also:
        Constant Field Values
      • ATT_SAVE_REPORT_PROPS

        @Deprecated
        public static final java.lang.String ATT_SAVE_REPORT_PROPS
        Deprecated.
        we now save properties for all formats
        Since:
        MicroStrategy Web 8.0.1
        See Also:
        Constant Field Values
      • ATT_FEATURE

        public static final java.lang.String ATT_FEATURE
        Since:
        MicroStrategy Web 8.0.1
        See Also:
        Constant Field Values
      • ATT_EXECUTION_MODE

        public static final java.lang.String ATT_EXECUTION_MODE
        Since:
        MicroStrategy Web 8.0.2
        See Also:
        Constant Field Values
      • ATT_FORCE_DOWNLOAD

        public static final java.lang.String ATT_FORCE_DOWNLOAD
        Since:
        MicroStrategy Web 8.0.2
        See Also:
        Constant Field Values
      • ATT_CHARSET

        public static final java.lang.String ATT_CHARSET
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_CODEPAGE

        public static final java.lang.String ATT_CODEPAGE
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • NODE_EXPORT_FORMAT

        public static final java.lang.String NODE_EXPORT_FORMAT
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExportFormat

        public ExportFormat()
        Class constructor. Initializes a new -empty- instance of the exportFormat class.
      • ExportFormat

        public ExportFormat​(org.w3c.dom.Node root)
        Class constructor. Initializes an Export format instance based on the information included on the XML Node
        Parameters:
        root - Node instance representing the export format information.
    • Method Detail

      • getKeyAttribute

        protected java.lang.String getKeyAttribute()
        Description copied from class: AbstractConfigurationElement
        This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
        Specified by:
        getKeyAttribute in class AbstractConfigurationElement
        Since:
        MicroStrategy Web 9.0.0
      • getMessage

        public java.lang.String getMessage​(Messages messages)
        Parameters:
        messages - the messages l10n object.
        Returns:
        the export format's localized descriptor, or the description if the descriptionId is empty.
      • getName

        public java.lang.String getName()
        Returns the export-format's name, a unique identifier for the export-format.
      • setName

        public void setName​(java.lang.String exportFormatName)
        Sets the export-format's name, which needs to be a unique identifier for the export-format.
      • getPageName

        public java.lang.String getPageName()
        Returns the page's name that the application uses when exporting using the specified export format.
        Since:
        MicroStrategy Web 8.0.0
      • setPageName

        public void setPageName​(java.lang.String pageName)
        Indicates the page that the application will use when exporting using this ExportFormat.
        Since:
        MicroStrategy Web 8.0.0
      • getDescriptorID

        public java.lang.String getDescriptorID()
        Returns the Resource Bundle item id that the application should use to display the export format in the language of the user's locale.
      • setDescriptorID

        public void setDescriptorID​(java.lang.String descriptorID)
        Indicates the Resource Bundle item id that the application should use to display the export format in the language of the user's locale.
      • getDescription

        public java.lang.String getDescription()
        Returns a description that the application should use to display the export format if the desc-id attribute is missing.
      • setDescription

        public void setDescription​(java.lang.String description)
        Provides a descriptor that the application should use to display the export format if the desc-id attribute is missing.
      • getBeanType

        public java.lang.String getBeanType()
        Returns the bean to which the export format belongs. In the export dialog this attributes dictactes which format to display depending on the object being exported (report, document or HTML Document).
        See Also:
        setBeanType(java.lang.String)
      • setBeanType

        public void setBeanType​(java.lang.String beanType)
        Indicates the bean to which the export format belongs. In the export dialog this attributes dictactes which format to display depending on the object being exported (report, document or HTML Document). Possible values are:
        • ReportBean
        • DocumentBean
        • RWBean
      • getViewMode

        public java.lang.String getViewMode()
        Returns the view mode that the export format uses. It returns the actual (resolved) value from the EnumWebReportViewMode.ReportViewModeGrid enumeration. If the view mode is not defined, it returns null.
      • setViewMode

        public void setViewMode​(java.lang.String viewMode)
        Indicates the view mode that the export format uses. The values of the attribute are expressed using the fully-qualified name of the constants defined in the EnumWebReportViewMode interface for example, "com.microstrategy.web.objects.EnumWebReportViewMode.ReportViewModeGrid").
      • getViewModeName

        @Deprecated
        public java.lang.String getViewModeName()
        Deprecated.
        use getViewMode()
        Returns:
        the view mode name of this export format
      • setViewModeName

        @Deprecated
        public void setViewModeName​(java.lang.String viewModeName)
        Deprecated.
        use setViewMode()
        Set the view mode name of this export format to the given parameter
        Parameters:
        viewModeName - the view mode used on this export format.
      • getStyle

        public java.lang.String getStyle()
        Returns the name of a style (from the Style Catalog) that is used to transform the corresponding bean when exporting using the export format. It only applies in export-formats that are used for reports
      • setStyle

        public void setStyle​(java.lang.String style)
        Indicatges the name of a style (from the Style Catalog) that is used to transform the corresponding bean when exporting using the export format. This attribute applies only to export formats that are used for reports (i.e. their beantype is ReportBean) , but in this case it is always required to have a valid value.
      • getMimeType

        public java.lang.String getMimeType()
        Returns the mime-type that the export format uses. This type is used by the browser to identify the type of content being sent.
      • setMimeType

        public void setMimeType​(java.lang.String mimeType)
        Indicates the mime-type that the export format should use. This type is used by the browser to identify the type of content being sent.
      • getFileExtension

        public java.lang.String getFileExtension()
        Returns the extension that the application gives to the file that is created when exporting using the export format.
      • setFileExtension

        public void setFileExtension​(java.lang.String fileExtension)
        Sets the extension that the application will give to the file that is created when exporting using the export format.
      • getExportFormatType

        public java.lang.String getExportFormatType()
        Returns the type of this export format. It returns the actual (resolved) value from the EnumExportFormats enumeration or null if the value is undefined.
        Since:
        MicroStrategy Web 8.0.0
      • setExportFormatType

        public void setExportFormatType​(java.lang.String exportFormatType)
        Sets the type of this export format. The value must be a valid fully-qualified name of the values defined in this EnumExportFormats internface, for example, "com.microstrategy.web.app.beans.EnumExportFormats.ExportFormatExcelWithPlaintext".
        Parameters:
        exportFormatType - the export format type to be used on this export format.
        Since:
        MicroStrategy Web 8.0.0
      • getSaveReportProps

        @Deprecated
        public boolean getSaveReportProps()
        Deprecated.
        we now save properties for all formats
        Returns whether the options selected by the user in the export dialog should be saved back as part of the report-properties.
        Since:
        MicroStrategy Web 8.0.1
      • setSaveReportProps

        @Deprecated
        public void setSaveReportProps​(boolean saveReportProps)
        Deprecated.
        we now save properties for all formats
        Indicates whether the options selected by the user in the export dialog should be saved back as part of the report-properties.
        Since:
        MicroStrategy Web 8.0.1
      • getFeature

        public java.lang.String getFeature()
        Returns the id of a feature that is evaluated to determine whether the export-format should be displayed as an option.
        Since:
        MicroStrategy Web 8.0.1
      • setFeature

        public void setFeature​(java.lang.String feature)
        Sets the name of a feature that is evaluated to determine whether the export-format should be displayed as an option.
        Since:
        MicroStrategy Web 8.0.1
      • getExecutionMode

        public java.lang.String getExecutionMode()
        Returns the execution mode that the export format uses. It returns the actual (resolved) value from the EnumRWExecutionModes enumeration, or null if the value is underined.
        Since:
        MicroStrategy Web 8.0.2
      • setExecutionMode

        public void setExecutionMode​(java.lang.String executionMode)
        Indicates the execution mode that the export format uses. This execution-mode applies only to export formats that are used for documents, that is their bean-type is "RWBean". The values of the attribute are expressed using the fully-qualified name of the constants defined in the EnumRWExecutionModes enumeration for example, "com.microstrategy.web.objects.rw.EnumRWExecutionModes.RW_MODE_PDF".
        Since:
        MicroStrategy Web 8.0.2
      • getForceDownload

        public boolean getForceDownload()
        Returns:
        whether to force the browser to download the file by adding "attachment" to the Content-Disposition HTTP header
        Since:
        MicroStrategy Web 8.0.2
      • setForceDownload

        public void setForceDownload​(boolean forceDownload)
        Set whether to force the browser to download the file by adding "attachment" to the Content-Disposition HTTP header
        Parameters:
        forceDownload - whether to force the browser to download the file by adding "attachment" to the Content-Disposition HTTP header
        Since:
        MicroStrategy Web 8.0.2
      • getCharset

        public java.lang.String getCharset​(AppContext appContext)
        Parameters:
        appContext - the application's context
        Returns:
        the charset to use when exporting.
        If not specified we read this from the value specified on the locales.xml like this:
        • "charset-excel". Excel with plaintext and CSV
            "charset". All other export formats
      • Since:
        MicroStrategy Web 9.0.0
      • setCharset

        public void setCharset​(boolean charset)
        Set the charset to use when exporting.
        If not specified we read this from the value specified on the locales.xml like this:
        • "charset-excel". Excel with plaintext and CSV
            "charset". All other export formats
Parameters:
charset - the charset to use when exporting.
Since:
MicroStrategy Web 9.0.0
Parameters:
codepage - the codepage to use on ASP.NET when exporting.
Since:
MicroStrategy Web 9.0.0