i-net Clear Reports

com.inet.report.database.beans
Interface BeanDataSourceManager


public interface BeanDataSourceManager

To provide a bean datasource for i-net Clear Reports this interface needs to be implemented inside a servlet environment. The declared methods will be used by i-net Clear Reports to check which Java Beans can be provided by the bean datasource and also query the data of the java beans. To setup a bean datasource in a servlet environment you will have to follow these steps:

Since:
7.6

Field Summary
static java.lang.String PROPERTY_DATABASECLASS
          The name of the property specifying the database class to be used for querying the data for a report.
static java.lang.String PROPERTY_MANAGERCLASS
          Defines the name of the property specifying the class name of the BeanDataSourceManager implementation class inside the application server.
static java.lang.String PROPERTY_SERVLETPATH
          Defines the name of the property specifying the servlet path to the TransferServlet which is used to communicate with the application server.
 
Method Summary
 void destroy()
          This method gives the BeanDataSourceManager an opportunity to clean up any resources that are being held.
 java.lang.String[] getAllBeanClassNames(java.lang.String user, java.lang.String password)
          Returns the class names of the Java Beans whose data can be requested.
 java.util.List getBeanData(java.lang.String beanClassName, java.lang.String user, java.lang.String password)
          Returns a list of Java Beans of the supplied type.
 java.util.List getBeanData(java.lang.String beanClassName, java.lang.String param, java.lang.String user, java.lang.String password)
          Returns a list of Java Beans of the supplied type.
 

Field Detail

PROPERTY_DATABASECLASS

static final java.lang.String PROPERTY_DATABASECLASS
The name of the property specifying the database class to be used for querying the data for a report.

Since:
8.1
See Also:
Constant Field Values

PROPERTY_SERVLETPATH

static final java.lang.String PROPERTY_SERVLETPATH
Defines the name of the property specifying the servlet path to the TransferServlet which is used to communicate with the application server.

Since:
8.1
See Also:
Constant Field Values

PROPERTY_MANAGERCLASS

static final java.lang.String PROPERTY_MANAGERCLASS
Defines the name of the property specifying the class name of the BeanDataSourceManager implementation class inside the application server.

Since:
8.1
See Also:
Constant Field Values
Method Detail

getAllBeanClassNames

java.lang.String[] getAllBeanClassNames(java.lang.String user,
                                        java.lang.String password)
                                        throws TransferServletException
Returns the class names of the Java Beans whose data can be requested.
Note: Please note that the Java Beans needs to be serializable.

Parameters:
user - The user who wants to connect to this bean datasource.
password - The password of the user who wants to connect to this datasource.
Returns:
An array containing the class names of all Java Beans supported by this BeanDataSourceManager. Should not return null.
Throws:
TransferServletException - If the call of this method was not successful. This can be the case if the supplied user or password is invalid or if another exception occurred which should be forwarded to i-net Clear Reports.

getBeanData

java.util.List getBeanData(java.lang.String beanClassName,
                           java.lang.String user,
                           java.lang.String password)
                           throws TransferServletException
Returns a list of Java Beans of the supplied type.

Parameters:
beanClassName - The package qualified class name of the Java Bean to return the data for.
user - The user who wants to connect to this bean datasource.
password - The password of the user who wants to connect to this datasource.
Returns:
The list containing the data to use for a report. Each element of the list has to be of the supplied type. Should not return null.
Throws:
TransferServletException - If the call of this method was not successful. This can be the case if the supplied user or password is invalid or if another exception occurred which should be forwarded to i-net Clear Reports.

getBeanData

java.util.List getBeanData(java.lang.String beanClassName,
                           java.lang.String param,
                           java.lang.String user,
                           java.lang.String password)
                           throws TransferServletException
Returns a list of Java Beans of the supplied type. The additional parameter can be used to filter the data by some criteria.

Parameters:
beanClassName - The package qualified class name of the Java Bean to return the data for.
param - A parameter which is provided by the report and can e.g. be used as filter.
user - The user who wants to connect to this bean datasource.
password - The password of the user who wants to connect to this datasource.
Returns:
The list containing the data to use for a report. Each element of the list has to be of the supplied type. Should not return null.
Throws:
TransferServletException - If the call of this method was not successful. This can be the case if the supplied user or password is invalid or if another exception occurred which should be forwarded to i-net Clear Reports.

destroy

void destroy()
This method gives the BeanDataSourceManager an opportunity to clean up any resources that are being held. This method will be called if the servlet should be destroyed.


i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH