private void redeployResource(Resource resource) throws Exception { ResourceDeployer resourceDeployer = getResourceDeployer(resource); if (resourceDeployer != null) { ResourceDeployerValidator validator = getResourceDeployerValidator(resourceDeployer); if (validator != null) { if (validator.isEnabledLocally(resource)) { // Resource is currently enabled in the config, // call the redeploy op; the ResourceDeployer should // be able to handle this scenario resourceDeployer.redeployResource(resource); } else if (validator.isDeployedLocally(resource)) { // Resource is disabled in new config, and resource // is currently active, so undeploy resourceDeployer.undeployResource(resource); } } else { // No validator, just call deployer resourceDeployer.redeployResource(resource); } } }
BindableResource bindableResource = (BindableResource) instance; if (getEnabledResourceRefforResource(bindableResource) && Boolean.valueOf(bindableResource.getEnabled())) { deployer.redeployResource(instance); redeployResource((Resource) instance); } else { deployer.redeployResource(instance); ResourceDeployer parentDeployer = getResourceDeployer(instance.getParent()); if (parentDeployer != null) parentDeployer.redeployResource(instance.getParent()); redeployResource((Resource) instance); } else { ResourceDeployer parentDeployer = getResourceDeployer(instance.getParent()); if (parentDeployer != null) parentDeployer.redeployResource(instance.getParent());
ResourceDeployer parentDeployer = getResourceDeployer(instance.getParent()); if (parentDeployer != null) parentDeployer.redeployResource(instance.getParent()); redeployResource((Resource) instance.getParent());