com.microstrategy.web.beans.ExpressionBean |
![]() |
The ExpressionBean interface represents a bean which can be used to edit an expression. It can represent either filter of a report, and can also represent an expression prompt. It has a state variable, ExpressionEditMode, which tells whether the ExpressionBean is in an editing mode or not. If the mode is Default, then it is not in editing mode.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
acceptChange()
Accepts the change that is currently being worked upon.
| ||||||||||
abstract boolean |
canSelectElements(WebAttribute webAttribute)
Returns true if Select Elements option can be used for the attribute
| ||||||||||
abstract WebAttributeForm | chooseDefaultForm(WebAttribute attr) | ||||||||||
abstract WebObjectInfo |
getActiveObject()
Returns the active object, the object being qualified upon.
| ||||||||||
abstract int |
getActiveOperatorNodeKey()
Returns the current active operator node key.
| ||||||||||
abstract WebElementSource |
getElementSource(WebAttribute att)
Returns properly initialized element source for a given attribute.
| ||||||||||
abstract WebExpression |
getExpression()
Returns the internal expression object.
| ||||||||||
abstract int |
getExpressionBeanType()
Returns the expression bean type, from
EnumExpressionBeanType . | ||||||||||
abstract int |
getExpressionEditMode()
Returns the current expression edit mode of the bean, from
EnumExpressionEditMode . | ||||||||||
abstract Scrollable |
getIncrementalFetch()
Returns a
Scrollable interface, which can be used to set
the incremental fetch window for an attribute elements qualification. | ||||||||||
abstract boolean |
getMatchCase()
Returns the match case flag, used in searching element browsing request.
| ||||||||||
abstract WebObjectInfo |
getRHS()
Returns the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison
| ||||||||||
abstract String |
getUserSearchPattern()
Returns the search pattern that will be applied to any element browsing request.
| ||||||||||
abstract WebBeanError |
getValidationErrorInfo()
This can hold a validation error which came about from the validate call.
| ||||||||||
abstract boolean |
isEditable()
Returns whether the Expression bean is editable.
| ||||||||||
abstract boolean |
isEditable(WebNode node)
Returns whether the given node can be edited properly under the current context of the
application.
| ||||||||||
abstract boolean |
isModified()
Returns whether this filter is modified from the filter object that it synchronizes
with.
| ||||||||||
abstract void | populateObject(WebObjectInfo oi) | ||||||||||
abstract void |
resetChanges()
Undoes all changes since the last synchronize call.
| ||||||||||
abstract void |
setActiveOperatorNodeKey(int key, boolean isNew)
Sets the current active operator node key.
| ||||||||||
abstract void |
setContext(ExpressionBeanContext context)
Sets the
ExpressionBeanContext . | ||||||||||
abstract void |
setExpressionEditMode(int mode)
Sets the current expression edit mode of the bean, from
EnumExpressionEditMode . | ||||||||||
abstract void |
setIsEditable(boolean value)
Sets whether the expression bean is editable.
| ||||||||||
abstract void |
setMatchCase(boolean matchCase)
Sets the match case flag, which determines whether the user search pattern must
match case or not.
| ||||||||||
abstract void |
setRHS(WebObjectInfo rhs)
Set the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison
| ||||||||||
abstract void |
setUserSearchPattern(String pattern)
Sets the search pattern that will be applied to any element browsing request.
| ||||||||||
abstract void | setValidationErrorInfo(WebBeanError err) | ||||||||||
abstract boolean |
shallSelectElements(WebAttribute webAttribute)
This method is used to decide what Attribute subexpression to create in a given context.
| ||||||||||
abstract void |
synchronize()
Synchronizes any changes that have been made to this expression to the owner expression
accessible on the WebReportInstance or WebPrompt object.
| ||||||||||
abstract void |
undoChange()
Undoes the change that is currently being worked upon.
| ||||||||||
abstract boolean |
validate()
Attempts to perform validation on the expression.
| ||||||||||
abstract boolean |
validateOperands(WebNode node)
Returns whether the given node and its children are valid.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Accepts the change that is currently being worked upon. The mode is set back to Default, and the active object and active operator node are set to null. This effectively makes the expression such that the undoChange method no longer does anything - it effectively means that the user accepted the single change they made.
Returns true if Select Elements option can be used for the attribute
webAttribute | attribute |
---|
IndexOutOfBoundsException | |
---|---|
WebBeanException | |
WebException | |
WebObjectsException |
Returns the active object, the object being qualified upon. This will be null if the mode is SelectUnit or Default, or if the active operator node is set incorrectly.
Returns the current active operator node key. Note that this will not be a valid value if the mode is SelectUnit or Default.
Returns properly initialized element source for a given attribute.
att | attribute |
---|
WebObjectsException | |
WebBeanException | |
WebBeanException | |
WebObjectsException |
Returns the internal expression object. This expression can be used to make changes to the structure of the expression.
WebExpression
representing the expression being edited.
Returns the expression bean type, from EnumExpressionBeanType
.
EnumExpressionBeanType
.
Returns the current expression edit mode of the bean, from EnumExpressionEditMode
.
This represents the current state of the bean.
EnumExpressionEditMode
.
Returns a Scrollable
interface, which can be used to set
the incremental fetch window for an attribute elements qualification.
Scrollable
object, which refers to the incremental fetch window.
Returns the match case flag, used in searching element browsing request.
Returns the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison
Returns the search pattern that will be applied to any element browsing request.
This can hold a validation error which came about from the validate call.
Returns whether the Expression bean is editable.
Returns whether the given node can be edited properly under the current context of the application. If this is false, then the expression should be kept as-is in the current expression context, only allowing moving and removal of the expression. Note that this does not indicate that the subexpression is invalid; instead, it only checks whether it is possible to edit the subexpression in the current context.
node | The WebNode object which is being checked. |
---|
Returns whether this filter is modified from the filter object that it synchronizes with. For example, if the filter has changed from the base filter on the WebReportInstance object exposed on a parent Report Bean. Calling synchronize or undo will re-baseline, setting isModified back to false.
Undoes all changes since the last synchronize call. This method will ensure that the edit mode of the bean is default, and that all non-synchronized changes are undone, even if they were accepted previously via acceptChange.
Sets the current active operator node key. The isNew variable must be passed in correctly - if the node is newly created, isNew should be true, if it already existed before this edit operation, it should be false. If isNew is incorrect, then the undoChange method will not work properly.
key | The key of the current active operator node key. |
---|---|
isNew | Whether the active operator node key is new or existing. |
Sets the ExpressionBeanContext
. If this is set, then the expression bean will obtain the original
expression that is being edited from that context.
context | The context to use to obtain the expression to be edited/displayed. |
---|
Sets the current expression edit mode of the bean, from EnumExpressionEditMode
. Note
that this operation is only valid if moving between SelectUnit and Default, or from
one node editing mode to another.
mode | The mode to change to, from EnumExpressionEditMode .
|
---|
Sets whether the expression bean is editable.
value | True if the expression bean should be editable, false otherwise. |
---|
Sets the match case flag, which determines whether the user search pattern must match case or not.
matchCase | The new value of the match case flag. |
---|
Set the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison
rhs | the RHS unit(attribute form/metric) |
---|
Sets the search pattern that will be applied to any element browsing request.
pattern | The user search pattern to use for element browsing. |
---|
This method is used to decide what Attribute subexpression to create in a given context. It returns true if getting list of available elements for a given attribute will be chip, for example because corresponding data set is already executed and cached.
Synchronizes any changes that have been made to this expression to the owner expression accessible on the WebReportInstance or WebPrompt object. This effectively means that the reset operation will no longer do anything, and that something should be done to the owner object to submit the synchronized expression to the Intelligence Server. Note that if this bean is not in Default mode, then what is synchronized is the version of the tree excluding the changes that were made to the active operator node. The changes to the active operator node are not lost, but are not propagated to the main expression either. This method will not change the edit mode of the bean.
Undoes the change that is currently being worked upon. If the state is Default, then nothing happens. If the state is SelectUnit, it is set back to default. Otherwise, any changes made to the active operator node or it's children since the editing operation began are undone, either by removing the active operator node (if it is new) or by rolling its state back to the state it was in when it was set as the active operator node. This will also set the mode back to default.
Attempts to perform validation on the expression. Returns false and sets the validation error (retrievable via the getValidationErrorInfo} method.
Returns whether the given node and its children are valid. The primary use of this is to ensure that the given node is valid within the given RW context.
node | The WebNode object which will be validated. If null is passed, then
the validation will start at the root. Note that all children will be validated as well. |
---|