6
6
import io .apicurio .registry .model .GA ;
7
7
import io .apicurio .registry .model .GAV ;
8
8
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 .*;
25
10
import io .apicurio .registry .storage .error .ArtifactNotFoundException ;
26
11
import io .apicurio .registry .storage .error .ContentNotFoundException ;
27
12
import io .apicurio .registry .storage .error .GroupNotFoundException ;
@@ -47,11 +32,9 @@ public abstract class RegistryStorageDecoratorReadOnlyBase implements RegistrySt
47
32
48
33
protected RegistryStorage delegate ;
49
34
50
-
51
35
protected RegistryStorageDecoratorReadOnlyBase () {
52
36
}
53
37
54
-
55
38
public void setDelegate (RegistryStorage delegate ) {
56
39
this .delegate = delegate ;
57
40
}
@@ -71,239 +54,205 @@ public boolean isReady() {
71
54
return delegate .isReady ();
72
55
}
73
56
74
-
75
57
@ Override
76
58
public boolean isAlive () {
77
59
return delegate .isAlive ();
78
60
}
79
61
80
-
81
62
@ Override
82
63
public boolean isReadOnly () {
83
64
return delegate .isReadOnly ();
84
65
}
85
66
86
-
87
67
@ Override
88
68
public ContentWrapperDto getContentById (long contentId )
89
69
throws ContentNotFoundException , RegistryStorageException {
90
70
return delegate .getContentById (contentId );
91
71
}
92
72
93
-
94
73
@ Override
95
74
public ContentWrapperDto getContentByHash (String contentHash )
96
75
throws ContentNotFoundException , RegistryStorageException {
97
76
return delegate .getContentByHash (contentHash );
98
77
}
99
78
100
-
101
79
@ Override
102
80
public List <ArtifactVersionMetaDataDto > getArtifactVersionsByContentId (long contentId ) {
103
81
return delegate .getArtifactVersionsByContentId (contentId );
104
82
}
105
83
106
-
107
84
@ Override
108
85
public Set <String > getArtifactIds (Integer limit ) {
109
86
return delegate .getArtifactIds (limit );
110
87
}
111
88
112
-
113
89
@ Override
114
90
public ArtifactSearchResultsDto searchArtifacts (Set <SearchFilter > filters , OrderBy orderBy ,
115
91
OrderDirection orderDirection , int offset , int limit ) {
116
92
return delegate .searchArtifacts (filters , orderBy , orderDirection , offset , limit );
117
93
}
118
94
119
-
120
95
@ Override
121
96
public ArtifactMetaDataDto getArtifactMetaData (String groupId , String artifactId )
122
97
throws ArtifactNotFoundException , RegistryStorageException {
123
98
return delegate .getArtifactMetaData (groupId , artifactId );
124
99
}
125
100
126
-
127
101
@ Override
128
102
public ArtifactVersionMetaDataDto getArtifactVersionMetaDataByContent (String groupId , String artifactId ,
129
- boolean canonical , ContentHandle content , List <ArtifactReferenceDto > artifactReferences )
103
+ boolean canonical , ContentHandle content , List <ArtifactReferenceDto > artifactReferences )
130
104
throws ArtifactNotFoundException , RegistryStorageException {
131
105
return delegate .getArtifactVersionMetaDataByContent (groupId , artifactId , canonical , content , artifactReferences );
132
106
}
133
107
134
-
135
108
@ Override
136
109
public List <RuleType > getArtifactRules (String groupId , String artifactId )
137
110
throws ArtifactNotFoundException , RegistryStorageException {
138
111
return delegate .getArtifactRules (groupId , artifactId );
139
112
}
140
113
141
-
142
114
@ Override
143
115
public void createArtifactRule (String groupId , String artifactId , RuleType rule ,
144
116
RuleConfigurationDto config )
145
117
throws ArtifactNotFoundException , RuleAlreadyExistsException , RegistryStorageException {
146
118
delegate .createArtifactRule (groupId , artifactId , rule , config );
147
119
}
148
120
149
-
150
121
@ Override
151
122
public RuleConfigurationDto getArtifactRule (String groupId , String artifactId , RuleType rule )
152
123
throws ArtifactNotFoundException , RuleNotFoundException , RegistryStorageException {
153
124
return delegate .getArtifactRule (groupId , artifactId , rule );
154
125
}
155
126
156
-
157
127
@ Override
158
128
public List <String > getArtifactVersions (String groupId , String artifactId )
159
129
throws ArtifactNotFoundException , RegistryStorageException {
160
130
return delegate .getArtifactVersions (groupId , artifactId );
161
131
}
162
132
163
133
@ Override
164
- public VersionSearchResultsDto searchVersions (String groupId , String artifactId , OrderBy orderBy , OrderDirection orderDirection , int offset , int limit ) throws RegistryStorageException {
134
+ public VersionSearchResultsDto searchVersions (String groupId , String artifactId , OrderBy orderBy , OrderDirection orderDirection , int offset , int limit )
135
+ throws RegistryStorageException {
165
136
return delegate .searchVersions (groupId , artifactId , orderBy , orderDirection , offset , limit );
166
137
}
167
138
168
-
169
139
@ Override
170
140
public StoredArtifactVersionDto getArtifactVersionContent (long globalId )
171
141
throws ArtifactNotFoundException , RegistryStorageException {
172
142
return delegate .getArtifactVersionContent (globalId );
173
143
}
174
144
175
-
176
145
@ Override
177
146
public StoredArtifactVersionDto getArtifactVersionContent (String groupId , String artifactId , String version )
178
147
throws ArtifactNotFoundException , VersionNotFoundException , RegistryStorageException {
179
148
return delegate .getArtifactVersionContent (groupId , artifactId , version );
180
149
}
181
150
182
-
183
151
@ Override
184
152
public ArtifactVersionMetaDataDto getArtifactVersionMetaData (String groupId , String artifactId ,
185
153
String version )
186
154
throws ArtifactNotFoundException , VersionNotFoundException , RegistryStorageException {
187
155
return delegate .getArtifactVersionMetaData (groupId , artifactId , version );
188
156
}
189
-
190
-
157
+
191
158
@ Override
192
159
public ArtifactVersionMetaDataDto getArtifactVersionMetaData (Long globalId )
193
160
throws VersionNotFoundException , RegistryStorageException {
194
161
return delegate .getArtifactVersionMetaData (globalId );
195
162
}
196
163
197
-
198
164
@ Override
199
165
public List <RuleType > getGlobalRules () throws RegistryStorageException {
200
166
return delegate .getGlobalRules ();
201
167
}
202
168
203
-
204
169
@ Override
205
170
public RuleConfigurationDto getGlobalRule (RuleType rule )
206
171
throws RuleNotFoundException , RegistryStorageException {
207
172
return delegate .getGlobalRule (rule );
208
173
}
209
174
210
-
211
175
@ Override
212
176
public List <String > getGroupIds (Integer limit ) throws RegistryStorageException {
213
177
return delegate .getGroupIds (limit );
214
178
}
215
179
216
-
217
180
@ Override
218
181
public GroupMetaDataDto getGroupMetaData (String groupId )
219
182
throws GroupNotFoundException , RegistryStorageException {
220
183
return delegate .getGroupMetaData (groupId );
221
184
}
222
185
223
-
224
186
@ Override
225
187
public void exportData (Function <Entity , Void > handler ) throws RegistryStorageException {
226
188
delegate .exportData (handler );
227
189
}
228
190
229
-
230
191
@ Override
231
192
public long countArtifacts () throws RegistryStorageException {
232
193
return delegate .countArtifacts ();
233
194
}
234
195
235
-
236
196
@ Override
237
197
public long countArtifactVersions (String groupId , String artifactId ) throws RegistryStorageException {
238
198
return delegate .countArtifactVersions (groupId , artifactId );
239
199
}
240
-
241
-
200
+
242
201
@ Override
243
202
public long countActiveArtifactVersions (String groupId , String artifactId ) throws RegistryStorageException {
244
203
return delegate .countActiveArtifactVersions (groupId , artifactId );
245
204
}
246
205
247
-
248
206
@ Override
249
207
public long countTotalArtifactVersions () throws RegistryStorageException {
250
208
return delegate .countTotalArtifactVersions ();
251
209
}
252
210
253
-
254
211
@ Override
255
212
public RoleMappingDto getRoleMapping (String principalId ) throws RegistryStorageException {
256
213
return delegate .getRoleMapping (principalId );
257
214
}
258
215
259
-
260
216
@ Override
261
217
public String getRoleForPrincipal (String principalId ) throws RegistryStorageException {
262
218
return delegate .getRoleForPrincipal (principalId );
263
219
}
264
220
265
-
266
221
@ Override
267
222
public List <RoleMappingDto > getRoleMappings () throws RegistryStorageException {
268
223
return delegate .getRoleMappings ();
269
224
}
270
-
225
+
271
226
@ Override
272
227
public RoleMappingSearchResultsDto searchRoleMappings (int offset , int limit ) throws RegistryStorageException {
273
228
return delegate .searchRoleMappings (offset , limit );
274
229
}
275
230
276
-
277
231
@ Override
278
232
public List <DynamicConfigPropertyDto > getConfigProperties () throws RegistryStorageException {
279
233
return delegate .getConfigProperties ();
280
234
}
281
235
282
-
283
236
@ Override
284
237
public DynamicConfigPropertyDto getConfigProperty (String propertyName ) {
285
238
return delegate .getConfigProperty (propertyName );
286
239
}
287
240
288
-
289
241
@ Override
290
242
public List <DynamicConfigPropertyDto > getStaleConfigProperties (Instant since ) {
291
243
return delegate .getStaleConfigProperties (since );
292
244
}
293
245
294
-
295
246
@ Override
296
247
public DynamicConfigPropertyDto getRawConfigProperty (String propertyName ) {
297
248
return delegate .getRawConfigProperty (propertyName );
298
249
}
299
250
300
-
301
251
@ Override
302
252
public Map <String , ContentHandle > resolveReferences (List <ArtifactReferenceDto > references ) {
303
253
return delegate .resolveReferences (references );
304
254
}
305
255
306
-
307
256
@ Override
308
257
public boolean isArtifactExists (String groupId , String artifactId ) throws RegistryStorageException {
309
258
return delegate .isArtifactExists (groupId , artifactId );
@@ -314,98 +263,85 @@ public boolean isGroupExists(String groupId) throws RegistryStorageException {
314
263
return delegate .isGroupExists (groupId );
315
264
}
316
265
317
-
318
266
@ Override
319
267
public boolean isArtifactVersionExists (String groupId , String artifactId , String version ) throws RegistryStorageException {
320
268
return delegate .isArtifactVersionExists (groupId , artifactId , version );
321
269
}
322
270
323
-
324
271
@ Override
325
272
public List <Long > getContentIdsReferencingArtifactVersion (String groupId , String artifactId , String version ) {
326
273
return delegate .getContentIdsReferencingArtifactVersion (groupId , artifactId , version );
327
274
}
328
275
329
-
330
276
@ Override
331
277
public List <Long > getGlobalIdsReferencingArtifactVersion (String groupId , String artifactId , String version ) {
332
278
return delegate .getGlobalIdsReferencingArtifactVersion (groupId , artifactId , version );
333
279
}
334
280
335
-
336
281
@ Override
337
282
public List <ArtifactReferenceDto > getInboundArtifactReferences (String groupId , String artifactId , String version ) {
338
283
return delegate .getInboundArtifactReferences (groupId , artifactId , version );
339
284
}
340
285
341
-
342
286
@ Override
343
287
public GroupSearchResultsDto searchGroups (Set <SearchFilter > filters , OrderBy orderBy , OrderDirection orderDirection , Integer offset , Integer limit ) {
344
288
return delegate .searchGroups (filters , orderBy , orderDirection , offset , limit );
345
289
}
346
290
347
-
348
291
@ Override
349
292
public List <CommentDto > getArtifactVersionComments (String groupId , String artifactId , String version ) {
350
293
return delegate .getArtifactVersionComments (groupId , artifactId , version );
351
294
}
352
295
353
-
354
296
@ Override
355
297
public boolean isContentExists (String contentHash ) throws RegistryStorageException {
356
298
return delegate .isContentExists (contentHash );
357
299
}
358
300
359
-
360
301
@ Override
361
302
public boolean isArtifactRuleExists (String groupId , String artifactId , RuleType rule ) throws RegistryStorageException {
362
303
return delegate .isArtifactRuleExists (groupId , artifactId , rule );
363
304
}
364
305
365
-
366
306
@ Override
367
307
public boolean isGlobalRuleExists (RuleType rule ) throws RegistryStorageException {
368
308
return delegate .isGlobalRuleExists (rule );
369
309
}
370
310
371
-
372
311
@ Override
373
312
public boolean isRoleMappingExists (String principalId ) {
374
313
return delegate .isRoleMappingExists (principalId );
375
314
}
376
315
377
-
378
316
@ Override
379
317
public Optional <Long > contentIdFromHash (String contentHash ) {
380
318
return delegate .contentIdFromHash (contentHash );
381
319
}
382
320
383
-
384
321
@ Override
385
322
public List <Long > getEnabledArtifactContentIds (String groupId , String artifactId ) {
386
323
return delegate .getEnabledArtifactContentIds (groupId , artifactId );
387
324
}
388
325
389
326
@ Override
390
- 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 {
391
329
return delegate .getArtifactVersions (groupId , artifactId , behavior );
392
330
}
393
331
394
-
395
332
@ Override
396
333
public GAV getArtifactBranchTip (GA ga , BranchId branchId , ArtifactRetrievalBehavior behavior ) {
397
334
return delegate .getArtifactBranchTip (ga , branchId , behavior );
398
335
}
399
336
400
-
401
337
@ Override
402
338
public Map <BranchId , List <GAV >> getArtifactBranches (GA ga ) {
403
339
return delegate .getArtifactBranches (ga );
404
340
}
405
341
406
-
407
342
@ Override
408
343
public List <GAV > getArtifactBranch (GA ga , BranchId branchId , ArtifactRetrievalBehavior behavior ) {
409
344
return delegate .getArtifactBranch (ga , branchId , behavior );
410
345
}
346
+
411
347
}
0 commit comments