Skip to content

Commit 9d2a4ab

Browse files
authored
Merge branch 'main' into rest-api/search-versions
2 parents a119fec + 61d2dc3 commit 9d2a4ab

File tree

2 files changed

+21
-79
lines changed

2 files changed

+21
-79
lines changed

app/src/main/java/io/apicurio/registry/storage/decorator/RegistryStorageDecoratorReadOnlyBase.java

+8-73
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,7 @@
66
import io.apicurio.registry.model.GA;
77
import io.apicurio.registry.model.GAV;
88
import io.apicurio.registry.storage.RegistryStorage;
9-
import io.apicurio.registry.storage.dto.ArtifactMetaDataDto;
10-
import io.apicurio.registry.storage.dto.ArtifactReferenceDto;
11-
import io.apicurio.registry.storage.dto.ArtifactSearchResultsDto;
12-
import io.apicurio.registry.storage.dto.ArtifactVersionMetaDataDto;
13-
import io.apicurio.registry.storage.dto.CommentDto;
14-
import io.apicurio.registry.storage.dto.ContentWrapperDto;
15-
import io.apicurio.registry.storage.dto.GroupMetaDataDto;
16-
import io.apicurio.registry.storage.dto.GroupSearchResultsDto;
17-
import io.apicurio.registry.storage.dto.OrderBy;
18-
import io.apicurio.registry.storage.dto.OrderDirection;
19-
import io.apicurio.registry.storage.dto.RoleMappingDto;
20-
import io.apicurio.registry.storage.dto.RoleMappingSearchResultsDto;
21-
import io.apicurio.registry.storage.dto.RuleConfigurationDto;
22-
import io.apicurio.registry.storage.dto.SearchFilter;
23-
import io.apicurio.registry.storage.dto.StoredArtifactVersionDto;
24-
import io.apicurio.registry.storage.dto.VersionSearchResultsDto;
9+
import io.apicurio.registry.storage.dto.*;
2510
import io.apicurio.registry.storage.error.ArtifactNotFoundException;
2611
import io.apicurio.registry.storage.error.ContentNotFoundException;
2712
import io.apicurio.registry.storage.error.GroupNotFoundException;
@@ -47,11 +32,9 @@ public abstract class RegistryStorageDecoratorReadOnlyBase implements RegistrySt
4732

4833
protected RegistryStorage delegate;
4934

50-
5135
protected RegistryStorageDecoratorReadOnlyBase() {
5236
}
5337

54-
5538
public void setDelegate(RegistryStorage delegate) {
5639
this.delegate = delegate;
5740
}
@@ -71,89 +54,76 @@ public boolean isReady() {
7154
return delegate.isReady();
7255
}
7356

74-
7557
@Override
7658
public boolean isAlive() {
7759
return delegate.isAlive();
7860
}
7961

80-
8162
@Override
8263
public boolean isReadOnly() {
8364
return delegate.isReadOnly();
8465
}
8566

86-
8767
@Override
8868
public ContentWrapperDto getContentById(long contentId)
8969
throws ContentNotFoundException, RegistryStorageException {
9070
return delegate.getContentById(contentId);
9171
}
9272

93-
9473
@Override
9574
public ContentWrapperDto getContentByHash(String contentHash)
9675
throws ContentNotFoundException, RegistryStorageException {
9776
return delegate.getContentByHash(contentHash);
9877
}
9978

100-
10179
@Override
10280
public List<ArtifactVersionMetaDataDto> getArtifactVersionsByContentId(long contentId) {
10381
return delegate.getArtifactVersionsByContentId(contentId);
10482
}
10583

106-
10784
@Override
10885
public Set<String> getArtifactIds(Integer limit) {
10986
return delegate.getArtifactIds(limit);
11087
}
11188

112-
11389
@Override
11490
public ArtifactSearchResultsDto searchArtifacts(Set<SearchFilter> filters, OrderBy orderBy,
11591
OrderDirection orderDirection, int offset, int limit) {
11692
return delegate.searchArtifacts(filters, orderBy, orderDirection, offset, limit);
11793
}
11894

119-
12095
@Override
12196
public ArtifactMetaDataDto getArtifactMetaData(String groupId, String artifactId)
12297
throws ArtifactNotFoundException, RegistryStorageException {
12398
return delegate.getArtifactMetaData(groupId, artifactId);
12499
}
125100

126-
127101
@Override
128102
public ArtifactVersionMetaDataDto getArtifactVersionMetaDataByContent(String groupId, String artifactId,
129-
boolean canonical, ContentHandle content, List<ArtifactReferenceDto> artifactReferences)
103+
boolean canonical, ContentHandle content, List<ArtifactReferenceDto> artifactReferences)
130104
throws ArtifactNotFoundException, RegistryStorageException {
131105
return delegate.getArtifactVersionMetaDataByContent(groupId, artifactId, canonical, content, artifactReferences);
132106
}
133107

134-
135108
@Override
136109
public List<RuleType> getArtifactRules(String groupId, String artifactId)
137110
throws ArtifactNotFoundException, RegistryStorageException {
138111
return delegate.getArtifactRules(groupId, artifactId);
139112
}
140113

141-
142114
@Override
143115
public void createArtifactRule(String groupId, String artifactId, RuleType rule,
144116
RuleConfigurationDto config)
145117
throws ArtifactNotFoundException, RuleAlreadyExistsException, RegistryStorageException {
146118
delegate.createArtifactRule(groupId, artifactId, rule, config);
147119
}
148120

149-
150121
@Override
151122
public RuleConfigurationDto getArtifactRule(String groupId, String artifactId, RuleType rule)
152123
throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException {
153124
return delegate.getArtifactRule(groupId, artifactId, rule);
154125
}
155126

156-
157127
@Override
158128
public List<String> getArtifactVersions(String groupId, String artifactId)
159129
throws ArtifactNotFoundException, RegistryStorageException {
@@ -166,145 +136,123 @@ public VersionSearchResultsDto searchVersions(Set<SearchFilter> filters, OrderBy
166136
return delegate.searchVersions(filters, orderBy, orderDirection, offset, limit);
167137
}
168138

169-
170139
@Override
171140
public StoredArtifactVersionDto getArtifactVersionContent(long globalId)
172141
throws ArtifactNotFoundException, RegistryStorageException {
173142
return delegate.getArtifactVersionContent(globalId);
174143
}
175144

176-
177145
@Override
178146
public StoredArtifactVersionDto getArtifactVersionContent(String groupId, String artifactId, String version)
179147
throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException {
180148
return delegate.getArtifactVersionContent(groupId, artifactId, version);
181149
}
182150

183-
184151
@Override
185152
public ArtifactVersionMetaDataDto getArtifactVersionMetaData(String groupId, String artifactId,
186153
String version)
187154
throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException {
188155
return delegate.getArtifactVersionMetaData(groupId, artifactId, version);
189156
}
190-
191-
157+
192158
@Override
193159
public ArtifactVersionMetaDataDto getArtifactVersionMetaData(Long globalId)
194160
throws VersionNotFoundException, RegistryStorageException {
195161
return delegate.getArtifactVersionMetaData(globalId);
196162
}
197163

198-
199164
@Override
200165
public List<RuleType> getGlobalRules() throws RegistryStorageException {
201166
return delegate.getGlobalRules();
202167
}
203168

204-
205169
@Override
206170
public RuleConfigurationDto getGlobalRule(RuleType rule)
207171
throws RuleNotFoundException, RegistryStorageException {
208172
return delegate.getGlobalRule(rule);
209173
}
210174

211-
212175
@Override
213176
public List<String> getGroupIds(Integer limit) throws RegistryStorageException {
214177
return delegate.getGroupIds(limit);
215178
}
216179

217-
218180
@Override
219181
public GroupMetaDataDto getGroupMetaData(String groupId)
220182
throws GroupNotFoundException, RegistryStorageException {
221183
return delegate.getGroupMetaData(groupId);
222184
}
223185

224-
225186
@Override
226187
public void exportData(Function<Entity, Void> handler) throws RegistryStorageException {
227188
delegate.exportData(handler);
228189
}
229190

230-
231191
@Override
232192
public long countArtifacts() throws RegistryStorageException {
233193
return delegate.countArtifacts();
234194
}
235195

236-
237196
@Override
238197
public long countArtifactVersions(String groupId, String artifactId) throws RegistryStorageException {
239198
return delegate.countArtifactVersions(groupId, artifactId);
240199
}
241-
242-
200+
243201
@Override
244202
public long countActiveArtifactVersions(String groupId, String artifactId) throws RegistryStorageException {
245203
return delegate.countActiveArtifactVersions(groupId, artifactId);
246204
}
247205

248-
249206
@Override
250207
public long countTotalArtifactVersions() throws RegistryStorageException {
251208
return delegate.countTotalArtifactVersions();
252209
}
253210

254-
255211
@Override
256212
public RoleMappingDto getRoleMapping(String principalId) throws RegistryStorageException {
257213
return delegate.getRoleMapping(principalId);
258214
}
259215

260-
261216
@Override
262217
public String getRoleForPrincipal(String principalId) throws RegistryStorageException {
263218
return delegate.getRoleForPrincipal(principalId);
264219
}
265220

266-
267221
@Override
268222
public List<RoleMappingDto> getRoleMappings() throws RegistryStorageException {
269223
return delegate.getRoleMappings();
270224
}
271-
225+
272226
@Override
273227
public RoleMappingSearchResultsDto searchRoleMappings(int offset, int limit) throws RegistryStorageException {
274228
return delegate.searchRoleMappings(offset, limit);
275229
}
276230

277-
278231
@Override
279232
public List<DynamicConfigPropertyDto> getConfigProperties() throws RegistryStorageException {
280233
return delegate.getConfigProperties();
281234
}
282235

283-
284236
@Override
285237
public DynamicConfigPropertyDto getConfigProperty(String propertyName) {
286238
return delegate.getConfigProperty(propertyName);
287239
}
288240

289-
290241
@Override
291242
public List<DynamicConfigPropertyDto> getStaleConfigProperties(Instant since) {
292243
return delegate.getStaleConfigProperties(since);
293244
}
294245

295-
296246
@Override
297247
public DynamicConfigPropertyDto getRawConfigProperty(String propertyName) {
298248
return delegate.getRawConfigProperty(propertyName);
299249
}
300250

301-
302251
@Override
303252
public Map<String, ContentHandle> resolveReferences(List<ArtifactReferenceDto> references) {
304253
return delegate.resolveReferences(references);
305254
}
306255

307-
308256
@Override
309257
public boolean isArtifactExists(String groupId, String artifactId) throws RegistryStorageException {
310258
return delegate.isArtifactExists(groupId, artifactId);
@@ -315,98 +263,85 @@ public boolean isGroupExists(String groupId) throws RegistryStorageException {
315263
return delegate.isGroupExists(groupId);
316264
}
317265

318-
319266
@Override
320267
public boolean isArtifactVersionExists(String groupId, String artifactId, String version) throws RegistryStorageException {
321268
return delegate.isArtifactVersionExists(groupId, artifactId, version);
322269
}
323270

324-
325271
@Override
326272
public List<Long> getContentIdsReferencingArtifactVersion(String groupId, String artifactId, String version) {
327273
return delegate.getContentIdsReferencingArtifactVersion(groupId, artifactId, version);
328274
}
329275

330-
331276
@Override
332277
public List<Long> getGlobalIdsReferencingArtifactVersion(String groupId, String artifactId, String version) {
333278
return delegate.getGlobalIdsReferencingArtifactVersion(groupId, artifactId, version);
334279
}
335280

336-
337281
@Override
338282
public List<ArtifactReferenceDto> getInboundArtifactReferences(String groupId, String artifactId, String version) {
339283
return delegate.getInboundArtifactReferences(groupId, artifactId, version);
340284
}
341285

342-
343286
@Override
344287
public GroupSearchResultsDto searchGroups(Set<SearchFilter> filters, OrderBy orderBy, OrderDirection orderDirection, Integer offset, Integer limit) {
345288
return delegate.searchGroups(filters, orderBy, orderDirection, offset, limit);
346289
}
347290

348-
349291
@Override
350292
public List<CommentDto> getArtifactVersionComments(String groupId, String artifactId, String version) {
351293
return delegate.getArtifactVersionComments(groupId, artifactId, version);
352294
}
353295

354-
355296
@Override
356297
public boolean isContentExists(String contentHash) throws RegistryStorageException {
357298
return delegate.isContentExists(contentHash);
358299
}
359300

360-
361301
@Override
362302
public boolean isArtifactRuleExists(String groupId, String artifactId, RuleType rule) throws RegistryStorageException {
363303
return delegate.isArtifactRuleExists(groupId, artifactId, rule);
364304
}
365305

366-
367306
@Override
368307
public boolean isGlobalRuleExists(RuleType rule) throws RegistryStorageException {
369308
return delegate.isGlobalRuleExists(rule);
370309
}
371310

372-
373311
@Override
374312
public boolean isRoleMappingExists(String principalId) {
375313
return delegate.isRoleMappingExists(principalId);
376314
}
377315

378-
379316
@Override
380317
public Optional<Long> contentIdFromHash(String contentHash) {
381318
return delegate.contentIdFromHash(contentHash);
382319
}
383320

384-
385321
@Override
386322
public List<Long> getEnabledArtifactContentIds(String groupId, String artifactId) {
387323
return delegate.getEnabledArtifactContentIds(groupId, artifactId);
388324
}
389325

390326
@Override
391-
public List<String> getArtifactVersions(String groupId, String artifactId, ArtifactRetrievalBehavior behavior) throws ArtifactNotFoundException, RegistryStorageException {
327+
public List<String> getArtifactVersions(String groupId, String artifactId, ArtifactRetrievalBehavior behavior)
328+
throws ArtifactNotFoundException, RegistryStorageException {
392329
return delegate.getArtifactVersions(groupId, artifactId, behavior);
393330
}
394331

395-
396332
@Override
397333
public GAV getArtifactBranchTip(GA ga, BranchId branchId, ArtifactRetrievalBehavior behavior) {
398334
return delegate.getArtifactBranchTip(ga, branchId, behavior);
399335
}
400336

401-
402337
@Override
403338
public Map<BranchId, List<GAV>> getArtifactBranches(GA ga) {
404339
return delegate.getArtifactBranches(ga);
405340
}
406341

407-
408342
@Override
409343
public List<GAV> getArtifactBranch(GA ga, BranchId branchId, ArtifactRetrievalBehavior behavior) {
410344
return delegate.getArtifactBranch(ga, branchId, behavior);
411345
}
346+
412347
}

0 commit comments

Comments
 (0)