use of util.ValidationResponse in project coprhd-controller by CoprHD.
the class CatalogImages method saveJson.
public static void saveJson(String name, @Required File file) {
if (Validation.hasErrors()) {
List<ValidationResponse> response = ValidationResponse.collectErrors();
renderJSON(response);
}
CatalogImageRestRep image = save(null, name, file);
renderJSON(ValidationResponse.valid(image.getId().toString()));
}
Aggregations