com.businessobjects.dsws.reportengine
Class ReportEngine

java.lang.Object
  extended by com.businessobjects.dsws.Consumer
      extended by com.businessobjects.dsws.reportengine.ReportEngine
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class ReportEngine
extends Consumer
implements java.io.Externalizable

ReportEngine class is a proxy that can consume the ReportEngine Web Service and that is mapped on its WSDL.
ReportEngine provides services to return DocumentInformation and Image objects.
DocumentInformation objects can contain all information and data related to a document stored on a Business Objects server.

Example: Initializing a ReportEngine instance.

 URL objURLSession = new URL("http://boserver:port/dswsbobje/services/Session");
 Connection objConnection = new Connection(objURLSession);
 Session objSession = new Session(objConnection);

 EnterpriseCredential objEnterpriseCredential = EnterpriseCredential.Factory.newInstance();
 objEnterpriseCredential.setLogin("John");
 objEnterpriseCredential.setPassword("MyPassword1973");
 objEnterpriseCredential.setDomain("MyCMS");
 objEnterpriseCredential.setLocale("en_US");
 objEnterpriseCredential.setTimeZone("GMT+01:00");
 SessionInfo objSessionInfo = objSession.login(objEnterpriseCredential);
 String[] astrURLs = objSession.getAssociatedServicesURL("ReportEngine");
 // If no URL is returned, the service is not available
 if (astrURLs.length > 0)
 {
        ReportEngine objReportEngine = ReportEngine.getInstance(objSession, astrURLs[0]);
 }
 

See Also:
Connection, AuthenticationCredential, Session, Serialized Form

Constructor Summary
ReportEngine()
          Instantiates a new ReportEngine object
ReportEngine(Connection objConnection, ConnectionState objConnectionState)
          Instantiate a new ReportEngine object using Connection and ConnectionState objects.
ReportEngine(java.lang.String strImplementation, ConnectionState objConnectionState)
          Internal Use Only.
 
Method Summary
 DocumentInformation getDataSourceObjectLOV(java.lang.String dataSourceUID, java.lang.String dataSourceObjectKey, RetrieveMustFillInfo retrieveMustFillInfo)
          The getDataSourceObjectLOV method returns a DocumentInformation corresponding to the temporary document created to get the LOV object that represents the list of values of the given DataSourceObject.
 DocumentInformation getDocumentInformation(java.lang.String documentReference, RetrieveMustFillInfo retrieveMustFillInfo, Action[] actions, Navigate navigate, RetrieveData retrieveData)
          The getDocumentInformation method returns a DocumentInformation corresponding to a unique ID (UID) or document reference.
 Image getImage(java.lang.String documentReference, java.lang.String imageName)
          Returns an Image embedded in a document.
static ReportEngine getInstance(Consumer objConsumer, java.lang.String strURL)
          GetInstance static method returns a ReportEngine by passing the Web Service URL and an already logged Consumer object.
 void readExternal(java.io.ObjectInput in)
          Internal Use Only.
 void writeExternal(java.io.ObjectOutput out)
          Internal Use Only.
 
Methods inherited from class com.businessobjects.dsws.Consumer
CreateAxisFault, displayException, GetAxisFaultDetails, getConnection, getConnection, getConnectionState, getConsumer, getConsumer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportEngine

public ReportEngine(java.lang.String strImplementation,
                    ConnectionState objConnectionState)
             throws AxisFault

Internal Use Only.

Throws:
AxisFault

ReportEngine

public ReportEngine(Connection objConnection,
                    ConnectionState objConnectionState)
             throws AxisFault
Instantiate a new ReportEngine object using Connection and ConnectionState objects.

Example: Initializing a ReportEngine instance.

Connection objConnection = new Connection(objURLSession);
SessionInfo objSessionInfo = objSession.Login(objEnterpriseCredential);
String[] astrURLs = objSession.getAssociatedServicesURL("ReportEngine");

// If no URL is returned, the service is not available
if (astrURLs.length > 0)
{
objConnection.setURL(new URL(astrURLs[0]));
ReportEngine objReportEngine = new ReportEngine(objConnection, objSession.getConnectionState());
}

Parameters:
objConnection - a valid Connection object with the URL set to the ReportEngine service.
objConnectionState - the ConnectionState of the current user session.
Throws:
AxisFault
See Also:
Connection, ConnectionState

ReportEngine

public ReportEngine()
Instantiates a new ReportEngine object

Method Detail

getInstance

public static ReportEngine getInstance(Consumer objConsumer,
                                       java.lang.String strURL)
                                throws AxisFault
GetInstance static method returns a ReportEngine by passing the Web Service URL and an already logged Consumer object.

Parameters:
objConsumer - one of the current user's consumer objects.
strURL - URL to connect to the ReportEngine web service.
Returns:
An instance of ReportEngine.
Throws:
DSWSException - Exception raised either as a Web Service SOAP Fault or as a Consumer side trapped exception.
Note:If the user is not logged in or the service name is unknown, NULL will be returned.

Example: Initializing a ReportEngine instance.

 URL objURLSession = new URL("http://boserver:port/dswsbobje/services/Session");
 Connection objConnection = new Connection(objURLSession);
 Session objSession = new Session(objConnection);

 EnterpriseCredential objEnterpriseCredential = EnterpriseCredential.Factory.newInstance();
 objEnterpriseCredential.setLogin("John");
 objEnterpriseCredential.setPassword("MyPassword1973");
 objEnterpriseCredential.setDomain("MyCMS");
 objEnterpriseCredential.setLocale("en_US");
 objEnterpriseCredential.setTimeZone("GMT+01:00");
 SessionInfo objSessionInfo = objSession.login(objEnterpriseCredential);
 String[] astrURLs = objSession.getAssociatedServicesURL("ReportEngine");

 // If no URL is returned, the service is not available
 if (astrURLs.length > 0)
 {
        ReportEngine objReportEngine = ReportEngine.getInstance(objSession, astrURLs[0]);
 }
 
AxisFault
See Also:
Connection, AuthenticationCredential, Session

getDocumentInformation

public DocumentInformation getDocumentInformation(java.lang.String documentReference,
                                                  RetrieveMustFillInfo retrieveMustFillInfo,
                                                  Action[] actions,
                                                  Navigate navigate,
                                                  RetrieveData retrieveData)
                                           throws AxisFault
The getDocumentInformation method returns a DocumentInformation corresponding to a unique ID (UID) or document reference. A DocumentInformation object is capable of containing all possible information relating to a document stored on a Web Services provider server. GetDocumentInformation enables the choice of data returned with the DocumentInformation object and actions performed on it when it is opened.

Example: Retrieve the last page of a refreshed document's current report in HTML format.

 Document[] bodocList = objBICatalog.getDocumentList("", 0, null, null, null, InstanceRetrievalType.ALL);
 Document myBODoc = bodocList[0];
 String strBODocuid = myBODoc.getUID();
 RetrieveData retBOData = RetrieveData.Factory.newInstance();
 RetrieveView retBOView = RetrieveView.Factory.newInstance();
 retBOData.setRetrieveView(retBOView);
 Navigate nPage = NavigateToLastPage.Factory.newInstance();
 Action[] actions = new Action[1];
 actions[0] = Refresh.Factory.newInstance();
 DocumentInformation boDocInfo = objReportEngine.getDocumentInformation( strBODocuid, null, actions, nPage, retBOData);
 CharacterView myBOView = (CharacterView)boDocInfo.getView();
 String docContents = myBOView.getContent();
 

Parameters:
documentReference - A documentInstance's unique ID, retrieved using BICatalog or a document reference, retrieved from a DocumentInformation object.
retrieveMustFillInfo - Controls information that has to be supplied to the document for it to open correctly. This information includes DBLoginInfo, prompts and query contexts. Set to null if no information is to be passed to the document.
actions - An array of actions to be performed on the document. Possible actions are:
  • Refresh
  • Drill
  • FillQueryContexts
  • FillPrompts
  • EmbeddedAction
  • FillPassword
  • FillDBLogons
  • Close
  • UpdateTrackData
  • FillDataSourceParameterValues
Set to null if no action to be performed.
navigate - set the current location of a document. Set to null to open at the user's current page.
retrieveData - Set the data to be retrieved with the DocumentInformation object.
Returns:
a DocumentInformation object corresponding to the UID or document reference supplied in the parameters.
Throws:
AxisFault
See Also:
BICatalog, Document, DocumentInformation, RetrieveMustFillInfo, Action, Navigate, RetrieveData, Connection, AuthenticationCredential, Session

getImage

public Image getImage(java.lang.String documentReference,
                      java.lang.String imageName)
               throws AxisFault
Returns an Image embedded in a document.
This method is used in conjunction with the ImageManagement class.

Parameters:
documentReference - UID of the document in which the image is embedded.
imageName - The name of the image to be retrieved.
Returns:
an Image object.
Throws:
AxisFault
See Also:
Image, ImageManagement

getDataSourceObjectLOV

public DocumentInformation getDataSourceObjectLOV(java.lang.String dataSourceUID,
                                                  java.lang.String dataSourceObjectKey,
                                                  RetrieveMustFillInfo retrieveMustFillInfo)
                                           throws AxisFault
The getDataSourceObjectLOV method returns a DocumentInformation corresponding to the temporary document created to get the LOV object that represents the list of values of the given DataSourceObject. A DocumentInformation object is capable of containing all possible information relating to a document stored on a Web Services provider server. Please use the method getDocumentInformation getDocumentInformation to: - fill in the eventual nested prompts contained in the LOV, - get all the other batches or chunks of the LOV you want to get, - close the temporary document created once you've got the complete LOV and don't want to access to it anymore. Once the web service manages to compute the datasource LOV, it puts it DocumentInformation.PromptInfos[0].LOV. Once you've got the complete LOV and don't want to access to it anymore, it is highly recommanded to use the method GetDocumentInformation to close the temporary document created by the call to getDataSourceObjectLOV.

Example: Retrieve the values of a datasource object LOV in chunks.

        int iBatchIndex = 0;
        RetrieveMustFillInfo boRetrieveMustFillInfo = RetrieveMustFillInfo.Factory.newInstance();
        RetrievePromptsInfo boRetrievePromptsInfo = RetrievePromptsInfo.Factory.newInstance();
        LOVBatch boLOVBatch = LOVBatch.Factory.newInstance();
        boLOVBatch.setIndex(iBatchIndex);
        boRetrievePromptsInfo.setLOVBatch(boLOVBatch);
        boRetrieveMustFillInfo.setRetrievePromptsInfo(boRetrievePromptsInfo);
        DocumentInformation boDocInfo = objReportEngine.getDataSourceObjectLOV(strDataSourceUID, strDataSourceObjectKey, boRetrieveMustFillInfo);
        // Assume the LOV has no nested prompts, so LOV is under boDocInfo.getPromptInfo(0).getLOV()
        PromptInfo[] boPromptInfo = boDocInfo.getPromptInfoArray();
        LOV boLOV = boPromptInfo[0].getLOV();
        int iBatchCount = boLOV.getBatchNameArray().length;
        Value[] aboValues = boLOV.getValuesArray();
        String strDocumentReference = boDocInfo.getDocumentReference();
        while (true)
        {
        // Do something with the current chunk of LOV.  For example,
        // you could display the values.
iBatchIndex++; if (iBatchIndex >= iBatchCount) break; boLOVBatch.setIndex(iBatchIndex); boDocInfo = objReportEngine.getDocumentInformation(strDocumentReference, boRetrieveMustFillInfo, null, null, null); boPromptInfo = boDocInfo.getPromptInfoArray(); boLOV = boPromptInfo[0].getLOV(); aboValues = boLOV.getValuesArray(); }

Parameters:
dataSourceUID - the UID of the DataSource (or Universe)
dataSourceObjectKey - the Key of the DataSourceObject
retrieveMustFillInfo - Controls information that has to be supplied to the document for it to open correctly. This information includes DBLoginInfo, prompts and query contexts. Set to null if no information is to be passed to the document.
Returns:
a DocumentInformation object corresponding to the temporary document created to access to the LOV for the DataSourceObject represented by the dataSourceObjectKey
Throws:
AxisFault
See Also:
BICatalog, Document, DocumentInformation, RetrieveMustFillInfo, Connection, AuthenticationCredential, Session, DataSourceObject, DataSourceSpecification, DataSource

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException

Internal Use Only.

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException

Internal Use Only.

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException