|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.businessobjects.dsws.Consumer
com.businessobjects.dsws.reportengine.ReportEngine
public class ReportEngine
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]);
}
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)
|
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 |
|---|
public ReportEngine(java.lang.String strImplementation,
ConnectionState objConnectionState)
throws AxisFault
Internal Use Only.
AxisFault
public ReportEngine(Connection objConnection,
ConnectionState objConnectionState)
throws AxisFault
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());
}
objConnection - a valid Connection object with the URL set to the ReportEngine service.objConnectionState - the ConnectionState of the current user session.
AxisFaultConnection,
ConnectionStatepublic ReportEngine()
| Method Detail |
|---|
public static ReportEngine getInstance(Consumer objConsumer,
java.lang.String strURL)
throws AxisFault
objConsumer - one of the current user's consumer objects.strURL - URL to connect to the ReportEngine web service.
DSWSException - Exception raised either as a Web Service SOAP Fault or as a Consumer side trapped exception.
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]);
}
AxisFaultConnection,
AuthenticationCredential,
Session
public DocumentInformation getDocumentInformation(java.lang.String documentReference,
RetrieveMustFillInfo retrieveMustFillInfo,
Action[] actions,
Navigate navigate,
RetrieveData retrieveData)
throws AxisFault
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();
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:
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.
AxisFaultBICatalog,
Document,
DocumentInformation,
RetrieveMustFillInfo,
Action,
Navigate,
RetrieveData,
Connection,
AuthenticationCredential,
Session
public Image getImage(java.lang.String documentReference,
java.lang.String imageName)
throws AxisFault
documentReference - UID of the document in which the image is embedded.imageName - The name of the image to be retrieved.
AxisFaultImage,
ImageManagement
public DocumentInformation getDataSourceObjectLOV(java.lang.String dataSourceUID,
java.lang.String dataSourceObjectKey,
RetrieveMustFillInfo retrieveMustFillInfo)
throws AxisFault
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();
}
dataSourceUID - the UID of the DataSource (or Universe)dataSourceObjectKey - the Key of the DataSourceObjectretrieveMustFillInfo - 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.
LOV
for the DataSourceObject represented by the dataSourceObjectKey
AxisFaultBICatalog,
Document,
DocumentInformation,
RetrieveMustFillInfo,
Connection,
AuthenticationCredential,
Session,
DataSourceObject,
DataSourceSpecification,
DataSource
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
Internal Use Only.
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
Internal Use Only.
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||