Class PermissionsXmlParser


  • public final class PermissionsXmlParser
    extends java.lang.Object
    A simple parser for enterprise-style permissions.xml files.
    • Constructor Detail

      • PermissionsXmlParser

        public PermissionsXmlParser()
    • Method Detail

      • parsePermissionsXml

        public static FactoryPermissionCollection parsePermissionsXml​(java.io.InputStream inputStream,
                                                                      ModuleLoader moduleLoader,
                                                                      java.lang.String moduleName)
                                                               throws XmlPullParserException,
                                                                      java.io.IOException
        Parse the permissions.xml stream content.
        Parameters:
        inputStream - the input stream
        moduleLoader - the module loader to load from
        moduleName - the module name to load from
        Returns:
        the permission collection (not null)
        Throws:
        java.io.IOException - if the input stream throws an exception
        XmlPullParserException - if the XML parser throws an exception
      • parsePermissionsXml

        public static FactoryPermissionCollection parsePermissionsXml​(XmlPullParser reader,
                                                                      ModuleLoader moduleLoader,
                                                                      java.lang.String moduleName)
                                                               throws java.io.IOException,
                                                                      XmlPullParserException
        Parse the permissions.xml content.
        Parameters:
        reader - the parser
        moduleLoader - the module loader to load from
        moduleName - the module name to load from
        Returns:
        the permission collection (not null)
        Throws:
        java.io.IOException - if the input stream throws an exception
        XmlPullParserException - if the XML parser throws an exception