public interface

WebDocumentSource

com.microstrategy.web.objects.WebDocumentSource

Class Overview

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.

Summary

Public Methods
abstract int getExecutionFlags()
Returns the current setting for the execution flags, which will be used when submitting a document for execution to the Intelligence Server.
abstract WebDocumentInstance getInstance(String messageID)
Returns a WebDocumentInstance representing the document execution with the given message ID.
abstract WebDocumentInstance getInstanceFromSchedule(WebSchedule schedule)
This method is deprecated. Starting with version 9.0 and the advent of Distribution Services, all schedule objects are replaced by subscriptions. Please use getInstanceFromSubscription(WebSubscription) instead.
abstract WebDocumentInstance getInstanceFromState(String savedStateStr)
Creates a document instance based on a pre-stored document state.
abstract WebDocumentInstance getInstanceFromState(SAXSupport parser, String uri, String localName, String qName, Attributes attrs)
Create a document instance based on a pre-stored document state.
abstract WebDocumentInstance getInstanceFromSubscription(WebSubscription subscription)
Create a document instance based on the subscription object.
abstract WebDocumentInstance getNewInstance(String documentID)
Generates a new document instance by executing the document with the given Document ID.
abstract String getPromptAnswer()
Returns the prompt answer, if any, which will be used to pre-answer prompts when executing a new document.
abstract WebDocumentInstance refresh(String messageID, boolean reprompt)
Refreshes the document and allows the caller to specify whether to reprompt the user to answer prompts again before submitting the document.
abstract WebDocumentInstance refresh(String messageID)
Refreshes the document without reprompting the user to answer prompts again.
abstract void setExecutionFlags(int executionFlags)
Sets the execution flags, which will be used when submitting a document for execution to the Intelligence Server.
abstract void setPromptAnswer(String promptAnswer)
Sets a prompt answer which will be used to pre-answer any documents executed by this object.

Public Methods

public abstract 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

public abstract WebDocumentInstance getInstance (String messageID)

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
Throws
WebObjectsException Thrown if the operation cannot be completed successfully.

public abstract WebDocumentInstance getInstanceFromSchedule (WebSchedule schedule)

This method is 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

public abstract WebDocumentInstance getInstanceFromState (String savedStateStr)

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.

public abstract WebDocumentInstance getInstanceFromState (SAXSupport parser, String uri, String localName, String qName, Attributes attrs)

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.

public abstract WebDocumentInstance getInstanceFromSubscription (WebSubscription subscription)

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

public abstract WebDocumentInstance getNewInstance (String documentID)

Generates a new document instance by executing the document with the given Document ID.

Parameters
documentID The DSSID of the document to execute.
Returns
Throws
WebObjectsException Signals an error encountered by IServer when executing the document.

public abstract 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.

public abstract WebDocumentInstance refresh (String messageID, boolean reprompt)

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
Throws
WebObjectsException This exception is thrown if an error occurs in the refresh action submitted.

public abstract WebDocumentInstance refresh (String messageID)

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
Throws
WebObjectsException This exception is thrown if an error occurs in refresh action submitted.

public abstract 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.

public abstract void setPromptAnswer (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.