java.lang.Object | |
↳ | com.microstrategy.web.app.utils.OptionsHelper |
This is the helper class used to save the print and PDF options on the report
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
OptionsHelper() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String |
booleanPreferencePropertyMapping(String preferenceValue)
Maps the value of a preference to a report property
| ||||||||||
static String |
booleanPreferencePropertyMappingGraphFormat(String preferenceValue)
Maps the value of the useBMPGraphs preference to the GraphFormat report property
| ||||||||||
static String |
booleanPreferencePropertyMappingPrintQuality(String preferenceValue)
Maps the value of the draftQualityGraphs preference to the PrintQuality report property
| ||||||||||
static String | booleanPreferencePropertyRowsColsMapping(String preferenceValue) | ||||||||||
static String |
booleanPropertyPreferenceMapping(String propertyValue)
Maps the value of a report property to the preference's respective value
| ||||||||||
static String |
booleanPropertyPreferenceMappingGraphFormat(String propertyValue)
Maps the value of the Graph Format report property to the useBMPGraphs preference respective value
| ||||||||||
static String |
booleanPropertyPreferenceMappingPrintQuality(String propertyValue)
Maps the value of the PrintQuality report property to the draftQualityGraphs preference respective value
| ||||||||||
static String | booleanPropertyPreferenceRowsColsMapping(String propertyValue) | ||||||||||
static boolean |
checkPropertiesPresent(ReportBean rb, String propertySetName)
Tells whether the print/pdf properties are present or not.
| ||||||||||
static String | convertUnits(String unitFrom, String unitTo, String value, int dpi) | ||||||||||
static String |
convertUnits(String value, Locale locale, String unitsPreference, int dpi)
Converts a given double String from inches to cm if the user preference
indicates so.
| ||||||||||
static String |
convertUnitsToUS(String value, Locale locale, String unitsPreference, int dpi)
Converts a given double String from cm to inches if the user preference
indicates so.
| ||||||||||
static String | getCheckboxOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, String preferenceName, String propertyName) | ||||||||||
static boolean | getCheckboxOptionValueFromRK(RequestKeys rk, String argumentName) | ||||||||||
static String[] |
getDesktopPaperSize(PaperSizesList paperSizesList, String paperSize)
This method is deprecated.
Use getDesktopPaperSize(ShortcutList, String)
| ||||||||||
static String[] |
getDesktopPaperSize(ShortcutList paperSizesList, String paperSize)
Gets the Desktop's paper size
| ||||||||||
static String | getOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, String preferenceName, String propertyName) | ||||||||||
static String |
getWebPaperSize(PaperSizesList paperSizesList, String paperType, String paperHeight, String paperWidth)
This method is deprecated.
Use getWebPaperSize(ShortcutList, String, String, String)
| ||||||||||
static String |
getWebPaperSize(ShortcutList paperSizesList, String paperType, String paperHeight, String paperWidth)
Retunrs the paper size key for the specified arguments or a Custom size
with the specified paperHeight and paperWidth
| ||||||||||
static HashList |
loadGlobalPropertyValues(ReportBean rb, String propertySetName)
Returns a list of the global properties needed for PDF
| ||||||||||
static HashList |
loadProjectPropertyValues(AppContext ac, String propertySetName)
Returns a list of the project properties needed for printing/PDF (depending on the propertySetName)
| ||||||||||
static HashList |
loadPropertyValues(ReportBean rb, String propertySetName)
Returns a list of the properties needed for printing/PDF (depending on the propertySetName)
| ||||||||||
static String |
localizeDouble(String doubleValue, String localeID)
Converts a double to the specified locale
| ||||||||||
static String |
localizeDoubleToEnglish(String doubleValue)
Converts a double to English locale
| ||||||||||
static void |
saveProjectPropertyValues(AppContext ac, HashList argumentValues, String propertySetName)
Saves the project properties contained in the
argumentValues . | ||||||||||
static void |
savePropertyValues(AppContext ac, HashList argumentValues, String propertySetName, boolean allProjects)
Saves properties contained in the
argumentValues . | ||||||||||
static void |
setPrefValue(Preferences preferences, String name, PreferenceLevel level, String value)
Saves the value of a preference
| ||||||||||
static void |
setPrefValueIfInRequest(Preferences preferences, RequestKeys rk, String name, PreferenceLevel level, String value)
Saves the value of a preference if the preference is present on the request
| ||||||||||
static void |
submitSetPropertyEvent(ReportBean rb, HashList argumentValues)
Submits an event that saves all the properties on the list
| ||||||||||
static String |
truncateDecimalVaule(String value, int maxLength, String localeID)
Truncate a decimal vaule so the length of its string representation does not exceed 'maxLength'.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Maps the value of a preference to a report property
preferenceValue | The preference value |
---|
Maps the value of the useBMPGraphs preference to the GraphFormat report property
preferenceValue | The preference value |
---|
Maps the value of the draftQualityGraphs preference to the PrintQuality report property
preferenceValue | The preference value |
---|
Maps the value of a report property to the preference's respective value
propertyValue | property value |
---|
Maps the value of the Graph Format report property to the useBMPGraphs preference respective value
propertyValue | property value |
---|
Maps the value of the PrintQuality report property to the draftQualityGraphs preference respective value
propertyValue | property value |
---|
Tells whether the print/pdf properties are present or not. it looks for property OptionsHelper.ReportPDFSettingsPresent on the property set specified
rb | report bean |
---|---|
propertySetName | property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings) |
Converts a given double String from inches to cm if the user preference indicates so. If the user preference is set to inches, the function does not do anything.
value | Double value in string format to convert. |
---|---|
locale | User's locale |
unitsPreference | Preference that specifies the units to be used |
Converts a given double String from cm to inches if the user preference indicates so. If the user preference is set to inches, the function does not do anything.
value | Double value in string format to convert. |
---|---|
locale | User's locale |
unitsPreference | Preference that specifies the units to be used |
This method is deprecated.
Use getDesktopPaperSize(ShortcutList, String)
Gets the Desktop's paper size
paperSizesList | paper sizes list |
---|---|
paperSize | paper size |
Gets the Desktop's paper size
paperSizesList | paper sizes list |
---|---|
paperSize | paper size |
This method is deprecated.
Use getWebPaperSize(ShortcutList, String, String, String)
Retunrs the paper size key for the specified arguments or a Custom size with the specified paperHeight and paperWidth
paperSizesList | a PaperSizesList collection with the available paper sizes |
---|---|
paperType | a String that specifies the paper type |
paperHeight | a String that specifies the paper height |
paperWidth | a String that specifies the paper width |
Retunrs the paper size key for the specified arguments or a Custom size with the specified paperHeight and paperWidth
paperSizesList | a ShortcutList collection with the available paper sizes |
---|---|
paperType | a String that specifies the paper type |
paperHeight | a String that specifies the paper height |
paperWidth | a String that specifies the paper width |
Returns a list of the global properties needed for PDF
rb | report bean |
---|---|
propertySetName | property set name (OptionsHelper.ExportPropertiesPropertySetName) |
Returns a list of the project properties needed for printing/PDF (depending on the propertySetName)
ac | The Application Context |
---|---|
propertySetName | property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings) |
Returns a list of the properties needed for printing/PDF (depending on the propertySetName)
rb | report bean |
---|---|
propertySetName | property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings) |
Converts a double to the specified locale
doubleValue | value to localize |
---|---|
localeID | locale to localize to |
Converts a double to English locale
doubleValue | value to localize |
---|
Saves the project properties contained in the argumentValues
. Equivalent to
savePropertyValues(AppContext, HashList, String, boolean)
where allProjects
is false
.
ac | AppContext the application context |
---|---|
argumentValues | HashList with all the project properties to be saved |
propertySetName | String property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings) |
Saves properties contained in the argumentValues
.
ac | AppContext the application context |
---|---|
argumentValues | HashList with all the project properties to be saved |
propertySetName | String property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings) |
allProjects | whether to apply settings to all projects or only the current project |
Saves the value of a preference
preferences | Preferences object |
---|---|
name | name of the preference |
level | preference level (a value from EnumPreferenceLevels) |
value | preference value |
Saves the value of a preference if the preference is present on the request
preferences | Preferences object |
---|---|
name | name of the preference |
level | preference level (a value from EnumPreferenceLevels) |
value | preference value |
Submits an event that saves all the properties on the list
rb | report bean |
---|---|
argumentValues | hashlist with the properties to save |
Truncate a decimal vaule so the length of its string representation does not exceed 'maxLength'. In any case we can only decrease the precision but not change the vaule itself.
value | The string representation of the value, formatted with specified locale |
---|---|
maxLength | The maximum length of objective string after truncation |
localeID | The ID of the locale with which the original value is localized |