Top Description Fields Constructors Methods
org.jboss.modules.xml

public final Class PermissionsXmlParser

extends Object
Class Inheritance
Static Imports
org.jboss.modules.xml.XmlPullParser.END_TAG, .XmlPullParser.FEATURE_PROCESS_NAMESPACES, .XmlPullParser.START_TAG

A simple parser for enterprise-style permissions.xml files.

Field Summary

Modifier and TypeField and Description
private static final PermissionFactory[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static PermissionFactory
parsePermissionElement(final XmlPullParser reader, final ModuleLoader moduleLoader, final String moduleName)

private static FactoryPermissionCollection
parsePermissionsElement(final XmlPullParser reader, final ModuleLoader moduleLoader, final String moduleName)

public static FactoryPermissionCollection

Returns:

the permission collection (not null)
parsePermissionsXml
(final InputStream
the input stream
inputStream
,
ModuleLoader
the module loader to load from
moduleLoader
,
final String
the module name to load from
moduleName
)

Parse the permissions.xml stream content.

public static FactoryPermissionCollection

Returns:

the permission collection (not null)
parsePermissionsXml
(final XmlPullParser
the parser
reader
,
ModuleLoader
the module loader to load from
moduleLoader
,
final String
the module name to load from
moduleName
)

Parse the permissions.xml content.

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NO_PERMISSION_FACTORIESback to summary
private static final PermissionFactory[] NO_PERMISSION_FACTORIES

Constructor Detail

PermissionsXmlParserback to summary
public PermissionsXmlParser()

Method Detail

parsePermissionElementback to summary
private static PermissionFactory parsePermissionElement(final XmlPullParser reader, final ModuleLoader moduleLoader, final String moduleName) throws IOException, XmlPullParserException
parsePermissionsElementback to summary
private static FactoryPermissionCollection parsePermissionsElement(final XmlPullParser reader, final ModuleLoader moduleLoader, final String moduleName) throws IOException, XmlPullParserException
parsePermissionsXmlback to summary
public static FactoryPermissionCollection parsePermissionsXml(final InputStream inputStream, ModuleLoader moduleLoader, final String moduleName) throws XmlPullParserException, IOException

Parse the permissions.xml stream content.

Parameters
inputStream:InputStream

the input stream

moduleLoader:ModuleLoader

the module loader to load from

moduleName:String

the module name to load from

Returns:FactoryPermissionCollection

the permission collection (not null)

Exceptions
XmlPullParserException:
if the XML parser throws an exception
IOException:
if the input stream throws an exception
parsePermissionsXmlback to summary
public static FactoryPermissionCollection parsePermissionsXml(final XmlPullParser reader, ModuleLoader moduleLoader, final String moduleName) throws IOException, XmlPullParserException

Parse the permissions.xml content.

Parameters
reader:XmlPullParser

the parser

moduleLoader:ModuleLoader

the module loader to load from

moduleName:String

the module name to load from

Returns:FactoryPermissionCollection

the permission collection (not null)

Exceptions
IOException:
if the input stream throws an exception
XmlPullParserException:
if the XML parser throws an exception
validateNamespaceback to summary
private static void validateNamespace(final XmlPullParser reader) throws XmlPullParserException