use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ImageCatalogV4Response in project cloudbreak by hortonworks.
the class ImageCatalogToImageCatalogV4ResponseConverter method convert.
public ImageCatalogV4Response convert(ImageCatalog source) {
ImageCatalogV4Response imageCatalogResponse = new ImageCatalogV4Response();
imageCatalogResponse.setUrl(source.getImageCatalogUrl());
String imageCatalogName = source.getName();
imageCatalogResponse.setUsedAsDefault(isDefault(imageCatalogName));
imageCatalogResponse.setName(imageCatalogName);
imageCatalogResponse.setDescription(source.getDescription());
imageCatalogResponse.setCreator(source.getCreator());
imageCatalogResponse.setCreated(source.getCreated());
imageCatalogResponse.setCrn(source.getResourceCrn());
return imageCatalogResponse;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ImageCatalogV4Response in project cloudbreak by hortonworks.
the class ImageCatalogService method getResourceCrnByResourceName.
@Override
public String getResourceCrnByResourceName(String resourceName) {
String initiatorUserCrn = ThreadBasedUserCrnProvider.getUserCrn();
ImageCatalogV4Endpoint imageCatalogV4Endpoint = cloudbreakInternalCrnClient.withInternalCrn().imageCatalogV4Endpoint();
ImageCatalogV4Response response = imageCatalogV4Endpoint.getByNameInternal(SdxService.WORKSPACE_ID_DEFAULT, resourceName, false, initiatorUserCrn);
return response.getCrn();
}
Aggregations