public abstract class

AbstractLimitExpressionBean

extends AbstractWebComponent
implements ExpressionBean LimitExpressionBean RequestPersistable WebBean
java.lang.Object
   ↳ com.microstrategy.utils.serialization.AbstractPersistable
     ↳ com.microstrategy.web.beans.AbstractTransformable
       ↳ com.microstrategy.web.beans.AbstractWebComponent
         ↳ com.microstrategy.web.beans.AbstractLimitExpressionBean

Summary

Constants
String ATTRIBUTE_BEAN_HEADER
String ATT_BEAN_TYPE
String ATT_HOW_MUCH_STATE
String DATA_EXPLORER_BEAN_HEADER
String DELIMITOR
String DOCUMENT_BEAN_HEADER
String EXPRESSION_BEAN_HEADER
String FILTER_BEAN_HEADER
String FOLDER_BEAN_HEADER
String INBOX_BEAN_HEADER
String PERFORMANCE_MONITOR_BEAN_HEADER
String PROMPTDEF_BEAN_HEADER
String PROMPTS_BEAN_HEADER
String REPORT_BEAN_HEADER
String RW_BEAN_HEADER
String SEPARATOR
[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Fields
protected boolean _hasCollectedData A flag indicating that the XML request to collect data has been executed
protected int _status
[Expand]
Inherited Fields
From class com.microstrategy.web.beans.AbstractWebComponent
From class com.microstrategy.web.beans.AbstractTransformable
Public Methods
void acceptChange(WebNode node)
void acceptChange()
Accepts the change that is currently being worked upon.
void addToLimit(WebNode node)
boolean canSelectElements(WebAttribute webAttribute)
Returns true if Select Elements option can be used for the attribute
WebAttributeForm chooseDefaultForm(WebAttribute attr)
void collectData()
Triggers execution to the back end no matter whether it is synchronous or asynchronous.
void collectMinimalData()
This is similar to collectData() except data collected is minimal.
MarkupOutput generateOutput()
This is the generic method to ask the WebComponent to generate some output for the client.
WebObjectInfo getActiveObject()
Returns the active object, the object being qualified upon.
int getActiveOperatorNodeKey()
Returns the current active operator node key.
String getDescriptor(int key)
String getDescriptor(String key)
Document getDocument()
Returns a org.w3c.dom.Document parsed from the XML representation of this bean.
WebElementSource getElementSource(WebAttribute att)
Returns properly initialized element source for a given attribute.
WebBeanError getErrorInfo()
Returns a WebBeanError object indicating processing error during the collectData method call.
WebExpression getExpression()
Returns the internal expression object.
int getExpressionBeanType()
Returns the expression bean type, from EnumExpressionBeanType.
int getExpressionEditMode()
Returns the current expression edit mode of the bean, from EnumExpressionEditMode.
Scrollable getIncrementalFetch()
Returns a Scrollable interface, which can be used to set the incremental fetch window for an attribute elements qualification.
boolean getMatchCase()
Returns the match case flag, used in searching element browsing request.
int getOutputFormat()
Returns the output format of EnumBeanOutputFormat of the current WebComponent.
WebObjectInfo getRHS()
Returns the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison
WebSessionInfo getSessionInfo()
Returns the WebSessionInfo instance from this bean.
TransformInstance getTransformInstance(String key)
Returns the TransformInstance object with the specified key.
Enumeration getTransformInstances()
Retuns a java.util.Enumeration over all the TransformInstance objects.
int getType()
Returns the transformable type as in EnumWebTransformableType.
String getUserSearchPattern()
Returns the search pattern that will be applied to any element browsing request.
WebBeanError getValidationErrorInfo()
This can hold a validation error which came about from the validate call.
int getXMLStatus()
This method returns the EnumRequestStatus status of the current Component.
boolean hasConstantNodes(WebNode nd)
boolean hasTransform(String key)
Returns a boolean value indicating whether there is such a TransformInstance object with the specified key.
boolean hasTransform()
Returns a boolean value indicating whether there is a default TransformInstance object.
boolean isEditable()
Returns whether the Expression bean is editable.
boolean isEditable(WebNode node)
Returns whether the given node can be edited properly under the current context of the application.
boolean isModified()
Returns whether this filter is modified from the filter object that it synchronizes with.
boolean isStale()
Returns a boolean value indicating whether the content of this bean is stale.
void populateObject(WebObjectInfo oi)
void resetChanges()
Undoes all changes since the last synchronize call.
void setActiveOperatorNodeKey(int _key, boolean _isNew)
Sets the current active operator node key.
void setContext(ExpressionBeanContext ebc)
void setExpressionEditMode(int _editMode)
Sets the current expression edit mode of the bean, from EnumExpressionEditMode.
void setIsEditable(boolean value)
Sets whether the expression bean is editable.
void setMatchCase(boolean _matchCase)
Sets the match case flag, which determines whether the user search pattern must match case or not.
void setRHS(WebObjectInfo rhs)
Set the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison
void setSessionInfo(WebSessionInfo sessionInfo)
Sets a new WebSessionInfo instance on this bean.
void setStale(boolean stale)
Sets a flag indicating whether this bean is stale or fresh.
void setUserSearchPattern(String _searchPattern)
Sets the search pattern that will be applied to any element browsing request.
void setValidationErrorInfo(WebBeanError err)
void setWebEventHandler(WebEventHandler handler)
Associate with this component a WebEventHandler instance.
boolean shallSelectElements(WebAttribute webAttribute)
This method is used to decide what Attribute subexpression to create in a given context.
void synchronize()
Synchronizes any changes that have been made to this expression to the owner expression accessible on the WebReportInstance or WebPrompt object.
void undoChange()
Undoes the change that is currently being worked upon.
boolean validate()
Attempts to perform validation on the expression.
boolean validateOperands(WebNode node)
Returns whether the given node and its children are valid.
Protected Methods
void addAttDetails(WebAttribute attr)
TransformInstance addTransform(Transform transform, String key)
Adds a transform to itself and all the child beans which support the transform and returns a TransformInstance of the last child bean it was added to.
void checkBeanType(AttributesXt attrs, String expected)
void checkHowMuchState(AttributesXt attrs)
boolean disableElementsBrowsing(WebAttribute att)
void doCollectData()
Override this method in sub classes to implement the collectData method.
void doCollectMinimalData()
void doFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)
AbstractHandler getStateHandler()
WebObjectsFactory getWebObjectsFactory()
void internalCollectData(boolean collectOnError, boolean collectOnProcessing)
Overriding method should not only throw WebBeanException, but also sets error info if possible.
void internalCollectData()
This method internally calls the method collectData if the method collectData has not yet been called.
void internalCollectData(boolean collectOnError)
Overriding method should not only throw WebBeanException, but also sets error info if possible.
void invalidateAllTransformCaches()
boolean isTransformSuitable(Transform t)
This method is called in the addTransform methods.
BeanContext newDefaultBeanContext()
This method is called by getBeanContext() to automatically create an instance of a BeanContext if one has not been explicitly set.
WebEventHandler newDefaultEventHandler()
StyleRequestContext newStyleRequestContext()
void reset()
void saveXMLState(XMLStateSerializer stateBuilder, int howMuchState)
Saves the component state
void setEmptyListError()
void setErrorInfo(WebBeanError beanErr)
void setXMLStatus(int status)
boolean shallAddNode(WebNode node)
boolean validateMetricDatatypeAllowed(WebOperatorNode activeNode)
[Expand]
Inherited Methods
From class com.microstrategy.web.beans.AbstractWebComponent
From class com.microstrategy.web.beans.AbstractTransformable
From class com.microstrategy.utils.serialization.AbstractPersistable
From class java.lang.Object
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.beans.ExpressionBean
From interface com.microstrategy.web.beans.LimitExpressionBean
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebBean
From interface com.microstrategy.web.beans.WebComponent

Constants

protected static final String ATTRIBUTE_BEAN_HEADER

Constant Value: "attb"

protected static final String ATT_BEAN_TYPE

Constant Value: "bt"

protected static final String ATT_HOW_MUCH_STATE

Constant Value: "hms"

protected static final String DATA_EXPLORER_BEAN_HEADER

Constant Value: "deb"

protected static final String DELIMITOR

Constant Value: ";"

protected static final String DOCUMENT_BEAN_HEADER

Constant Value: "db"

protected static final String EXPRESSION_BEAN_HEADER

Constant Value: "eb"

protected static final String FILTER_BEAN_HEADER

Constant Value: "ftb"

protected static final String FOLDER_BEAN_HEADER

Constant Value: "fb"

protected static final String INBOX_BEAN_HEADER

Constant Value: "ib"

protected static final String PERFORMANCE_MONITOR_BEAN_HEADER

Constant Value: "pmb"

protected static final String PROMPTDEF_BEAN_HEADER

Constant Value: "pdb"

protected static final String PROMPTS_BEAN_HEADER

Constant Value: "pb"

protected static final String REPORT_BEAN_HEADER

Constant Value: "rb"

protected static final String RW_BEAN_HEADER

Constant Value: "rwb"

protected static final String SEPARATOR

Constant Value: ":"

Fields

protected boolean _hasCollectedData

A flag indicating that the XML request to collect data has been executed

protected int _status

Public Methods

public void acceptChange (WebNode node)

public void acceptChange ()

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.

public void addToLimit (WebNode node)

public boolean canSelectElements (WebAttribute webAttribute)

Returns true if Select Elements option can be used for the attribute

Parameters
webAttribute attribute
Returns
  • true if Select Elements option can be used for the attribute

public WebAttributeForm chooseDefaultForm (WebAttribute attr)

Throws
WebException
IndexOutOfBoundsException
WebBeanException
WebObjectsException

public void collectData ()

Triggers execution to the back end no matter whether it is synchronous or asynchronous. If this method fails to collect data, an exception is raised and saved in a WebBeanError instance.

public void collectMinimalData ()

This is similar to collectData() except data collected is minimal. This is essentially a check to ensure everything is ok, but that we don't need any data. After invoking this operation, see getXMLStatus() and getErrorInfo() for details.

public MarkupOutput generateOutput ()

This is the generic method to ask the WebComponent to generate some output for the client. The type of output should be determined by the OutputFormat property (setOutputFormat(int)).

Returns

public WebObjectInfo getActiveObject ()

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 active object of the expression.

public int getActiveOperatorNodeKey ()

Returns the current active operator node key. Note that this will not be a valid value if the mode is SelectUnit or Default.

Returns
  • The key of the operator node being edited.

public String getDescriptor (int key)

public String getDescriptor (String key)

public Document getDocument ()

Returns a org.w3c.dom.Document parsed from the XML representation of this bean.

Returns
  • the XML representation of this bean.

public WebElementSource getElementSource (WebAttribute att)

Returns properly initialized element source for a given attribute.

Parameters
att attribute
Returns
  • properly initialized element source for a given attribute.

public WebBeanError getErrorInfo ()

Returns a WebBeanError object indicating processing error during the collectData method call. Null is returned if there is no error.

Returns
  • a WebBeanError object; null if there is no error.

public WebExpression getExpression ()

Returns the internal expression object. This expression can be used to make changes to the structure of the expression.

Returns

public int getExpressionBeanType ()

Returns the expression bean type, from EnumExpressionBeanType.

Returns

public int getExpressionEditMode ()

Returns the current expression edit mode of the bean, from EnumExpressionEditMode. This represents the current state of the bean.

Returns

public Scrollable getIncrementalFetch ()

Returns a Scrollable interface, which can be used to set the incremental fetch window for an attribute elements qualification.

Returns
  • A Scrollable object, which refers to the incremental fetch window.

public boolean getMatchCase ()

Returns the match case flag, used in searching element browsing request.

Returns
  • The current value of the match case flag.

public int getOutputFormat ()

Returns the output format of EnumBeanOutputFormat of the current WebComponent.

Returns
  • the output format of this component.

public WebObjectInfo getRHS ()

Returns the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison

Returns
  • WebObjectInfo the RHS unit(attribute form/metric)

public WebSessionInfo getSessionInfo ()

Returns the WebSessionInfo instance from this bean. A WebSessionInfo object is where you can get or set the session ID to the intelligence server, user credentials and localization, etc.

Returns
  • a WebSessionInfo instance.

public TransformInstance getTransformInstance (String key)

Returns the TransformInstance object with the specified key.

Parameters
key the key of a TransformInstance.
Returns
  • the TransformInstance object with the specified key.

public Enumeration getTransformInstances ()

Retuns a java.util.Enumeration over all the TransformInstance objects.

Returns
  • a java.util.Enumeration over all the TransformInstance objects.

public int getType ()

Returns the transformable type as in EnumWebTransformableType.

Returns
  • the transformable type.

public String getUserSearchPattern ()

Returns the search pattern that will be applied to any element browsing request.

Returns
  • The current user search pattern for element browsing.

public WebBeanError getValidationErrorInfo ()

This can hold a validation error which came about from the validate call.

Returns
  • Any exception which came about from the validate call.

public int getXMLStatus ()

This method returns the EnumRequestStatus status of the current Component.

Returns

public boolean hasConstantNodes (WebNode nd)

public boolean hasTransform (String key)

Returns a boolean value indicating whether there is such a TransformInstance object with the specified key.

Parameters
key the key of a Transform
Returns
  • true if there is such a TransformInstance with the specified key.

public boolean hasTransform ()

Returns a boolean value indicating whether there is a default TransformInstance object.

Returns
  • true if there is a default transform.

public boolean isEditable ()

Returns whether the Expression bean is editable.

Returns
  • True if the bean is editable, false otherwise.

public boolean isEditable (WebNode node)

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.

Parameters
node The WebNode object which is being checked.
Returns
  • True if the expression can be edited as-is, false if it cannot.

public boolean isModified ()

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.

Returns
  • Whether the current expression has been modified.

public boolean isStale ()

Returns a boolean value indicating whether the content of this bean is stale.

Returns
  • true if this bean is stale.

public void populateObject (WebObjectInfo oi)

public void resetChanges ()

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.

public void setActiveOperatorNodeKey (int _key, boolean _isNew)

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.

Parameters
_key The key of the current active operator node key.
_isNew Whether the active operator node key is new or existing.

public void setContext (ExpressionBeanContext ebc)

Sets the ExpressionBeanContext. If this is set, then the expression bean will obtain the original expression that is being edited from that context.

Parameters
ebc The context to use to obtain the expression to be edited/displayed.

public void setExpressionEditMode (int _editMode)

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.

Parameters
_editMode The mode to change to, from EnumExpressionEditMode.

public void setIsEditable (boolean value)

Sets whether the expression bean is editable.

Parameters
value True if the expression bean should be editable, false otherwise.

public void setMatchCase (boolean _matchCase)

Sets the match case flag, which determines whether the user search pattern must match case or not.

Parameters
_matchCase The new value of the match case flag.

public void setRHS (WebObjectInfo rhs)

Set the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison

Parameters
rhs the RHS unit(attribute form/metric)

public void setSessionInfo (WebSessionInfo sessionInfo)

Sets a new WebSessionInfo instance on this bean. A WebSessionInfo object is where you can get or set the session ID to the intelligence server, user credentials and localization, etc.

Parameters
sessionInfo a WebSessionInfo instance.
Throws
IllegalArgumentException

public void setStale (boolean stale)

Sets a flag indicating whether this bean is stale or fresh.

Parameters
stale true if this bean is stale.

public void setUserSearchPattern (String _searchPattern)

Sets the search pattern that will be applied to any element browsing request.

Parameters
_searchPattern The user search pattern to use for element browsing.

public void setValidationErrorInfo (WebBeanError err)

public void setWebEventHandler (WebEventHandler handler)

Associate with this component a WebEventHandler instance.

A WebComponent has one to one relationship with a WebEventHandler instance. This method first removes any existing handler associated with this component, and then sets the new one on it.

This method calls the method setWebComponent(WebComponent). Therefore, the WebEventHandler implementator should be careful to avoid cyclic reference to each other between this component and the event handler.

Parameters
handler the WebEventHandler instance to set.

public boolean shallSelectElements (WebAttribute webAttribute)

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.

Returns
  • true if getting list of available elements for a given attribute will be chip

public void synchronize ()

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.

public void undoChange ()

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.

public boolean validate ()

Attempts to perform validation on the expression. Returns false and sets the validation error (retrievable via the getValidationErrorInfo} method.

Returns
  • Whether the validation has succeeded.

public boolean validateOperands (WebNode node)

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.

Parameters
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.
Returns
  • True if the expression is valid, false if it is not.

Protected Methods

protected void addAttDetails (WebAttribute attr)

protected TransformInstance addTransform (Transform transform, String key)

Adds a transform to itself and all the child beans which support the transform and returns a TransformInstance of the last child bean it was added to.

protected void checkBeanType (AttributesXt attrs, String expected)

Throws
IllegalArgumentException

protected void checkHowMuchState (AttributesXt attrs)

Throws
IllegalArgumentException
SAXSupportException

protected boolean disableElementsBrowsing (WebAttribute att)

protected void doCollectData ()

Override this method in sub classes to implement the collectData method.

protected void doCollectMinimalData ()

protected void doFlatState (FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)

protected AbstractHandler getStateHandler ()

protected WebObjectsFactory getWebObjectsFactory ()

protected void internalCollectData (boolean collectOnError, boolean collectOnProcessing)

Overriding method should not only throw WebBeanException, but also sets error info if possible.

Parameters
collectOnError will attempt to collect data even if object in in error.
collectOnProcessing will attempt to collect data even if object is in processing.

protected void internalCollectData ()

This method internally calls the method collectData if the method collectData has not yet been called. Otherwise it does nothing.

protected void internalCollectData (boolean collectOnError)

Overriding method should not only throw WebBeanException, but also sets error info if possible.

Parameters
collectOnError will attempt to collect data even if object in in error.

protected void invalidateAllTransformCaches ()

protected boolean isTransformSuitable (Transform t)

This method is called in the addTransform methods. It verifies that the passed transform is suitable for this object. Default implementation simply calls transform's supports method.

protected BeanContext newDefaultBeanContext ()

This method is called by getBeanContext() to automatically create an instance of a BeanContext if one has not been explicitly set.

protected WebEventHandler newDefaultEventHandler ()

protected StyleRequestContext newStyleRequestContext ()

protected void reset ()

protected void saveXMLState (XMLStateSerializer stateBuilder, int howMuchState)

Saves the component state

Parameters
stateBuilder a XMLStateSerializer object
howMuchState how much state to save (EnumWebPersistableState)

protected void setEmptyListError ()

protected void setErrorInfo (WebBeanError beanErr)

protected void setXMLStatus (int status)

protected boolean shallAddNode (WebNode node)

protected boolean validateMetricDatatypeAllowed (WebOperatorNode activeNode)