void removeHandler(String name) { assert config.isCore() : "Not available for non-core configuration"; if (addedHandlers != null && addedHandlers.containsKey(name)){ throw ControllerLogger.ROOT_LOGGER.attemptToBothAddAndRemoveAndHandlerFromCompositeOperation(); } if (replacedHandlers != null && replacedHandlers.containsKey(name)){ throw ControllerLogger.ROOT_LOGGER.attemptToBothUpdateAndRemoveHandlerFromCompositeOperation(); } final AuditLogHandler handler = config.getConfiguredHandler(name); if (handler != null){ Set<PathAddress> references = handler.getReferences(); if (references.size() > 0){ if (!references.containsAll(removedReferences)){ Set<PathAddress> activeReferences = new HashSet<PathAddress>(references); activeReferences.removeAll(removedReferences); throw ControllerLogger.ROOT_LOGGER.handlerIsReferencedBy(removedReferences); } } } config.removeConfiguredHandler(name); if (removedHandlers == null){ removedHandlers = new HashSet<String>(); } removedHandlers.add(name); }
void removeHandler(String name) { assert config.isCore() : "Not available for non-core configuration"; if (addedHandlers != null && addedHandlers.containsKey(name)){ throw ControllerLogger.ROOT_LOGGER.attemptToBothAddAndRemoveAndHandlerFromCompositeOperation(); } if (replacedHandlers != null && replacedHandlers.containsKey(name)){ throw ControllerLogger.ROOT_LOGGER.attemptToBothUpdateAndRemoveHandlerFromCompositeOperation(); } final AuditLogHandler handler = config.getConfiguredHandler(name); if (handler != null){ Set<PathAddress> references = handler.getReferences(); if (references.size() > 0){ if (!references.containsAll(removedReferences)){ Set<PathAddress> activeReferences = new HashSet<PathAddress>(references); activeReferences.removeAll(removedReferences); throw ControllerLogger.ROOT_LOGGER.handlerIsReferencedBy(removedReferences); } } } config.removeConfiguredHandler(name); if (removedHandlers == null){ removedHandlers = new HashSet<String>(); } removedHandlers.add(name); }
void removeHandler(String name) { assert config.isCore() : "Not available for non-core configuration"; if (addedHandlers != null && addedHandlers.containsKey(name)){ throw ControllerMessages.MESSAGES.attemptToBothAddAndRemoveAndHandlerFromCompositeOperation(); } if (replacedHandlers != null && replacedHandlers.containsKey(name)){ throw ControllerMessages.MESSAGES.attemptToBothUpdateAndRemoveHandlerFromCompositeOperation(); } final AuditLogHandler handler = config.getConfiguredHandler(name); if (handler != null){ Set<PathAddress> references = handler.getReferences(); if (references.size() > 0){ if (!references.containsAll(removedReferences)){ Set<PathAddress> activeReferences = new HashSet<PathAddress>(references); activeReferences.removeAll(removedReferences); throw ControllerMessages.MESSAGES.handlerIsReferencedBy(removedReferences); } } } config.removeConfiguredHandler(name); if (removedHandlers == null){ removedHandlers = new HashSet<String>(); } removedHandlers.add(name); }
for (PathAddress referenceAddress : existing.getReferences()){ if (removedReferences != null && !removedReferences.contains(referenceAddress)){ handler.addReference(referenceAddress);
for (PathAddress referenceAddress : existing.getReferences()){ if (removedReferences != null && !removedReferences.contains(referenceAddress)){ handler.addReference(referenceAddress);
for (PathAddress referenceAddress : existing.getReferences()){ if (removedReferences != null && !removedReferences.contains(referenceAddress)){ handler.addReference(referenceAddress);