Class AbstractLimitExpressionBean

    • 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
      • 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 interface ExpressionBean
        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 interface ExpressionBean
      • acceptChange

        public void acceptChange​(WebNode node)
      • shallAddNode

        protected boolean shallAddNode​(WebNode node)
      • 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 interface ExpressionBean
        Returns:
        Whether the current expression has been modified.
      • setSessionInfo

        public void setSessionInfo​(WebSessionInfo sessionInfo)
                            throws java.lang.IllegalArgumentException
        Description copied from interface: WebBean
        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.
        Specified by:
        setSessionInfo in interface WebBean
        Parameters:
        sessionInfo - a WebSessionInfo 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 interface ExpressionBean
        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 interface ExpressionBean
        Returns:
        WebObjectInfo the RHS unit(attribute form/metric)
      • setExpressionEditMode

        public void setExpressionEditMode​(int _editMode)
        Description copied from interface: ExpressionBean
        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.
        Specified by:
        setExpressionEditMode in interface ExpressionBean
        Parameters:
        _editMode - The mode to change to, from EnumExpressionEditMode.
      • 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 interface ExpressionBean
        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 interface ExpressionBean
        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 interface ExpressionBean
        Returns:
        The active object of the expression.
      • getMessageID

        protected java.lang.String getMessageID()
        Returns:
        The messageId related to the report for the filter bean
      • setMessageID

        protected void setMessageID​(java.lang.String msgID)
        Set the messageId for the filter bean
        Parameters:
        msgID - - String representing the message ID of the report
      • 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 interface ExpressionBean
        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 interface ExpressionBean
        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 interface ExpressionBean
        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 interface ExpressionBean
        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 interface ExpressionBean
        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 interface ExpressionBean
      • 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 interface ExpressionBean
      • 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 interface ExpressionBean
      • reset

        protected void reset()
      • doCollectData

        protected void doCollectData()
                              throws WebBeanException
        Override this method in sub classes to implement the collectData method.
        Throws:
        WebBeanException
      • disableElementsBrowsing

        protected boolean disableElementsBrowsing​(WebAttribute att)
      • getDocument

        public org.w3c.dom.Document getDocument()
                                         throws WebBeanException
        Description copied from interface: WebBean
        Returns a org.w3c.dom.Document parsed from the XML representation of this bean.
        Specified by:
        getDocument in interface WebBean
        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 interface ExpressionBean
        Returns:
        Any exception which came about from the validate call.
      • hasConstantNodes

        public boolean hasConstantNodes​(WebNode nd)
      • 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 interface ExpressionBean
        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.
        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 interface ExpressionBean
        Parameters:
        node - The WebNode 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 interface ExpressionBean
        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 interface ExpressionBean
        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 the ExpressionBeanContext. If this is set, then the expression bean will obtain the original expression that is being edited from that context.
        Specified by:
        setContext in interface ExpressionBean
        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 interface ExpressionBean
        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 interface ExpressionBean
        Returns:
        true if getting list of available elements for a given attribute will be chip
      • getErrorInfo

        public WebBeanError getErrorInfo()
        Description copied from interface: WebBean
        Returns a WebBeanError object indicating processing error during the collectData method call. Null is returned if there is no error.
        Specified by:
        getErrorInfo in interface WebBean
        Returns:
        a WebBeanError object; null if there is no error.
      • setErrorInfo

        protected void setErrorInfo​(WebBeanError beanErr)
      • setXMLStatus

        protected void setXMLStatus​(int status)
      • getSessionInfo

        public WebSessionInfo getSessionInfo()
        Description copied from interface: WebBean
        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.
        Specified by:
        getSessionInfo in interface WebBean
        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.
        Specified by:
        isStale in interface WebBean
        Returns:
        true if 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.
        Specified by:
        setStale in interface WebBean
        Parameters:
        stale - true if this bean is stale.
      • invalidateAllTransformCaches

        protected void invalidateAllTransformCaches()
      • internalCollectData

        protected void internalCollectData​(boolean collectOnError,
                                           boolean collectOnProcessing)
                                    throws WebBeanException
        Description copied from class: AbstractTransformable
        Overriding method should not only throw WebBeanException, but also sets error info if possible.
        Overrides:
        internalCollectData in class AbstractTransformable
        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
      • 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 class AbstractTransformable
      • checkBeanType

        protected void checkBeanType​(AttributesXt attrs,
                                     java.lang.String expected)
                              throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
        Since:
        MicroStrategy Web 8.0.0
      • hasTransform

        public boolean hasTransform​(java.lang.String key)
        Description copied from interface: Transformable
        Returns a boolean value indicating whether there is such a TransformInstance object with the specified key.
        Specified by:
        hasTransform in interface Transformable
        Overrides:
        hasTransform in class AbstractTransformable
        Parameters:
        key - the key of a Transform
        Returns:
        true if there is such a TransformInstance with the specified key.