use of org.jboss.staxmapper.XMLExtendedStreamReader in project wildfly by wildfly.
the class FederationSubsystemReader_1_0 method parseHandlerConfig.
@Override
protected void parseHandlerConfig(final XMLExtendedStreamReader reader, final ModelNode entityProviderNode, final List<ModelNode> addOperations) throws XMLStreamException {
String name = reader.getAttributeValue("", COMMON_CLASS_NAME.getName());
if (name == null) {
name = reader.getAttributeValue("", COMMON_CODE.getName());
if (name != null) {
name = HandlerTypeEnum.forType(name);
}
}
ModelNode handlerNode = parseConfig(reader, COMMON_HANDLER, name, entityProviderNode, HandlerResourceDefinition.INSTANCE.getAttributes(), addOperations);
parseElement(new ElementParser() {
@Override
public void parse(final XMLExtendedStreamReader reader, final ModelElement element, final ModelNode parentNode, List<ModelNode> addOperations) throws XMLStreamException {
switch(element) {
case COMMON_HANDLER_PARAMETER:
parseConfig(reader, COMMON_HANDLER_PARAMETER, COMMON_NAME.getName(), parentNode, HandlerParameterResourceDefinition.INSTANCE.getAttributes(), addOperations);
break;
default:
throw unexpectedElement(reader);
}
}
}, COMMON_HANDLER, handlerNode, reader, addOperations);
}
use of org.jboss.staxmapper.XMLExtendedStreamReader in project wildfly by wildfly.
the class AbstractIDMSubsystemReader method parseFileStoreConfig.
private void parseFileStoreConfig(final XMLExtendedStreamReader reader, final ModelNode identityManagementNode, final List<ModelNode> addOperations) throws XMLStreamException {
ModelNode fileStoreNode = parseConfig(reader, FILE_STORE, null, identityManagementNode, FileStoreResourceDefinition.INSTANCE.getAttributes(), addOperations);
parseElement(new ElementParser() {
@Override
public void parse(final XMLExtendedStreamReader reader, final ModelElement element, final ModelNode parentNode, List<ModelNode> addOperations) throws XMLStreamException {
switch(element) {
case IDENTITY_STORE_CREDENTIAL_HANDLER:
parseCredentialHandlerConfig(reader, parentNode, addOperations);
break;
case SUPPORTED_TYPES:
parseSupportedTypesConfig(reader, parentNode, addOperations);
break;
}
}
}, FILE_STORE, fileStoreNode, reader, addOperations);
}
use of org.jboss.staxmapper.XMLExtendedStreamReader in project wildfly by wildfly.
the class AbstractIDMSubsystemReader method parseIdentityConfigurationConfig.
private void parseIdentityConfigurationConfig(final XMLExtendedStreamReader reader, final ModelNode parentNode, final List<ModelNode> addOperations) throws XMLStreamException {
ModelNode identityConfigurationNode = parseConfig(reader, IDENTITY_CONFIGURATION, COMMON_NAME.getName(), parentNode, IdentityConfigurationResourceDefinition.INSTANCE.getAttributes(), addOperations);
parseElement(new ElementParser() {
@Override
public void parse(final XMLExtendedStreamReader reader, final ModelElement element, final ModelNode parentNode, List<ModelNode> addOperations) throws XMLStreamException {
switch(element) {
case JPA_STORE:
parseJPAStoreConfig(reader, parentNode, addOperations);
break;
case FILE_STORE:
parseFileStoreConfig(reader, parentNode, addOperations);
break;
case LDAP_STORE:
parseLDAPStoreConfig(reader, addOperations, parentNode);
break;
}
}
}, IDENTITY_CONFIGURATION, identityConfigurationNode, reader, addOperations);
}
use of org.jboss.staxmapper.XMLExtendedStreamReader in project wildfly by wildfly.
the class AbstractIDMSubsystemReader method parseSupportedTypesConfig.
private ModelNode parseSupportedTypesConfig(final XMLExtendedStreamReader reader, final ModelNode identityStoreNode, final List<ModelNode> addOperations) throws XMLStreamException {
ModelNode supportedTypesNode = parseConfig(reader, SUPPORTED_TYPES, null, identityStoreNode, SupportedTypesResourceDefinition.INSTANCE.getAttributes(), addOperations);
parseElement(new ElementParser() {
@Override
public void parse(final XMLExtendedStreamReader reader, final ModelElement element, final ModelNode parentNode, List<ModelNode> addOperations) throws XMLStreamException {
switch(element) {
case SUPPORTED_TYPE:
parseSupportedTypeConfig(reader, parentNode, addOperations);
break;
}
}
}, SUPPORTED_TYPES, supportedTypesNode, reader, addOperations);
return supportedTypesNode;
}
use of org.jboss.staxmapper.XMLExtendedStreamReader in project wildfly by wildfly.
the class AbstractFederationSubsystemReader method parseFederation.
private void parseFederation(final XMLExtendedStreamReader reader, final ModelNode subsystemNode, final List<ModelNode> addOperations) throws XMLStreamException {
ModelNode federationNode = parseConfig(reader, FEDERATION, COMMON_NAME.getName(), subsystemNode, Arrays.asList(FederationResourceDefinition.ATTRIBUTE_DEFINITIONS), addOperations);
parseElement(new ElementParser() {
@Override
public void parse(final XMLExtendedStreamReader reader, final ModelElement element, final ModelNode parentNode, List<ModelNode> addOperations) throws XMLStreamException {
switch(element) {
case KEY_STORE:
parseKeyStore(reader, parentNode, addOperations);
break;
case SAML:
parseConfig(reader, SAML, null, parentNode, SAMLResourceDefinition.INSTANCE.getAttributes(), addOperations);
break;
case IDENTITY_PROVIDER:
parseIdentityProviderConfig(reader, parentNode, addOperations);
break;
case SERVICE_PROVIDER:
parseServiceProviderConfig(reader, parentNode, addOperations);
break;
default:
throw unexpectedElement(reader);
}
}
}, FEDERATION, federationNode, reader, addOperations);
}
Aggregations