IllegalArgumentAssertion.assertNotNull(resource, "resource");
ResourceContent content = resource.adapt(ResourceContent.class);
IllegalStateAssertion.assertNotNull(content, "Resource has no content: " + resource);
Context context = new DefaultInstallerContext(resource);
ResourceHandle handle;
if (shared) {
handle = installer.installSharedResource(context, resource);
} else {
handle = installer.installResource(context, resource, runtimeName);