Interface RWSource


  • public interface RWSource
    The RWSource interface allows the user to execute and retrieve document instances, along with giving access to many objects which have a supplemental usage in document execution.
    Since:
    MicroStrategy Web 8.0.0
    • Method Detail

      • getNewInstance

        RWInstance getNewInstance​(java.lang.String documentID)
                           throws WebObjectsException
        Generates a new document instance by executing the document with the given Document ID.
        Parameters:
        documentID - The DSSID of the document to execute.
        Returns:
        A RWInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException - Signals an error encountered by IServer when executing the document.
      • getNewInstance

        RWInstance getNewInstance​(java.lang.String documentID,
                                  boolean isDossier)
                           throws WebObjectsException
        Generates a new document instance by executing the document with the given Document ID.
        Parameters:
        documentID - The DSSID of the document to execute.
        Returns:
        A RWInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException - Signals an error encountered by IServer when executing the document.
      • getNewInstance

        RWInstance getNewInstance​(java.lang.String documentID,
                                  boolean isDossier,
                                  java.lang.String bookmarkID)
                           throws WebObjectsException
        Generates a new document instance by executing the document with the given Document ID.
        Parameters:
        documentID - The DSSID of the document to execute.
        bookmarkID - The bookmark id to be used to execute the document. Use GUID_NULL (i.e. 00000000000000000000000000000000 to reset the manipulations saved on the shortcut
        Returns:
        A RWInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException - Signals an error encountered by IServer when executing the document.
      • getNewInstance

        RWInstance getNewInstance​(java.lang.String documentID,
                                  int executionMode)
                           throws WebObjectsException
        Generates a new document instance by executing the document with the given Document ID.
        Parameters:
        documentID - The DSSID of the document to execute.
        executionMode - specifies a value from EnumRWExecutionModes
        Returns:
        A RWInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException - Signals an error encountered by IServer when executing the document.
      • getNewInstance

        RWInstance getNewInstance​(java.lang.String documentID,
                                  int executionMode,
                                  boolean isDossier)
                           throws WebObjectsException
        Generates a new document instance by executing the document with the given Document ID.
        Parameters:
        documentID - The DSSID of the document to execute.
        executionMode - specifies a value from EnumRWExecutionModes
        Returns:
        A RWInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException - Signals an error encountered by IServer when executing the document.
      • getNewInstance

        RWInstance getNewInstance​(java.lang.String documentID,
                                  int executionMode,
                                  boolean isDossier,
                                  java.lang.String bookmarkID)
                           throws WebObjectsException
        Generates a new document instance by executing the document with the given Document ID.
        Parameters:
        documentID - The DSSID of the document to execute.
        executionMode - specifies a value from EnumRWExecutionModes
        bookmarkID - The id of the bookmark being used to get the instance. Use GUID_NULL (i.e. 00000000000000000000000000000000 to reset the manipulations saved on the shortcut
        Returns:
        A RWInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException - Signals an error encountered by IServer when executing the document.
      • getInstance

        RWInstance getInstance​(java.lang.String messageID)
                        throws WebObjectsException
        Returns a RWInstance representing the document execution with the given message ID. Note that this does not cause a document execution to begin, but rather can be used to obtain the results of an already existing document instance.
        Parameters:
        messageID - The message ID of the job submitted to the Intelligence Server.
        Returns:
        A RWInstance object, representing the document with the given message ID.
        Throws:
        WebObjectsException - Thrown if the operation cannot be completed successfully.
      • getPromptAnswer

        java.lang.String getPromptAnswer()
        Returns the prompt answer, if any, which will be used to pre-answer prompts when executing a new document.
        Returns:
        The current prompt answer which will be used when executing documents.
      • setPromptAnswer

        void setPromptAnswer​(java.lang.String promptAnswer)
        Sets a prompt answer which will be used to pre-answer any documents executed by this object.
        Parameters:
        promptAnswer - The value to pre-answer prompts with when executing documents.
      • getInstanceFromState

        RWInstance getInstanceFromState​(java.lang.String savedStateStr)
                                 throws WebObjectsException
        Creates a document instance based on a pre-stored document state. A document instance state can be obtained using the persistence support on RWInstance
        Parameters:
        savedStateStr - The saved state of a document instance.
        Returns:
        RWInstance A document instance restored to state specified by the input parameter.
        Throws:
        WebObjectsException - Thrown when an error occurs restoring the document instance state using the the state string.
      • getInstanceFromState

        RWInstance getInstanceFromState​(SAXSupport parser,
                                        java.lang.String uri,
                                        java.lang.String localName,
                                        java.lang.String qName,
                                        org.xml.sax.Attributes attrs)
                                 throws WebObjectsException
        Create a document instance based on a pre-stored document state. A document instance state can be obtained using the persistence support on RWInstance
        Parameters:
        parser - The SAX parser parsing the state (in which the the document state is embedded, if it is not the only state).
        uri - The uri value of the SAX node from where the current parsing of the document state is invoked.
        localName - The localName value of the SAX node from where the current parsing of the document state is invoked.
        qName - The qName value of the SAX node from where the current parsing of the document state is invoked.
        attrs - The attributes of the SAX node from where the current parsing of the document state is invoked.
        Returns:
        RWInstance A document instance restored to state specified by the input parameter.
        Throws:
        WebObjectsException - Thrown when an error occurs restoring the document instance state.
      • getInstanceFromSchedule

        RWInstance getInstanceFromSchedule​(WebSchedule schedule)
                                    throws WebObjectsException
        Deprecated.
        Starting with version 9.0 and the advent of Distribution Services, all schedule objects are replaced by subscriptions. Please use getInstanceFromSubscription(WebSubscription) instead.
        Create a document instance based on the schedule object. Thus, a document instance with the state similar to a scheduled document can be obtained using this method.
        Parameters:
        schedule - The schedule object.
        Returns:
        WebReportInstance A document instance built using the schedule information.
        Throws:
        WebObjectsException - Thrown when error ocurrs during creating the document instance
      • getInstanceFromSubscription

        RWInstance getInstanceFromSubscription​(WebSubscription subscription)
                                        throws WebObjectsException
        Create a document instance based on the subscription object. Thus, a document instance with the state similar to a subscribed document can be obtained using this method.
        Parameters:
        subscription - The subscription object.
        Returns:
        RWInstance A document instance built using the subscription information.
        Throws:
        WebObjectsException - Thrown when error ocurrs during creating the document instance
      • getInstanceFromSubscription

        RWInstance getInstanceFromSubscription​(WebSubscription subscription,
                                               int executionMode)
                                        throws WebObjectsException
        Create a document instance based on the subscription object. Thus, a document instance with the state similar to a subscribed document can be obtained using this method. This method can also change the execution mode of the instance.
        Parameters:
        subscription - The subscription object.
        executionMode - see EnumRWExecutionModes
        Returns:
        RWInstance A document instance built using the subscription information.
        Throws:
        WebObjectsException - Thrown when error ocurrs during creating the document instance
        Since:
        MicroStrategy Web 9.0.0
      • setSaveToInbox

        void setSaveToInbox​(boolean saveToInbox)
        Sets a boolean property indicating that the result of the execution should be saved to the Inbox This setting will take effect only when the execution mode (EnumRWExecutionModes) on the RWInstance is set to EnumRWExecutionModes.RW_MODE_DATA
        Parameters:
        saveToInbox -
      • setUseDefaultPromptAnswers

        void setUseDefaultPromptAnswers​(boolean useDefault)
        Sets a property indicating that the default prompts answers should be used during execution
        Parameters:
        useDefault -
      • isUseDefaultPromptAnswers

        boolean isUseDefaultPromptAnswers()
        Retrives the value of the proprety set using {#setUseDefaultPromptAnswers}
        Returns:
        the value of the proprety set using {#setUseDefaultPromptAnswers}
      • setFreshDocumentExecution

        void setFreshDocumentExecution​(boolean value)
        Sets a property indicating that the caches should not be used and a fresh document execution should be done.
        Parameters:
        value -
      • isFreshDocumentExecution

        boolean isFreshDocumentExecution()
        Retrives the value of the proprety set using {#setFreshDocumentExecution}
        Returns:
        the value of the proprety set using {#setFreshDocumentExecution}
      • setBackgroundDocumentExecution

        void setBackgroundDocumentExecution​(boolean background)
        Sets a property indicating that the document is executed as a background job.
        Parameters:
        background -
      • setExecutionResolveOnly

        void setExecutionResolveOnly​(boolean resolveOnly)
        Sets a property indicating that the document is executed in resolveOnly mode.
        Parameters:
        background -
      • getExportSettings

        RWExportSettings getExportSettings​(int executionMode)
        Returns export setting for specified execution mode
        Parameters:
        executionMode - execution mode from EnumRWExecutionModes
        Returns:
        RWExportSettings
      • getRWSettings

        RWSettings getRWSettings​(int executionMode)
        Returns the RWSettings for specified execution mode
        Parameters:
        executionMode - execution mode from EnumRWExecutionModes
        Returns:
        A RWSettings object
      • getReport2RWSettings

        Report2RWSettings getReport2RWSettings()
        Returns:
        settings governing conversion of a report into a report writing document
        Since:
        MicroStrategy Web 9.0.0
      • getTheme2RWSettings

        Theme2RWSettings getTheme2RWSettings()
        Returns:
        settings governing conversion of a theme into a report writing document
        Since:
        MicroStrategy Web 10.0.0
      • setUpdateDSCaches

        void setUpdateDSCaches​(boolean value)
        Since:
        MicroStrategy Web 9.0.0
      • getUpdateDSCaches

        boolean getUpdateDSCaches()
        Since:
        MicroStrategy Web 9.0.0
      • setPreviousExecutionMode

        void setPreviousExecutionMode​(int executionMode)
        Sets the previous execution mode for calls to getInstance that takes a message ID. This will be assumed to be the current execution mode of the report at instance creation time. The default value is -1, which means the previous mode is unknown and should be determined by the API.
        Parameters:
        executionMode - The previous execution mode.
        Since:
        MicroStrategy Web 9.0.0
      • getPreviousExecutionMode

        int getPreviousExecutionMode()
        Returns the previous execution mode for calls to getInstance that takes a message ID. This will be assumed to be the current execution mode of the report at instance creation time. The default value is -1, which means the previous mode is unknown and should be determined via the API.
        Returns:
        The previous execution mode.
        Since:
        MicroStrategy Web 9.0.0
      • getImportAsyncDashboardResult

        java.lang.String getImportAsyncDashboardResult​(java.lang.String messageID,
                                                       java.lang.String dashboardName,
                                                       boolean isResume)
                                                throws WebObjectsException
        Throws:
        WebObjectsException
      • getImportAsyncDashboardMessageID

        java.lang.String getImportAsyncDashboardMessageID​(java.io.InputStream data,
                                                          long dataLength,
                                                          java.lang.String folderID,
                                                          java.lang.String dashboardName,
                                                          java.lang.String dashboardDescription)
                                                   throws WebObjectsException
        Throws:
        WebObjectsException
      • getNewInstance

        RWInstance getNewInstance​(java.lang.String documentID,
                                  RWSettings rwSettings,
                                  boolean isDossier,
                                  java.lang.String bookmarkID,
                                  boolean manipulationsAutoSavingDisabled,
                                  int evaluationLevel,
                                  java.lang.String[] sharedBookmarkIds)
                           throws WebObjectsException
        Generates a new document instance by executing the document with the given Document ID.
        Parameters:
        documentID - The DSSID of the document to execute.
        rwSettings - the RWSettings object we use to obtain the new instance.
        isDossier - True, if this is a dossier request. It handles I-server RO command execution accordingly.
        manipulationsAutoSavingDisabled - Specific for personal view.
        evaluationLevel - For computation on demand, 0--all; 1--chapter(layout); 2--page(not supported yet).
        sharedBookmarkIds - The shared bookmark id list when the execution originates from bookmarks sharing.
        Returns:
        A RWInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException
        Since:
        MicroStrategy Web 11.3.0
      • getInstanceFromMessageID

        RWInstance getInstanceFromMessageID​(java.lang.String messageID,
                                            RWSettings settings)
                                     throws WebObjectsException
        Restore Document instance from message id with out polling status from iserver. For Internal use only.
        Parameters:
        messageID - id of instance
        settings - see RWSettings
        Returns:
        Restored RWInstance
        Throws:
        WebObjectsException
      • getShortcutBinaryCache

        byte[] getShortcutBinaryCache​(java.lang.String cacheId)
                               throws WebObjectsException
        Get dossier shortcut binary cache, only support one cache id in 11.1 Internal used only 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:
        cacheId -
        Returns:
        Throws:
        WebObjectsException
      • getShortcutCacheInfo

        java.lang.String getShortcutCacheInfo​(int type,
                                              java.lang.String shortcutId)
                                       throws WebObjectsException
        Get the cache info include definition cache and data cache for a dossier shortcut Internal used only
        Parameters:
        type - EnumDSSExportFormat - Flag to indicate export format. now only support DssExportFormatFlash = 7
        shortcutId -
        Returns:
        Throws:
        WebObjectsException
      • getShortcutCacheInfo

        java.lang.String getShortcutCacheInfo​(int type,
                                              java.lang.String shortcutId,
                                              java.lang.Integer resultFlags,
                                              java.lang.Integer detailFlags,
                                              java.lang.String bookmarkId)
                                       throws WebObjectsException
        Get the cache info include definition cache and data cache for a dossier shortcut Internal used only
        Parameters:
        type - EnumDSSExportFormat - Flag to indicate export format. now only support DssExportFormatFlash = 7
        shortcutId -
        resultFlags -
        detailFlags -
        bookmarkId -
        Returns:
        Throws:
        WebObjectsException
      • getShortcutCacheInfo

        java.lang.String getShortcutCacheInfo​(int type,
                                              java.lang.String shortcutId,
                                              java.lang.Integer resultFlags,
                                              java.lang.Integer detailFlags,
                                              java.lang.Integer shortcutCacheInfoFlag,
                                              java.lang.String bookmarkId)
                                       throws WebObjectsException
        Get the cache info include definition cache and data cache for a dossier shortcut Internal used only
        Parameters:
        type - EnumDSSExportFormat - Flag to indicate export format. now only support DssExportFormatFlash = 7
        shortcutId -
        resultFlags -
        detailFlags -
        shortcutCacheInfoFlag -
        bookmarkId -
        Returns:
        Throws:
        WebObjectsException
      • getShortcutCacheInfo

        java.lang.String getShortcutCacheInfo​(int type,
                                              java.lang.String shortcutId,
                                              java.lang.String instanceId,
                                              java.lang.Integer resultFlags,
                                              java.lang.Integer detailFlags,
                                              java.lang.Integer shortcutCacheInfoFlag,
                                              java.lang.String bookmarkId)
                                       throws WebObjectsException
        Get the cache info include definition cache and data cache for a dossier shortcut Internal used only
        Parameters:
        type - EnumDSSExportFormat - Flag to indicate export format. now only support DssExportFormatFlash = 7
        shortcutId -
        instanceId -
        resultFlags -
        detailFlags -
        shortcutCacheInfoFlag -
        bookmarkId -
        Returns:
        Throws:
        WebObjectsException