public interface

IDSSXMLFileLoader

com.microstrategy.webapi.IDSSXMLFileLoader

Class Overview

This class handles the loading of images (usually graphs) from the Intelligence Server. The original COM-based FileLoader was ASP-dependent, but the Java-based function has no such restriction.

Summary

Constants
int DEFAULT_LoadGraph_graphImgType Default graphImgType parameter for LoadGraph method
String DEFAULT_LoadGraph_graphProp Default graphProp parameter for LoadGraph method
int DEFAULT_LoadGraph_stateID Default stateID parameter for LoadGraph method
String DEFAULT_LoadGraph_windowSetting Default windowSetting parameter for LoadGraph method
int DEFAULT_SaveGraph_graphImgType Default graphImgType parameter for SaveGraph method
String DEFAULT_SaveGraph_graphProp Default graphProp parameter for SaveGraph method
int DEFAULT_SaveGraph_stateID Default stateID parameter for SaveGraph method
String DEFAULT_SaveGraph_windowSetting Default windowSetting parameter for SaveGraph method
Public Methods
abstract void LoadGraph(String sessionID, String messageID, String windowSetting, int stateID, int graphImgType, String graphProp, IContentConsumer consumer)
Load the graph binary from backend and streams it to provided content consumer.
abstract byte[] LoadGraph(String sessionID, String messageID, String windowSetting, int stateID, int graphImgType, String graphProp)
Load the graph binary of a report and return it as a byte array.
abstract byte[] LoadGraph(String sessionID, String messageID, String windowSetting, int stateID, int graphImgType, String graphProp, IntWrapper iwStatus)
Load the graph binary of a report and return it as a byte array.
abstract void SaveGraph(String sessionID, String messageID, String fileName, String windowSetting, int stateID, int graphImgType, String graphProp)
Save the graph binary of a report to the given filename.

Constants

public static final int DEFAULT_LoadGraph_graphImgType

Default graphImgType parameter for LoadGraph method

Constant Value: 1 (0x00000001)

public static final String DEFAULT_LoadGraph_graphProp

Default graphProp parameter for LoadGraph method

Constant Value: ""

public static final int DEFAULT_LoadGraph_stateID

Default stateID parameter for LoadGraph method

Constant Value: -1 (0xffffffff)

public static final String DEFAULT_LoadGraph_windowSetting

Default windowSetting parameter for LoadGraph method

Constant Value: ""

public static final int DEFAULT_SaveGraph_graphImgType

Default graphImgType parameter for SaveGraph method

Constant Value: 1 (0x00000001)

public static final String DEFAULT_SaveGraph_graphProp

Default graphProp parameter for SaveGraph method

Constant Value: ""

public static final int DEFAULT_SaveGraph_stateID

Default stateID parameter for SaveGraph method

Constant Value: -1 (0xffffffff)

public static final String DEFAULT_SaveGraph_windowSetting

Default windowSetting parameter for SaveGraph method

Constant Value: ""

Public Methods

public abstract void LoadGraph (String sessionID, String messageID, String windowSetting, int stateID, int graphImgType, String graphProp, IContentConsumer consumer)

Load the graph binary from backend and streams it to provided content consumer.

To display a report in graph mode, an HTML IMG tag needs to be added to the result page. The SRC attribute of the IMG tag should point to an ASP page. This ASP page should create a DSSXMLFileLoader object and call LoadGraph. The input parameters of LoadGraph need to be passed into the ASP page in someway. A possible implementation of this ASP page is given.

WindowSetting parameter is in XML format. It defines a subset of the report result. For details of the XML format, refer to the interface specification of IDSSXMLReportServer. Note that the windowSetting is optional. If it is not given, the windowSetting saved in the inbox of this report will be used.

A report can be manipulated multiple times (pivot twice and then sort for example). A Web user can also use the back button of a browser to return to any of the report state. The stateID parameter is used to identify each state. The original report has stateID = 0. Sub sequent report manipulation will increment the stateID by one.

This method takes a stateID as an optional parameter. When present, this method loads the graph that corresponds to the report state identified by this parameter. When left out, the graph of the final state (the state with the highest ID) is returned.

Any stateID that is higher than the highest stateID of a report results in an error.

A user can also provide the image type to be loaded. Parameter graphImgLoad takes its value from EnumDSSXMLGraphImgTypes.

A user can provide graph major/minor type and/or graph size (width/height in pixels) through the graphProp parameter. This parameter is in XML format. Refer to XML description section of the IDSSXMLReportServer.doc for details of the XML structure. Note that the graph type and/or size change is just a temporary change and is not remembered in the user inbox.

Parameters
sessionID A valid Session ID.
messageID The message/job ID of the graph report.
windowSetting XML that specify the portion of data to be loaded. [Default=""]
stateID Chooses the state of the report to show. Each report manipulation creates a new state. [Default=-1]
graphImgType The image type of the graph to show. Value must be from EnumDSSXMLGraphImgTypes. [Default=DssXmlGraphImgGIF]
graphProp XML that describes the graph properties(type and size). [Default=""]
consumer an object that will "consume" graph data. For example in case of rendering graph in HTML the consumer will steam the graph data directly to markup output.

public abstract byte[] LoadGraph (String sessionID, String messageID, String windowSetting, int stateID, int graphImgType, String graphProp)

Load the graph binary of a report and return it as a byte array.

To display a report in graph mode, an HTML IMG tag needs to be added to the result page. The SRC attribute of the IMG tag should point to an ASP page. This ASP page should create a DSSXMLFileLoader object and call LoadGraph. The input parameters of LoadGraph need to be passed into the ASP page in someway. A possible implementation of this ASP page is given.

WindowSetting parameter is in XML format. It defines a subset of the report result. For details of the XML format, refer to the interface specification of IDSSXMLReportServer. Note that the windowSetting is optional. If it is not given, the windowSetting saved in the inbox of this report will be used.

A report can be manipulated multiple times (pivot twice and then sort for example). A Web user can also use the back button of a browser to return to any of the report state. The stateID parameter is used to identify each state. The original report has stateID = 0. Sub sequent report manipulation will increment the stateID by one.

This method takes a stateID as an optional parameter. When present, this method loads the graph that corresponds to the report state identified by this parameter. When left out, the graph of the final state (the state with the highest ID) is returned.

Any stateID that is higher than the highest stateID of a report results in an error.

A user can also provide the image type to be loaded. Parameter graphImgLoad takes its value from EnumDSSXMLGraphImgTypes.

A user can provide graph major/minor type and/or graph size (width/height in pixels) through the graphProp parameter. This parameter is in XML format. Refer to XML description section of the IDSSXMLReportServer.doc for details of the XML structure. Note that the graph type and/or size change is just a temporary change and is not remembered in the user inbox.

Parameters
sessionID A valid Session ID.
messageID The message/job ID of the graph report.
windowSetting XML that specify the portion of data to be loaded. [Default=""]
stateID Chooses the state of the report to show. Each report manipulation creates a new state. [Default=-1]
graphImgType The image type of the graph to show. Value must be from EnumDSSXMLGraphImgTypes. [Default=DssXmlGraphImgGIF]
graphProp XML that describes the graph properties(type and size). [Default=""]
Returns
  • A byte array representing the graph that was retrieved.
Throws
MSTRWebAPIException Signals an error condition.

public abstract byte[] LoadGraph (String sessionID, String messageID, String windowSetting, int stateID, int graphImgType, String graphProp, IntWrapper iwStatus)

Load the graph binary of a report and return it as a byte array.

To display a report in graph mode, an HTML IMG tag needs to be added to the result page. The SRC attribute of the IMG tag should point to an ASP page. This ASP page should create a DSSXMLFileLoader object and call LoadGraph. The input parameters of LoadGraph need to be passed into the ASP page in someway. A possible implementation of this ASP page is given.

WindowSetting parameter is in XML format. It defines a subset of the report result. For details of the XML format, refer to the interface specification of IDSSXMLReportServer. Note that the windowSetting is optional. If it is not given, the windowSetting saved in the inbox of this report will be used.

A report can be manipulated multiple times (pivot twice and then sort for example). A Web user can also use the back button of a browser to return to any of the report state. The stateID parameter is used to identify each state. The original report has stateID = 0. Sub sequent report manipulation will increment the stateID by one.

This method takes a stateID as an optional parameter. When present, this method loads the graph that corresponds to the report state identified by this parameter. When left out, the graph of the final state (the state with the highest ID) is returned.

Any stateID that is higher than the highest stateID of a report results in an error.

A user can also provide the image type to be loaded. Parameter graphImgLoad takes its value from EnumDSSXMLGraphImgTypes.

A user can provide graph major/minor type and/or graph size (width/height in pixels) through the graphProp parameter. This parameter is in XML format. Refer to XML description section of the IDSSXMLReportServer.doc for details of the XML structure. Note that the graph type and/or size change is just a temporary change and is not remembered in the user inbox.

Parameters
sessionID A valid Session ID.
messageID The message/job ID of the graph report.
windowSetting XML that specify the portion of data to be loaded. [Default=""]
stateID Chooses the state of the report to show. Each report manipulation creates a new state. [Default=-1]
graphImgType The image type of the graph to show. Value must be from EnumDSSXMLGraphImgTypes. [Default=DssXmlGraphImgGIF]
graphProp XML that describes the graph properties(type and size). [Default=""]
iwStatus An IntWrapper which will contain the status of the operation. A value of 1 implies status ready.
Returns
  • A byte array representing the graph that was retrieved.
Throws
MSTRWebAPIException Signals an error condition.

public abstract void SaveGraph (String sessionID, String messageID, String fileName, String windowSetting, int stateID, int graphImgType, String graphProp)

Save the graph binary of a report to the given filename.

Parameters
sessionID A valid Session ID.
messageID The message/job ID of the graph report.
fileName The name of the file to save the graph to on the webserver. Note that the path should be included in this string, if necessary. Also, the directory must already exist for the graph to be created.
windowSetting XML to specify the portion of data to be loaded. [Default=""]
stateID Chooses the state of the report to show. Each report manipulation creates a new state. [Default=-1]
graphImgType The image type of the graph to show. See EnumDSSXMLGraphImgTypes. [Default=DssXmlGraphImgGIF]
graphProp XML that describes the graph properties(type and size) [Default=""]
Throws
MSTRWebAPIException Signals an error condition.