java.lang.Object | |
↳ | com.microstrategy.web.beans.GridWebFormatHelper |
![]() |
This class provides a series of methods that aid on the manipulation of grid formatting properties.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | LOCAL_TARGET_ALL_METRICS | Constant for representing All Metrics on the report as target for the formatting | |||||||||
int | LOCAL_TARGET_ALL_REPORT | Constant for representing All Report as target for the formatting | |||||||||
int | LOCAL_TARGET_GRID_BORDER | Constant for representing Grid border on the report as target for the formatting | |||||||||
int | LOCAL_TARGET_GRID_CONTAINER | Constant for representing Grid Container on the RWD as target for the formatting |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GridWebFormatHelper() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String |
constructNumberFormat(String numberCategory, String thousandSeparator, String decimalPlaces, String currencySymbol, String currencyPosition, String negativeNumbers, String originalFormat)
Given the formatting specifications, constructs the string that represents the
formatting indicated.
| ||||||||||
static String |
convertColorDecimalToHTMLHex(int colorCode)
Converts a color ID retrieved as cell property from the metadata
to its HTML hexadecimal representation
| ||||||||||
static WebFormatContainer |
getAxis(WebTemplate wt, int targetAxis)
Do the required validation for returning the requested axis' format container
| ||||||||||
static String | getComparedPropertyValue(WebTemplate template, ArrayList webFormatArray, String propertyGroup, String propertyName, String defaultValue, int originalTargetAxis, int originalTargetPosition, int originalTargetLevel) | ||||||||||
static String |
getComparedPropertyValue(WebComponent taskBean, ArrayList webFormatArray, String propertyGroup, String propertyName, String defaultValue, int originalTargetAxis, int originalTargetPosition, int originalTargetLevel)
Based on the array of web format objects, compare the requested property and determine if they are the same (and what value
that shall be) or if they should be marked as default if at least one value is different.
| ||||||||||
static ArrayList |
getGridFormatObjectsArray(WebComponent targetBean, int targetAxis, int targetPosition, int unitType, int targetLevel)
Get an array of all the format objects that should be analyzed before showing the current values selected on
the editor's interface
| ||||||||||
static ArrayList |
getGridFormatObjectsArray(boolean getAsRequested, WebComponent targetBean, int targetAxis, int targetPosition, int unitType, int targetLevel)
Get an array of all the format objects that should be analyzed before showing the current values selected on
the editor's interface
| ||||||||||
static ArrayList |
getGridFormatObjectsArray(boolean getAsRequested, WebComponent targetBean, int targetAxis, int targetPosition, int targetLevel)
Get an array of all the format objects that should be analyzed before showing the current values selected on
the editor's interface
| ||||||||||
static ArrayList |
getGridFormatObjectsArray(WebComponent targetBean, int targetAxis, int targetPosition, int targetLevel)
Get an array of all the format objects that should be analyzed before showing the current values selected on
the editor's interface.
| ||||||||||
static ArrayList | getGridFormatObjectsArray(boolean getAsRequested, WebTemplate template, int targetAxis, int targetPosition, int targetLevel) | ||||||||||
static WebTemplate |
getGridTemplate(WebComponent wc)
Get the template object out of the report bean
| ||||||||||
static WebFormatContainer |
getMetric(WebTemplate wt, int indexPosition)
Do required validation for returning requested metric's format container
| ||||||||||
static boolean |
getPropertyUseDefault(WebFormat wf, String group, String property)
Retrieve the property requested from the
WebFormat object and determine if default value is to be used on it | ||||||||||
static String |
getPropertyValue(WebFormat wf, String group, String property)
Given the group and property specified as parameters, find and return its value according
to the WebFormat object passed as parameter.
| ||||||||||
static String |
getPropertyValue(WebFormat wf, String group, String property, String defaultValue)
Given the group and property specified as parameters, find and return its value according
to the WebFormat object passed as parameter.
| ||||||||||
static WebFormatContainer |
getTemplateUnit(WebTemplate wt, int targetAxis, int targetPosition)
Do required validation for returning requested template unit's format container
| ||||||||||
static int |
getUnitType(int targetAxis, int targetPosition)
Given the axis and position, calculate the unit type of the target
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constant for representing All Metrics on the report as target for the formatting
Constant for representing All Report as target for the formatting
Constant for representing Grid border on the report as target for the formatting
Constant for representing Grid Container on the RWD as target for the formatting
Given the formatting specifications, constructs the string that represents the formatting indicated. (ie #,##0.00).
numberCategory | category selected by the user, a String element of the
EnumGridFormatNumberCategory enumeration |
---|---|
thousandSeparator | character to use as thousand separator |
decimalPlaces | number of decimal places to include |
currencySymbol | character to use as currency symbol |
currencyPosition | location of currency symbol character, a String element of the
EnumGridNumberCurrencyPosition enumeration |
negativeNumbers | category selected for negative numbers, a String element of the
EnumGridNegativeNumbersFormat enumeration |
originalFormat | a String representing the original nubmer format selected |
Converts a color ID retrieved as cell property from the metadata to its HTML hexadecimal representation
colorCode | decimal representation of the color to translate |
---|
Do the required validation for returning the requested axis' format container
wt | a WebTemplate instance initialized |
---|---|
targetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis to return |
WebFormatContainer
instance for the axis requested. Returns null
if the
process could not be completed.
Based on the array of web format objects, compare the requested property and determine if they are the same (and what value that shall be) or if they should be marked as default if at least one value is different.
taskBean | target grid bean that is being targeted for formatting (usually of type ReportBean or ViewBean |
---|---|
webFormatArray | array of web format objects to analyze |
propertyGroup | name of the property group to check for |
propertyName | name of the property to check |
defaultValue | what the default value shall be if values are different |
originalTargetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis of the object being modified |
originalTargetPosition | an index indicating the position on the axis where the object is located. Special
notation is used for identifying the different object types: If position = 0 -> object identified is an axis (its ID is the targetAxis parameter) If position <0 -> object identified is a metric (its index position is represented on the targetAxis parameter) If position >0 -> object identified is a template unit (its axis is on the targetAxis parameter, its position is indicated on this parameter) |
originalTargetLevel | an element from the EnumWebFormatType enumeration representing the
level being formatted for the unit |
Get an array of all the format objects that should be analyzed before showing the current values selected on the editor's interface
targetBean | target grid bean that is being targeted for formatting (usually of type ReportBean or ViewBean |
---|---|
targetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis of the object being modified |
targetPosition | an index indicating the true position where the object is located. |
unitType | an identifier indicating the type of target object. If for example it is a metric, the targetAxis value will be ignored and targetPosition is the only one that matters. |
targetLevel | an element from the EnumWebFormatType enumeration representing the
level being formatted for the unit |
Get an array of all the format objects that should be analyzed before showing the current values selected on the editor's interface
getAsRequested | inidicates if the current axis/position should be obtained as requested or not. Particularly used when asking for an axis (return the axis object as such, not the first object in the collection) |
---|---|
targetBean | target grid bean that is being targeted for formatting (usually of type ReportBean or ViewBean |
targetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis of the object being modified |
targetPosition | an index indicating the true position on the axis where the object is located. |
unitType | an identifier indicating the type of target object. If for example it is a metric, the targetAxis value will be ignored and targetPosition is the only one that matters. |
targetLevel | an element from the EnumWebFormatType enumeration representing the
level being formatted for the unit |
Get an array of all the format objects that should be analyzed before showing the current values selected on the editor's interface
getAsRequested | inidicates if the current axis/position should be obtained as requested or not. Particularly used when asking for an axis (return the axis object as such, not the first object in the collection) |
---|---|
targetBean | target grid bean that is being targeted for formatting (usually of type ReportBean or ViewBean |
targetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis of the object being modified |
targetPosition | an index indicating the position on the axis where the object is located. Special
notation is used for identifying the different object types: If position = 0 -> object identified is an axis (its ID is the targetAxis parameter) If position <0 -> object identified is a metric (its index position is represented on the targetAxis parameter) If position >0 -> object identified is a template unit (its axis is on the targetAxis parameter, its position is indicated on this parameter) |
targetLevel | an element from the EnumWebFormatType enumeration representing the
level being formatted for the unit |
Get an array of all the format objects that should be analyzed before showing the current values selected on the editor's interface.
targetBean | target grid bean that is being targeted for formatting (usually of type ReportBean or ViewBean |
---|---|
targetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis of the object being modified |
targetPosition | an index indicating the position on the axis where the object is located. Special
notation is used for identifying the different object types: If position = 0 -> object identified is an axis (its ID is the targetAxis parameter) If position <0 -> object identified is a metric (its index position is represented on the targetAxis parameter) If position >0 -> object identified is a template unit (its axis is on the targetAxis parameter, its position is indicated on this parameter) |
targetLevel | an element from the EnumWebFormatType enumeration representing the
level being formatted for the unit |
Get the template object out of the report bean
wc | a WebComponent instance initialized - the method processes ReportBean and
ViewBean instances. |
---|
WebTemplate
instance corresponding to the report bean sent as parameter. Returns
null
if the object could not be retrieved.Do required validation for returning requested metric's format container
wt | a WebTemplate instance initialized |
---|---|
indexPosition | the index location of the metric in the Metrics array |
WebFormatContainer
instance for the metric requested. Returns null
if the
process could not be completed.
Retrieve the property requested from the WebFormat
object and determine if default value is to be used on it
wf | WebFormat instance to test |
---|---|
group | String with the name of the property group to find |
property | String with the name of the property to find |
Given the group and property specified as parameters, find and return its value according to the WebFormat object passed as parameter. If there is any error or the property or group cannot be found, null will be returned.
wf | a WebFormat object initialized |
---|---|
group | the name of the formatting property group to analyze |
property | the name of the property in the property group to analyze |
null
if the process could
not be completed
Given the group and property specified as parameters, find and return its value according to the WebFormat object passed as parameter. If there is any error or the property or group cannot be found or default is used, the default value passed as parameter will be returned.
wf | a WebFormat object initialized |
---|---|
group | the name of the formatting property group to analyze |
property | the name of the property in the property group to analyze |
defaultValue | the value to return if anything failed during the process |
Do required validation for returning requested template unit's format container
wt | a WebTemplate instance initialized |
---|---|
targetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis of the object being modified |
targetPosition | an index indicating the position on the axis where the object is located. Special
notation is used for identifying the different object types: If position = 0 -> object identified is an axis (its ID is the targetAxis parameter) If position <0 -> object identified is a metric (its index position is represented on the targetAxis parameter) If position >0 -> object identified is a template unit (its axis is on the targetAxis parameter, its position is indicated on this parameter) |
WebFormatContainer
instance for the template unit requested. Returns null
if the
process could not be completed.
Given the axis and position, calculate the unit type of the target
targetAxis | an element from the EnumDSSXMLAxisName enumeration representing the
axis of the object being modified |
---|---|
targetPosition | an index indicating the position on the axis where the object is located. Special
notation is used for identifying the different object types: If position = 0 -> object identified is an axis (its ID is the targetAxis parameter) If position <0 -> object identified is a metric (its index position is represented on the targetAxis parameter) If position >0 -> object identified is a template unit (its axis is on the targetAxis parameter, its position is indicated on this parameter) |
EnumGridFormatUnit
enumeration indicating the type of target unit for this
manipulation