use of org.cloudfoundry.credhub.request.UpdateTransitionalVersionRequest in project credhub by cloudfoundry-incubator.
the class CertificatesHandler method handleUpdateTransitionalVersion.
public List<CertificateView> handleUpdateTransitionalVersion(String certificateId, UpdateTransitionalVersionRequest requestBody, List<EventAuditRecordParameters> auditRecordParameters) {
List<CredentialVersion> credentialList;
UUID versionUUID = null;
if (requestBody.getVersionUuid() != null) {
versionUUID = UUID.fromString(requestBody.getVersionUuid());
}
credentialList = permissionedCertificateService.updateTransitionalVersion(UUID.fromString(certificateId), versionUUID, auditRecordParameters);
List<CertificateView> list = credentialList.stream().map(credential -> new CertificateView((CertificateCredentialVersion) credential)).collect(Collectors.toList());
return list;
}
Aggregations