Class PrivilegeDefinitionReader
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionReader
-
public class PrivilegeDefinitionReader extends Object
Reads privilege definitions for the specifiedInputStream. Note, that this reader will not apply any validation.
-
-
Constructor Summary
Constructors Constructor Description PrivilegeDefinitionReader(InputStream in, String contentType)Creates a newPrivilegeDefinitionReaderfor the given input stream.PrivilegeDefinitionReader(Reader reader, String contentType)Creates a newPrivilegeDefinitionReaderfor the given input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getNamespaces()Returns the namespace mappings such as retrieved during parsing.PrivilegeDefinition[]getPrivilegeDefinitions()Returns the privilege definitions retrieved from the input stream.
-
-
-
Constructor Detail
-
PrivilegeDefinitionReader
public PrivilegeDefinitionReader(InputStream in, String contentType) throws ParseException
Creates a newPrivilegeDefinitionReaderfor 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 byPrivilegeXmlHandler.isSupportedContentType(String)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 newPrivilegeDefinitionReaderfor 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 byPrivilegeXmlHandler.isSupportedContentType(String)are allowed.- Throws:
ParseException- If an error occurs.IllegalArgumentException- if the specified content type is not supported.
-
-
Method Detail
-
getPrivilegeDefinitions
public PrivilegeDefinition[] getPrivilegeDefinitions()
Returns the privilege definitions retrieved from the input stream.- Returns:
- an array of
PrivilegeDefinition
-
-