use of com.emc.vipr.model.catalog.AssetDependencyResponse in project coprhd-controller by CoprHD.
the class AssetOptionService method getAssetDependencies.
@POST
@Path("/{assetType}/dependencies")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public AssetDependencyResponse getAssetDependencies(@PathParam("assetType") String assetType, AssetDependencyRequest request) {
final Set<String> availableAssetTypes = request.getAvailableAssetTypes();
final String sanitizedAssetType = SecurityUtils.stripXSS(assetType);
log.info("Retrieving asset dependencies for " + sanitizedAssetType + " with available assets : " + StringUtils.join(availableAssetTypes, ", "));
List<String> dependencies = assetOptionsManager.getAssetDependencies(sanitizedAssetType, availableAssetTypes);
AssetDependencyResponse response = new AssetDependencyResponse();
response.setAssetType(sanitizedAssetType);
response.setAssetDependencies(dependencies);
return response;
}
Aggregations