Class PrivilegeDefinitionReader


  • public class PrivilegeDefinitionReader
    extends java.lang.Object
    Reads privilege definitions for the specified InputStream. Note, that this reader will not apply any validation.
    • Constructor Summary

      Constructors 
      Constructor Description
      PrivilegeDefinitionReader​(java.io.InputStream in, java.lang.String contentType)
      Creates a new PrivilegeDefinitionReader for the given input stream.
      PrivilegeDefinitionReader​(java.io.Reader reader, java.lang.String contentType)
      Creates a new PrivilegeDefinitionReader for the given input stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getNamespaces()
      Returns the namespace mappings such as retrieved during parsing.
      PrivilegeDefinition[] getPrivilegeDefinitions()
      Returns the privilege definitions retrieved from the input stream.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrivilegeDefinitionReader

        public PrivilegeDefinitionReader​(java.io.InputStream in,
                                         java.lang.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) are allowed.
        Throws:
        ParseException - If an error occurs.
        java.lang.IllegalArgumentException - if the specified content type is not supported.
      • PrivilegeDefinitionReader

        public PrivilegeDefinitionReader​(java.io.Reader reader,
                                         java.lang.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) are allowed.
        Throws:
        ParseException - If an error occurs.
        java.lang.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
      • getNamespaces

        public java.util.Map<java.lang.String,​java.lang.String> getNamespaces()
        Returns the namespace mappings such as retrieved during parsing.
        Returns:
        a mapping of namespace prefix to uri used by the privilege definitions.