1 |
41842
|
sandro.lab
|
package eu.dnetlib.enabling.datasources;
|
2 |
|
|
|
3 |
43070
|
sandro.lab
|
import java.util.Date;
|
4 |
|
|
import java.util.List;
|
5 |
|
|
import java.util.Map;
|
6 |
41842
|
sandro.lab
|
|
7 |
|
|
import eu.dnetlib.enabling.tools.AbstractBaseService;
|
8 |
|
|
import eu.dnetlib.rmi.datasource.*;
|
9 |
|
|
import org.springframework.beans.factory.annotation.Required;
|
10 |
|
|
|
11 |
|
|
public class DatasourceManagerServiceImpl extends AbstractBaseService implements DatasourceManagerService {
|
12 |
|
|
|
13 |
43189
|
sandro.lab
|
//private List<XmlBrowsableField> browsableFields;
|
14 |
41842
|
sandro.lab
|
|
15 |
43070
|
sandro.lab
|
private DnetDatasourceManagerCore datasourceManagerCore;
|
16 |
41842
|
sandro.lab
|
|
17 |
|
|
@Override
|
18 |
|
|
public boolean addDatasource(final DatasourceDesc ds) throws DatasourceManagerServiceException {
|
19 |
43070
|
sandro.lab
|
return datasourceManagerCore.addDatasource(ds);
|
20 |
41842
|
sandro.lab
|
}
|
21 |
|
|
|
22 |
|
|
@Override
|
23 |
|
|
public boolean deleteDatasource(final String dsId) throws DatasourceManagerServiceException {
|
24 |
43070
|
sandro.lab
|
return datasourceManagerCore.deleteDatasource(dsId);
|
25 |
41842
|
sandro.lab
|
}
|
26 |
|
|
|
27 |
|
|
@Override
|
28 |
|
|
public DatasourceDesc getDatasource(final String dsId) throws DatasourceManagerServiceException {
|
29 |
43070
|
sandro.lab
|
return datasourceManagerCore.getDatasource(dsId);
|
30 |
41842
|
sandro.lab
|
}
|
31 |
|
|
|
32 |
|
|
@Override
|
33 |
|
|
public List<DatasourceDesc> listAllDatasources() throws DatasourceManagerServiceException {
|
34 |
|
|
return listDatasourcesUsingFilter(null, null, null, null);
|
35 |
|
|
}
|
36 |
|
|
|
37 |
|
|
@Override
|
38 |
|
|
public List<DatasourceDesc> listDatasourcesUsingFilter(final String compliance,
|
39 |
|
|
final String contentDescription,
|
40 |
|
|
final String iisProcessingWorkflow,
|
41 |
|
|
final String collectedFrom)
|
42 |
|
|
throws DatasourceManagerServiceException {
|
43 |
|
|
|
44 |
43070
|
sandro.lab
|
return datasourceManagerCore.listDatasourcesUsingFilter(compliance, contentDescription, iisProcessingWorkflow, collectedFrom);
|
45 |
41842
|
sandro.lab
|
|
46 |
|
|
}
|
47 |
|
|
|
48 |
|
|
@Override
|
49 |
|
|
public boolean updateLevelOfCompliance(final String dsId, final String ifaceId, final String level) throws DatasourceManagerServiceException {
|
50 |
43070
|
sandro.lab
|
return datasourceManagerCore.updateLevelOfCompliance(dsId, ifaceId, level);
|
51 |
41842
|
sandro.lab
|
}
|
52 |
|
|
|
53 |
|
|
|
54 |
43070
|
sandro.lab
|
|
55 |
41842
|
sandro.lab
|
@Override
|
56 |
|
|
public boolean updateBaseUrl(final String dsId, final String ifaceId, final String baseUrl) throws DatasourceManagerServiceException {
|
57 |
43070
|
sandro.lab
|
return datasourceManagerCore.updateBaseUrl(dsId, ifaceId, baseUrl);
|
58 |
41842
|
sandro.lab
|
}
|
59 |
|
|
|
60 |
|
|
|
61 |
43070
|
sandro.lab
|
|
62 |
41842
|
sandro.lab
|
@Override
|
63 |
|
|
public boolean updateActivationStatus(final String dsId, final String ifaceId, final boolean active) throws DatasourceManagerServiceException {
|
64 |
43070
|
sandro.lab
|
return datasourceManagerCore.updateActivationStatus(dsId, ifaceId, active);
|
65 |
41842
|
sandro.lab
|
}
|
66 |
|
|
|
67 |
|
|
|
68 |
43070
|
sandro.lab
|
|
69 |
41842
|
sandro.lab
|
@Override
|
70 |
|
|
public boolean updateContentDescription(final String dsId, final String ifaceId, final String desc) throws DatasourceManagerServiceException {
|
71 |
43070
|
sandro.lab
|
return datasourceManagerCore.updateContentDescription(dsId, ifaceId, desc);
|
72 |
41842
|
sandro.lab
|
}
|
73 |
|
|
|
74 |
|
|
|
75 |
43070
|
sandro.lab
|
|
76 |
41842
|
sandro.lab
|
@Override
|
77 |
|
|
public boolean setIisProcessingWorkflow(final String dsId, final String ifaceId, final String wf) throws DatasourceManagerServiceException {
|
78 |
43070
|
sandro.lab
|
return datasourceManagerCore.setIisProcessingWorkflow(dsId, ifaceId, wf);
|
79 |
41842
|
sandro.lab
|
}
|
80 |
|
|
|
81 |
|
|
@Override
|
82 |
|
|
public boolean updateExtraField(final String dsId, final String ifaceId, final String field, final String value, final boolean preserveOriginal)
|
83 |
|
|
throws DatasourceManagerServiceException {
|
84 |
43070
|
sandro.lab
|
return datasourceManagerCore.updateExtraField(dsId, ifaceId, field, value, preserveOriginal);
|
85 |
41842
|
sandro.lab
|
}
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
@Override
|
90 |
|
|
public boolean updateAccessParam(final String dsId, final String ifaceId, final String field, final String value, final boolean preserveOriginal)
|
91 |
|
|
throws DatasourceManagerServiceException {
|
92 |
43070
|
sandro.lab
|
return datasourceManagerCore.updateAccessParam(dsId, ifaceId, field, value, preserveOriginal);
|
93 |
41842
|
sandro.lab
|
}
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
@Override
|
98 |
|
|
public boolean deleteAccessParamOrExtraField(final String dsId, final String ifaceId, final String field) throws DatasourceManagerServiceException {
|
99 |
43070
|
sandro.lab
|
return datasourceManagerCore.deleteAccessParamOrExtraField(dsId, ifaceId, field);
|
100 |
41842
|
sandro.lab
|
}
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
|
|
@Override
|
105 |
|
|
public boolean addInterface(final String dsId, final IfaceDesc iface) throws DatasourceManagerServiceException {
|
106 |
43070
|
sandro.lab
|
return datasourceManagerCore.addInterface(dsId, iface);
|
107 |
41842
|
sandro.lab
|
}
|
108 |
|
|
|
109 |
|
|
@Override
|
110 |
|
|
public boolean deleteInterface(final String dsId, final String ifaceId) throws DatasourceManagerServiceException {
|
111 |
43070
|
sandro.lab
|
return datasourceManagerCore.deleteInterface(dsId, ifaceId);
|
112 |
41842
|
sandro.lab
|
}
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
@Override
|
117 |
|
|
public boolean updateSQL(final String dsId, final String sql, final boolean delete) throws DatasourceManagerServiceException {
|
118 |
43070
|
sandro.lab
|
return datasourceManagerCore.updateSQL(dsId, sql, delete);
|
119 |
41842
|
sandro.lab
|
}
|
120 |
|
|
|
121 |
|
|
@Override
|
122 |
|
|
public Date findNextScheduledExecution(final String dsId, final String ifaceId) throws DatasourceManagerServiceException {
|
123 |
43070
|
sandro.lab
|
return datasourceManagerCore.findNextScheduledExecution(dsId, ifaceId);
|
124 |
41842
|
sandro.lab
|
}
|
125 |
|
|
|
126 |
|
|
|
127 |
43070
|
sandro.lab
|
|
128 |
41842
|
sandro.lab
|
@Override
|
129 |
|
|
public boolean bulkUpdateApiExtraFields(final String repoId, final String ifaceId, final Map<String, String> fields)
|
130 |
|
|
throws DatasourceManagerServiceException {
|
131 |
43070
|
sandro.lab
|
return datasourceManagerCore.bulkUpdateApiExtraFields(repoId, ifaceId, fields);
|
132 |
41842
|
sandro.lab
|
|
133 |
|
|
}
|
134 |
|
|
|
135 |
|
|
@Override
|
136 |
|
|
public boolean bulkUpdateApiAccessParams(final String dsId, final String ifaceId, final Map<String, String> params)
|
137 |
|
|
throws DatasourceManagerServiceException {
|
138 |
43070
|
sandro.lab
|
return datasourceManagerCore.bulkUpdateApiAccessParams(dsId, ifaceId, params);
|
139 |
41842
|
sandro.lab
|
}
|
140 |
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
|
|
@Override
|
144 |
|
|
public boolean overrideCompliance(final String dsId, final String ifaceId, final String level) throws DatasourceManagerServiceException {
|
145 |
43070
|
sandro.lab
|
return datasourceManagerCore.overrideCompliance(dsId, ifaceId, level);
|
146 |
41842
|
sandro.lab
|
}
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
@Override
|
151 |
|
|
public List<BrowsableField> listBrowsableFields() throws DatasourceManagerServiceException {
|
152 |
43189
|
sandro.lab
|
return datasourceManagerCore.listBrowsableFields();
|
153 |
41842
|
sandro.lab
|
}
|
154 |
|
|
|
155 |
|
|
@Override
|
156 |
|
|
public List<BrowseTerm> browseField(final String f) throws DatasourceManagerServiceException {
|
157 |
43189
|
sandro.lab
|
return datasourceManagerCore.browseField(f);
|
158 |
41842
|
sandro.lab
|
}
|
159 |
|
|
|
160 |
|
|
@Override
|
161 |
|
|
public List<SearchInterfacesEntry> searchInterface(final String field, final String value) throws DatasourceManagerServiceException {
|
162 |
43189
|
sandro.lab
|
return datasourceManagerCore.searchInterface(field, value);
|
163 |
41842
|
sandro.lab
|
}
|
164 |
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
|
|
@Override
|
168 |
|
|
public List<RepositoryMapEntry> getRepositoryMap() throws DatasourceManagerServiceException {
|
169 |
43070
|
sandro.lab
|
return datasourceManagerCore.getRepositoryMap();
|
170 |
41842
|
sandro.lab
|
}
|
171 |
|
|
|
172 |
|
|
@Override
|
173 |
|
|
public List<SimpleDatasourceDesc> simpleListDatasourcesByType(final String type) throws DatasourceManagerServiceException {
|
174 |
43070
|
sandro.lab
|
return datasourceManagerCore.simpleListDatasourcesByType(type);
|
175 |
|
|
}
|
176 |
41842
|
sandro.lab
|
|
177 |
43070
|
sandro.lab
|
public DnetDatasourceManagerCore getDatasourceManagerCore() {
|
178 |
|
|
return datasourceManagerCore;
|
179 |
|
|
}
|
180 |
41842
|
sandro.lab
|
|
181 |
43070
|
sandro.lab
|
@Required
|
182 |
|
|
public void setDatasourceManagerCore(final DnetDatasourceManagerCore datasourceManagerCore) {
|
183 |
|
|
this.datasourceManagerCore = datasourceManagerCore;
|
184 |
|
|
}
|
185 |
41842
|
sandro.lab
|
|
186 |
|
|
|
187 |
|
|
|
188 |
|
|
}
|