Search in sources :

Example 16 with ModelElement

use of org.wildfly.extension.picketlink.common.model.ModelElement in project wildfly by wildfly.

the class AbstractIDMSubsystemReader method parseLDAPMappingConfig.

protected void parseLDAPMappingConfig(final XMLExtendedStreamReader reader, final ModelNode identityProviderNode, final List<ModelNode> addOperations) throws XMLStreamException {
    ModelNode ldapMappingConfig = parseConfig(reader, LDAP_STORE_MAPPING, COMMON_NAME.getName(), identityProviderNode, LDAPStoreMappingResourceDefinition.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 LDAP_STORE_ATTRIBUTE:
                    parseConfig(reader, LDAP_STORE_ATTRIBUTE, LDAPStoreAttributeResourceDefinition.NAME.getName(), parentNode, LDAPStoreAttributeResourceDefinition.INSTANCE.getAttributes(), addOperations);
                    break;
            }
        }
    }, LDAP_STORE_MAPPING, ldapMappingConfig, reader, addOperations);
}
Also used : ModelElement(org.wildfly.extension.picketlink.common.model.ModelElement) XMLStreamException(javax.xml.stream.XMLStreamException) ModelNode(org.jboss.dmr.ModelNode) XMLExtendedStreamReader(org.jboss.staxmapper.XMLExtendedStreamReader)

Example 17 with ModelElement

use of org.wildfly.extension.picketlink.common.model.ModelElement in project wildfly by wildfly.

the class AbstractIDMSubsystemReader method parseLDAPStoreConfig.

private void parseLDAPStoreConfig(final XMLExtendedStreamReader reader, final List<ModelNode> addOperations, final ModelNode identityManagementNode) throws XMLStreamException {
    ModelNode ldapStoreNode = parseConfig(reader, LDAP_STORE, null, identityManagementNode, LDAPStoreResourceDefinition.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 LDAP_STORE_MAPPING:
                    parseLDAPMappingConfig(reader, parentNode, addOperations);
                    break;
                case SUPPORTED_TYPES:
                    parseSupportedTypesConfig(reader, parentNode, addOperations);
                    break;
            }
        }
    }, LDAP_STORE, ldapStoreNode, reader, addOperations);
}
Also used : ModelElement(org.wildfly.extension.picketlink.common.model.ModelElement) XMLStreamException(javax.xml.stream.XMLStreamException) ModelNode(org.jboss.dmr.ModelNode) XMLExtendedStreamReader(org.jboss.staxmapper.XMLExtendedStreamReader)

Aggregations

ModelElement (org.wildfly.extension.picketlink.common.model.ModelElement)17 XMLStreamException (javax.xml.stream.XMLStreamException)15 ModelNode (org.jboss.dmr.ModelNode)15 XMLExtendedStreamReader (org.jboss.staxmapper.XMLExtendedStreamReader)15 HashSet (java.util.HashSet)1