Java Code Examples for org.jboss.as.controller.parsing.ParseUtils#requireSingleAttribute()
The following examples show how to use
org.jboss.as.controller.parsing.ParseUtils#requireSingleAttribute() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KeycloakSubsystemParser.java From keycloak with Apache License 2.0 | 6 votes |
void readRoleIdentifiers(ModelNode addServiceProvider, XMLExtendedStreamReader reader) throws XMLStreamException { ParseUtils.requireNoAttributes(reader); while (reader.hasNext() && nextTag(reader) != END_ELEMENT) { String tagName = reader.getLocalName(); if (!Constants.XML.ATTRIBUTE.equals(tagName)) { throw ParseUtils.unexpectedElement(reader); } ParseUtils.requireSingleAttribute(reader, Constants.XML.NAME); String name = ParseUtils.readStringAttributeElement(reader, Constants.XML.NAME); ServiceProviderDefinition.ROLE_ATTRIBUTES.parseAndAddParameterElement(name, addServiceProvider, reader); } }
Example 2
Source File: KeycloakSubsystemParser.java From keycloak with Apache License 2.0 | 6 votes |
void readRoleIdentifiers(ModelNode addServiceProvider, XMLExtendedStreamReader reader) throws XMLStreamException { ParseUtils.requireNoAttributes(reader); while (reader.hasNext() && nextTag(reader) != END_ELEMENT) { String tagName = reader.getLocalName(); if (!Constants.XML.ATTRIBUTE.equals(tagName)) { throw ParseUtils.unexpectedElement(reader); } ParseUtils.requireSingleAttribute(reader, Constants.XML.NAME); String name = ParseUtils.readStringAttributeElement(reader, Constants.XML.NAME); ServiceProviderDefinition.ROLE_ATTRIBUTES.parseAndAddParameterElement(name, addServiceProvider, reader); } }
Example 3
Source File: AttributeParsers.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void parseElement(AttributeDefinition ad, XMLExtendedStreamReader reader, ModelNode addPermissionMapper) throws XMLStreamException { ParseUtils.requireSingleAttribute(reader, NAME); String name = reader.getAttributeValue(0); addPermissionMapper.get(ad.getName()).add(name); ParseUtils.requireNoContent(reader); }
Example 4
Source File: JMXExtension.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
private boolean parseShowModelElement(XMLExtendedStreamReader reader) throws XMLStreamException { ParseUtils.requireSingleAttribute(reader, CommonAttributes.VALUE); return ParseUtils.readBooleanAttributeElement(reader, CommonAttributes.VALUE); }