java.lang.Object | |
↳ | com.microstrategy.web.app.utils.ExpressionHelper |
This class contains some public utility methods that can be used for handling parameters included on objects such as HttpServletRequest and RequestKeys.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ALL_OPERATORS | ||||||||||
String | ANSWER_SEPARATOR | Constant for the expression separator.- "" | |||||||||
int | ATTR_ALL_FORMS | ||||||||||
int | ATTR_BROWSE_FORMS | Flag indicating type of forms to be retrieved for a given attribute: ATTR_BROWSE_FORMS ATTR_ALL_FORMS ATTR_TEMPLATE_FORMS | |||||||||
int | ATTR_LIST_OPERATORS | ||||||||||
int | ATTR_OPERATORS | Flag for determining type of operators list to be displayed: ATTR_OPERATORS METRIC_OPERATORS ALL_OPERATORS | |||||||||
int | ATTR_TEMPLATE_FORMS | ||||||||||
String | EXCLUDE_ARGUMENT_VALUE | Indicates the argument value for the exclude option | |||||||||
int | EXPRESSION_TYPE_MDX | ||||||||||
int | EXPRESSION_TYPE_REGULAR | ||||||||||
String | EXPR_SEPARATOR | Constant for the expression separator.- "" | |||||||||
String | INCLUDE_ARGUMENT_VALUE | Indicates the argument value for the Include option | |||||||||
String | ITEM_SEPARATOR | Constant for the item separator.- "~" | |||||||||
int | MDX_ATTR_OPERATORS | ||||||||||
int | MDX_METRIC_OPERATORS | ||||||||||
int | MDX_SAP_ATTR_OPERATORS | ||||||||||
int | METRIC_OPERATORS | ||||||||||
int | METRIC_RP_OPERATORS | ||||||||||
String | SIMPLE_SEPARATOR | Character separators: SIMPLE_SEPARATOR UNIT_SEPARATOR ITEM_SEPARATOR EXPR_SEPARATOR | |||||||||
String | SIMPLE_SEPARATOR_COMMA | Constant for the comma separator.- "," | |||||||||
String | UNIT_SEPARATOR | Constant for the unit separator.- "" |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ExpressionHelper() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
displayAQListOperators(MarkupOutput mo, Messages messages, int opFunction, boolean forRA)
Renders all operators supported in Attribute Qualification prompts.
| ||||||||||
static void | displayAQListOperators(MarkupOutput mo, Messages messages, int opFunction) | ||||||||||
static void | displayAQOperators(MarkupOutput mo, Messages messages, int opFunction, boolean bUnitComparison, int expressionType) | ||||||||||
static void |
displayAQOperators(MarkupOutput mo, Messages messages, int opFunction, boolean bUnitComparison)
Renders all operators supported in Attribute Qualification prompts.
| ||||||||||
static void |
displayAQOperators(MarkupOutput mo, Messages messages, int opFunction)
Renders all operators supported in Attribute Qualification prompts.
| ||||||||||
static void |
displayAttributeForms(MarkupOutput mo, Messages messages, WebAttribute att, String currentFormId, int showFormsId, WebWorkingSet wkSet)
Renders a form list of a given attribute
| ||||||||||
static void |
displayAttributeForms(MarkupOutput mo, Messages messages, WebAttribute att, String currentFormId)
Renders a form list of a given attribute
| ||||||||||
static void |
displayAttributeForms(MarkupOutput mo, Messages messages, WebAttribute att, String currentFormId, int showFormsId)
Renders a form list of a given attribute
| ||||||||||
static void |
displayAttributeForms(MarkupOutput mo, Messages messages, WebAttribute att, String currentFormId, int showFormsId, WebWorkingSet wkSet, boolean hideIDForms)
Renders a form list of a given attribute
| ||||||||||
static void | displayMQOperators(MarkupOutput mo, Messages messages, int opFunction, int opFunctionType, boolean bUnitComparison, boolean bShowRankOperators) | ||||||||||
static void |
displayMQOperators(MarkupOutput mo, Messages messages, int opFunction, int opFunctionType, boolean bUnitComparison)
Renders an HTML option list of Metric qualification operators.
| ||||||||||
static void |
displayMQOperators(MarkupOutput mo, Messages messages, int opFunction, int opFunctionType, boolean bUnitComparison, boolean bShowRankOperators, boolean blnShowStringOperators)
Renders an HTML option list of Metric qualification operators.
| ||||||||||
static void |
displayMQOperators(MarkupOutput mo, Messages messages, int opFunction)
Renders an HTML option list of Metric qualification operators.
| ||||||||||
static void |
displayPromptMDXOperators(MarkupOutput mo, Messages messages, int opFunction, boolean bShowMetricOps, boolean bShowSAPOperators)
Renders all the different types of Prompt Operators as options of a list
| ||||||||||
static void |
displayPromptMDXOperators(MarkupOutput mo, Messages messages, int opFunction, boolean bShowMetricOps)
Renders all the different types of Prompt Operators as options of a list
| ||||||||||
static void |
displayPromptOperators(MarkupOutput mo, Messages messages, int opFunction, int opFunctionType, boolean bShowMetricOps)
Renders all operators supported by the Prompts feature.
| ||||||||||
static void |
displayRestrictedPromptOperators(MarkupOutput mo, Messages messages, int restrictedOperator)
Renders all the different types of Prompt Operators as options of a list
| ||||||||||
static void |
displayWorkingSetAttributeForms(MarkupOutput mo, WebWorkingSet ws, String currentAttId, String currentFormId)
Renders all attribute forms defined in Workingset realm
| ||||||||||
static void |
displayWorkingSetMetrics(MarkupOutput mo, WebWorkingSet ws, String currentMetricID)
Renders metrics defined in Workingset realm
| ||||||||||
static String |
formatAttributeFormDisplay(String attName, String formName)
Returns the string used to display an attribute form to the end user.
| ||||||||||
static String |
formatAttributeFormValue(String attId, String formId, int formDataType, String attName, String formName)
Returns the string used by some event-handlers to identify an attribute form
based on the specified arguments.
| ||||||||||
static String |
formatAttributeFormValueForSingleAttr(String formId, int formDataType, String formName)
Returns the string used by some event-handlers to identify an attribute form
when there can only be a single attribute in the request.
| ||||||||||
static String |
formatAttributeValue(String attId, String attName)
Returns the string used by some event-handlers to identify an attribute
based on the specified arguments.
| ||||||||||
static String |
formatObjectInfoValue(String id, int type, String name)
Returns the string used by some event-handlers to identify an object-info
based on the specified arguments.
| ||||||||||
static String |
getConstantText(WebNode node, Messages messages)
Gets the children nodes of the
DssXmlNodeConstant type from the operator node
and returns the constant value as text | ||||||||||
static String |
getConstantText(WebNode node, Messages messages, Locale locale)
Gets the children nodes of the
DssXmlNodeConstant type from the operator node
and returns the constant value as text. | ||||||||||
static int | getDimtyOutputLevel(WebNode n) | ||||||||||
static String |
getObjectText(WebNode node)
Gets the first child node from the operator node and returns the object as a
String :
| ||||||||||
static String |
getOperatorSymbol(int operatorId, Messages messages)
Returns the corresponding operator text associated with the operator Id.
| ||||||||||
static GUIOperator[] | getOperators(int operatorType, Messages msgs) | ||||||||||
static boolean |
isDimtyNodeEmpty(WebNode node)
Checks if the node has dimensionality (Dimty), and if so,
if it's empty.
| ||||||||||
static boolean |
isExpressionAnswerComplex(WebExpression answer, int expressionType)
Determines whether the current answer is complex or not.
| ||||||||||
static boolean |
isFilterEmpty(WebExpression expr)
Returns whether the given filter expression is empty.
| ||||||||||
static boolean |
isNodeComplex(WebNode node, int expressionType)
Checks if a single subexpression is Complex.
| ||||||||||
static String |
localizeValue(String value, int dataType, Locale locale)
Returns the localized value for the specified date or number
| ||||||||||
static void |
renderFilterDebugInfo(MarkupOutput out, WebFilter filter, int indent)
Renders debugging information for a given Filter instance
| ||||||||||
static String |
toOperatorName(int operatorId, int operatorType, Messages messages)
Gets the operator's name based on the operator's id and type
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constant for the expression separator.- ""
Flag indicating type of forms to be retrieved for a given attribute: ATTR_BROWSE_FORMS ATTR_ALL_FORMS ATTR_TEMPLATE_FORMS
Flag for determining type of operators list to be displayed: ATTR_OPERATORS METRIC_OPERATORS ALL_OPERATORS
Indicates the argument value for the exclude option
Constant for the expression separator.- ""
Indicates the argument value for the Include option
Constant for the item separator.- "~"
Character separators: SIMPLE_SEPARATOR UNIT_SEPARATOR ITEM_SEPARATOR EXPR_SEPARATOR
Constant for the comma separator.- ","
Constant for the unit separator.- ""
Renders all operators supported in Attribute Qualification prompts.
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
opFunction | default operator Id |
Renders all operators supported in Attribute Qualification prompts.
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
opFunction | default operator Id |
bUnitComparison | flag indicating whether unit comparison is enabled |
Renders all operators supported in Attribute Qualification prompts.
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
opFunction | default operator Id |
Renders a form list of a given attribute
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
att | attribute instance to be parsed in order to get its forms |
currentFormId | Form Id for given default value |
showFormsId | flag indicating whether to show form Ids |
Renders a form list of a given attribute
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
att | attribute instance to be parsed in order to get its forms |
currentFormId | Form Id for given default value |
Renders a form list of a given attribute
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
att | attribute instance to be parsed in order to get its forms |
currentFormId | Form Id for given default value |
showFormsId | flag indicating whether to show form Ids |
Renders a form list of a given attribute
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
att | attribute instance to be parsed in order to get its forms |
currentFormId | Form Id for given default value |
showFormsId | flag indicating whether to show form Ids |
hideIDForms | If this is true, then all ID forms will be removed, as long as the form is not selected, and there exists at least one non-id form. |
Renders an HTML option list of Metric qualification operators.
mo | where to write output |
---|---|
messages | instance for getting localized text |
opFunction | function to set as default value |
opFunctionType | function type |
bUnitComparison | flag indicating whether unit comparison is enabled or not |
Renders an HTML option list of Metric qualification operators.
mo | where to write output |
---|---|
messages | instance for getting localized text |
opFunction | function to set as default value |
opFunctionType | function type |
bUnitComparison | flag indicating whether unit comparison is enabled or not. |
bShowRankOperators | flag indicating whether or not to show rank operators |
Renders an HTML option list of Metric qualification operators.
mo | where to write output |
---|---|
messages | instance for getting localized text |
opFunction | function to set as default value |
Renders all the different types of Prompt Operators as options of a list
mo | MarkupOutput |
---|---|
messages | Messages |
opFunction | int |
bShowMetricOps | boolean |
bShowSAPOperators | boolean |
Renders all the different types of Prompt Operators as options of a list
mo | MarkupOutput |
---|---|
messages | Messages |
opFunction | int |
bShowMetricOps | boolean |
Renders all operators supported by the Prompts feature.
mo | where to write output |
---|---|
messages | instance used for getting localized texts |
opFunction | default operator Id |
bShowMetricOps | flag indicating whether to show metric operators or not. |
Renders all the different types of Prompt Operators as options of a list
mo | MarkupOutput |
---|---|
messages | Messages |
restrictedOperator | int |
Renders all attribute forms defined in Workingset realm
mo | where to write output |
---|---|
ws | Workingset instance |
currentAttId | active default attribute Id |
currentFormId | active default form Id |
Renders metrics defined in Workingset realm
mo | where to write output |
---|---|
ws | Workingset instance |
currentMetricID | default value |
Returns the string used to display an attribute form to the end user. based on the specified arguments. This method shows the attribute's name followed by the attribute form enclosed in parenthesis.
attName | Attribute's name |
---|---|
formName | Attribute form's name. |
Returns the string used by some event-handlers to identify an attribute form
based on the specified arguments. This string can then be used as the
value of an <INPUT>
tag to submit it in a form.
attId | Attribute id |
---|---|
formId | Form-id |
formDataType | Form's data-type |
attName | Attribute name |
formName | Form name |
Returns the string used by some event-handlers to identify an attribute form
when there can only be a single attribute in the request.
This string can then be used as the
value of an <INPUT>
tag to submit it in a form.
formId | Form-id |
---|---|
formDataType | Form's data-type |
formName | Form name |
Returns the string used by some event-handlers to identify an attribute
based on the specified arguments. This string can then be used as the
value of an <INPUT>
tag to submit it in a form.
attId | Attribute id |
---|---|
attName | Attribute name |
Returns the string used by some event-handlers to identify an object-info
based on the specified arguments. This string can then be used as the
value of an <INPUT>
tag to submit it in a form.
id | object-id |
---|---|
type | object-type |
name | object-name |
Gets the children nodes of the DssXmlNodeConstant
type from the operator node
and returns the constant value as text
node | the operator node |
---|---|
messages | object for retrieving localized messages |
Gets the children nodes of the DssXmlNodeConstant
type from the operator node
and returns the constant value as text.
It uses the locale to return its localized value.
node | the operator node |
---|---|
messages | object for retrieving localized messages |
locale | language |
Gets the first child node from the operator node and returns the object as a String
:
node | the operator node, i.e the subexpression node |
---|
Returns the corresponding operator text associated with the operator Id.
operatorId | Function Id |
---|---|
messages | instance for getting localized messages |
Checks if the node has dimensionality (Dimty), and if so, if it's empty.
node | The node to check. |
---|
Determines whether the current answer is complex or not.
True
if answer is complex.Returns whether the given filter expression is empty.
expr | The expression to evaluate. |
---|
Checks if a single subexpression is Complex. An expression
is complex if it cannot be created using the Web interface.
This is used by ExpressionPrompts transforms to determine if the Answer is Complex.
node | the root node of the subexpression to check |
---|
Returns the localized value for the specified date or number
value | string to be localized |
---|---|
dataType | value dataType |
locale | language being used as locale |
Renders debugging information for a given Filter instance
out | where to write output |
---|---|
filter | Filter instance to be parsed |
indent | text used as indent character |
Gets the operator's name based on the operator's id and type
operatorId | int |
---|---|
operatorType | int |
messages | Messages |