Interface RWInstance

    • Field Detail

      • PROPERTY_SET_DOCUMENT

        static final java.lang.String PROPERTY_SET_DOCUMENT
        See Also:
        Constant Field Values
      • PROPERTY_SET_FORMATTING_PAGE

        static final java.lang.String PROPERTY_SET_FORMATTING_PAGE
        See Also:
        Constant Field Values
      • PROPERTY_SET_CONFIGURATION

        static final java.lang.String PROPERTY_SET_CONFIGURATION
        See Also:
        Constant Field Values
    • Method Detail

      • getDefinition

        RWDefinition getDefinition()
                            throws WebObjectsException
        Returns report definition. If the definition is not currently present in the object state, it will be loaded from the server.
        Returns:
        report definition
        Throws:
        WebObjectsException
      • getDefinitionNoLoad

        RWDefinition getDefinitionNoLoad()
        Returns report definition or null if it is not present
        Returns:
        report definition
      • getLogMessageAsXML

        java.lang.String getLogMessageAsXML()
                                     throws WebObjectsException
        Returns log message for the current report. The parse method didn't provide here, if you want to parse the log message, please refer to com.microstrategy.MSTRTester.MSTRTesterModel#parseToMap(java.io.BufferedReader) and com.microstrategy.MSTRTester.MSTRTesterModel#parseToCSV(com.microstrategy.utils.json.JSONObject) for more detail
        Returns:
        log message for the current report.
        Throws:
        WebObjectsException - indicates an inability to obtain the message information from the Intelligence Server.
      • setSaveAsFlags

        void setSaveAsFlags​(int saveAsFlags)
        Sets the flags for the saveAs call. These flags determine what is saved and the state it is saved in. This value should be the bitwise or (|) of values from EnumDSSXMLReportSaveAsFlags.
        Parameters:
        saveAsFlags - The value to use as the save as flags.
        See Also:
        getSaveAsFlags()
      • getSaveAsFlags

        int getSaveAsFlags()
        Returns the flags for the saveAs call. These flags determine what is saved and the state it is saved in. This value should be the bitwise or (|) of values from EnumDSSXMLReportSaveAsFlags.
        Returns:
        The current setting of the save as flags.
        See Also:
        setSaveAsFlags(int)
      • setSaveAsDisplayMode

        void setSaveAsDisplayMode​(int saveAsDisplayMode)
        Sets the display mode for the saveAs call. These flags determine the format that the report is saved in. This value should be from EnumDSSXMLDisplayMode.
        Parameters:
        saveAsDisplayMode - The value to use as the save as display mode.
        See Also:
        getSaveAsDisplayMode()
      • getSaveAsDisplayMode

        int getSaveAsDisplayMode()
        Returns the display mode for the saveAs call. These flags determine the format that the report is saved in. This value should be from EnumDSSXMLDisplayMode.
        Returns:
        The current setting for display mode.
        See Also:
        setSaveAsDisplayMode(int)
      • saveAs

        WebObjectInfo saveAs​(WebFolder parentFolder)
                      throws WebObjectsException
        Saves the current report instance, or template of the current report instance, or filter of the current report instance into the given folder with the given name and description. The saveAsFlags and saveAsDisplayMode control how the object is saved. One flag in saveAsFlags controls whether to save the report or template or filter of the current report. The new saved object returned without being populated.
        Parameters:
        parentFolder - The folder to place the new report in, an object of type WebFolder.
        Returns:
        The WebObjectInfo object of saved object, it can be report or a filter or a template.
        Throws:
        WebObjectsException - Signals an error in sending the command to the Intelligence Server, or receiving of an invalid DSS ID from the IServer corresponding to the saved object.
      • saveAs

        WebObjectInfo saveAs​(WebFolder parentFolder,
                             java.lang.String name,
                             java.lang.String description)
                      throws WebObjectsException
        Saves the current report instance, or template of the current report instance, or filter of the current report instance into the given folder with the given name and description. The saveAsFlags and saveAsDisplayMode control how the object is saved. One flag in saveAsFlags controls whether to save the report or template or filter of the current report. The new saved object returned without being populated.
        Parameters:
        parentFolder - The folder to place the new report in, an object of type WebFolder.
        name - The name of the new object to be saved.
        description - The description of the new object.
        Returns:
        The WebObjectInfo object of saved object, it can be report or a filter or a template.
        Throws:
        WebObjectsException - Signals an error in sending the command to the Intelligence Server, receiving of an invalid DSS ID from the IServer corresponding to the saved object, or an invalid object name.
      • saveAs

        WebObjectInfo saveAs​(WebFolder parentFolder,
                             java.lang.String name)
                      throws WebObjectsException
        Saves the current report instance, or template of the current report instance, or filter of the current report instance into the given folder with the given name and description. The saveAsFlags and saveAsDisplayMode control how the object is saved. One flag in saveAsFlags controls whether to save the report or template or filter of the current report. The new saved object returned without being populated.
        Parameters:
        parentFolder - The folder to place the new report in, an object of type WebFolder.
        name - The name of the new object to be saved.
        Returns:
        The WebObjectInfo object of saved object, it can be report or a filter or a template.
        Throws:
        WebObjectsException - Signals an error in sending the command to the Intelligence Server, receiving of an invalid DSS ID from the IServer corresponding to the saved object, or an invalid object name.
      • saveAsForManagedDataset

        java.lang.String saveAsForManagedDataset​(java.lang.String folderID,
                                                 java.lang.String docName,
                                                 java.lang.String docDesc,
                                                 boolean documentLevel,
                                                 java.lang.String reportSaveAsOptions,
                                                 IntWrapper status,
                                                 int requestTimeout)
                                          throws WebObjectsException,
                                                 MSTRWebAPIException
        Saves managed dataset or standalone dataset within the current report instance. The saveAsFlags is set to 16 to indicate this is a dataset level saveas, or other value depending on user input to enter document level saveas. The status is returned.
        Parameters:
        folderID - The id of the folder to place the document. When dataset level saveas, it doesn't matter.
        docName - The name of the new document to be saved.
        docDesc - The description of the new document.
        documentLevel - Whether this is a document level saveas
        reportSaveAsOptions - The xml delta of the report SaveAs options for datasets within document.
        status - Contains the current status of the document.
        requestTimeout - the amount to wait in milliseconds for the xml command
        Returns:
        objectID
        Throws:
        WebObjectsException - Signals an error in sending the command to the Intelligence Server, receiving of an invalid DSS ID from the IServer corresponding to the saved object, or an invalid object name.
        MSTRWebAPIException - Signals duplicated name error or other errors.
      • saveAsSegment

        java.lang.String saveAsSegment​(WebFolder parentFolder,
                                       java.lang.String name,
                                       java.lang.String description,
                                       int flags,
                                       java.lang.String nodeKey)
                                throws WebObjectsException
        Save segment from RWD.
        Parameters:
        parentFolder - The folder to place the new segment in, an object of type WebFolder.
        name - A name for the segment.
        description - A description for the segment.
        flags - Flags which modify the behavior of the call.
        nodeKey - the key to locate the node
        Returns:
        the new created segment's id
        Throws:
        WebObjectsException
      • getRWManipulator

        RWManipulation getRWManipulator​(boolean validateStatus)
                                 throws WebObjectsException
        Returns RW manipulator
        Parameters:
        validateStatus - - boolean indicating whether we need to validate the ready status.
        Returns:
        RW manipulator
        Throws:
        WebObjectsException
      • getResultFilterMode

        int getResultFilterMode()
        Returns the filter mode that is currently set. This is a value from the enumeration EnumRWResultFilterModes
      • getMessage

        RWMessage getMessage​(boolean populate)
                      throws WebObjectsException
        Returns A RWMessage object for the current RW doc. If populate is true, the information is retreived from Intelligence Server.
        Parameters:
        populate - Whether the message should be populated with the inbox information for the message. This may cause an additional call to the Intelligence Server if it is set to true.
        Returns:
        RWMessage for the current report.
        Throws:
        WebObjectsException - indicates an inability to obtain the message information from the Intelligence Server.
      • setProperty

        void setProperty​(java.lang.String unitKey,
                         java.lang.String propertySetName,
                         java.lang.String propertyName,
                         java.lang.String propertyValue)
                  throws WebObjectsException
        Sets a property value for the specified unit
        Parameters:
        unitKey - unit key
        propertySetName - property set name
        propertyName - property name
        propertyValue - value
        Throws:
        WebObjectsException
      • setDocumentProperty

        void setDocumentProperty​(java.lang.String propertySetName,
                                 java.lang.String propertyName,
                                 java.lang.String propertyValue)
                          throws WebObjectsException
        Sets document's property
        Parameters:
        propertySetName - property set name
        propertyName - property name
        propertyValue - value
        Throws:
        WebObjectsException
      • subscribe

        void subscribe​(WebSubscriptionTrigger trigger,
                       WebSubscriptionAddress address,
                       java.lang.String subject,
                       boolean sendNow,
                       java.lang.String customMessage,
                       WebSubscriptionContentFormat format,
                       boolean zip)
                throws WebObjectsException
        Subscibes a user to this document
        Parameters:
        trigger - subscription trigger
        address - subscription address
        subject - subject string
        sendNow - flag indicating that a message shall be send immediately
        customMessage - custom message string
        format - subscription format
        zip - flag indication that content must be compressed
        Throws:
        WebObjectsException
      • getGraphObject

        WebGraph getGraphObject​(java.lang.String nodeKey)
                         throws WebObjectsException,
                                java.lang.IllegalArgumentException
        Returns the graph definition object associated with the specified node. The graph object returned should not be used for retrieving data as the sliced window ID is missing for such a graph object.
        Parameters:
        nodeKey - the key of the node.
        Returns:
        the graph object.
        Throws:
        WebObjectsException - if there was an error encountered while retrieving the graph object.
        java.lang.IllegalArgumentException - if an invalid node key is passed.
      • getGraphObject

        WebGraph getGraphObject​(java.lang.String nodeKey,
                                int slicedWindowID)
                         throws WebObjectsException,
                                java.lang.IllegalArgumentException
        Returns the graph definition object associated with the specified node. The graph object returned can be used for retrieving data
        Parameters:
        nodeKey - the node key
        slicedWindowID - the window ID of sliced graph object to be fetched.
        Returns:
        the graph object.
        Throws:
        WebObjectsException - if there was an error encountered while retrieving the graph object.
        java.lang.IllegalArgumentException - if an invalid node key or slice ID (<0) is passed
      • setExecutionMode

        void setExecutionMode​(int mode)
        Sets execution mode
        Parameters:
        mode - exectuon mode from EnumRWExecutionModes
      • isDirty

        boolean isDirty()
        Indicates whether the instance has been modified since it was first executed. This means that the version of the document in memory is different from the one saved in the metadata
        Returns:
        boolean indicating if the document has been modified
        See Also:
        WebResultSetInstance.isModified()
      • getCurrentLayoutKey

        java.lang.String getCurrentLayoutKey()
        Returns the current layout key.
        Returns:
        the current layout key.
        Since:
        MicroStrategy Web 9.0.0
      • setCurrentLayoutKey

        void setCurrentLayoutKey​(java.lang.String value)
        Switches to a new current layout.
        Parameters:
        value - the key of a layout that must be set current.
        Since:
        MicroStrategy Web 9.0.0
      • getDataSettings

        RWDataSettings getDataSettings()
        Returns document data settings.
        Returns:
        document data settings.
        Since:
        MicroStrategy Web 9.0.0
      • setUnitsFilter

        void setUnitsFilter​(java.util.Set units)
        Sets units filter
        Parameters:
        units - a list of unit keys that will be returned from the server
        Since:
        MicroStrategy Web 8.1.0
      • setCurrentPageKey

        void setCurrentPageKey​(java.lang.String value)
        Set pageKey to specify the tag 'target_key' value in grtex command to get the specific node info.
        Parameters:
        value - the key of a page that must be set current.
        Since:
        MicroStrategy Web 11.3.2
      • setUnitsFilterProps

        void setUnitsFilterProps​(java.util.Map defnFilterProps,
                                 java.util.Map dataFilterProps)
        Sets the JSON properties in the units filter for the server to return.
        Parameters:
        defnFilterProps -
        dataFilterProps -
      • setControlFilter

        void setControlFilter​(java.util.Set<java.lang.String> units)
        Sets control filter
        Parameters:
        units - a list of control keys that updated by user
        Since:
        MicroStrategy Web 9.1.0
      • setUpdatedUnitsFilter

        void setUpdatedUnitsFilter​(java.util.Set<java.lang.String> nodes)
        Sets update units filter
        Parameters:
        nodes - a list of node keys that updated by user
      • setUpdatedObjectsFilter

        void setUpdatedObjectsFilter​(java.util.Set<MojoRWUpdatedObjectsSettings> objects)
        Set the partial update on object keys. Added for html5 vi.
        Parameters:
        objects - a list of updated object keys.
      • setNodesFilter

        void setNodesFilter​(java.util.Set<java.lang.String> units)
        Sets nodes filter
        Parameters:
        units - a list of node keys that updated by user
      • appendNodesFilter

        void appendNodesFilter​(java.lang.String units)
        Parameters:
        units - Adds Node key to the list. if the nodes list is empty, it creates a new HashSet before appending.
      • getNodesFilter

        java.util.Set<java.lang.String> getNodesFilter()
        returns list of node keys those are set for the filter
      • includeFilterUnits

        void includeFilterUnits()
        Include filter units in partial update result
      • getUpdatedUnits

        java.util.Set<java.lang.String> getUpdatedUnits()
        Since:
        MicroStrategy Web 9.0.3 return a set of keys for the updated units when doing partial update
      • getDefaultGridGraphSettings

        RWGridGraphSettings getDefaultGridGraphSettings()
        This method returns the default grid/graph settings. This object can be used to change the result flags and other settings of all grids embedded in the RW document.
        Returns:
        A RWGridGraphSettings object, which can be used to change the grid graph settings for all grids in the RWD.
        Since:
        MicroStrategy Web 8.0.2
      • getGridGraphSettings

        RWGridGraphSettings getGridGraphSettings​(int mode)
        This method returns the grid/graph settings for a specific visualization mode. This object can be used to change the result flags and other settings of all grids embedded in the RW document with their visualization view mode set to the given value.
        Parameters:
        mode - The visualization view mode that the given settings are for. If a grid has this visualization view mode, then these settings will apply, otherwise they will not.
        Returns:
        A RWGridGraphSettings object, which can be used to change the grid graph settings for grids in the RWD with the given visualization mode.
        Since:
        MicroStrategy Web 8.0.2
      • getSecondaryDataProviderHelper

        RWSecondaryDataProviderHelper getSecondaryDataProviderHelper()
        Returns a helper class for working with widget secondary data providers.
        Returns:
        a helper class for working with widget secondary data providers.
        Since:
        MicroStrategy Web 8.1.1
      • getExportData

        byte[] getExportData()
                      throws WebObjectsException
        Retrieves from the IServer binary data for export.
        Returns:
        binary export data.
        Throws:
        WebObjectsException
        Since:
        MicroStrategy Web 9.0.0
      • sendExportData

        void sendExportData​(IContentConsumer contentConsumer)
                     throws WebObjectsException
        Streams binary export data received from IServe to a content consumer. This method is used to avoid buffering export data inside web server.
        Parameters:
        contentConsumer - a consumer of export data.
        Throws:
        WebObjectsException
        Since:
        MicroStrategy Web 9.0.0
      • getDetailsFormatter

        RWDetailsFormatter getDetailsFormatter()
        Returns the details formatter object associated with this instance. To retrieve document details, the formatter should be configured to indicate which parts of the details are retrieved from the server.
        Since:
        MicroStrategy Web 9.0.0
      • getResultSettings

        RWSettings getResultSettings()
        Since:
        MicroStrategy Web 9.0.1
      • setGridIncrementalFetch

        void setGridIncrementalFetch​(java.lang.String unitKey,
                                     int rowPosition,
                                     int maxRows,
                                     int colPosition,
                                     int maxColumns)
        Sets grid incremental fetch position
        Parameters:
        unitKey - the grid unit key
        rowPosition - rows position
        maxRows - maximum number of rows per page
        colPosition - columns position
        maxColumns - maximum number of columns per page
        Since:
        MicroStrategy Web 9.0.1
      • setGridIncrementalFetch

        void setGridIncrementalFetch​(java.lang.String unitKey,
                                     int rowMode,
                                     int rowPosition,
                                     int maxRows,
                                     int colMode,
                                     int colPosition,
                                     int maxColumns)
        Sets grid incremental fetch position
        Parameters:
        unitKey - the grid unit key
        rowMode - row incremental fetch mode
        rowPosition - rows position
        maxRows - maximum number of rows per page
        colMode - column incremental fetch mode
        colPosition - columns position
        maxColumns - maximum number of columns per page
        Since:
        MicroStrategy Web 9.0.1
      • clearGridIncrementalFetch

        void clearGridIncrementalFetch()
        Clear grid incremental fetch setting
        Since:
        MicroStrategy Web 11.2.2
      • getLastUpdate

        java.lang.String getLastUpdate()
        Returns the time and date when this document was last updated against the warehouse.
        Returns:
        A string representing the last updated time and date.
      • disablePartialCSSForGridGraph

        void disablePartialCSSForGridGraph​(java.lang.String ggKey)
        Disables the partial update of the specified object
        Parameters:
        ggKey - The key corresponding to the grid/graph for which partial update is disabled and forces the iserver to send the entire css
      • getResultsAsJson

        java.lang.Object getResultsAsJson​(int resultFlags,
                                          int mode)
                                   throws WebObjectsException
        THIS METHOD IS NOT SUPPORTED FOR USE IN CUSTOM APPLICATION DEVELOPMENT. THE METHOD IS SUBJECT TO CHANGE IN FUTURE RELEASES AND SOME METHODS AND PROPERTIES MAY NOT BE SUITABLE FOR CUSTOM DEVELOPMENT.
        Parameters:
        resultFlags -
        mode - result data moda see EnumWebApiResultMode
        Returns:
        Throws:
        WebObjectsException
      • setStateID

        void setStateID​(int stateID)
        set the steateID of inboxMessage of instance
        Parameters:
        stateID - the steateID of inboxMessage of instance
      • setSupportsUndo

        void setSupportsUndo​(boolean value)
        Sets flag indication that application using this instance supports undo/redo
        Parameters:
        value -
      • getSupportsUndo

        boolean getSupportsUndo()
        Indicate that the application using this instance supports undo/redo
        Returns:
      • saveAsTheme

        java.lang.String saveAsTheme​(java.lang.String folderID,
                                     java.lang.String themeName,
                                     java.lang.String themeDesc,
                                     int flags)
                              throws WebObjectsException,
                                     MSTRWebAPIException
        Save the document theme as a standalone object.
        Parameters:
        folderID - The id of the folder to place the theme.
        themeName - The name of the new document theme to be saved.
        themeDesc - The description of the new document theme.
        flags - Flags which modify the behavior of the call, from EnumDSSXMLDocSaveAsFlags.
        Returns:
        objectID the id of the new document theme.
        Throws:
        WebObjectsException
        MSTRWebAPIException
      • getElementFromGraph

        java.lang.String getElementFromGraph​(java.lang.String sessionID,
                                             java.lang.String messageID,
                                             java.lang.String nodeKey,
                                             java.lang.String sliceID,
                                             int x,
                                             int y,
                                             java.lang.String dpi)
                                      throws WebObjectsException
        Get elements from graph in document.
        Returns:
        Throws:
        WebObjectsException
      • getElementFromGraph

        java.lang.String getElementFromGraph​(java.lang.String sessionID,
                                             java.lang.String messageID,
                                             java.lang.String nodeKey,
                                             java.lang.String sliceID,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             java.lang.String dpi)
                                      throws WebObjectsException
        Get elements from graph in document.
        Throws:
        WebObjectsException
      • importImageToDocument

        java.lang.String importImageToDocument​(java.lang.String treeType,
                                               java.lang.String nodeKey,
                                               java.lang.String fieldKey,
                                               java.lang.String fieldName,
                                               java.lang.String imgName,
                                               int index,
                                               long fileSize,
                                               java.lang.String imgID,
                                               java.lang.String hashCode,
                                               int isEdit,
                                               java.io.InputStream data)
                                        throws WebObjectsException
        Import image to document
        Returns:
        Throws:
        WebObjectsException
      • importImageToDocument

        java.lang.String importImageToDocument​(java.lang.String binaryID,
                                               int blockCount,
                                               int blockIndex,
                                               int blockSize,
                                               java.lang.String treeType,
                                               java.lang.String nodeKey,
                                               java.lang.String fieldKey,
                                               java.lang.String fieldName,
                                               java.lang.String imgName,
                                               int index,
                                               long fileSize,
                                               java.lang.String imgID,
                                               java.lang.String hashCode,
                                               int isEdit,
                                               java.io.InputStream data)
                                        throws WebObjectsException
        Import image to document
        Returns:
        Throws:
        WebObjectsException
      • checkImageExist

        java.lang.String checkImageExist​(java.lang.String shaValue)
                                  throws WebObjectsException
        check whether the image has been stored in MD or in current instance
        Parameters:
        shaValue - the SHA result of image binary stream
        Returns:
        If the image exists, return the id of the image. else return a string with all zero
        Throws:
        WebObjectsException
      • setExportCacheID

        void setExportCacheID​(byte[] exportCacheID)
        set the exportCacheID of the instance
        Parameters:
        exportCacheID - the cacheID of the instance
      • getExportCacheID

        byte[] getExportCacheID()
      • getMSTRPredictedFileSize

        java.lang.String getMSTRPredictedFileSize​(java.lang.String documentID)
                                           throws WebObjectsException
        Get the predicted MSTR file size for a document or a report.
        Parameters:
        documentID -
        Returns:
        a json String e.g.{"mstr_size":0,"IsSetting":false}, the "mstr_size" is the predicted MSTR file size calculated by the i-Server. "IsSetting" indicates if the "mstr_size" is obtained by returning the value of 'MicroStrategy .(mstr) file size(MB)' set on the developer directly. If IsSetting is true meaning that the value of "mstr_size" was returned based on the value of 'MicroStrategy .(mstr) file size(MB)' set on developer; if IsSetting is false meaning that the value of "mstr_size" was calculated for a given document or report by the i-Server.
        Throws:
        WebObjectsException
      • getPersonalViewExecutionInfo

        PersonalViewExecutionInfo getPersonalViewExecutionInfo()
        Get PersonalViewExecutionInfo, which indicates if personal manipulations all applied
        Returns:
        PersonalViewExecutionInfo
      • setPersonalViewExecutionInfo

        void setPersonalViewExecutionInfo​(PersonalViewExecutionInfo pvInfo)
        Set PersonalViewExecutionInfo, which indicates if personal manipulations all applied
        Parameters:
        pvInfo -
      • setIsClientAuto

        void setIsClientAuto​(boolean isClientAuto)
        Set isClientAuto, which indicates whether the manipulation is client auto
        Parameters:
        isClientAuto -
      • getIsClientAuto

        boolean getIsClientAuto()
        Get isClientAuto, which indicates whether the manipulation is client auto
        Returns:
        isClientAuto
      • isPromptStatus

        boolean isPromptStatus()
        Whether the current result status is a prompt result status
        Specified by:
        isPromptStatus in interface WebResultSetInstance
        Returns:
        boolean
      • getGatewayJsonVersion

        int getGatewayJsonVersion()
        gatewayJsonVersion is transient property for gateway JSON generation. It is currently only used for gateway JSON generation workflow Version 1: all attributes in rows and metrics in column; Subtotal not supported; Result in de-normalized JSON tree structure Version 2: Normalized JSON structure including lookup table for attribute elements, row and column headers; Cross-tab and subtotal supported.
      • setGatewayJsonVersion

        void setGatewayJsonVersion​(int version)