Package com.microstrategy.web.beans
Class AbstractLimitExpressionBean
- java.lang.Object
-
- com.microstrategy.utils.serialization.AbstractPersistable
-
- com.microstrategy.web.beans.AbstractTransformable
-
- com.microstrategy.web.beans.AbstractWebComponent
-
- com.microstrategy.web.beans.AbstractLimitExpressionBean
-
- All Implemented Interfaces:
EnumWebPersistableState
,Persistable
,ExpressionBean
,LimitExpressionBean
,RequestPersistable
,Transformable
,WebBean
,WebComponent
public abstract class AbstractLimitExpressionBean extends AbstractWebComponent implements LimitExpressionBean
- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_hasCollectedData
A flag indicating that the XML request to collect data has been executedprotected int
_status
protected static java.lang.String
ATT_BEAN_TYPE
protected static java.lang.String
ATT_HOW_MUCH_STATE
protected static java.lang.String
ATTRIBUTE_BEAN_HEADER
protected static java.lang.String
DATA_EXPLORER_BEAN_HEADER
protected static java.lang.String
DELIMITOR
protected static java.lang.String
DOCUMENT_BEAN_HEADER
protected static java.lang.String
EXPRESSION_BEAN_HEADER
protected static java.lang.String
FILTER_BEAN_HEADER
protected static java.lang.String
FOLDER_BEAN_HEADER
protected static java.lang.String
INBOX_BEAN_HEADER
protected static java.lang.String
PERFORMANCE_MONITOR_BEAN_HEADER
protected static java.lang.String
PROMPTDEF_BEAN_HEADER
protected static java.lang.String
PROMPTS_BEAN_HEADER
protected static java.lang.String
REPORT_BEAN_HEADER
protected static java.lang.String
RW_BEAN_HEADER
protected static java.lang.String
SEPARATOR
-
Fields inherited from class com.microstrategy.web.beans.AbstractWebComponent
_features, _hasJustOpened
-
Fields inherited from class com.microstrategy.web.beans.AbstractTransformable
_beanContext
-
Fields inherited from class com.microstrategy.utils.serialization.AbstractPersistable
scriptEndTagEncoder
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptChange()
Accepts the change that is currently being worked upon.void
acceptChange(WebNode node)
protected void
addAttDetails(WebAttribute attr)
void
addToLimit(WebNode node)
protected TransformInstance
addTransform(Transform transform, java.lang.String key)
Adds a transform to itself and all the child beans which support the transform and returns aTransformInstance
of the last child bean it was added to.boolean
canSelectElements(WebAttribute webAttribute)
Returns true if Select Elements option can be used for the attributeprotected void
checkBeanType(AttributesXt attrs, java.lang.String expected)
protected void
checkHowMuchState(AttributesXt attrs)
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 toWebComponent.collectData()
except data collected is minimal.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)
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.java.lang.String
getDescriptor(int key)
java.lang.String
getDescriptor(java.lang.String key)
org.w3c.dom.Document
getDocument()
Returns aorg.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 aWebBeanError
object indicating processing error during thecollectData
method call.WebExpression
getExpression()
Returns the internal expression object.int
getExpressionBeanType()
Returns the expression bean type, fromEnumExpressionBeanType
.int
getExpressionEditMode()
Returns the current expression edit mode of the bean, fromEnumExpressionEditMode
.Scrollable
getIncrementalFetch()
Returns aScrollable
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 ofEnumBeanOutputFormat
of the current WebComponent.WebObjectInfo
getRHS()
Returns the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparisonWebSessionInfo
getSessionInfo()
Returns theWebSessionInfo
instance from this bean.protected AbstractHandler
getStateHandler()
TransformInstance
getTransformInstance(java.lang.String key)
Returns theTransformInstance
object with the specified key.java.util.Enumeration
getTransformInstances()
Retuns ajava.util.Enumeration
over all theTransformInstance
objects.int
getType()
Returns the transformable type as inEnumWebTransformableType
.java.lang.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.protected WebObjectsFactory
getWebObjectsFactory()
int
getXMLStatus()
This method returns theEnumRequestStatus
status of the current Component.boolean
hasConstantNodes(WebNode nd)
boolean
hasTransform()
Returns a boolean value indicating whether there is a defaultTransformInstance
object.boolean
hasTransform(java.lang.String key)
Returns a boolean value indicating whether there is such aTransformInstance
object with the specified key.protected void
internalCollectData()
This method internally calls the method collectData if the method collectData has not yet been called.protected void
internalCollectData(boolean collectOnError)
Overriding method should not only throwWebBeanException
, but also sets error info if possible.protected void
internalCollectData(boolean collectOnError, boolean collectOnProcessing)
Overriding method should not only throwWebBeanException
, but also sets error info if possible.protected void
invalidateAllTransformCaches()
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.protected boolean
isTransformSuitable(Transform t)
This method is called in the addTransform methods.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()
void
populateObject(WebObjectInfo oi)
protected void
reset()
void
resetChanges()
Undoes all changes since the last synchronize call.protected void
saveXMLState(XMLStateSerializer stateBuilder, int howMuchState)
Saves the component statevoid
setActiveOperatorNodeKey(int _key, boolean _isNew)
Sets the current active operator node key.void
setContext(ExpressionBeanContext ebc)
Sets theExpressionBeanContext
.protected void
setEmptyListError()
protected void
setErrorInfo(WebBeanError beanErr)
void
setExpressionEditMode(int _editMode)
Sets the current expression edit mode of the bean, fromEnumExpressionEditMode
.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 comparisonvoid
setSessionInfo(WebSessionInfo sessionInfo)
Sets a newWebSessionInfo
instance on this bean.void
setStale(boolean stale)
Sets a flag indicating whether this bean is stale or fresh.void
setUserSearchPattern(java.lang.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 aWebEventHandler
instance.protected void
setXMLStatus(int status)
protected boolean
shallAddNode(WebNode node)
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.protected boolean
validateMetricDatatypeAllowed(WebOperatorNode activeNode)
boolean
validateOperands(WebNode node)
Returns whether the given node and its children are valid.-
Methods inherited from class com.microstrategy.web.beans.AbstractWebComponent
addChild, addChildStateInfo, addChildStateInfo, addChildStateInfo, addChildStateInfo, addChildStateInfo, addStateInfo, childValues, clearChildren, clearStateCache, getCachedState, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, handleRequest, hasChanged, hasJustOpened, haveChildrenChanged, initBean, invalidateChildrenState, isBeanContextEmpty, isChangeComparisonFlagSet, isFeatureAvailable, prepareForReuse, removeChild, removeChild, restoreState, restoreStateFromRequest, restoreStateFromRequest, saveXMLState, saveXMLState, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setStateCache, setTargetBean, setTargetBeanPath
-
Methods inherited from class com.microstrategy.web.beans.AbstractTransformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, createTransformInstance, createTransformInstance, getBeanContext, getDefaultTransform, getMessageString, getMyTransformInstances, getTransformInstance, invalidateTransformCache, transform, transform, transform, transform
-
Methods inherited from class com.microstrategy.utils.serialization.AbstractPersistable
doFlatState, isXMLStateZipped, restoreState, restoreXMLState, saveState, saveState, saveState, saveState, saveXMLState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.beans.ExpressionBean
canSelectElements, chooseDefaultForm, getActiveObject, getActiveOperatorNodeKey, getElementSource, getExpressionBeanType, getExpressionEditMode, getIncrementalFetch, getMatchCase, getRHS, getUserSearchPattern, getValidationErrorInfo, isEditable, isEditable, populateObject, resetChanges, setActiveOperatorNodeKey, setContext, setExpressionEditMode, setIsEditable, setMatchCase, setRHS, setUserSearchPattern, setValidationErrorInfo, shallSelectElements, synchronize, undoChange, validate, validateOperands
-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest
-
Methods inherited from interface com.microstrategy.web.beans.Transformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, getBeanContext, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, getType, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform
-
Methods inherited from interface com.microstrategy.web.beans.WebBean
getDocument, getErrorInfo, getSessionInfo, isStale, setSessionInfo, setStale
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, addChildStateInfo, addChildStateInfo, collectData, collectMinimalData, generateOutput, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, getXMLStatus, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Field Detail
-
FOLDER_BEAN_HEADER
protected static final java.lang.String FOLDER_BEAN_HEADER
- See Also:
- Constant Field Values
-
REPORT_BEAN_HEADER
protected static final java.lang.String REPORT_BEAN_HEADER
- See Also:
- Constant Field Values
-
PROMPTS_BEAN_HEADER
protected static final java.lang.String PROMPTS_BEAN_HEADER
- See Also:
- Constant Field Values
-
DOCUMENT_BEAN_HEADER
protected static final java.lang.String DOCUMENT_BEAN_HEADER
- See Also:
- Constant Field Values
-
INBOX_BEAN_HEADER
protected static final java.lang.String INBOX_BEAN_HEADER
- See Also:
- Constant Field Values
-
DATA_EXPLORER_BEAN_HEADER
protected static final java.lang.String DATA_EXPLORER_BEAN_HEADER
- See Also:
- Constant Field Values
-
RW_BEAN_HEADER
protected static final java.lang.String RW_BEAN_HEADER
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
EXPRESSION_BEAN_HEADER
protected static final java.lang.String EXPRESSION_BEAN_HEADER
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
FILTER_BEAN_HEADER
protected static final java.lang.String FILTER_BEAN_HEADER
- See Also:
- Constant Field Values
-
PROMPTDEF_BEAN_HEADER
protected static final java.lang.String PROMPTDEF_BEAN_HEADER
- See Also:
- Constant Field Values
-
ATTRIBUTE_BEAN_HEADER
protected static final java.lang.String ATTRIBUTE_BEAN_HEADER
- See Also:
- Constant Field Values
-
PERFORMANCE_MONITOR_BEAN_HEADER
protected static final java.lang.String PERFORMANCE_MONITOR_BEAN_HEADER
- Since:
- MicroStrategy Web 7.5.0
- See Also:
- Constant Field Values
-
DELIMITOR
protected static final java.lang.String DELIMITOR
- See Also:
- Constant Field Values
-
SEPARATOR
protected static final java.lang.String SEPARATOR
- See Also:
- Constant Field Values
-
ATT_BEAN_TYPE
protected static final java.lang.String ATT_BEAN_TYPE
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
ATT_HOW_MUCH_STATE
protected static final java.lang.String ATT_HOW_MUCH_STATE
- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
_status
protected int _status
-
_hasCollectedData
protected boolean _hasCollectedData
A flag indicating that the XML request to collect data has been executed
-
-
Method Detail
-
getExpression
public WebExpression getExpression()
Description copied from interface:ExpressionBean
Returns the internal expression object. This expression can be used to make changes to the structure of the expression.- Specified by:
getExpression
in interfaceExpressionBean
- Returns:
- A
WebExpression
representing the expression being edited.
-
acceptChange
public void acceptChange()
Description copied from interface:ExpressionBean
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.- Specified by:
acceptChange
in interfaceExpressionBean
-
acceptChange
public void acceptChange(WebNode node)
-
shallAddNode
protected boolean shallAddNode(WebNode node)
-
addToLimit
public void addToLimit(WebNode node)
- Specified by:
addToLimit
in interfaceLimitExpressionBean
-
isModified
public boolean isModified()
Description copied from interface:ExpressionBean
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.- Specified by:
isModified
in interfaceExpressionBean
- Returns:
- Whether the current expression has been modified.
-
getExpressionBeanType
public int getExpressionBeanType()
Description copied from interface:ExpressionBean
Returns the expression bean type, fromEnumExpressionBeanType
.- Specified by:
getExpressionBeanType
in interfaceExpressionBean
- Returns:
- The expression bean type, from
EnumExpressionBeanType
.
-
getOutputFormat
public int getOutputFormat()
Description copied from class:AbstractWebComponent
Returns the output format ofEnumBeanOutputFormat
of the current WebComponent.- Specified by:
getOutputFormat
in interfaceWebComponent
- Overrides:
getOutputFormat
in classAbstractWebComponent
- Returns:
- the output format of this component.
-
populateObject
public void populateObject(WebObjectInfo oi) throws WebBeanException
- Specified by:
populateObject
in interfaceExpressionBean
- Throws:
WebBeanException
- Since:
- MicroStrategy Web 8.0.2
-
setSessionInfo
public void setSessionInfo(WebSessionInfo sessionInfo) throws java.lang.IllegalArgumentException
Description copied from interface:WebBean
Sets a newWebSessionInfo
instance on this bean. AWebSessionInfo
object is where you can get or set the session ID to the intelligence server, user credentials and localization, etc.- Specified by:
setSessionInfo
in interfaceWebBean
- Parameters:
sessionInfo
- aWebSessionInfo
instance.- Throws:
java.lang.IllegalArgumentException
-
setRHS
public void setRHS(WebObjectInfo rhs)
Description copied from interface:ExpressionBean
Set the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison- Specified by:
setRHS
in interfaceExpressionBean
- Parameters:
rhs
- the RHS unit(attribute form/metric)
-
getRHS
public WebObjectInfo getRHS()
Description copied from interface:ExpressionBean
Returns the unit(attribute form/metric) used on the Right Hand Side(RHS) of the filter comparison- Specified by:
getRHS
in interfaceExpressionBean
- Returns:
- WebObjectInfo the RHS unit(attribute form/metric)
-
newDefaultEventHandler
protected WebEventHandler newDefaultEventHandler()
- Overrides:
newDefaultEventHandler
in classAbstractWebComponent
-
getWebObjectsFactory
protected WebObjectsFactory getWebObjectsFactory()
-
getExpressionEditMode
public int getExpressionEditMode()
Description copied from interface:ExpressionBean
Returns the current expression edit mode of the bean, fromEnumExpressionEditMode
. This represents the current state of the bean.- Specified by:
getExpressionEditMode
in interfaceExpressionBean
- Returns:
- The current expression edit mode of the bean, from
EnumExpressionEditMode
.
-
setExpressionEditMode
public void setExpressionEditMode(int _editMode)
Description copied from interface:ExpressionBean
Sets the current expression edit mode of the bean, fromEnumExpressionEditMode
. Note that this operation is only valid if moving between SelectUnit and Default, or from one node editing mode to another.- Specified by:
setExpressionEditMode
in interfaceExpressionBean
- Parameters:
_editMode
- The mode to change to, fromEnumExpressionEditMode
.
-
getActiveOperatorNodeKey
public int getActiveOperatorNodeKey()
Description copied from interface:ExpressionBean
Returns the current active operator node key. Note that this will not be a valid value if the mode is SelectUnit or Default.- Specified by:
getActiveOperatorNodeKey
in interfaceExpressionBean
- Returns:
- The key of the operator node being edited.
-
setActiveOperatorNodeKey
public void setActiveOperatorNodeKey(int _key, boolean _isNew)
Description copied from interface:ExpressionBean
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.- Specified by:
setActiveOperatorNodeKey
in interfaceExpressionBean
- Parameters:
_key
- The key of the current active operator node key._isNew
- Whether the active operator node key is new or existing.
-
getActiveObject
public WebObjectInfo getActiveObject()
Description copied from interface:ExpressionBean
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.- Specified by:
getActiveObject
in interfaceExpressionBean
- Returns:
- The active object of the expression.
-
getUserSearchPattern
public java.lang.String getUserSearchPattern()
Description copied from interface:ExpressionBean
Returns the search pattern that will be applied to any element browsing request.- Specified by:
getUserSearchPattern
in interfaceExpressionBean
- Returns:
- The current user search pattern for element browsing.
-
setUserSearchPattern
public void setUserSearchPattern(java.lang.String _searchPattern)
Description copied from interface:ExpressionBean
Sets the search pattern that will be applied to any element browsing request.- Specified by:
setUserSearchPattern
in interfaceExpressionBean
- Parameters:
_searchPattern
- The user search pattern to use for element browsing.
-
getMatchCase
public boolean getMatchCase()
Description copied from interface:ExpressionBean
Returns the match case flag, used in searching element browsing request.- Specified by:
getMatchCase
in interfaceExpressionBean
- Returns:
- The current value of the match case flag.
-
setMatchCase
public void setMatchCase(boolean _matchCase)
Description copied from interface:ExpressionBean
Sets the match case flag, which determines whether the user search pattern must match case or not.- Specified by:
setMatchCase
in interfaceExpressionBean
- Parameters:
_matchCase
- The new value of the match case flag.
-
validateMetricDatatypeAllowed
protected boolean validateMetricDatatypeAllowed(WebOperatorNode activeNode)
-
validate
public boolean validate()
Description copied from interface:ExpressionBean
Attempts to perform validation on the expression. Returns false and sets the validation error (retrievable via the getValidationErrorInfo} method.- Specified by:
validate
in interfaceExpressionBean
- Returns:
- Whether the validation has succeeded.
-
setEmptyListError
protected void setEmptyListError()
-
undoChange
public void undoChange()
Description copied from interface:ExpressionBean
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.- Specified by:
undoChange
in interfaceExpressionBean
-
synchronize
public void synchronize()
Description copied from interface:ExpressionBean
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.- Specified by:
synchronize
in interfaceExpressionBean
-
resetChanges
public void resetChanges()
Description copied from interface:ExpressionBean
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.- Specified by:
resetChanges
in interfaceExpressionBean
-
getType
public int getType()
Description copied from interface:Transformable
Returns the transformable type as inEnumWebTransformableType
.- Specified by:
getType
in interfaceTransformable
- Returns:
- the transformable type.
-
reset
protected void reset()
-
doCollectData
protected void doCollectData() throws WebBeanException
Override this method in sub classes to implement the collectData method.- Throws:
WebBeanException
-
addAttDetails
protected void addAttDetails(WebAttribute attr) throws WebObjectsException
- Throws:
WebObjectsException
-
disableElementsBrowsing
protected boolean disableElementsBrowsing(WebAttribute att)
-
doFlatState
protected void doFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)
-
saveXMLState
protected void saveXMLState(XMLStateSerializer stateBuilder, int howMuchState)
Description copied from class:AbstractWebComponent
Saves the component state- Parameters:
stateBuilder
- aXMLStateSerializer
objecthowMuchState
- how much state to save (EnumWebPersistableState
)
-
getStateHandler
protected AbstractHandler getStateHandler()
-
getDocument
public org.w3c.dom.Document getDocument() throws WebBeanException
Description copied from interface:WebBean
Returns aorg.w3c.dom.Document
parsed from the XML representation of this bean.- Specified by:
getDocument
in interfaceWebBean
- Returns:
- the XML representation of this bean.
- Throws:
WebBeanException
- thrown if there is error when collecting data for this bean.
-
getValidationErrorInfo
public WebBeanError getValidationErrorInfo()
Description copied from interface:ExpressionBean
This can hold a validation error which came about from the validate call.- Specified by:
getValidationErrorInfo
in interfaceExpressionBean
- Returns:
- Any exception which came about from the validate call.
-
setValidationErrorInfo
public void setValidationErrorInfo(WebBeanError err)
- Specified by:
setValidationErrorInfo
in interfaceExpressionBean
-
getIncrementalFetch
public Scrollable getIncrementalFetch()
Description copied from interface:ExpressionBean
Returns aScrollable
interface, which can be used to set the incremental fetch window for an attribute elements qualification.- Specified by:
getIncrementalFetch
in interfaceExpressionBean
- Returns:
- A
Scrollable
object, which refers to the incremental fetch window.
-
hasConstantNodes
public boolean hasConstantNodes(WebNode nd)
-
getElementSource
public WebElementSource getElementSource(WebAttribute att) throws WebObjectsException, WebBeanException
Description copied from interface:ExpressionBean
Returns properly initialized element source for a given attribute.- Specified by:
getElementSource
in interfaceExpressionBean
- Parameters:
att
- attribute- Returns:
- properly initialized element source for a given attribute.
- Throws:
WebObjectsException
WebBeanException
-
validateOperands
public boolean validateOperands(WebNode node)
Description copied from interface:ExpressionBean
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.- Specified by:
validateOperands
in interfaceExpressionBean
- Parameters:
node
- TheWebNode
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.
- Since:
- MicroStrategy Web 8.0.1
-
isEditable
public boolean isEditable(WebNode node)
Description copied from interface:ExpressionBean
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.- Specified by:
isEditable
in interfaceExpressionBean
- Parameters:
node
- TheWebNode
object which is being checked.- Returns:
- True if the expression can be edited as-is, false if it cannot.
- Since:
- MicroStrategy Web 8.0.1
-
isEditable
public boolean isEditable()
Description copied from interface:ExpressionBean
Returns whether the Expression bean is editable.- Specified by:
isEditable
in interfaceExpressionBean
- Returns:
- True if the bean is editable, false otherwise.
- Since:
- MicroStrategy Web 8.0.2
-
setIsEditable
public void setIsEditable(boolean value)
Description copied from interface:ExpressionBean
Sets whether the expression bean is editable.- Specified by:
setIsEditable
in interfaceExpressionBean
- Parameters:
value
- True if the expression bean should be editable, false otherwise.- Since:
- MicroStrategy Web 8.0.2
-
setContext
public void setContext(ExpressionBeanContext ebc)
Description copied from interface:ExpressionBean
Sets theExpressionBeanContext
. If this is set, then the expression bean will obtain the original expression that is being edited from that context.- Specified by:
setContext
in interfaceExpressionBean
- Parameters:
ebc
- The context to use to obtain the expression to be edited/displayed.
-
canSelectElements
public boolean canSelectElements(WebAttribute webAttribute)
Description copied from interface:ExpressionBean
Returns true if Select Elements option can be used for the attribute- Specified by:
canSelectElements
in interfaceExpressionBean
- Parameters:
webAttribute
- attribute- Returns:
- true if Select Elements option can be used for the attribute
-
shallSelectElements
public boolean shallSelectElements(WebAttribute webAttribute)
Description copied from interface:ExpressionBean
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.- Specified by:
shallSelectElements
in interfaceExpressionBean
- Returns:
- true if getting list of available elements for a given attribute will be chip
-
chooseDefaultForm
public WebAttributeForm chooseDefaultForm(WebAttribute attr) throws WebException, java.lang.IndexOutOfBoundsException, WebBeanException, WebObjectsException
- Specified by:
chooseDefaultForm
in interfaceExpressionBean
- Throws:
WebException
java.lang.IndexOutOfBoundsException
WebBeanException
WebObjectsException
-
getErrorInfo
public WebBeanError getErrorInfo()
Description copied from interface:WebBean
Returns aWebBeanError
object indicating processing error during thecollectData
method call. Null is returned if there is no error.- Specified by:
getErrorInfo
in interfaceWebBean
- Returns:
- a
WebBeanError
object; null if there is no error.
-
setErrorInfo
protected void setErrorInfo(WebBeanError beanErr)
-
getXMLStatus
public int getXMLStatus()
Description copied from interface:WebComponent
This method returns theEnumRequestStatus
status of the current Component.- Specified by:
getXMLStatus
in interfaceWebComponent
- Returns:
- the
EnumRequestStatus
of the current page.
-
setXMLStatus
protected void setXMLStatus(int status)
-
getSessionInfo
public WebSessionInfo getSessionInfo()
Description copied from interface:WebBean
Returns theWebSessionInfo
instance from this bean. AWebSessionInfo
object is where you can get or set the session ID to the intelligence server, user credentials and localization, etc.- Specified by:
getSessionInfo
in interfaceWebBean
- Returns:
- a
WebSessionInfo
instance.
-
isStale
public boolean isStale()
Description copied from interface:WebBean
Returns a boolean value indicating whether the content of this bean is stale.
-
setStale
public void setStale(boolean stale)
Description copied from interface:WebBean
Sets a flag indicating whether this bean is stale or fresh.
-
invalidateAllTransformCaches
protected void invalidateAllTransformCaches()
-
generateOutput
public MarkupOutput generateOutput()
Description copied from interface:WebComponent
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 (WebComponent.setOutputFormat(int)
).- Specified by:
generateOutput
in interfaceWebComponent
- Returns:
- a
MarkupOutput
object.
-
internalCollectData
protected void internalCollectData() throws WebBeanException
This method internally calls the method collectData if the method collectData has not yet been called. Otherwise it does nothing.- Overrides:
internalCollectData
in classAbstractTransformable
- Throws:
WebBeanException
- thrown if there is severe errors when collecting data- See Also:
AbstractTransformable.internalCollectData(boolean)
-
internalCollectData
protected void internalCollectData(boolean collectOnError) throws WebBeanException
Description copied from class:AbstractTransformable
Overriding method should not only throwWebBeanException
, but also sets error info if possible.- Overrides:
internalCollectData
in classAbstractTransformable
- Parameters:
collectOnError
- will attempt to collect data even if object in in error.- Throws:
WebBeanException
- thrown if there is severe errors when collecting data
-
internalCollectData
protected void internalCollectData(boolean collectOnError, boolean collectOnProcessing) throws WebBeanException
Description copied from class:AbstractTransformable
Overriding method should not only throwWebBeanException
, but also sets error info if possible.- Overrides:
internalCollectData
in classAbstractTransformable
- 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.- Throws:
WebBeanException
- thrown if there is severe errors when collecting data
-
collectData
public void collectData() throws WebBeanException
Description copied from class:AbstractWebComponent
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.- Specified by:
collectData
in interfaceWebComponent
- Overrides:
collectData
in classAbstractWebComponent
- Throws:
WebBeanException
- thrown if there is any exception
-
doCollectMinimalData
protected void doCollectMinimalData() throws WebBeanException
- Throws:
WebBeanException
-
collectMinimalData
public void collectMinimalData() throws WebBeanException
Description copied from interface:WebComponent
This is similar toWebComponent.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, seeWebComponent.getXMLStatus()
andWebBean.getErrorInfo()
for details.- Specified by:
collectMinimalData
in interfaceWebComponent
- Overrides:
collectMinimalData
in classAbstractWebComponent
- Throws:
WebBeanException
- thrown if an error occurs during this operation.
-
getDescriptor
public java.lang.String getDescriptor(int key)
-
getDescriptor
public java.lang.String getDescriptor(java.lang.String key)
-
isTransformSuitable
protected boolean isTransformSuitable(Transform t)
Description copied from class:AbstractTransformable
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.- Overrides:
isTransformSuitable
in classAbstractTransformable
-
checkBeanType
protected void checkBeanType(AttributesXt attrs, java.lang.String expected) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
- Since:
- MicroStrategy Web 8.0.0
-
checkHowMuchState
protected void checkHowMuchState(AttributesXt attrs) throws java.lang.IllegalArgumentException, SAXSupportException
- Throws:
java.lang.IllegalArgumentException
SAXSupportException
- Since:
- MicroStrategy Web 8.0.0
-
newDefaultBeanContext
protected BeanContext newDefaultBeanContext()
Description copied from class:AbstractTransformable
This method is called by getBeanContext() to automatically create an instance of a BeanContext if one has not been explicitly set.- Overrides:
newDefaultBeanContext
in classAbstractTransformable
-
addTransform
protected TransformInstance addTransform(Transform transform, java.lang.String key)
Adds a transform to itself and all the child beans which support the transform and returns aTransformInstance
of the last child bean it was added to.- Overrides:
addTransform
in classAbstractTransformable
-
hasTransform
public boolean hasTransform()
Description copied from interface:Transformable
Returns a boolean value indicating whether there is a defaultTransformInstance
object.- Specified by:
hasTransform
in interfaceTransformable
- Overrides:
hasTransform
in classAbstractTransformable
- Returns:
- true if there is a default transform.
-
hasTransform
public boolean hasTransform(java.lang.String key)
Description copied from interface:Transformable
Returns a boolean value indicating whether there is such aTransformInstance
object with the specified key.- Specified by:
hasTransform
in interfaceTransformable
- Overrides:
hasTransform
in classAbstractTransformable
- Parameters:
key
- the key of aTransform
- Returns:
- true if there is such a
TransformInstance
with the specified key.
-
getTransformInstance
public TransformInstance getTransformInstance(java.lang.String key) throws KeyDoesNotExistException
Description copied from interface:Transformable
Returns theTransformInstance
object with the specified key.- Specified by:
getTransformInstance
in interfaceTransformable
- Overrides:
getTransformInstance
in classAbstractTransformable
- Parameters:
key
- the key of aTransformInstance
.- Returns:
- the
TransformInstance
object with the specified key. - Throws:
KeyDoesNotExistException
- thrown if the key is not found.
-
getTransformInstances
public java.util.Enumeration getTransformInstances()
Description copied from interface:Transformable
Retuns ajava.util.Enumeration
over all theTransformInstance
objects.- Specified by:
getTransformInstances
in interfaceTransformable
- Overrides:
getTransformInstances
in classAbstractTransformable
- Returns:
- a
java.util.Enumeration
over all theTransformInstance
objects.
-
setWebEventHandler
public void setWebEventHandler(WebEventHandler handler)
Description copied from class:AbstractWebComponent
Associate with this component aWebEventHandler
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
WebEventHandler.setWebComponent(com.microstrategy.web.beans.WebComponent)
. Therefore, the WebEventHandler implementator should be careful to avoid cyclic reference to each other between this component and the event handler.- Specified by:
setWebEventHandler
in interfaceWebComponent
- Overrides:
setWebEventHandler
in classAbstractWebComponent
- Parameters:
handler
- the WebEventHandler instance to set.- See Also:
WebComponent.setWebEventHandler(com.microstrategy.web.beans.WebEventHandler)
-
newStyleRequestContext
protected StyleRequestContext newStyleRequestContext()
- Overrides:
newStyleRequestContext
in classAbstractWebComponent
-
-