org.apache.jackrabbit.spi.commons.privilege
Class PrivilegeDefinitionReader

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionReader

public class PrivilegeDefinitionReader
extends Object

Reads privilege definitions for the specified InputStream. Note, that this reader will not apply any validation.


Constructor Summary
PrivilegeDefinitionReader(InputStream in, String contentType)
          Creates a new PrivilegeDefinitionReader for the given input stream.
PrivilegeDefinitionReader(Reader reader, String contentType)
          Creates a new PrivilegeDefinitionReader for the given input stream.
 
Method Summary
 Map<String,String> getNamespaces()
          Returns the namespace mappings such as retrieved during parsing.
 org.apache.jackrabbit.spi.PrivilegeDefinition[] getPrivilegeDefinitions()
          Returns the privilege definitions retrieved from the input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivilegeDefinitionReader

public PrivilegeDefinitionReader(InputStream in,
                                 String contentType)
                          throws ParseException
Creates a new PrivilegeDefinitionReader for the given input stream. The specified content type is used in order to determine the type of privilege serialization.

Parameters:
in - The input stream to read the privilege definitions from.
contentType - Currently only types supported by PrivilegeXmlHandler#isSupportedContentType(String)PrivilegeXmlHandler are allowed.
Throws:
ParseException - If an error occurs.
IllegalArgumentException - if the specified content type is not supported.

PrivilegeDefinitionReader

public PrivilegeDefinitionReader(Reader reader,
                                 String contentType)
                          throws ParseException
Creates a new PrivilegeDefinitionReader for the given input stream. The specified content type is used in order to determine the type of privilege serialization.

Parameters:
reader - The reader to read the privilege definitions from.
contentType - Currently only types supported by PrivilegeXmlHandler#isSupportedContentType(String)PrivilegeXmlHandler are allowed.
Throws:
ParseException - If an error occurs.
IllegalArgumentException - if the specified content type is not supported.
Method Detail

getPrivilegeDefinitions

public org.apache.jackrabbit.spi.PrivilegeDefinition[] getPrivilegeDefinitions()
Returns the privilege definitions retrieved from the input stream.

Returns:
an array of PrivilegeDefinition

getNamespaces

public Map<String,String> getNamespaces()
Returns the namespace mappings such as retrieved during parsing.

Returns:
a mapping of namespace prefix to uri used by the privilege definitions.


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.