Class PrivilegeDefinitionReader


  • public class PrivilegeDefinitionReader
    extends Object
    Reads privilege definitions for the specified InputStream. Note, that this reader will not apply any validation.
    • 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) 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) 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
      • 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.