boolean success = true;
boolean daemonOnly = true;
boolean onlyIfStarted = true;
ResourceConfigurationFacet facet = componentService.getComponent(resourceId, ResourceConfigurationFacet.class,
FacetLockType.READ, FACET_METHOD_TIMEOUT, daemonOnly, onlyIfStarted);
if (isStructured) {
try {
facet.validateStructuredConfiguration(configuration);
} catch (IllegalArgumentException e) {
success = false;
} catch (Throwable t) {
throw new PluginContainerException(t.getMessage(), t);
}
} else {
for (RawConfiguration rawConfiguration : configuration.getRawConfigurations()) {
try {
facet.validateRawConfiguration(rawConfiguration);
} catch (IllegalArgumentException e) {
success = false;
rawConfiguration.errorMessage = e.getMessage();
} catch (Throwable t) {
success = false;