@Override protected void updateModel(final HandlerConfiguration configuration, final ModelNode model) { final ModelNode handlers = model.setEmptyList(); for (String s : configuration.getHandlerNames()) { handlers.add(s); } } });
@Override protected void updateModel(final HandlerConfiguration configuration, final ModelNode model) { final ModelNode handlers = model.setEmptyList(); for (String s : configuration.getHandlerNames()) { handlers.add(s); } } });
@Override public void performRuntime(final OperationContext context, final HandlerConfiguration configuration, final String name, final ModelNode model) throws OperationFailedException { // Get the handler name final String handlerName = HANDLER_NAME.resolveModelAttribute(context, model).asString(); if (name.equals(handlerName)) { throw createOperationFailure(LoggingMessages.MESSAGES.cannotAddHandlerToSelf(configuration.getName())); } if (configuration.getHandlerNames().contains(handlerName)) { throw createOperationFailure(LoggingMessages.MESSAGES.handlerAlreadyDefined(handlerName)); } configuration.addHandlerName(handlerName); } };
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String name = context.getCurrentAddressValue(); final HandlerConfiguration configuration = logContextConfiguration.getHandlerConfiguration(name); if (configuration == null) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.handlerConfigurationNotFound(name)); } // Get the handler name, uses the operation to get the single handler name being added final String handlerName = HANDLER_NAME.resolveModelAttribute(context, operation).asString(); if (name.equals(handlerName)) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.cannotAddHandlerToSelf(configuration.getName())); } if (configuration.getHandlerNames().contains(handlerName)) { LoggingLogger.ROOT_LOGGER.tracef("Handler %s is already assigned to handler %s", handlerName, handlerName); } else { configuration.addHandlerName(handlerName); } } };
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String name = context.getCurrentAddressValue(); final HandlerConfiguration configuration = logContextConfiguration.getHandlerConfiguration(name); if (configuration == null) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.handlerConfigurationNotFound(name)); } // Get the handler name, uses the operation to get the single handler name being added final String handlerName = HANDLER_NAME.resolveModelAttribute(context, operation).asString(); if (name.equals(handlerName)) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.cannotAddHandlerToSelf(configuration.getName())); } if (configuration.getHandlerNames().contains(handlerName)) { LoggingLogger.ROOT_LOGGER.tracef("Handler %s is already assigned to handler %s", handlerName, handlerName); } else { configuration.addHandlerName(handlerName); } } };
final HandlerConfiguration c = logContextConfiguration.getHandlerConfiguration(handlerName); if (c != null) { if (c.getHandlerNames().contains(name)) { assigned.add(handlerName);
final HandlerConfiguration c = logContextConfiguration.getHandlerConfiguration(handlerName); if (c != null) { if (c.getHandlerNames().contains(name)) { assigned.add(handlerName);
} else if (attribute.getName().equals(SUBHANDLERS.getName())) { final Collection<String> resolvedValue = SUBHANDLERS.resolvePropertyValue(context, model); final Collection<String> currentValue = configuration.getHandlerNames(); result = (resolvedValue == null ? currentValue == null : resolvedValue.containsAll(currentValue)); } else if (attribute.getName().equals(PROPERTIES.getName())) {
for (String handlerName : handler.getHandlerNames()) { if (config.getHandlerNames().contains(handlerName)) { implicitHandlers.add(handlerName);
} else if (attribute.getName().equals(SUBHANDLERS.getName())) { final Collection<String> resolvedValue = SUBHANDLERS.resolvePropertyValue(context, model); final Collection<String> currentValue = configuration.getHandlerNames(); result = (resolvedValue == null ? currentValue == null : resolvedValue.containsAll(currentValue)); } else if (attribute.getName().equals(PROPERTIES.getName())) {
} else if (attribute.getName().equals(SUBHANDLERS.getName())) { final Collection<String> resolvedValue = SUBHANDLERS.resolvePropertyValue(context, model); final Collection<String> currentValue = configuration.getHandlerNames(); result = (resolvedValue == null ? currentValue == null : resolvedValue.containsAll(currentValue)); } else if (attribute.getName().equals(PROPERTIES.getName())) {