01: package com.jat.integration;
02:
03: import com.jat.business.BusinessObjectProperties;
04: import com.jat.business.BusinessObjectPropertyList;
05: import com.jat.business.MultiBusinessObjectProperties;
06:
07: /**
08: * <p>Title: JAT</p>
09: * <p>Description: this interface represent a Data Source.</p>
10: * <p>Copyright: Copyright (c) 2004 -2005 Stefano Fratini (stefano.fratini@gmail.com)</p>
11: * <p>Distributed under the terms of the GNU Lesser General Public License, v2.1 or later</p>
12: * @author stf
13: * @version 1.1
14: * @since 1.0
15: */
16:
17: public interface DataSource {
18:
19: /**
20: * This method initialized your Data Source
21: * @param name the Data Source name
22: * @throws java.lang.Exception if any exception occours
23: */
24: public void init(String name) throws IntegrationException;
25:
26: /**
27: * This method load data from Data Source
28: * @param name the configured operation name
29: * @param parameters the parameters used to load data
30: * @return data loaded
31: * @throws IntegrationException if any exception occours
32: */
33: public BusinessObjectPropertyList getData(String name,
34: BusinessObjectProperties parameters)
35: throws IntegrationException;
36:
37: /**
38: * This metod execute an operation on the Data Source
39: * @param name the configured operation name
40: * @param parameters the parameters used to perform operation
41: * @return the returned data from the executed operation
42: * @throws IntegrationException if any exception occours
43: */
44: public BusinessObjectProperties execute(String name,
45: BusinessObjectProperties parameters)
46: throws IntegrationException;
47:
48: /**
49: * This metod execute transactional operations on the Data Source
50: * @param multi contains the operations and relative parameters
51: * @return the returned data from executed operations
52: * @throws IntegrationException if any exception occours
53: */
54: public BusinessObjectPropertyList execute(
55: MultiBusinessObjectProperties multi)
56: throws IntegrationException;
57:
58: /** @link dependency
59: * @stereotype instantiate*/
60: /*# com.jat.business.BusinessObjectList lnkBusinessObjectList; */
61: }
|