public void execute()

in src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigRemoveTask.java [46:71]


    public void execute(final InstallationContext ctx) {
        synchronized ( Coordinator.SHARED ) {
            try {
                Configuration cfg = ConfigUtil.getConfiguration(this.getConfigurationAdmin(), this.factoryPid, this.configPid);
                if (cfg == null) {
                    this.getLogger().debug("Cannot delete config , pid={} not found, ignored ({})", getRealPID(), getResource());
                } else {
                    if ( !ConfigUtil.isSameData(cfg.getProperties(), this.getResource().getDictionary()) ) {
                        this.getLogger().debug("Configuration has changed after it has been installed!");
                    } else {
                        final Coordinator.Operation op = new Coordinator.Operation(cfg.getPid(), cfg.getFactoryPid(), true);

                        this.getLogger().debug("Deleting config {} ({})", getRealPID(), getResource());
                        cfg.delete();
                        ctx.log("Deleted configuration {} from resource {}", getRealPID(), getResource());

                        Coordinator.SHARED.add(op);
                    }
                }
            } catch (final Exception e) {
                this.getLogger().debug("Exception during removal of config " + this.getResource() + " : " + e.getMessage() + ". Retrying later.", e);
            }
            // we always set to uninstalled as the resource really has been deleted
            this.setFinishedState(ResourceState.UNINSTALLED);
        }
    }