Revision 49659
Added by Michele Artini over 6 years ago
DatasourceManager.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.Date; |
4 | 4 |
import java.util.List; |
5 |
import java.util.Map; |
|
6 | 5 |
|
7 |
public interface DatasourceManager { |
|
6 |
public interface DatasourceManager<DS extends Datasource<?, ?>, API extends Api> {
|
|
8 | 7 |
|
9 |
public boolean addDatasource(DatasourceDesc ds) throws DatasourceManagerServiceException;
|
|
8 |
List<String> listIds(int page, int size) throws DatasourceManagerException;
|
|
10 | 9 |
|
11 |
public boolean deleteDatasource(String dsId) throws DatasourceManagerServiceException;
|
|
10 |
DatasourceResponse<DS> getDsInfo(String id) throws DatasourceManagerException;
|
|
12 | 11 |
|
13 |
public DatasourceDesc getDatasource(String dsId) throws DatasourceManagerServiceException;
|
|
12 |
DS getDs(String id) throws DatasourceManagerException;
|
|
14 | 13 |
|
15 |
public boolean updateLevelOfCompliance(String dsId, String ifaceId, String level) throws DatasourceManagerServiceException;
|
|
14 |
List<? extends DatasourceResponse<DS>> searchByName(String name, int page, int size) throws DatasourceManagerException;
|
|
16 | 15 |
|
17 |
public boolean overrideCompliance(String dsId, String ifaceId, String level) throws DatasourceManagerServiceException;
|
|
16 |
List<? extends DatasourceResponse<DS>> searchByContactemail(String contactemail, int page, int size) throws DatasourceManagerException;
|
|
18 | 17 |
|
19 |
public boolean updateBaseUrl(String dsId, String ifaceId, String baseUrl) throws DatasourceManagerServiceException;
|
|
18 |
List<? extends DatasourceResponse<DS>> searchByCountry(String country, int page, int size) throws DatasourceManagerException;
|
|
20 | 19 |
|
21 |
public boolean updateActivationStatus(String dsId, String ifaceId, boolean active) throws DatasourceManagerServiceException;
|
|
20 |
List<? extends SearchApisEntry> searchApis(String field, String value) throws DatasourceManagerException;
|
|
22 | 21 |
|
23 |
public boolean updateContentDescription(String dsId, String ifaceId, String desc) throws DatasourceManagerServiceException;
|
|
22 |
List<? extends BrowseTerm> browseField(String field) throws DatasourceManagerException;
|
|
24 | 23 |
|
25 |
public boolean updateAccessParam(String dsId, String ifaceId, String field, String value) throws DatasourceManagerServiceException;
|
|
24 |
List<? extends Api> getApis(String dsId) throws DatasourceManagerException;
|
|
26 | 25 |
|
27 |
public boolean deleteAccessParam(String dsId, String ifaceId, String field) throws DatasourceManagerServiceException;
|
|
26 |
void deleteDs(String dsId) throws DatasourceManagerException;
|
|
28 | 27 |
|
29 |
public boolean addInterface(String dsId, IfaceDesc iface) throws DatasourceManagerServiceException;
|
|
28 |
void deleteApi(String dsId, String apiId) throws DatasourceManagerException;
|
|
30 | 29 |
|
31 |
public boolean deleteInterface(String dsId, String ifaceId) throws DatasourceManagerServiceException;
|
|
30 |
void addApi(API api) throws DatasourceManagerException;
|
|
32 | 31 |
|
33 |
public boolean updateSQL(String dsId, String sql, boolean delete) throws DatasourceManagerServiceException;
|
|
32 |
void setManaged(String id, boolean managed) throws DatasourceManagerException;
|
|
34 | 33 |
|
35 |
public Date findNextScheduledExecution(String dsId, String ifaceId) throws DatasourceManagerServiceException;
|
|
34 |
void saveDs(DS datasource) throws DatasourceManagerException;
|
|
36 | 35 |
|
37 |
public boolean bulkUpdateApiAccessParams(String dsId, String ifaceId, Map<String, String> params) throws DatasourceManagerServiceException;
|
|
36 |
void updateOfficialname(String dsId, String officialname) throws DatasourceManagerException;
|
|
38 | 37 |
|
39 |
public List<BrowsableField> listBrowsableFields() throws DatasourceManagerServiceException;
|
|
38 |
void updateEnglishname(String dsId, String english) throws DatasourceManagerException;
|
|
40 | 39 |
|
41 |
public List<BrowseTerm> browseField(final String field) throws DatasourceManagerServiceException;
|
|
40 |
void updateLatitude(String dsId, Double latitude) throws DatasourceManagerException;
|
|
42 | 41 |
|
43 |
public List<SearchInterfacesEntry> searchInterface(final String field, final String value) throws DatasourceManagerServiceException;
|
|
42 |
void updateLongitude(String dsId, Double longitude) throws DatasourceManagerException;
|
|
44 | 43 |
|
45 |
public List<RepositoryMapEntry> getRepositoryMap() throws DatasourceManagerServiceException; |
|
44 |
void updateActivationStatus(String dsId, String ifaceId, boolean active) throws DatasourceManagerException; // TODO resettare last_*_* |
|
45 |
// if active == false |
|
46 | 46 |
|
47 |
public List<SimpleDatasourceDesc> simpleListDatasourcesByType(String type) throws DatasourceManagerServiceException;
|
|
47 |
void updateCompliance(String dsId, String ifaceId, String compliance) throws DatasourceManagerException;
|
|
48 | 48 |
|
49 |
void setLastCollectionInfo(String dsId, String ifaceId, String mdId, int size, Date date) throws DatasourceManagerException; |
|
50 |
|
|
51 |
void setLastAggregationInfo(String dsId, String ifaceId, String mdId, int size, Date date) throws DatasourceManagerException; |
|
52 |
|
|
53 |
void setLastDownloadInfo(String dsId, String ifaceId, String objId, int size, Date date) throws DatasourceManagerException; |
|
54 |
|
|
55 |
void updateBaseUrl(String dsId, String ifaceId, String baseUrl) throws DatasourceManagerException; |
|
56 |
|
|
49 | 57 |
} |
Also available in: Unified diff
Work in progress