Interface ExpressionBean

    • Method Detail

      • getExpression

        WebExpression getExpression()
        Returns the internal expression object. This expression can be used to make changes to the structure of the expression.
        Returns:
        A WebExpression representing the expression being edited.
      • getExpressionEditMode

        int getExpressionEditMode()
        Returns the current expression edit mode of the bean, from EnumExpressionEditMode. This represents the current state of the bean.
        Returns:
        The current expression edit mode of the bean, from EnumExpressionEditMode.
      • setExpressionEditMode

        void setExpressionEditMode​(int mode)
        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:
        mode - The mode to change to, from EnumExpressionEditMode.
      • getActiveOperatorNodeKey

        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.
      • setActiveOperatorNodeKey

        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.
      • getActiveObject

        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.
      • getUserSearchPattern

        java.lang.String getUserSearchPattern()
        Returns the search pattern that will be applied to any element browsing request.
        Returns:
        The current user search pattern for element browsing.
      • setUserSearchPattern

        void setUserSearchPattern​(java.lang.String pattern)
        Sets the search pattern that will be applied to any element browsing request.
        Parameters:
        pattern - The user search pattern to use for element browsing.
      • getMatchCase

        boolean getMatchCase()
        Returns the match case flag, used in searching element browsing request.
        Returns:
        The current value of the match case flag.
      • setMatchCase

        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.
      • isModified

        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.
      • validate

        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.
      • acceptChange

        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.
      • undoChange

        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.
      • synchronize

        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.
      • resetChanges

        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.
      • getValidationErrorInfo

        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.
      • getIncrementalFetch

        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.
      • validateOperands

        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.
        Since:
        MicroStrategy Web 8.0.1
      • isEditable

        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.
        Since:
        MicroStrategy Web 8.0.1
      • isEditable

        boolean isEditable()
        Returns whether the Expression bean is editable.
        Returns:
        True if the bean is editable, false otherwise.
        Since:
        MicroStrategy Web 8.0.2
      • setIsEditable

        void setIsEditable​(boolean value)
        Sets whether the expression bean is editable.
        Parameters:
        value - True if the expression bean should be editable, false otherwise.
        Since:
        MicroStrategy Web 8.0.2
      • setValidationErrorInfo

        void setValidationErrorInfo​(WebBeanError err)
        Since:
        MicroStrategy Web 9.0.0
      • setContext

        void setContext​(ExpressionBeanContext context)
        Sets the ExpressionBeanContext. If this is set, then the expression bean will obtain the original expression that is being edited from that context.
        Parameters:
        context - The context to use to obtain the expression to be edited/displayed.
        Since:
        MicroStrategy Web 9.0.0
      • canSelectElements

        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
        Since:
        MicroStrategy Web 9.0.0
      • shallSelectElements

        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.
        Parameters:
        webAttribute -
        Returns:
        true if getting list of available elements for a given attribute will be chip
        Since:
        MicroStrategy Web 9.0.0
      • setRHS

        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)
      • getRHS

        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)