Package org.jboss.modules.xml

# Class PermissionsXmlParser

java.lang.Object
org.jboss.modules.xml.PermissionsXmlParser

public final class PermissionsXmlParser extends Object
A simple parser for enterprise-style `permissions.xml` files.

## Constructor Summary

Constructors
Constructor
Description
`PermissionsXmlParser()`

## Method Summary

Modifier and Type
Method
Description
`static FactoryPermissionCollection`
`parsePermissionsXml(InputStream inputStream, ModuleLoader moduleLoader, String moduleName)`
Parse the `permissions.xml` stream content.
`static FactoryPermissionCollection`
`parsePermissionsXml(XmlPullParser reader, ModuleLoader moduleLoader, String moduleName)`
Parse the `permissions.xml` content.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PermissionsXmlParser

public PermissionsXmlParser()

## Method Details

### parsePermissionsXml

public static FactoryPermissionCollection parsePermissionsXml(InputStream inputStream, ModuleLoader moduleLoader, String moduleName) throws XmlPullParserException, 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:
  `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, String moduleName) throws 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:
  `IOException` - if the input stream throws an exception
  `XmlPullParserException` - if the XML parser throws an exception