/** * A helper to parse the deprecated {@code filter} for schema versions {@code 1.0} and {@code 1.1}. This parses the * XML and creates a {@code filter-spec} expression. The expression is set as the value for the {@code filter-spec} * attribute on the operation. * * @param operation the operation to add the parsed filter to * @param reader the reader used to read the filter * * @throws XMLStreamException if a parsing error occurs */ static void parseFilter(final ModelNode operation, final XMLExtendedStreamReader reader) throws XMLStreamException { final StringBuilder filter = new StringBuilder(); parseFilterChildren(filter, false, reader); operation.get(FILTER_SPEC.getName()).set(filter.toString()); }
/** * A helper to parse the deprecated {@code filter} for schema versions {@code 1.0} and {@code 1.1}. This parses the * XML and creates a {@code filter-spec} expression. The expression is set as the value for the {@code filter-spec} * attribute on the operation. * * @param operation the operation to add the parsed filter to * @param reader the reader used to read the filter * * @throws XMLStreamException if a parsing error occurs */ static void parseFilter(final ModelNode operation, final XMLExtendedStreamReader reader) throws XMLStreamException { final StringBuilder filter = new StringBuilder(); parseFilterChildren(filter, false, reader); operation.get(FILTER_SPEC.getName()).set(filter.toString()); }
private static void parseFilter(final Namespace namespace, final ModelNode node, final XMLExtendedStreamReader reader) throws XMLStreamException { if (namespace == Namespace.LOGGING_1_0 || namespace == Namespace.LOGGING_1_1) { // No attributes if (reader.getAttributeCount() > 0) { throw unexpectedAttribute(reader, 0); } final StringBuilder filter = new StringBuilder(); parseFilterChildren(filter, false, reader); node.get(FILTER_SPEC.getName()).set(filter.toString()); } else { FILTER_SPEC.parseAndSetParameter(readStringAttributeElement(reader, Attribute.VALUE.getLocalName()), node, reader); } }
parseFilterChildren(filter, true, reader); parseFilterChildren(filter, true, reader); parseFilterChildren(filter, true, reader);
parseFilterChildren(filter, true, reader); parseFilterChildren(filter, true, reader); parseFilterChildren(filter, true, reader);
parseFilterChildren(filter, true, reader); parseFilterChildren(filter, true, reader); parseFilterChildren(filter, true, reader);