public class

ExportBeanHelper

extends Object
java.lang.Object
   ↳ com.microstrategy.web.app.utils.ExportBeanHelper

Class Overview

The ExportBeanHelper is a helper for exporting

Summary

Constants
int EXPORT_BASE_RESULT_FLAGS
Public Constructors
ExportBeanHelper()
Constructor to create an instance of the helper.
Public Methods
static String getDisplayableReportName(String fileName, boolean encodeSpace)
Cleans the file name.
static String getExportActionFormName(String servletName, String uniqueID, String suggestedFileName, boolean redirect)
static String getExportAnchorTarget(WebComponent wc)
static int getExportReportResultFlags(ReportBean rb)
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.
static boolean isPlaintextFormat(String exportFormatName)
This method is deprecated. this can be determined from ExportFormat object of the ExportBean
void reset()
Resets the values set by the setters on the helper.
void setCharSet(String charSet)
Overrides the charset to use for the setupExportHeaders method.
void setCodePage(int codePage)
Sets the code page to use when generating export headers.
static void setContentDispositionHTTPHeaderForExporting(String fileName, String fileExtension, boolean forceDownload, ContainerServices cServ, BrowserSettings browserSettings, int maxFileSize)
void setContentType(String contentType)
Overrides the content type used in the setupExportHeaders method.
void setExportFormat(ExportFormat exportFormat)
Sets the export format to be used when the Export operation gets called.
void setFileExtension(String fileExtension)
Overrides the file extension to use for the setupExportHeaders method.
void setFileName(String fileName)
Overrides the filename used in the setupExportHeaders method.
void setForceDownload(Boolean forceDownload)
void setMaxFileSize(int maxFileSize)
Sets the max filename size for the setupExportHeaders method.
String setupExportHeaders(AppContext appContext)
This method will setup the headers for the export operation.
String setupExportHeaders(AppContext appContext, MarkupOutput mo)
This method will setup the headers for the export operation.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int EXPORT_BASE_RESULT_FLAGS

Constant Value: 8519968 (0x00820120)

Public Constructors

public ExportBeanHelper ()

Constructor to create an instance of the helper.
Initializes all internal properties with default values.

Public Methods

public static String getDisplayableReportName (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

public static String getExportActionFormName (String servletName, String uniqueID, String suggestedFileName, boolean redirect)

public static String getExportAnchorTarget (WebComponent wc)

public static int getExportReportResultFlags (ReportBean rb)

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)

public static boolean isPlaintextFormat (String exportFormatName)

This method is 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.

public void reset ()

Resets the values set by the setters on the helper.

public void setCharSet (String charSet)

Overrides the charset to use for the setupExportHeaders method.

Parameters
charSet The charset to use for the export.

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.

public static void setContentDispositionHTTPHeaderForExporting (String fileName, String fileExtension, boolean forceDownload, ContainerServices cServ, BrowserSettings browserSettings, int maxFileSize)

public void setContentType (String contentType)

Overrides the content type used in the setupExportHeaders method.

Parameters
contentType The new content type to use for the export.

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.

public void setFileExtension (String fileExtension)

Overrides the file extension to use for the setupExportHeaders method.

Parameters
fileExtension The file extension to use for the export.

public void setFileName (String fileName)

Overrides the filename used in the setupExportHeaders method.

Parameters
fileName The new filename to use for the export.

public void setForceDownload (Boolean forceDownload)

public void setMaxFileSize (int maxFileSize)

Sets the max filename size for the setupExportHeaders method.

Parameters
maxFileSize The maximum file size for the setupExportHeaders method.

public 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.

public 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.