in integrations/rest-management/rest-management/src/main/java/org/apache/aries/jax/rs/rest/management/internal/client/RestClientImpl.java [502:526]
public BundleDTO installBundle(String location) throws Exception {
try (Response response = maybeThrow(() -> {
Response r = webTarget.path(
"framework"
).path(
"bundles"
).request(
APPLICATION_BUNDLE_JSON
).post(
Entity.entity(location, TEXT_PLAIN)
);
StatusType statusInfo = r.getStatusInfo();
if (statusInfo.getStatusCode() == 400) {
BundleExceptionSchema bundleExceptionSchema = r.readEntity(BundleExceptionSchema.class);
throw new BundleException(bundleExceptionSchema.message, bundleExceptionSchema.typecode);
}
return r;
})) {
return response.readEntity(
BundleSchema.class
);
}
}