The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

About the extension bundle 4.1 About the IExtension interface AllbundleextensioncontributorswillimplementtheIExtensioninterface.Thisclassiscreatedinthe

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by , 2016-10-20 01:05:03

Using extension points to customize the Web Intelligence ...

About the extension bundle 4.1 About the IExtension interface AllbundleextensioncontributorswillimplementtheIExtensioninterface.Thisclassiscreatedinthe

Using extension points to customize the Web Intelligence interface
■ SAP BusinessObjects Business Intelligence Suite 4.1 Support Package 2

2013-11-07

Copyright © 2013 SAP AG or an SAP affiliate company. All rights reserved. No part of this publication may be
reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice. Some software products
marketed by SAP AG and its distributors contain proprietary software components of other software
vendors. National product specifications may vary. These materials are provided by SAP AG and its
affiliated companies ("SAP Group") for informational purposes only, without representation or warranty
of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP Group products and services are those that are set forth in the express
warranty statements accompanying such products and services, if any. Nothing herein should be
construed as constituting an additional warranty. SAP and other SAP products and services mentioned
herein as well as their respective logos are trademarks or registered trademarks of SAP AG in
Germany and other countries. Please see
http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark
information and notices.

2013-11-07

Contents

Chapter 1 About this guide......................................................................................................................5

Chapter 2 Document history....................................................................................................................7

Chapter 3 About Web Intelligence extension points................................................................................9

Chapter 4 About the extension bundle...................................................................................................11
4.1 About the IExtension interface................................................................................................11
4.2 About the extension bundle....................................................................................................11
4.2.1 To create an extension bundle................................................................................................12
4.3 Extension bundle recommendations.......................................................................................12
4.4 To declare the extension bundle contribution..........................................................................13
4.5 To implement the IExtension interface....................................................................................14
4.5.1 About the getExtension method properties............................................................................15
4.6 To build the extension bundle.................................................................................................15
4.7 For 64 bit Windows: To deploy the extension point bundles on the Tomcat application server.16
4.8 To test the extension bundle..................................................................................................16
4.9 About the extension bundle sample........................................................................................17

Chapter 5 The user interface JavaScript APIs.......................................................................................19
5.1 About the user interface JavaScript APIs...............................................................................19
5.1.1 addEventListener...................................................................................................................19
5.1.2 setWaitCursorDisplayed........................................................................................................20
5.1.3 displayErrorMessage..............................................................................................................20
5.1.4 navigateTo.............................................................................................................................21
5.1.5 getContext.............................................................................................................................21
5.1.6 loadReport.............................................................................................................................21
5.1.7 reloadPane.............................................................................................................................22
5.1.8 attachDefaultButton...............................................................................................................22
5.1.9 setTitle...................................................................................................................................22
5.1.10 resize.....................................................................................................................................23

3 2013-11-07

5.1.11 Contents
5.1.12
5.1.13 close......................................................................................................................................23
5.1.14 setButtonText........................................................................................................................23
5.1.15 setButtonTitle........................................................................................................................23
5.1.16 setButtonDisabled.................................................................................................................24
setButtonDisplayed................................................................................................................24
Chapter 6 buttonEvents..........................................................................................................................24

6.1 Using the Web Intelligence services JavaScript APIs..........................................................25
6.1.1
6.1.2 About the Web Intelligence services JavaScript APIs.............................................................25
6.1.3 getParameters.......................................................................................................................25
6.1.4 refreshDocument...................................................................................................................25
6.1.5 getReports.............................................................................................................................26
6.1.6 createReport..........................................................................................................................26
6.1.7 updateReport.........................................................................................................................26
6.1.8 getReportSpecification...........................................................................................................27
6.1.9 updateReportSpecification.....................................................................................................27
6.1.10 getReportMap........................................................................................................................27
6.1.11 getReportOutput....................................................................................................................28
6.1.12 getDataProviders...................................................................................................................28
6.1.13 getReportElement..................................................................................................................28
6.1.14 getDPDetails..........................................................................................................................29
6.1.15 addDataProvider....................................................................................................................29
6.1.16 updateDataProvider...............................................................................................................29
6.1.17 getDPQuerySpec...................................................................................................................30
6.1.18 updateDPQuerySpec.............................................................................................................30
6.1.19 updateDPNbFlows.................................................................................................................30
6.1.20 getDPFlowDetails..................................................................................................................31
6.1.21 exportReportListingMode.......................................................................................................31
6.1.22 exportReportElement.............................................................................................................31
6.1.23 getVariables...........................................................................................................................32
6.1.24 addVariable............................................................................................................................32
6.1.25 updateVariable.......................................................................................................................32
getVariableDefinition..............................................................................................................33
deleteVariable........................................................................................................................33

4 2013-11-07

About this guide

About this guide

This document provides a description of how to use the Extension Points SDK to interact with the Web
Intelligence (DHTML and Java interfaces) and Web Intelligence documents via the JavaScript APIs.
This guide is intended for SAP BusinessObjects administrators and report creators who wish to customize
the interface and use the JavaScript API calls to create and interact with reports. This document describes
how to create your extension and use the calls to interact with documents.

5 2013-11-07

About this guide
6 2013-11-07

Document history

Document history

The following table provides an overview of the most important document changes.

Version Date Description

SAP Web Intelligence User In-
terface Extension Points API 4.1 November 2013 New product for the 4.1 release.
SP02

7 2013-11-07

Document history
8 2013-11-07

About Web Intelligence extension points

About Web Intelligence extension points

Develop and deploy extension bundles in order to create functions that can be used by specific groups
of Web Intelligence users. You use the CMC to define which extensions are available to a selected
user group.
1. Declare and deploy the extension bundles.
2. Use the provided models to define and call the Javascript user interface APIs. refer to the JavaScript

APIs to call the RESTful services in order to interact with Web Intelligence Documents.
3. In the CMC, use the customization panel in order to select the extensions that you want to make

available to users.
Related Topics
• About the IExtension interface
• About the user interface JavaScript APIs

How to create extension points and use the RESTful services API to interact with Web
Intelligence documents.
• About the Web Intelligence services JavaScript APIs
An overview of how you can use the Web Intelligence RESTful web service JavaScript APIs
to interact with reports.

9 2013-11-07

About Web Intelligence extension points
10 2013-11-07

About the extension bundle

About the extension bundle

4.1 About the IExtension interface

All bundle extension contributors will implement the IExtension interface. This class is created in the
com.sap.webi.toolkit.extension package, which must be exported to make the interface available for
the extensions.
The interface IExtension has to methods:
ExtensionProperties getExtensionProperties (String lang):
The implementation of this method must return the Extension Properties.
List<IUIElement> getContribution (String lang):
The implement of this method must return 1 or N UIElements. The parameter lang takes the current
UI language as value.

4.2 About the extension bundle

The extension bundle is a webpath bundle. Its folders must be organized following some
recommendations. Please see paragraph 2.2.2 for more details. The bundle must be a fragment linked
to the bundle host webpath.AnalyticalReporting. It behaves like language pack fragment. The content
of the extension is merged to webpath.AnalyticalReporting host. Here is an example of merged folder
structure.

web
webiApplet
webiDHTML
viewer

extension
<Provider>
<Extension name>

11 2013-11-07

About the extension bundle

4.2.1 To create an extension bundle

You must have SAP Business Objects Enterprise Server installed in your development machine.
Create the extension bundle in order to use the extension points. To create an Extension bundle, it is
highly recommended to build a development environment based on Eclipse 3.6 or higher.
1. Open Eclipse and select Plug-in Development perspective as your work perspective
2. Edit the Eclipse preferences and set the Java/Installed runtimes to JDK 1.6.0.x.
3. Right-click on "Package Explorer" and select "Import."
4. In the "Import" dialog box, select Plug-in development/import plug-ins and Fragments and click

Next.
5. Select the Directory option in Import From. The directory must be C:\Program Files (x86)\SAP

BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\warfiles\we
bapps\BOE\WEB-INF\eclipse\plugins.
6. Select "com.businessobjects.webpath.AnalyticalReporting" bundle and click Finish.
You can now create the extension bundle
7. Right-click on Package Explorer and select New/Plug-in Development. Select Fragment project
and click Next.
8. Fill in the "New Fragment Project" dialog box as below and click Next.
a. Select Use default location
b. Select Create a Java project"(Source folder": src," Output folder": bin)
• Select an OSGi framework: Equinox
9. Fill in the "Fragment Content" as below:
a. ID: com.businessobjects.webpath.AnalyticalReporting_SAP_ExtensionName
b. Version: 1.0.0
c. Name: Extension Name
d. Provider: SAP
e. Execution Environment: JavaSE-1.6
10. Click Finish.

4.3 Extension bundle recommendations

Following recommendations

12 2013-11-07

About the extension bundle

Extension bundle naming convention
The name of the extension bundle must follow the template below in order to fit the BOE deployment.
com.businessobjects.webpath.AnalyticalReporting_<Provider>_<ExtensionName>
Note:
Provider and Extension name must contain only alphanumeric characters. The space character is not
recommended. If a space is required it can be replaced by the underscore character and they must be
the same as those provided by the extension attributes.

Bundle folders organization
In the BOE OSGI framework, the webpath.AnalyticalReporting bundle host and its fragment bundles
(language packs and extensions) are merged. In order to avoid some files overriding others, respect
the following constraints to the extension bundle folders organization. The extension bundle is a webpath
and it must organize its folders as following way:

web
extension
<Provider>
<Extension name>

WEB-INF
lib

• web: is the top folder of all webpath bundles,
• extension: means the sub-folders belong to an extension bundle,
• Provider: the name of bundle provider. The provider can be a vendor or a company name
• Extension name: the name should reflect the functionality provided by the extension
• WEB-INF/lib: the folder where you can deploy libraries. Mainly jar files.
Add folders and jars to the classpath in order to be found and loaded by the class loader.

Root path
The root path of the extension bundle is the folder from where the resource files are deployed.
The root path is web/extension/<Provider>/<Extension name>.
The bundle resources can be html, JavaScript, jsp, images files. This is non-exhaustive list of file types.
Important: all URL to resources must be relative to root path.

Extension bundle contribution
The extension bundle is created to contribute to the webpath.AnalyticalReporting bundle host.
The extension declaration is done in the MANIFEST.MF file. We will use the manifest editor to do it.
Open the MANIFEST.MF file and select the Overview tab. Click on Extensions link in
“Extension/Extension Point Content” area.

4.4 To declare the extension bundle contribution

13 2013-11-07

About the extension bundle

The extension bundle is created to contribute to the webpath.AnalyticalReporting bundle host.
The extension declaration is done in the MANIFEST.MF file.

1. Open the MANIFEST.MF file and select the Overview tab.
2. Click on Extensions link in “Extension/Extension Point Content” area
3. In Extensions tab, you click on Add button to display the list of available extension points.
4. Select the com.businessobjects.webpath.AnalyticalReporting.webiApplication

extension point and click Finish.
5. Select the created extension com.businessobjects.webpath.AnalyticalReporting_SAP_CustomButton

in order to define attributes.

Table 4-1:

Attribute Property
id com.sap.custombutton
class com.sap.custombutton.Extension
name Custom Button
provider SAP
varsion 1.0.0

The id attribute can take the bundle name and class attribute refers a java class that implements
the interface IExtension.

4.5 To implement the IExtension interface

The extension bundle must implement the IExtension interface to contribute to webpath.Analytical
Reporting bundle host.

The interface has two methods. Both methods must be implemented by the created java class.

The method getExtensionProperties (String lang) returns Extension Properties in required
language.
1. create a package with the template: com.<Provider>.<Extension name>. The package must

contain alphanumeric characters and a dot character as separator.
2. Select the created package and right-click on it to create a java class.The java class must implement

the IExtension interface.

14 2013-11-07

About the extension bundle

4.5.1 About the getExtension method properties

This method returns an instance of ExtensionProperties class. The instance is provided by the Extension
and it must contain the following properties:
• Title: The extension Title that is displayed in Extension Management UI in CMC application.
• Description: it provides a short description of the feature provided by the Extension.

4.6 To build the extension bundle

To use the Extension bundle in your deployment, build the bundle to create a deployable jar file. In our
use case we only create a build binary.
Note:
In the out-of-the-box installation, Tomcat 6 is used as an application server. The warpath bundles are
not deployed as jar files but as sub-folders under <Tomcat DIR>\webapps\BOE\WEB-INF\eclipse\plugins
folder.
1. In the Project Explorer (or Package explorer), double-click on the build.properties file to open it.
2. Select folders according to the table below and click on “Export deployable plug-ins and fragments”

button (surrounded in red). The Export dialog is displayed to set some options on how to export the
bundle.
Binary build files to select
META-INF
bin
web

3. Click the“Export deployable plug-ins and fragments” icon (top right)
4. Select the Extension bundle project in plug-ins list and specify in Destination tab the folder where

the jar is generated. If you select the project folder then a new folder with name “plugins” and the
plugin jar is copied in this folder.
5. Convert the Extension bundle jar file to a zip file.
6. Create a new folder webpath.AnalyticalReporting_SAP_CustomButton in the same folder as the
built jar file.
7. Right-click on the jar file and select “Extract files”. Select the new folder webpath.AnalyticalRe
porting_SAP_CustomButton to extract the content of the jar.
8. Create a zip file webpath.AnalyticalReporting_SAP_CustomButton_1.0.0.zip and put
the folder webpath.AnalyticalReporting_SAP_CustomButton into the zip file.

15 2013-11-07

About the extension bundle

4.7 For 64 bit Windows: To deploy the extension point bundles on the Tomcat
application server

How to deploy the jfxrt.jar file for using Web Intelligence user interface extension points with the Java
Applet.
You must have Java 7 installed on the computer where you deploy the extension points.
Note:
When deploying the extension points for Web Intelligence Rich Client, there is no specific action required.
When deploying the extension points for a desktop computer for use wiith the Java Applet, you must
create a copy of the jfxrt.jar file. Do the following:
• Copy the jfxrt.jar file to the extension file. How you do this depends on whether you are using a

32-bit or 64-bit machine:
a. For a Windows 32-bit machine, copy the file C:\Program Files\Java\jre7\lib\jfxrt.jar

to the folder: C:\Program Files\Java\jre7\lib\ext.
b. For a Windows 64-bit machine, copy the file C:\Program Files

(x86)\Java\jre7\lib\jfxrt.jar to the folder: C:\Program Files
(x86)\Java\jre7\lib\ext.

4.8 To test the extension bundle

Use the zip file webpath.AnalyticalReporting.webpath_SAP_ExtensionSample_1.0.0.zip to test the
Extension Points.
1. Stop Tomcat
2. Extract all the contents of the zip file in <Tomcat DIR>\webapps\BOE\WEB-

INF\eclipse\plugins and also in Tomcat cache: <Tomcat DIR>\work\Catalina\local
host\BOE\eclipse\plugins.
3. Start Tomcat.
4. Log on to the CMC and in the home page click on the User Groups link.
5. Click on the" Group List" item on the left pane to display all available groups.
6. Right-click on a group name you want to customize and click on Customization item.
7. A customization dialog page is displayed. Select the "Extensions" tab to display all installed
Extensions.
8. Check the Extensions you want to validate and make them available for users of the selected group.
9. Click on Save and close button to save your selection.

16 2013-11-07

About the extension bundle

10. In order to see the Extension in action, your test User must be a member of the customized "User
Group".

4.9 About the extension bundle sample

You can start using the provided Extension bundle sample as a starter kit for your Extension bundle
development. The sample shows how to use the provided JavaScript APIs to interact with WebI DHTML
application and also with WebI services. This sample has two functionalities.
• Start and stop a periodic refresh of the document in the side panel.
• Show and update Report Specification in a custom dialog box.
To use the sample, you just deploy the provided zip on your installed BOE server build. You must have
installed an out-of-the-box build and the Tomcat installation folder is C:\Program Files (x86)\SAP
BusinessObjects\Tomcat6. We call this folder <Tomcat DIR>.

17 2013-11-07

About the extension bundle
18 2013-11-07

The user interface JavaScript APIs

The user interface JavaScript APIs

5.1 About the user interface JavaScript APIs

How to create extension points and use the RESTful services API to interact with Web Intelligence
documents.
This chapter provides a description of how to use the extension points SDK to modify and setup the
Web Intelligence interface to interact with Web Intelligence documents via the RESTful services API.

5.1.1 addEventListener

You can add an event listener to your code

/**
* Add event listenerbr*
* @parambr* Object eventType: WebiApplication.Events
* callback: Function
*/
WebiApplication.addEventListener(

{
eventType,
callback
})

WebiApplication.Events =
{
UNDO_REDO,
REPORT_PAGE_LOADED,
DATA_REFRESHED,
REPORT_SELECTED
REPORT_ELEMENT_SELECTED
}

The callback function is called when the event manager caches an event. The callback function will
receive 2 parameters: eventType and data. The second parameter is optional and its value depends
on the eventType.

19 2013-11-07

The user interface JavaScript APIs

eventType Data

UNDO_REDO No value

RE- No value
PORT_PAGE_LOAD-
ED

DATA_RE- No value
FRESHED

REPORT_SELECT- Report ID
ED

REPORT_ELE- No value. You can get the list of selected report elements from the WebiApplica-
MENT_SELECTED tion.getContext().selectedReportElementsInfo attribute.

5.1.2 setWaitCursorDisplayed

Use this to display or hide a wait cursor.

/**
* Display/Hide wait cursor
*
* @param
* display Boolean. Default value: true. It displays a wait cursor.
*/
WebiApplication.setWaitCursorDisplayed(display)

5.1.3 displayErrorMessage

/**
* Display error message
*
* @param
* Object message: String
* code (optional): String
* title (optional): String. The text to display on dialog title bar
*/
WebiApplication.displayErrorMessage(

{
message,
code,
title

})

20 2013-11-07

The user interface JavaScript APIs 2013-11-07

5.1.4 navigateTo

/**
* Navigate to a page in a target frame
*
* @param
* Object url (relative URL): String
* targetFrame: WebiApplication.TargetFrames
*/
WebiApplication.navigateTo(

{
url,
targetFrame

})
WebiApplication.TargetFrames =

{
SAME_FRAME,
DIALOG_BOX

}

5.1.5 getContext

/**
* Get application context
*
* @returns
* Object applicationType: WebiApplication.ApplicationTypes
* documentName: String
* currentUser: String. The account name of the current user.
* selectedReportId: int
* pageNumber: int
* selectedReportElements: Array of selected Report Elements
* pvl (Preferred Viewing Locale): String
* lang (UI language): String
*/
applicationContext = WebiApplication.getContext()
WebiApplication.ApplicationTypes =

{
DHTML,
APPLET,
DESKTOP

}

5.1.6 loadReport

/**
* Load report
*
* @param

21

The user interface JavaScript APIs 2013-11-07

* Object (Optional). If not specified the current report will reloaded
* reportId: int. Default to current report
* pageNumber: int. Default to current page
*/
WebiApplication.loadReport(

{
reportId,
pageNumber

})

5.1.7 reloadPane

/**
* Reload pane
*/
WebiApplication.sidepane.reloadPane()

5.1.8 attachDefaultButton

/**
* Set default button
*
* @param
* button WebiApplication.dialogbox.Buttons
*/
WebiApplication.dialogbox.attachDefaultButton(button)
WebiApplication.dialogbox.Buttons =

{
OK_BUTTON,
APPLY_BUTTON,
CANCEL_BUTTON,
HELP_BUTTON
}

5.1.9 setTitle

/**
* Set dialog title
*
* @param
* title String
*/
WebiApplication.dialogbox.setTitle(title)

22

The user interface JavaScript APIs 2013-11-07

5.1.10 resize

/**
* Resize dialog box
*
* @param
* Object width: int
* height: int
*/
WebiApplication.dialogbox.resize(

{
width,
height
})

5.1.11 close

/**
* Close current dialog box
*/
WebiApplication.dialogbox.close()

5.1.12 setButtonText

/**
* Set button text
*
* @param
* Object button: WebiApplication.dialogbox.Buttons
* text: String
*/
WebiApplication.dialogbox.setButtonText(

{
button,
text
})

5.1.13 setButtonTitle

/**
* Set button title
*
* @param
* Object button: WebiApplication.dialogbox.Buttons
* title: String. It is a tooltip of the button

23

The user interface JavaScript APIs

*/
WebiApplication.dialogbox.setButtonTitle(

{
button,
title
})

5.1.14 setButtonDisabled

/**
* Disable/Enable button
*
* @param
* Object button: WebiApplication.dialogbox.Buttons
* disable: Boolean. If true then button is disabled else (false) the button is enabled
*/
WebiApplication.dialogbox.setButtonDisabled(

{
button,
disable
})

5.1.15 setButtonDisplayed

/**
* Display/Hide button
*
* @param
* Object button: WebiApplication.dialogbox.Buttons
* display true (disable button), false (enable button)
*/
WebiApplication.dialogbox.setButtonDisplayed(

{
button,
display
})

5.1.16 buttonEvents

/**
* Button Events
*/
WebiApplication.dialogbox.Events =

{
OK_CLICK,
APPLY_CLICK,
CANCEL_CLICK

}

24 2013-11-07

Using the Web Intelligence services JavaScript APIs

Using the Web Intelligence services JavaScript APIs

6.1 About the Web Intelligence services JavaScript APIs

An overview of how you can use the Web Intelligence RESTful web service JavaScript APIs to interact
with reports.

Use the Web Intelligence RESTful web service JavaScript APIs to interact with reports. You can do the
folIowing:
• Manipulate Web Intelligence documents and reports
• Retrieve data from a dataprovider
• Retrieve a list of available universes and details of an universes
• Schedule documents
You can also create an empty SAP Web Intelligence document and fill the document by using a Report
Spercification. To edit a document, you must do this by updating the report specification. The Web
Intelligence RESTful web service SDK relies on the BI platform RESTful web services.

6.1.1 getParameters

/**
* Get document parameters
*
* @returns
* Object containing the list of parameters
*/
WebiServices.document.getParameters()

6.1.2 refreshDocument 2013-11-07

/**
* Refresh Document
*
* @param
* Object (optional): it contains a list of parameters with answer
*/
WebiServices.document.refreshDocument(

{

25

Using the Web Intelligence services JavaScript APIs 2013-11-07

"parameters": [{parameter:{...}]
})

6.1.3 getReports

/**
* Get all document reportsbr *
* @returns
* Object containing the document reports
*/
WebiServices.document.getReports()

6.1.4 createReport

/**
* Create a report
*
* @param
* Object (optional): it contains the report namebr *
* @returns
* Object containing the success message and the report ID created
*/
WebiServices.document.createReport(

{
"report": {"name": "<REPORT_NAME>"}

})

6.1.5 updateReport

/**
* Update the specified report with the specified values
*
* @param
* Object reportId: int. A valid report identifier
* requestBody (optional): Object
*
* @returns
* Object containing the success message and the report ID updated
*/
WebiServices.document.updateReport(

{
"reportId": <REPORT_ID>,
"requestBody": {"report": {"name": "<REPORT_NAME>",
"showDataChanges":< true|false>}
}

})

26

Using the Web Intelligence services JavaScript APIs 2013-11-07

6.1.6 getReportSpecification

/**
* Get the report specification
*
* @param
* Object that specifies the report identifier
*
* @returns
* Report specification in XML format
*/WebiServices.document.getReportSpecification(

{
"reportId": <REPORT_ID>,

})

6.1.7 updateReportSpecification

/**
* Update the report specification
*
* @param
* Object reportId: int. A valid report identifier
* requestBody: string. New report specification XML
*
* @returns
* Object containing the success message and the report ID updated
*/
WebiServices.document.updateReportSpecification(

{
"reportId": <REPORT_ID>
"requestBody": "<XML>"

})

6.1.8 getReportMap

/**
* Get the report map
*
* @param
* Object reportId: a valid identifier of a report
* reference: (optional) a valid reference of a map node
*
* @returns
* Object containing the report map
*/

WebiServices.document.getReportMap(
{
"reportId": <REPORT_ID>,
"reference": “<REFRENCE_NODE>”
})

27

Using the Web Intelligence services JavaScript APIs

6.1.9 getReportOutput

/**
* Get report output in XML format
*
* @param
* Object reportId: int. A valid report identifier
* dpi (optional): int. Min=75, max=9600, default=96
* chartOutputFormat (optional): String. Chart format.

* //defaut: png
* @returns
* Report output in XML format
*/
WebiServices.document.getReportOutput(

{
"reportId": <REPORT_ID>,
"dpi":<DPI_VALUE>,
"chartOutputFormat":”<bmp|gif|jpeg|png>"

})

6.1.10 getDataProviders

/**
* Get document data providersbr *
* @returns
* Object containing the data provider list
*/
WebiServices.document.getDataProviders()

6.1.11 getReportElement

/**
* Get the report element detailsww *
* @param
* Object: reportId: int. A valid identifier of a report inside the WebI document.
* elementId: int. A valid identifier of an element inside the report.
*
* @returns
* Object containing report element details
*/

WebiServices.document.getReportElement(
{
"reportId": <REPORT_ID>,
" elementId ": “<ELEMENT_ID>”
})

28 2013-11-07

Using the Web Intelligence services JavaScript APIs

6.1.12 getDPDetails

/**
* Get document data provider details
*
* @param
* Object: a valid data provider identifier
*
* @returns
* Object containing data provider details
*/
WebiServices.document.getDPDetails(

{
"dpId": "<DP_ID>"

})

6.1.13 addDataProvider

/**
* Add a data provider
*
* @param
* Object: it contains data provider name and the data source ID
* In case of BEx queries, the datasource ID is equal to “<DATASOURCE_ID>;<QUERY_NAME>”
*
* @returns
* Object containing the success message and the data provider ID created
*/
WebiServices.document.addDataProvider(

{
{"dataprovider": {"name": "<DATAPROVIDER_NAME>",
"dataSourceId": “<DATASOURCE_ID>”}
}

})

6.1.14 updateDataProvider 2013-11-07

/**
* Update a document data provider
*
* @param
* Object dpId: int. A valid data provider identifier
* requestBody: Object. Data provider info
*
* @returns
* Object containing the success message and the data provider ID updatedbr */
WebiServices.document.updateDataProvider(

{
{"dpId": "<DP_ID>",
"requestBody": {"dataprovider": {"name": "<DP_NAME>"}},
"purge": true|false", //purge data
"purgeOptions": "prompts" //purge prompts values (optional)
}

})

29

Using the Web Intelligence services JavaScript APIs

6.1.15 getDPQuerySpec 2013-11-07

/**
* Get the query specification attached to a given data provider
*
* @param
* Object: it contains a valid data provider identifier
*
* @returns
* XML String containing the query specification attached to a data provider
*/
WebiServices.document.getDPQuerySpec(

{
"dpId": "<DP_ID>"

})

6.1.16 updateDPQuerySpec

/**
* Update the query specification attached to a given data providerbr *
* @param
* Object dpId: String. A valid data provider identifier
* requestBody: String. New query specification XML
*
* @returns
* Object containing the success message and the data provider ID updated
*/
WebiServices.document.updateDPQuerySpec(

{
"dpId": "<DP_ID>",
"requestBody": “<XML>”

})

6.1.17 updateDPNbFlows

/**
* Get number of available flows, for a given data provider
*
* @param
* Object: it contains a valid data provider identifier
*
* @returns
* The number of flows for the data provider specified (String value).
*/
WebiServices.document.getDPNbFlows(

{
"dpId": "<DP_ID>"

})

30

Using the Web Intelligence services JavaScript APIs

6.1.18 getDPFlowDetails 2013-11-07

/**
* Get detail of a given flow for a given data provider
*
* @param
* Object dpId: int. A valid data provider identifier
* flowId: int. Flow index
*
* @returns
* Details of the given flow (CSV format)
*/
WebiServices.document.getDPFlowDetails(

{
"dpId": "<DP_ID>",
"flowId": <FLOW_ID>

})

6.1.19 exportReportListingMode

/**
* Export a report in listing mode
*
* @param
* Object reportId: int. A valid report identifier
* dpi (optional): int. Min=75, max=9600, default=96
* chartOutputFormat (optional): String. Chart format.
*
* @returns
* Report output in HTML format
*/
WebiServices.document.exportReportListingMode(

{
"reportId":<REPORT_ID>,
"dpi":<DPI_VALUE>,
"chartOutputFormat":”<bmp|gif|jpeg|png>" //defaut: png

})

6.1.20 exportReportElement

/**
* Export an element of a report
*
* @param
* Object reportId: int. A valid report identifier
* elementId: int. A valid identifier of an element inside the report
* datapath (optional): String. It allows specifying a datapath
* (ex: DP1.DObc:2004,DP1.DOa6:Austin)
* dpi (optional): int. Min=75, max=9600, default=96
* chartOutputFormat (optional): String. Chart format.
*
* @returns
* String in HTML format
*/

31

Using the Web Intelligence services JavaScript APIs

WebiServices.document.exportReportElement( //defaut: png
{
"reportId":<REPORT_ID>,
"elementId":<ELEMENT_ID>,
"datapath":<DATA_PATH>,
"dpi":<DPI_VALUE>,
"chartOutputFormat":”<bmp|gif|jpeg|png>"
})

6.1.21 getVariables

/**
* Get the content of a document variables dictionary
*
* @returns
* Object containing the list of variables
*/
WebiServices.document.getVariables()

6.1.22 addVariable

/**
* Add a variable to dictionary
*
* @param
* Object: it contains the variable definition
*
* @returns
* Object containing the success message and the variable ID updated
*/
WebiServices.document.addVariable(

{
"variable":{ "@dataType":”<Numeric|String|Date|DateTime>”,
"@qualification":”<Measure|Dimension|Attribute>”,
"name":”<VARIABLE_NAME>”,
"definition":”<VARIABLE_EXPRESSION>”
}

})

6.1.23 updateVariable

/**
* Modify the definition of an existing variable from the document's expressions dictionarybr *
* @param
* Object variableId: String. A valid variable identifier
* requestBody: String. It defines the update of the variablebr *
* @returns
* Object containing the success message and the variable ID updatedbr */
WebiServices.document.updateVariable(

{
"variableId":”<VARIABLE_ID>”,
"requestBody": {"variable": {"@dataType":”< DATA_TYPE_VALUE>”,
"@qualification":”<QUALIFICATION_VALUE>”,

32 2013-11-07

Using the Web Intelligence services JavaScript APIs

"name":”<VARIABLE_NAME>”,
“definition”: ”<VARIABLE_EXPRESSION>”
})

6.1.24 getVariableDefinition

/**
* Get the definition of a variable from the document's expressions dictionary
*
* @param
* Object: it contains a valid variable identifier, obtained from the expressions dictionary
*
* @returns
* String contains variable definition in XML format
*/
WebiServices.document.getVariableDefinition(

{
"variableId":”<VARIABLE_ID> ” })
})

6.1.25 deleteVariable

/**
* Delete a variable from the document's expressions dictionary
*
* @param
* Object: it contains a valid variable identifier, obtained from the expressions dictionary
*
* @returns
* Object containing the success message and the variable ID deleted
*/
WebiServices.document.deleteVariable(

{
"variableId":”<VARIABLE_ID>”

})

33 2013-11-07

Using the Web Intelligence services JavaScript APIs
34 2013-11-07


Click to View FlipBook Version