Package com.microstrategy.web.app.utils
Class OptionsHelper
- java.lang.Object
-
- com.microstrategy.web.app.utils.OptionsHelper
-
public class OptionsHelper extends java.lang.Object
This is the helper class used to save the print and PDF options on the report- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AdminFooterCenter
static java.lang.String
AdminFooterLeft
static java.lang.String
AdminFooterRight
static java.lang.String
AdminHeaderCenter
static java.lang.String
AdminHeaderLeft
static java.lang.String
AdminHeaderRight
static java.lang.String
AdvancedSettings
static java.lang.String
BlackAndWhite
static java.lang.String
CenterHorizontal
static java.lang.String
CenterVertical
static java.lang.String
Columns
static java.lang.String
CoverPageDetailsContents
static java.lang.String
CoverPageLocation
static java.lang.String
EmbedFonts
static java.lang.String
EncodeHTML
static java.lang.String
ExcelEmbedImages
static java.lang.String
ExcelReportFooter
static java.lang.String
ExcelReportHeader
static java.lang.String
ExcelReportHeaderLocation
static java.lang.String
ExpandAllPages
static java.lang.String
ExpandPageFields
static java.lang.String
ExpandToFit
static java.lang.String
ExportAdminFooter
static java.lang.String
ExportAdminHeader
static java.lang.String
ExportAdvancedPropertiesPropertySetName
static java.lang.String
ExportPageByInfo
static java.lang.String
ExportPropertiesPropertySetName
static java.lang.String
ExportReportTitle
static java.lang.String
ExportSection
static java.lang.String
FilterDetails
static java.lang.String
FooterCenter
static java.lang.String
FooterLeft
static java.lang.String
FooterRight
static java.lang.String
GraphFormat
static java.lang.String
GridandGraph
static java.lang.String
HeaderCenter
static java.lang.String
HeaderLeft
static java.lang.String
HeaderRight
static java.lang.String
HeadersAsText
static java.lang.String
HtmlColumns
static java.lang.String
HtmlRows
static java.lang.String
MarginBottom
static java.lang.String
MarginLeft
static java.lang.String
MarginRight
static java.lang.String
MarginTop
static java.lang.String
MaxFooterSize
static java.lang.String
MaxHeaderSize
static java.lang.String
MetricValuesAsText
static java.lang.String
NumberingStartPage
static java.lang.String
Orientation
static java.lang.String
OverlapGridTitles
static java.lang.String
PageOrdering
static java.lang.String
PaperHeight
static java.lang.String
PaperType
static java.lang.String
PaperWidth
static java.lang.String
PDFPropertySetName
static java.lang.String
PlaintextDelimiter
static java.lang.String
PrintCoverDetails
static java.lang.String
PrintPropertySetName
static java.lang.String
PrintQuality
static java.lang.String
RepeatColumnHeaders
static java.lang.String
RepeatRowHeaders
static java.lang.String
ReportHeader
static int
ReportObjectType
static java.lang.String
ReportOfficeRefresh
static java.lang.String
ReportPDFSettingsPresent
static java.lang.String
Rows
static java.lang.String
ScalePagesTall
static java.lang.String
ScalePagesWide
static java.lang.String
ScalePercentage
static java.lang.String
Scaling
static java.lang.String
SettingsPresent
static java.lang.String
ShowAttributeFormNames
static java.lang.String
ShowPageFieldTitles
static java.lang.String
TemplateFormattingPropertySetName
static java.lang.String
UseLiveChartGraphs
static java.lang.String
UseSeparateSheets
-
Constructor Summary
Constructors Constructor Description OptionsHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
booleanPreferencePropertyMapping(java.lang.String preferenceValue)
Maps the value of a preference to a report propertystatic java.lang.String
booleanPreferencePropertyMappingGraphFormat(java.lang.String preferenceValue)
Maps the value of the useBMPGraphs preference to the GraphFormat report propertystatic java.lang.String
booleanPreferencePropertyMappingPrintQuality(java.lang.String preferenceValue)
Maps the value of the draftQualityGraphs preference to the PrintQuality report propertystatic java.lang.String
booleanPreferencePropertyRowsColsMapping(java.lang.String preferenceValue)
static java.lang.String
booleanPropertyPreferenceMapping(java.lang.String propertyValue)
Maps the value of a report property to the preference's respective valuestatic java.lang.String
booleanPropertyPreferenceMappingGraphFormat(java.lang.String propertyValue)
Maps the value of the Graph Format report property to the useBMPGraphs preference respective valuestatic java.lang.String
booleanPropertyPreferenceMappingPrintQuality(java.lang.String propertyValue)
Maps the value of the PrintQuality report property to the draftQualityGraphs preference respective valuestatic java.lang.String
booleanPropertyPreferenceRowsColsMapping(java.lang.String propertyValue)
static boolean
checkPropertiesPresent(ReportBean rb, java.lang.String propertySetName)
Tells whether the print/pdf properties are present or not.static java.lang.String
convertUnits(java.lang.String unitFrom, java.lang.String unitTo, java.lang.String value, int dpi)
static java.lang.String
convertUnits(java.lang.String value, java.util.Locale locale, java.lang.String unitsPreference, int dpi)
Converts a given double String from inches to cm if the user preference indicates so.static java.lang.String
convertUnitsToUS(java.lang.String value, java.util.Locale locale, java.lang.String unitsPreference, int dpi)
Converts a given double String from cm to inches if the user preference indicates so.static java.lang.String
getCheckboxOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)
static boolean
getCheckboxOptionValueFromRK(RequestKeys rk, java.lang.String argumentName)
static java.lang.String[]
getDesktopPaperSize(PaperSizesList paperSizesList, java.lang.String paperSize)
Deprecated.Use getDesktopPaperSize(ShortcutList, String)static java.lang.String[]
getDesktopPaperSize(ShortcutList paperSizesList, java.lang.String paperSize)
Gets the Desktop's paper sizestatic java.lang.String
getOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)
static java.lang.String
getWebPaperSize(PaperSizesList paperSizesList, java.lang.String paperType, java.lang.String paperHeight, java.lang.String paperWidth)
Deprecated.Use getWebPaperSize(ShortcutList, String, String, String)static java.lang.String
getWebPaperSize(ShortcutList paperSizesList, java.lang.String paperType, java.lang.String paperHeight, java.lang.String paperWidth)
Retunrs the paper size key for the specified arguments or a Custom size with the specified paperHeight and paperWidthstatic HashList
loadGlobalPropertyValues(ReportBean rb, java.lang.String propertySetName)
Returns a list of the global properties needed for PDFstatic HashList
loadProjectPropertyValues(AppContext ac, java.lang.String propertySetName)
Returns a list of the project properties needed for printing/PDF (depending on the propertySetName)static HashList
loadPropertyValues(ReportBean rb, java.lang.String propertySetName)
Returns a list of the properties needed for printing/PDF (depending on the propertySetName)static java.lang.String
localizeDouble(java.lang.String doubleValue, java.lang.String localeID)
Converts a double to the specified localestatic java.lang.String
localizeDoubleToEnglish(java.lang.String doubleValue)
Converts a double to English localestatic void
saveProjectPropertyValues(AppContext ac, HashList argumentValues, java.lang.String propertySetName)
Saves the project properties contained in theargumentValues
.static void
savePropertyValues(AppContext ac, HashList argumentValues, java.lang.String propertySetName, boolean allProjects)
Saves properties contained in theargumentValues
.static void
setPrefValue(Preferences preferences, java.lang.String name, PreferenceLevel level, java.lang.String value)
Saves the value of a preferencestatic void
setPrefValueIfInRequest(Preferences preferences, RequestKeys rk, java.lang.String name, PreferenceLevel level, java.lang.String value)
Saves the value of a preference if the preference is present on the requeststatic void
submitSetPropertyEvent(ReportBean rb, HashList argumentValues)
Submits an event that saves all the properties on the liststatic java.lang.String
truncateDecimalVaule(java.lang.String value, int maxLength, java.lang.String localeID)
Truncate a decimal vaule so the length of its string representation does not exceed 'maxLength'.
-
-
-
Field Detail
-
ReportObjectType
public static final int ReportObjectType
- See Also:
- Constant Field Values
-
PrintPropertySetName
public static final java.lang.String PrintPropertySetName
- See Also:
- Constant Field Values
-
PDFPropertySetName
public static final java.lang.String PDFPropertySetName
- See Also:
- Constant Field Values
-
TemplateFormattingPropertySetName
public static final java.lang.String TemplateFormattingPropertySetName
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
ExportPropertiesPropertySetName
public static final java.lang.String ExportPropertiesPropertySetName
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
ExportAdvancedPropertiesPropertySetName
public static final java.lang.String ExportAdvancedPropertiesPropertySetName
- Since:
- MicroStrategy Web 8.0.1
- See Also:
- Constant Field Values
-
Orientation
public static final java.lang.String Orientation
- See Also:
- Constant Field Values
-
Scaling
public static final java.lang.String Scaling
- See Also:
- Constant Field Values
-
ScalePercentage
public static final java.lang.String ScalePercentage
- See Also:
- Constant Field Values
-
ScalePagesWide
public static final java.lang.String ScalePagesWide
- See Also:
- Constant Field Values
-
ScalePagesTall
public static final java.lang.String ScalePagesTall
- See Also:
- Constant Field Values
-
MarginTop
public static final java.lang.String MarginTop
- See Also:
- Constant Field Values
-
MarginBottom
public static final java.lang.String MarginBottom
- See Also:
- Constant Field Values
-
MarginLeft
public static final java.lang.String MarginLeft
- See Also:
- Constant Field Values
-
MarginRight
public static final java.lang.String MarginRight
- See Also:
- Constant Field Values
-
PageOrdering
public static final java.lang.String PageOrdering
- See Also:
- Constant Field Values
-
HeaderLeft
public static final java.lang.String HeaderLeft
- See Also:
- Constant Field Values
-
HeaderCenter
public static final java.lang.String HeaderCenter
- See Also:
- Constant Field Values
-
HeaderRight
public static final java.lang.String HeaderRight
- See Also:
- Constant Field Values
-
FooterLeft
public static final java.lang.String FooterLeft
- See Also:
- Constant Field Values
-
FooterCenter
public static final java.lang.String FooterCenter
- See Also:
- Constant Field Values
-
FooterRight
public static final java.lang.String FooterRight
- See Also:
- Constant Field Values
-
NumberingStartPage
public static final java.lang.String NumberingStartPage
- See Also:
- Constant Field Values
-
ExpandPageFields
public static final java.lang.String ExpandPageFields
- See Also:
- Constant Field Values
-
ShowPageFieldTitles
public static final java.lang.String ShowPageFieldTitles
- See Also:
- Constant Field Values
-
RepeatRowHeaders
public static final java.lang.String RepeatRowHeaders
- See Also:
- Constant Field Values
-
RepeatColumnHeaders
public static final java.lang.String RepeatColumnHeaders
- See Also:
- Constant Field Values
-
CenterVertical
public static final java.lang.String CenterVertical
- See Also:
- Constant Field Values
-
CenterHorizontal
public static final java.lang.String CenterHorizontal
- See Also:
- Constant Field Values
-
PaperHeight
public static final java.lang.String PaperHeight
- See Also:
- Constant Field Values
-
PaperWidth
public static final java.lang.String PaperWidth
- See Also:
- Constant Field Values
-
PaperType
public static final java.lang.String PaperType
- See Also:
- Constant Field Values
-
MaxHeaderSize
public static final java.lang.String MaxHeaderSize
- See Also:
- Constant Field Values
-
MaxFooterSize
public static final java.lang.String MaxFooterSize
- See Also:
- Constant Field Values
-
PrintCoverDetails
public static final java.lang.String PrintCoverDetails
- See Also:
- Constant Field Values
-
ExpandToFit
public static final java.lang.String ExpandToFit
- See Also:
- Constant Field Values
-
BlackAndWhite
public static final java.lang.String BlackAndWhite
- See Also:
- Constant Field Values
-
PrintQuality
public static final java.lang.String PrintQuality
- See Also:
- Constant Field Values
-
Rows
public static final java.lang.String Rows
- See Also:
- Constant Field Values
-
Columns
public static final java.lang.String Columns
- See Also:
- Constant Field Values
-
FilterDetails
public static final java.lang.String FilterDetails
- See Also:
- Constant Field Values
-
GridandGraph
public static final java.lang.String GridandGraph
- See Also:
- Constant Field Values
-
HtmlRows
public static final java.lang.String HtmlRows
- See Also:
- Constant Field Values
-
HtmlColumns
public static final java.lang.String HtmlColumns
- See Also:
- Constant Field Values
-
ReportPDFSettingsPresent
public static final java.lang.String ReportPDFSettingsPresent
- See Also:
- Constant Field Values
-
AdvancedSettings
public static final java.lang.String AdvancedSettings
- See Also:
- Constant Field Values
-
ExportAdminHeader
public static final java.lang.String ExportAdminHeader
- Since:
- MicroStrategy Web 8.0.2
- See Also:
- Constant Field Values
-
ExportAdminFooter
public static final java.lang.String ExportAdminFooter
- Since:
- MicroStrategy Web 8.0.2
- See Also:
- Constant Field Values
-
ShowAttributeFormNames
public static final java.lang.String ShowAttributeFormNames
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
GraphFormat
public static final java.lang.String GraphFormat
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
EmbedFonts
public static final java.lang.String EmbedFonts
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
AdminHeaderLeft
public static final java.lang.String AdminHeaderLeft
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
AdminHeaderCenter
public static final java.lang.String AdminHeaderCenter
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
AdminHeaderRight
public static final java.lang.String AdminHeaderRight
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
AdminFooterLeft
public static final java.lang.String AdminFooterLeft
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
AdminFooterCenter
public static final java.lang.String AdminFooterCenter
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
AdminFooterRight
public static final java.lang.String AdminFooterRight
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
ExpandAllPages
public static final java.lang.String ExpandAllPages
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
UseSeparateSheets
public static final java.lang.String UseSeparateSheets
- Since:
- MicroStrategy Web 8.0.1
- See Also:
- Constant Field Values
-
CoverPageLocation
public static final java.lang.String CoverPageLocation
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
CoverPageDetailsContents
public static final java.lang.String CoverPageDetailsContents
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ReportHeader
public static final java.lang.String ReportHeader
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ExcelEmbedImages
public static final java.lang.String ExcelEmbedImages
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ExcelReportHeader
public static final java.lang.String ExcelReportHeader
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ExcelReportHeaderLocation
public static final java.lang.String ExcelReportHeaderLocation
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ExcelReportFooter
public static final java.lang.String ExcelReportFooter
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
SettingsPresent
public static final java.lang.String SettingsPresent
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ExportSection
public static final java.lang.String ExportSection
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
PlaintextDelimiter
public static final java.lang.String PlaintextDelimiter
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
MetricValuesAsText
public static final java.lang.String MetricValuesAsText
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
HeadersAsText
public static final java.lang.String HeadersAsText
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
UseLiveChartGraphs
public static final java.lang.String UseLiveChartGraphs
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
OverlapGridTitles
public static final java.lang.String OverlapGridTitles
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ReportOfficeRefresh
public static final java.lang.String ReportOfficeRefresh
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ExportReportTitle
public static final java.lang.String ExportReportTitle
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ExportPageByInfo
public static final java.lang.String ExportPageByInfo
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
EncodeHTML
public static final java.lang.String EncodeHTML
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadPropertyValues
public static HashList loadPropertyValues(ReportBean rb, java.lang.String propertySetName)
Returns a list of the properties needed for printing/PDF (depending on the propertySetName)- Parameters:
rb
- report beanpropertySetName
- property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings)- Returns:
- a Hashlist with all the properties needed for printing/PDF (depending on the propertySetName)
-
loadGlobalPropertyValues
public static HashList loadGlobalPropertyValues(ReportBean rb, java.lang.String propertySetName)
Returns a list of the global properties needed for PDF- Parameters:
rb
- report beanpropertySetName
- property set name (OptionsHelper.ExportPropertiesPropertySetName)- Returns:
- a Hashlist with all the global properties needed for PDF
- Since:
- MicroStrategy Web 8.0.0
-
loadProjectPropertyValues
public static HashList loadProjectPropertyValues(AppContext ac, java.lang.String propertySetName)
Returns a list of the project properties needed for printing/PDF (depending on the propertySetName)- Parameters:
ac
- The Application ContextpropertySetName
- property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings)- Returns:
- a Hashlist with all the project properties needed for printing/PDF (depending on the propertySetName)
- Since:
- MicroStrategy Web 8.0.0
-
saveProjectPropertyValues
public static void saveProjectPropertyValues(AppContext ac, HashList argumentValues, java.lang.String propertySetName)
Saves the project properties contained in theargumentValues
. Equivalent tosavePropertyValues(AppContext, HashList, String, boolean)
whereallProjects
isfalse
.- Parameters:
ac
- AppContext the application contextargumentValues
- HashList with all the project properties to be savedpropertySetName
- String property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings)- Since:
- MicroStrategy Web 8.0.0
-
savePropertyValues
public static void savePropertyValues(AppContext ac, HashList argumentValues, java.lang.String propertySetName, boolean allProjects)
Saves properties contained in theargumentValues
.- Parameters:
ac
- AppContext the application contextargumentValues
- HashList with all the project properties to be savedpropertySetName
- String property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings)allProjects
- whether to apply settings to all projects or only the current project- Since:
- MicroStrategy Web 9.0.0
-
checkPropertiesPresent
public static boolean checkPropertiesPresent(ReportBean rb, java.lang.String propertySetName)
Tells whether the print/pdf properties are present or not. it looks for property OptionsHelper.ReportPDFSettingsPresent on the property set specified- Parameters:
rb
- report beanpropertySetName
- property set name (OptionsHelper.PrintPropertySetName or OptionsHelper.ExportPDFSettings)- Returns:
- true if print/pdf properties are present
-
submitSetPropertyEvent
public static void submitSetPropertyEvent(ReportBean rb, HashList argumentValues)
Submits an event that saves all the properties on the list- Parameters:
rb
- report beanargumentValues
- hashlist with the properties to save
-
booleanPropertyPreferenceMapping
public static java.lang.String booleanPropertyPreferenceMapping(java.lang.String propertyValue)
Maps the value of a report property to the preference's respective value- Parameters:
propertyValue
- property value- Returns:
- the preference value
-
booleanPreferencePropertyMapping
public static java.lang.String booleanPreferencePropertyMapping(java.lang.String preferenceValue)
Maps the value of a preference to a report property- Parameters:
preferenceValue
- The preference value- Returns:
- the report property value
-
booleanPropertyPreferenceMappingGraphFormat
public static java.lang.String booleanPropertyPreferenceMappingGraphFormat(java.lang.String propertyValue)
Maps the value of the Graph Format report property to the useBMPGraphs preference respective value- Parameters:
propertyValue
- property value- Returns:
- the preference value
- Since:
- MicroStrategy Web 8.0.0
-
booleanPreferencePropertyMappingGraphFormat
public static java.lang.String booleanPreferencePropertyMappingGraphFormat(java.lang.String preferenceValue)
Maps the value of the useBMPGraphs preference to the GraphFormat report property- Parameters:
preferenceValue
- The preference value- Returns:
- the report property value
- Since:
- MicroStrategy Web 8.0.0
-
booleanPropertyPreferenceMappingPrintQuality
public static java.lang.String booleanPropertyPreferenceMappingPrintQuality(java.lang.String propertyValue)
Maps the value of the PrintQuality report property to the draftQualityGraphs preference respective value- Parameters:
propertyValue
- property value- Returns:
- the preference value
- Since:
- MicroStrategy Web 8.0.0
-
booleanPreferencePropertyMappingPrintQuality
public static java.lang.String booleanPreferencePropertyMappingPrintQuality(java.lang.String preferenceValue)
Maps the value of the draftQualityGraphs preference to the PrintQuality report property- Parameters:
preferenceValue
- The preference value- Returns:
- the report property value
- Since:
- MicroStrategy Web 8.0.0
-
booleanPropertyPreferenceRowsColsMapping
public static java.lang.String booleanPropertyPreferenceRowsColsMapping(java.lang.String propertyValue)
-
booleanPreferencePropertyRowsColsMapping
public static java.lang.String booleanPreferencePropertyRowsColsMapping(java.lang.String preferenceValue)
-
getWebPaperSize
@Deprecated public static java.lang.String getWebPaperSize(PaperSizesList paperSizesList, java.lang.String paperType, java.lang.String paperHeight, java.lang.String paperWidth)
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- Parameters:
paperSizesList
- aPaperSizesList
collection with the available paper sizespaperType
- aString
that specifies the paper typepaperHeight
- aString
that specifies the paper heightpaperWidth
- aString
that specifies the paper width- Returns:
- a
String
with the key for the specified arguments
-
getWebPaperSize
public static java.lang.String getWebPaperSize(ShortcutList paperSizesList, java.lang.String paperType, java.lang.String paperHeight, java.lang.String paperWidth)
Retunrs the paper size key for the specified arguments or a Custom size with the specified paperHeight and paperWidth- Parameters:
paperSizesList
- aShortcutList
collection with the available paper sizespaperType
- aString
that specifies the paper typepaperHeight
- aString
that specifies the paper heightpaperWidth
- aString
that specifies the paper width- Returns:
- a
String
with the key for the specified arguments - Since:
- MicroStrategy Web 9.0.0
-
getDesktopPaperSize
@Deprecated public static java.lang.String[] getDesktopPaperSize(PaperSizesList paperSizesList, java.lang.String paperSize)
Deprecated.Use getDesktopPaperSize(ShortcutList, String)Gets the Desktop's paper size- Parameters:
paperSizesList
- paper sizes listpaperSize
- paper size- Returns:
- Desktop's paper size
-
getDesktopPaperSize
public static java.lang.String[] getDesktopPaperSize(ShortcutList paperSizesList, java.lang.String paperSize)
Gets the Desktop's paper size- Parameters:
paperSizesList
- paper sizes listpaperSize
- paper size- Returns:
- Desktop's paper size
- Since:
- MicroStrategy Web 9.0.0
-
localizeDouble
public static java.lang.String localizeDouble(java.lang.String doubleValue, java.lang.String localeID)
Converts a double to the specified locale- Parameters:
doubleValue
- value to localizelocaleID
- locale to localize to- Returns:
- localized value
-
localizeDoubleToEnglish
public static java.lang.String localizeDoubleToEnglish(java.lang.String doubleValue)
Converts a double to English locale- Parameters:
doubleValue
- value to localize- Returns:
- value localized
-
convertUnits
public static java.lang.String convertUnits(java.lang.String value, java.util.Locale locale, java.lang.String unitsPreference, int dpi)
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.- Parameters:
value
- Double value in string format to convert.locale
- User's localeunitsPreference
- Preference that specifies the units to be used- Returns:
- the converted value
- Since:
- MicroStrategy Web 8.0.0
-
convertUnitsToUS
public static java.lang.String convertUnitsToUS(java.lang.String value, java.util.Locale locale, java.lang.String unitsPreference, int dpi)
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.- Parameters:
value
- Double value in string format to convert.locale
- User's localeunitsPreference
- Preference that specifies the units to be used- Returns:
- the converted value
- Since:
- MicroStrategy Web 8.0.0
-
convertUnits
public static java.lang.String convertUnits(java.lang.String unitFrom, java.lang.String unitTo, java.lang.String value, int dpi)
- Since:
- MicroStrategy Web 8.1.0
-
setPrefValue
public static void setPrefValue(Preferences preferences, java.lang.String name, PreferenceLevel level, java.lang.String value)
Saves the value of a preference- Parameters:
preferences
- Preferences objectname
- name of the preferencelevel
- preference level (a value from EnumPreferenceLevels)value
- preference value
-
setPrefValueIfInRequest
public static void setPrefValueIfInRequest(Preferences preferences, RequestKeys rk, java.lang.String name, PreferenceLevel level, java.lang.String value)
Saves the value of a preference if the preference is present on the request- Parameters:
preferences
- Preferences objectname
- name of the preferencelevel
- preference level (a value from EnumPreferenceLevels)value
- preference value- Since:
- MicroStrategy Web 8.0.0
-
getOptionValue
public static java.lang.String getOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)
-
getCheckboxOptionValue
public static java.lang.String getCheckboxOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)
-
getCheckboxOptionValueFromRK
public static boolean getCheckboxOptionValueFromRK(RequestKeys rk, java.lang.String argumentName)
- Since:
- MicroStrategy Web 7.5.0
-
truncateDecimalVaule
public static java.lang.String truncateDecimalVaule(java.lang.String value, int maxLength, java.lang.String localeID)
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.- Parameters:
value
- The string representation of the value, formatted with specified localemaxLength
- The maximum length of objective string after truncationlocaleID
- The ID of the locale with which the original value is localized- Returns:
- The representation of the value after truncation
- Since:
- MicroStrategy Web 9.0.0
-
-