|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataProviders
The DataProviders
interface defines a collection of data
providers.
DataProvider
,
DocumentInstance.getDataProviders()
Method Summary | |
---|---|
void |
changeDataSource(java.lang.String oldDataSourceID,
java.lang.String newDataSourceID,
boolean applyMapping)
Deprecated. Use DataProviders.changeUniverse(String, String,
boolean) . |
void |
changeUniverse(java.lang.String olduniverseid,
java.lang.String newuniverseid,
boolean applyMapping)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
void |
clearContexts()
Warning:This interface is no longer functional from the SAP BusinessObjects XI 4.0 release onwards. |
DataProvider |
createDP(java.lang.String dataSourceID,
int index)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
void |
deleteDP(int index)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
void |
deleteDP(java.lang.String name)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
DataProvider |
duplicate(int index)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
Query |
findQueryFromConditionID(java.lang.String conditionID)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
void |
generateQueries()
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
boolean |
getCanChangeDataSource()
Deprecated. Use DataProviders.getCanChangeUniverse() . |
boolean |
getCanChangeUniverse()
Checks if this document supports replacing one universe by another. |
ChangeDataSourceMapping |
getChangeDataSourceMapping()
Deprecated. Use DataProviders.getChangeUniverseMapping() instead of this call. |
ChangeUniverseMapping |
getChangeUniverseMapping()
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
int |
getCount()
Gets the number of data providers in the collection. |
DataProvider |
getItem(int index)
Returns the data provider at the specified position in the list. |
DataProvider |
getItem(java.lang.String name)
Returns a data provider by name. |
CharacterView |
getResultAsXML()
Get the all the DPResults as XML output |
CharacterView |
getView(OutputFormatType outputFormat)
Retrieves aggregated data providers data in CSV (Comma Separated Values) or Xml format. |
void |
move(int from,
int to)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
boolean |
mustFillChangeDataSourceMapping()
Deprecated. Use DataProviders.mustFillChangeUniverseMapping() . |
boolean |
mustFillChangeUniverseMapping()
Checks if any object mapping must be validated after calling DataProviders.changeUniverse(String, String, boolean) . |
void |
purgeAll()
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
void |
purgeAll(boolean purgePromptValues)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
void |
runQueries()
Updates all modifications made in any query in any data provider, and refreshes all data in each data provider. |
void |
runQueries(boolean refreshAllDPWithRights)
Updates all modifications made in any query in any data provider, and refreshes all data in each data provider. |
void |
setChangeDataSourceMapping()
Deprecated. Use DataProviders.getChangeUniverseMapping() instead of this call. |
void |
setChangeUniverseMapping()
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards. |
Method Detail |
---|
int getCount()
DataProvider getItem(int index)
index
- the index of the data provider to return (0 based)
java.lang.ArrayIndexOutOfBoundsException
- if index
is out of range (index < 0 || index >= getCount()
)DataProvider getItem(java.lang.String name)
name
- name of the data provider to return
null
when no data provider in
this collection has a name corresponding to name
CharacterView getResultAsXML()
for full description of
the Data Provider DTD
DataProvider createDP(java.lang.String dataSourceID, int index) throws REException
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Creates a new data provider.
dataSourceID
- the ID of the universe the new data provider should be based
onindex
- the index of the new data provider (index < 0
means "at the end")
REException
java.lang.ArrayIndexOutOfBoundsException
- when index > getCount()
NotImplementedException
- if ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance was opened to run
Desktop Intelligence documents. See
ReportEngines#getService(int type)
for more
information.DataProvider duplicate(int index) throws REException
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Duplicates an existing data provider. The new data provider is added at the end of the list.
index
- the index of the data provider to copy
REException
java.lang.ArrayIndexOutOfBoundsException
- when index < 0
or
index >= getCount()
NotImplementedException
- if ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance was opened to run
Desktop Intelligence documents. See
ReportEngines#getService(int type)
for more
information.void move(int from, int to)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Moves a data provider to another position. The data provider currently at
index from
will be moved so that after calling this
function, its index will be to
.
Does nothing when from == to
.
from
- the index of the data provider to moveto
- the new index
java.lang.ArrayIndexOutOfBoundsException
- when from
or to
are invalid
REException
NotImplementedException
- if
ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance was opened to run
Desktop Intelligence documents. See
ReportEngines#getService(int type)
for more
information.void deleteDP(int index)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Deletes the data provider at indexindex
.
index
- the index of the data provider to delete
java.lang.ArrayIndexOutOfBoundsException
- when index
is invalid
REException
- when a server error occurred or when the data provider at
index
is the last one.
NotImplementedException
- if
ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance was opened to run
Desktop Intelligence documents. See
ReportEngines#getService(int type)
for more
information.void deleteDP(java.lang.String name)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Deletes the data provider with namename
. When no data
provider has the specified name, nothing happens.
name
- the name of the data provider to delete
REException
- when a server error occurred or the data provider with name
name
is the last onevoid runQueries()
REException
NotImplementedException
- if
ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance was opened to run
Desktop Intelligence documents. See
ReportEngines#getService(int type)
for more
information.DataProvider.runQuery()
void runQueries(boolean refreshAllDPWithRights)
refreshAllDPWithRights
- - true - On true, it will allow to refresh the document with only allowed MDP
- false - On false, it will not perform any action, in case if it is accessed from SDK as false,
it will try to refresh only the one which are allowed
NotImplementedException
- if ReportEngine.getCanEditDocument()
returns false
. That is to say, the ReportEngine
instance
was opened to run Desktop Intelligence
documents. See ReportEngines#getService(int type)
for more information.
REException
- is an general execption which will be thrown at any failure in refresh actionthis is method resemblence is there completely, execusively that parameter check
,
DataProvider.runQuery()
void generateQueries() throws REException
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Updates the query definition for any modified queries in this list of data providers.
REException
NotImplementedException
- if ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance was opened to run
Desktop Intelligence documents. See
ReportEngines.getService(com.businessobjects.rebean.wi.ReportEngines.ReportEngineType)
for more information.DataProvider.generateQuery()
void purgeAll()
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Purges all data providers. Once a data provider has been purged, it no longer contains any data. In other words, after calling this method, the document will not contain data anymore.
Calling this method has the same effect as calling purgeAll(false)
;
NotImplementedException
- Thrown when ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance used to open this
DataProvider
was opened to run Desktop
Intelligence documents. See
ReportEngines.getService(com.businessobjects.rebean.wi.ReportEngines.ReportEngineType)
for more information.void purgeAll(boolean purgePromptValues)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Purges all data providers. Once a data provider has been purged, it no longer contains any data. In other words, after calling this method, the document will not contain data anymore.
purgePromptValues
- if true
, prompt values used during the last refresh will be reset, too.
NotImplementedException
- Thrown when ReportEngine.getCanEditDocument()
returns
false
. That is to say, the
ReportEngine
instance used to open this
DataProvider
was opened to run Desktop
Intelligence documents. See
ReportEngines.getService(com.businessobjects.rebean.wi.ReportEngines.ReportEngineType)
for more information.Query findQueryFromConditionID(java.lang.String conditionID)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Returns the query from one of its query condition identifier. The query condition identifierFilterConditionNode.getID()
is unique for all data providers.
conditionID
-
@Deprecated boolean getCanChangeDataSource()
DataProviders.getCanChangeUniverse()
.
true
when this document type supports changing
data source.@Deprecated void changeDataSource(java.lang.String oldDataSourceID, java.lang.String newDataSourceID, boolean applyMapping)
DataProviders.changeUniverse(String, String,
boolean)
.
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Replaces all occurrences of a data source with another one. After calling
this method with applyMapping == true
, the
default mapping
needs to be
validated
(so
DataProviders.mustFillChangeDataSourceMapping()
will return true
).
After that, possibly DocumentInstance.getMustFillContexts()
will
return true
, indicating at least a context must be
resolved.
Once this method has been called, it is not possible to cancel the operation; the mapping and contexts must be set in order for the document to be ready for use.
After completing the full workflow, all occurrences of the data source
identified by oldDataSourceID
will have been replaced by
the data source identified by newDataSourceID
. This
includes all data providers, the
document dictionary
including
any variables and synchronized objects, and all reports.
A typical workflow of changing the data source is:
dataProviders.changeDataSource(oldID, newID, true);
if (dataProviders.mustFillChangeDataSourceMapping()) {
// This will always be the case.
ChangeDataSourceMapping mapping = dataProviders
.getChangeDataSourceMapping();
// Display the mapping and change it when necessary...
// Validate the mapping.
dataProviders.setChangeDataSourceMapping();
if (document.getMustFillContexts()) {
Contexts contexts = document.getContexts();
// Answer the contexts...
document.setContexts();
}
}
When applyMapping == false
, this method simply changes
the ID in the references to the old data source into the new one. This
may leave the document in a state where all queries based on the old data
source contain invalid objects. Calling this method with
applyMapping == false
is strongly discouraged for most
cases. It can however be useful when the old data source is no longer
available and the caller is absolutely certain that the new data source
is a valid replacement. This means that all object IDs must be equal to
the old ones and that all objects are of the same type and qualification.
oldDataSourceID
- The ID of the data source to replace.newDataSourceID
- The ID of the new data source.applyMapping
- When true
,
DataProviders.mustFillChangeDataSourceMapping()
will return
true
after calling this method and the mapping
must be set. When false
, no mapping will be
applied; only the universe ID will be changed. This means that
queries based on the old data source may become invalid.
java.lang.NullPointerException
- Thrown when either oldDataSourceID
or
newDataSourceID
are null
.
java.lang.IllegalArgumentException
- Thrown when either oldDataSourceID
or
newDataSourceID
are not IDs of valid data
sources.
QueryException
- Thrown when applyMapping == true
and at least
one impacted query is empty. When applying a mapping, all
impacted source queries must have at least one object.
REException
- Thrown when there was a problem accessing the old or the new
data source (for example, when the current user does not have
sufficient rights to access both data sources).DataSource.getID()
@Deprecated boolean mustFillChangeDataSourceMapping()
DataProviders.mustFillChangeUniverseMapping()
.
DataProviders.changeDataSource(String, String, boolean)
.
true
if the mapping must be validated.@Deprecated ChangeDataSourceMapping getChangeDataSourceMapping()
DataProviders.getChangeUniverseMapping()
instead of this call.
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Returns the data source mapping, after a call toDataProviders.changeDataSource(String, String, boolean)
with the
applyMapping
argument set to true
.
null
when
DataProviders.mustFillChangeDataSourceMapping()
returns
false
.@Deprecated void setChangeDataSourceMapping()
DataProviders.getChangeUniverseMapping()
instead of this call.
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Validates the current data source mapping, when changing a data source. After calling this method, all impacted queries will be changed according to the current object mapping. I this changes a query (this will be the case unless all objects and their IDs remain identical), then the document will be purged.
After calling this method, one or more contexts may have to be filled.
Always check this by calling
DocumentInstance.getMustFillContexts()
.
Internally, this method updates all impacted queries and calls
DataProviders.generateQueries()
. Once any contexts have been filled, the new
report dictionary
is used to
replace all impacted objects in any variables and the
document structure
.
QueryException
- Thrown when at least one of the impacted queries would be
empty after applying the mapping.DataProviders.changeDataSource(String, String, boolean)
,
DataProviders.getChangeDataSourceMapping()
boolean getCanChangeUniverse()
true
when this document type supports changing
universe.boolean mustFillChangeUniverseMapping()
DataProviders.changeUniverse(String, String, boolean)
.
true
if the mapping must be validated.void changeUniverse(java.lang.String olduniverseid, java.lang.String newuniverseid, boolean applyMapping)
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Changes old universe by the new one in the document. It means that all occurrences of a data source object will be replaced by another one of new universe. WhenapplyMapping
is true
, this call provides a ChangeUniverseMapping
containing all old data source object to be replaced with a possible new data source object
default mapping
. This mapping needs to be
validated
(so
DataProviders.mustFillChangeUniverseMapping()
will return true
).
After that, possibly DocumentInstance.getMustFillContexts()
will
return true
, indicating at least a context must be
resolved.
After DataProviders.setChangeUniverseMapping()
call and resolution of contexts, all occurrences
of the data source identified by oldDataSourceID
will have been replaced by
the data source identified by newDataSourceID
. This
includes all data providers, the
document dictionary
including
any variables and synchronized objects, and all reports.
A full workflow must be completed by DocumentInstance.applyFormat()
and
DocumentInstance.refresh()
.
dataProviders.changeUniverse(oldID, newID, true);
if (dataProviders.mustFillChangeUniverseMapping()) {
// This will always be the case.
ChangeUniverseMapping mapping = dataProviders
.getChangeUniverseMapping();
// Display the mapping and change it when necessary...
// Validate the mapping.
dataProviders.setChangeUniverseMapping();
if (document.getMustFillContexts()) {
Contexts contexts = document.getContexts();
// Answer the contexts...
document.setContexts();
}
document.applyFormat();
document.refresh();
}
olduniverseid
- old universe id to be replaced DataSource.getUniverseID()
newuniverseid
- new universe id DataSource.getUniverseID()
applyMapping
- When true
,
DataProviders.mustFillChangeUniverseMapping()
will return
true
after calling this method and the mapping
must be set. When false
, no mapping will be
applied; only the universe ID will be changed. This means that
queries based on the old universe may become invalid.ChangeUniverseMapping getChangeUniverseMapping()
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Returns a universe mapping containing all instances of data source mapping consequently a call toDataProviders.changeUniverse(String, String, boolean)
with the
applyMapping
argument set to true
.
null
when
DataProviders.mustFillChangeDataSourceMapping()
returns
false
.void setChangeUniverseMapping()
Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
Validates the current universe mapping, when changing a universe. After calling this method, all impacted queries will be changed according to the current object mapping. And all report expressions of document will be updated using current object mapping, then the document will be purged.
After calling this method, one or more contexts may have to be filled.
Always check this by calling
DocumentInstance.getMustFillContexts()
.
Internally, this method updates all impacted queries and calls
DataProviders.generateQueries()
. Once any contexts have been filled, the new
report dictionary
is used to
replace all impacted objects in any variables and the
document structure
.
In order to update the document with updated report expressions and new universe data,
DocumentInstance.applyFormat()
and DocumentInstance.refresh()
should be called.
QueryException
- Thrown when at least one of the impacted queries would be
empty after applying the mapping.DataProviders.changeUniverse(String, String, boolean)
,
DataProviders.getChangeUniverseMapping()
CharacterView getView(OutputFormatType outputFormat)
outputFormat
- The output format (must be CSV or XML)
java.lang.Exception
- void clearContexts()
Warning:This interface is no longer functional from the SAP BusinessObjects XI 4.0 release onwards.
Clears any contexts set for any data provider, asDataProvider.clearContexts()
. When used in combination with
Query.resetContexts()
, calling this method will ensure that any
contexts will be prompted upon the next refresh.
Contexts
,
DocumentInstance.getMustFillContexts()
,
DocumentInstance.getContextPrompts()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |