Interface WebDocumentSource


  • public interface WebDocumentSource
    The WebDocumentSource 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 7.3.1 or earlier
    • Method Detail

      • getNewInstance

        WebDocumentInstance 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 WebDocumentInstance object, representing the document executed by this method.
        Throws:
        WebObjectsException - Signals an error encountered by IServer when executing the document.
      • getInstance

        WebDocumentInstance getInstance​(java.lang.String messageID)
                                 throws WebObjectsException
        Returns a WebDocumentInstance 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 WebDocumentInstance object, representing the document with the given message ID.
        Throws:
        WebObjectsException - Thrown if the operation cannot be completed successfully.
      • getExecutionFlags

        int getExecutionFlags()
        Returns the current setting for the execution flags, which will be used when submitting a document for execution to the Intelligence Server.
        Returns:
        The current execution flags, the bitwise OR of values from EnumDSSXMLExecutionFlags.
      • setExecutionFlags

        void setExecutionFlags​(int executionFlags)
        Sets the execution flags, which will be used when submitting a document for execution to the Intelligence Server. The execution flags are enumerated in EnumDSSXMLDocExecutionFlags.
        Parameters:
        executionFlags - The execution flags setting to use. This should be the bitwise or of values from EnumDSSXMLDocExecutionFlags.
      • 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.
      • refresh

        WebDocumentInstance refresh​(java.lang.String messageID)
                             throws WebObjectsException
        Refreshes the document without reprompting the user to answer prompts again.

        This method will not reopen the prompts, which will cause the current prompt answer to be used.

        Returns:
        A new WebDocumentInstance value represent the refreshed results returned for this document.
        Throws:
        WebObjectsException - This exception is thrown if an error occurs in refresh action submitted.
      • refresh

        WebDocumentInstance refresh​(java.lang.String messageID,
                                    boolean reprompt)
                             throws WebObjectsException
        Refreshes the document and allows the caller to specify whether to reprompt the user to answer prompts again before submitting the document.

        If prompts are reopened (and prompts exist), then the user will be prompted to answer the prompts again. If the the prompts are not reopened, the current prompt answers will be used.

        Parameters:
        reprompt - true if the user should be asked to answer prompts again.
        Returns:
        A WebDocumentInstance represents the refreshed results returned for this document.
        Throws:
        WebObjectsException - This exception is thrown if an error occurs in the refresh action submitted.
      • getInstanceFromState

        WebDocumentInstance 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 WebDocumentInstance
        Parameters:
        savedStateStr - The saved state of a document instance.
        Returns:
        WebDocumentInstance 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

        WebDocumentInstance 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 WebDocumentInstance
        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:
        WebDocumentInstance A document instance restored to state specified by the input parameter.
        Throws:
        WebObjectsException - Thrown when an error occurs restoring the document instance state.
      • getInstanceFromSchedule

        @Deprecated
        WebDocumentInstance 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

        WebDocumentInstance 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:
        WebReportInstance A document instance built using the subscription information.
        Throws:
        WebObjectsException - Thrown when error ocurrs during creating the document instance
      • getInstanceFromSubscription

        WebDocumentInstance getInstanceFromSubscription​(WebSubscription subscription,
                                                        WebSubscriptionContent websubscriptionContent)
                                                 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 API can be used for multiple content subscription
        Parameters:
        subscription - The subscription object.
        websubscriptionContent - The subscription content object.
        Returns:
        WebReportInstance A document instance built using the subscription information.
        Throws:
        WebObjectsException - Thrown when error ocurrs during creating the document instance