41
41
import io .apicurio .registry .rest .v2 .shared .CommonResourceOperations ;
42
42
import io .apicurio .registry .rules .RuleApplicationType ;
43
43
import io .apicurio .registry .rules .RulesService ;
44
- import io .apicurio .registry .storage .RegistryStorage .ArtifactRetrievalBehavior ;
44
+ import io .apicurio .registry .storage .RegistryStorage .RetrievalBehavior ;
45
45
import io .apicurio .registry .storage .dto .ArtifactMetaDataDto ;
46
46
import io .apicurio .registry .storage .dto .ArtifactReferenceDto ;
47
47
import io .apicurio .registry .storage .dto .ArtifactSearchResultsDto ;
@@ -169,7 +169,7 @@ public Response getLatestArtifact(String groupId, String artifactId, Boolean der
169
169
}
170
170
171
171
try {
172
- GAV latestGAV = storage .getArtifactBranchTip (new GA (groupId , artifactId ), BranchId .LATEST , ArtifactRetrievalBehavior .SKIP_DISABLED_LATEST );
172
+ GAV latestGAV = storage .getBranchTip (new GA (groupId , artifactId ), BranchId .LATEST , RetrievalBehavior .SKIP_DISABLED_LATEST );
173
173
ArtifactVersionMetaDataDto metaData = storage .getArtifactVersionMetaData (latestGAV .getRawGroupIdWithNull (), latestGAV .getRawArtifactId (), latestGAV .getRawVersionId ());
174
174
StoredArtifactVersionDto artifact = storage .getArtifactVersionContent (defaultGroupIdToNull (groupId ), artifactId , latestGAV .getRawVersionId ());
175
175
@@ -267,7 +267,7 @@ public ArtifactMetaData getArtifactMetaData(String groupId, String artifactId) {
267
267
requireParameter ("artifactId" , artifactId );
268
268
269
269
ArtifactMetaDataDto dto = storage .getArtifactMetaData (defaultGroupIdToNull (groupId ), artifactId );
270
- GAV latestGAV = storage .getArtifactBranchTip (new GA (groupId , artifactId ), BranchId .LATEST , ArtifactRetrievalBehavior .SKIP_DISABLED_LATEST );
270
+ GAV latestGAV = storage .getBranchTip (new GA (groupId , artifactId ), BranchId .LATEST , RetrievalBehavior .SKIP_DISABLED_LATEST );
271
271
ArtifactVersionMetaDataDto vdto = storage .getArtifactVersionMetaData (latestGAV .getRawGroupIdWithNull (), latestGAV .getRawArtifactId (), latestGAV .getRawVersionId ());
272
272
273
273
ArtifactMetaData amd = V2ApiUtil .dtoToMetaData (defaultGroupIdToNull (groupId ), artifactId , dto .getArtifactType (), dto );
@@ -291,7 +291,7 @@ public ArtifactMetaData getArtifactMetaData(String groupId, String artifactId) {
291
291
@ Audited (extractParameters = {"0" , KEY_GROUP_ID , "1" , KEY_ARTIFACT_ID , "2" , KEY_EDITABLE_METADATA })
292
292
@ Authorized (style = AuthorizedStyle .GroupAndArtifact , level = AuthorizedLevel .Write )
293
293
public void updateArtifactMetaData (String groupId , String artifactId , EditableMetaData data ) {
294
- GAV latestGAV = storage .getArtifactBranchTip (new GA (groupId , artifactId ), BranchId .LATEST , ArtifactRetrievalBehavior .DEFAULT );
294
+ GAV latestGAV = storage .getBranchTip (new GA (groupId , artifactId ), BranchId .LATEST , RetrievalBehavior .DEFAULT );
295
295
storage .updateArtifactVersionMetaData (groupId , artifactId , latestGAV .getRawVersionId (), EditableVersionMetaDataDto .builder ()
296
296
.name (data .getName ())
297
297
.description (data .getDescription ())
@@ -535,8 +535,8 @@ public void updateArtifactState(String groupId, String artifactId, UpdateState d
535
535
requireParameter ("body.state" , data .getState ());
536
536
537
537
// Possible race condition here. Worst case should be that the update fails with a reasonable message.
538
- GAV latestGAV = storage .getArtifactBranchTip (new GA (defaultGroupIdToNull (groupId ), artifactId ),
539
- BranchId .LATEST , ArtifactRetrievalBehavior .DEFAULT );
538
+ GAV latestGAV = storage .getBranchTip (new GA (defaultGroupIdToNull (groupId ), artifactId ),
539
+ BranchId .LATEST , RetrievalBehavior .DEFAULT );
540
540
updateArtifactVersionState (groupId , artifactId , latestGAV .getRawVersionId (), data );
541
541
}
542
542
0 commit comments