@ManagementOperation(description = "Uninstalls a contribution") public void uninstall(URI uri) throws ContributionUninstallException { try { contributionService.uninstall(uri); } catch (ContributionInUseException e) { throw new ContributionInUseManagementException(e.getMessage(), e.getUri(), e.getContributions()); } catch (ContributionLockedException e) { throw new ContributionLockedManagementException(e.getMessage(), e.getUri(), e.getDeployables()); } catch (ContributionException e) { // log the exception as it is not recoverable monitor.error("Error uninstalling contribution: " + uri, e); // don't rethrow the original exception since the class will not be available on the client's classpath throw new ContributionUninstallException(getErrorMessage(e)); } }
@ManagementOperation(description = "Uninstalls a profile") public void uninstallProfile(URI uri) throws ContributionUninstallException { try { contributionService.uninstallProfile(uri); } catch (ContributionInUseException e) { throw new ContributionInUseManagementException(e.getMessage(), e.getUri(), e.getContributions()); } catch (ContributionLockedException e) { throw new ContributionLockedManagementException(e.getMessage(), e.getUri(), e.getDeployables()); } catch (ContributionException e) { // log the exception as it is not recoverable monitor.error("Error uninstalling profile: " + uri, e); // don't rethrow the original exception since the class will not be available on the client's classpath throw new ContributionUninstallException(getErrorMessage(e)); } }