Search in sources :

Example 1 with XmlIdProviderDescriptorParser

use of com.enonic.xp.xml.parser.XmlIdProviderDescriptorParser in project xp by enonic.

the class IdProviderDescriptorServiceImpl method parseXml.

private void parseXml(final Resource resource, final IdProviderDescriptor.Builder builder) {
    try {
        final XmlIdProviderDescriptorParser parser = new XmlIdProviderDescriptorParser();
        parser.builder(builder);
        parser.currentApplication(resource.getKey().getApplicationKey());
        parser.source(resource.readString());
        parser.parse();
    } catch (final Exception e) {
        throw new XmlException(e, "Could not load auth descriptor [" + resource.getUrl() + "]: " + e.getMessage());
    }
}
Also used : XmlIdProviderDescriptorParser(com.enonic.xp.xml.parser.XmlIdProviderDescriptorParser) XmlException(com.enonic.xp.xml.XmlException) XmlException(com.enonic.xp.xml.XmlException)

Aggregations

XmlException (com.enonic.xp.xml.XmlException)1 XmlIdProviderDescriptorParser (com.enonic.xp.xml.parser.XmlIdProviderDescriptorParser)1