Interface IDSSXMLFileLoader


  • public interface IDSSXMLFileLoader
    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.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] LoadGraph​(java.lang.String sessionID, java.lang.String messageID, java.lang.String windowSetting, int stateID, int graphImgType, java.lang.String graphProp)
      Load the graph binary of a report and return it as a byte array.
      void LoadGraph​(java.lang.String sessionID, java.lang.String messageID, java.lang.String windowSetting, int stateID, int graphImgType, java.lang.String graphProp, IContentConsumer consumer)
      Load the graph binary from backend and streams it to provided content consumer.
      byte[] LoadGraph​(java.lang.String sessionID, java.lang.String messageID, java.lang.String windowSetting, int stateID, int graphImgType, java.lang.String graphProp, IntWrapper iwStatus)
      Load the graph binary of a report and return it as a byte array.
      void SaveGraph​(java.lang.String sessionID, java.lang.String messageID, java.lang.String fileName, java.lang.String windowSetting, int stateID, int graphImgType, java.lang.String graphProp)
      Save the graph binary of a report to the given filename.
    • Field Detail

      • DEFAULT_LoadGraph_windowSetting

        static final java.lang.String DEFAULT_LoadGraph_windowSetting
        Default windowSetting parameter for LoadGraph method
        See Also:
        Constant Field Values
      • DEFAULT_LoadGraph_stateID

        static final int DEFAULT_LoadGraph_stateID
        Default stateID parameter for LoadGraph method
        See Also:
        Constant Field Values
      • DEFAULT_LoadGraph_graphImgType

        static final int DEFAULT_LoadGraph_graphImgType
        Default graphImgType parameter for LoadGraph method
        See Also:
        Constant Field Values
      • DEFAULT_LoadGraph_graphProp

        static final java.lang.String DEFAULT_LoadGraph_graphProp
        Default graphProp parameter for LoadGraph method
        See Also:
        Constant Field Values
      • DEFAULT_SaveGraph_windowSetting

        static final java.lang.String DEFAULT_SaveGraph_windowSetting
        Default windowSetting parameter for SaveGraph method
        See Also:
        Constant Field Values
      • DEFAULT_SaveGraph_stateID

        static final int DEFAULT_SaveGraph_stateID
        Default stateID parameter for SaveGraph method
        See Also:
        Constant Field Values
      • DEFAULT_SaveGraph_graphImgType

        static final int DEFAULT_SaveGraph_graphImgType
        Default graphImgType parameter for SaveGraph method
        See Also:
        Constant Field Values
      • DEFAULT_SaveGraph_graphProp

        static final java.lang.String DEFAULT_SaveGraph_graphProp
        Default graphProp parameter for SaveGraph method
        See Also:
        Constant Field Values
    • Method Detail

      • LoadGraph

        byte[] LoadGraph​(java.lang.String sessionID,
                         java.lang.String messageID,
                         java.lang.String windowSetting,
                         int stateID,
                         int graphImgType,
                         java.lang.String graphProp)
                  throws MSTRWebAPIException
        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.
      • LoadGraph

        byte[] LoadGraph​(java.lang.String sessionID,
                         java.lang.String messageID,
                         java.lang.String windowSetting,
                         int stateID,
                         int graphImgType,
                         java.lang.String graphProp,
                         IntWrapper iwStatus)
                  throws MSTRWebAPIException
        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.
      • SaveGraph

        void SaveGraph​(java.lang.String sessionID,
                       java.lang.String messageID,
                       java.lang.String fileName,
                       java.lang.String windowSetting,
                       int stateID,
                       int graphImgType,
                       java.lang.String graphProp)
                throws MSTRWebAPIException
        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.
      • LoadGraph

        void LoadGraph​(java.lang.String sessionID,
                       java.lang.String messageID,
                       java.lang.String windowSetting,
                       int stateID,
                       int graphImgType,
                       java.lang.String graphProp,
                       IContentConsumer consumer)
                throws MSTRWebAPIException
        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.
        Throws:
        MSTRWebAPIException