|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DynamicConnectionProvider
The DynamicConnection provider.
The JReport server provide the default implementation of this API to get dynamic connection
from the server system database (see DynamicConnectionManager ).
When run a report
#getAvailableDynamicConnections(String, String, String, DynamicConnection) of DynamicConnectionProvider#getDynamicConnection(String, String, String, DynamicConnection, String) In the default implementation, One user can have multiple dynamic connections for one catalog data source (distinguish by the dynamicConnectionId).
Users also can implement this API to get dynamic connections from their own system. Server will call this API when run a report. Users can register a customized DynamicConnectionProvider into JReport Server by the option "server.custom.DynamicConnectionProvider" in the file report_home/bin/server.properties.
| Method Summary | |
|---|---|
DynamicConnection[] |
getAvailableDynamicConnections(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
DynamicConnection originalConnectionInfo)
Gets the available connections information against the original catalog connection information. |
DynamicConnection[] |
getAvailableDynamicConnections(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
java.lang.String connectionName,
DynamicConnection originalConnectionInfo)
|
DynamicConnection |
getDynamicConnection(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
DynamicConnection originalConnectionInfo,
java.lang.String dynamicConnectionId)
Gets the dynamic connection against the original catalog connection information. |
DynamicConnection |
getDynamicConnection(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
java.lang.String connectionName,
DynamicConnection originalConnectionInfo,
java.lang.String dynamicConnectionId)
|
| Method Detail |
|---|
DynamicConnection[] getAvailableDynamicConnections(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
DynamicConnection originalConnectionInfo)
This method support multiple dynamic connections. One user can have multiple dynamic connections for one catalog data source (distinguish by dynamicConnectionId).
The server will call this method when show Advanced Run and Schedule Run page, to let the end-user select one from available dynamic connections.
In the default implementation, the server get dynamic connections by below logic:
clientId - the multiple tenancy client IDuserName - the server logon username.catalog - the catalog resource path. For example, "/WebDemo/SampleReports.cat".datasource - the data source name in the catalog.originalConnectionInfo - the original catalog connection information
DynamicConnection[] getAvailableDynamicConnections(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
java.lang.String connectionName,
DynamicConnection originalConnectionInfo)
DynamicConnection getDynamicConnection(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
DynamicConnection originalConnectionInfo,
java.lang.String dynamicConnectionId)
When run a report, the server will pass the dynamic connection information into the report engine. The report engine will merge the connection information with the original catalog connection information to setup the database connection.
The server will call this method when run report (Direct Run, or Advanced Run & Schedule Run submit back).
This method return the dynamic connection for the specified identifier or
choose a dynamic connection from available connections (if without specified
In the default implementation, the server get dynamic connection by below logic:
dynamicConnectionId).
#getAvailableDynamicConnections(String, String, String, DynamicConnection)) .
clientId - the multiple tenancy client IDuserName - the server logon username.catalog - the catalog resource path. For example, "/WebDemo/SampleReports.cat".datasource - the data source name in the catalog.originalConnectionInfo - the original catalog connection information.dynamicConnectionId - the user specified identifier of dynamic connection,
null to get default dynamic connection, recommend the fist one of available connections.
null use original connection.
DynamicConnection getDynamicConnection(java.lang.String clientId,
java.lang.String userName,
java.lang.String catalog,
java.lang.String datasource,
java.lang.String connectionName,
DynamicConnection originalConnectionInfo,
java.lang.String dynamicConnectionId)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||