Package com.microstrategy.web.app.utils
Class ExportBeanHelper
- java.lang.Object
-
- com.microstrategy.web.app.utils.ExportBeanHelper
-
public class ExportBeanHelper extends java.lang.Object
The ExportBeanHelper is a helper for exporting- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static int
EXPORT_BASE_RESULT_FLAGS
-
Constructor Summary
Constructors Constructor Description ExportBeanHelper()
Constructor to create an instance of the helper.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
getDisplayableReportName(java.lang.String fileName, boolean encodeSpace)
Cleans the file name.static java.lang.String
getDisplayableReportName(java.lang.String fileName, java.util.List<java.lang.String> escapeStrings)
Cleans the file name.static java.lang.String
getExportActionFormName(java.lang.String servletName, java.lang.String uniqueID, java.lang.String suggestedFileName, boolean redirect)
static java.lang.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(java.lang.String exportFormatName)
Deprecated.this can be determined fromExportFormat
object of theExportBean
void
reset()
Resets the values set by the setters on the helper.void
setCharSet(java.lang.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(java.lang.String fileName, java.lang.String fileExtension, boolean forceDownload, ContainerServices cServ, BrowserSettings browserSettings, int maxFileSize)
void
setContentType(java.lang.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(java.lang.String fileExtension)
Overrides the file extension to use for the setupExportHeaders method.void
setFileName(java.lang.String fileName)
Overrides the filename used in the setupExportHeaders method.void
setForceDownload(java.lang.Boolean forceDownload)
void
setMaxFileSize(int maxFileSize)
Sets the max filename size for the setupExportHeaders method.java.lang.String
setupExportHeaders(AppContext appContext)
This method will setup the headers for the export operation.java.lang.String
setupExportHeaders(AppContext appContext, MarkupOutput mo)
This method will setup the headers for the export operation.
-
-
-
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
-
-
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 fromExportFormat
object of theExportBean
- 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
- TheExportFormat
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
- TheAppContext
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
- TheAppContext
object.mo
- TheMarkupOutput
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 cleanescapeStrings
- 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
-
-