Enum FastDnParser

    • Enum Constant Detail

    • Constructor Detail

      • FastDnParser

        private FastDnParser()
    • Method Detail

      • values

        public static FastDnParser[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FastDnParser c : FastDnParser.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FastDnParser valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • parse

        static Dn parse​(String name)
                 throws LdapException
        Parses a Dn from a String
        Parameters:
        name - The Dn to parse
        Returns:
        A valid Dn
        Throws:
        LdapException - If the Dn was invalid
      • parse

        static Dn parse​(SchemaManager schemaManager,
                        String name)
                 throws LdapException
        Parses a Dn from a String
        Parameters:
        schemaManager - The SchemaManager
        name - The Dn to parse
        Returns:
        A valid Dn
        Throws:
        LdapException - If the Dn was invalid
      • parseDn

        static void parseDn​(SchemaManager schemaManager,
                            String name,
                            Dn dn)
                     throws LdapInvalidDnException
        Parses the given name string and fills the given Dn object.
        Parameters:
        schemaManager - The SchemaManager
        name - the name to parse
        dn - the Dn to fill
        Throws:
        LdapInvalidDnException - the invalid name exception
      • parseRdn

        static void parseRdn​(SchemaManager schemaManager,
                             String name,
                             Rdn rdn)
                      throws LdapInvalidDnException
        Parses the given name string and fills the given Rdn object.
        Parameters:
        schemaManager - The SchemaManager
        name - the name to parse
        rdn - the Rdn to fill
        Throws:
        LdapInvalidDnException - the invalid name exception
      • matchSpaces

        private static void matchSpaces​(char[] name,
                                        org.apache.directory.api.util.Position pos)
                                 throws LdapInvalidDnException
        Matches and forgets optional spaces.
        Parameters:
        name - the name
        pos - the pos
        Throws:
        LdapInvalidDnException - If some invalid chars are found
      • matchAttributeType

        private static String matchAttributeType​(char[] name,
                                                 org.apache.directory.api.util.Position pos)
                                          throws LdapInvalidDnException
        Matches attribute type.
        Parameters:
        name - the name
        pos - the pos
        Returns:
        the matched attribute type
        Throws:
        LdapInvalidDnException - the invalid name exception
      • matchAttributeTypeDescr

        private static String matchAttributeTypeDescr​(char[] name,
                                                      org.apache.directory.api.util.Position pos)
                                               throws LdapInvalidDnException
        Matches attribute type descr.
        Parameters:
        name - the name
        pos - the pos
        Returns:
        the attribute type descr
        Throws:
        LdapInvalidDnException - the invalid name exception
      • matchAttributeTypeNumericOid

        private static String matchAttributeTypeNumericOid​(char[] name,
                                                           org.apache.directory.api.util.Position pos)
                                                    throws LdapInvalidDnException
        Matches attribute type numeric OID.
        Parameters:
        name - the name
        pos - the pos
        Returns:
        the attribute type OID
        Throws:
        LdapInvalidDnException - the invalid name exception
      • matchEquals

        private static void matchEquals​(char[] name,
                                        org.apache.directory.api.util.Position pos)
                                 throws LdapInvalidDnException
        Matches the equals character.
        Parameters:
        name - the name
        pos - the pos
        Throws:
        LdapInvalidDnException - the invalid name exception
      • matchValue

        private static String matchValue​(char[] name,
                                         org.apache.directory.api.util.Position pos)
                                  throws LdapInvalidDnException
        Matches the assertion value. This method only handles simple values. If we find any special character (BACKSLASH, PLUS, SHARP or DQUOTE), a LdapInvalidDnException will be thrown.
        Parameters:
        name - the name
        pos - the pos
        Returns:
        the string
        Throws:
        LdapInvalidDnException - the invalid name exception
      • nextChar

        private static char nextChar​(char[] name,
                                     org.apache.directory.api.util.Position pos,
                                     boolean increment)
                              throws LdapInvalidDnException
        Gets the next character.
        Parameters:
        name - the name
        pos - the pos
        increment - true to increment the position
        Returns:
        the character
        Throws:
        LdapInvalidDnException - If no more characters are available
      • hasMoreChars

        private static boolean hasMoreChars​(org.apache.directory.api.util.Position pos)
        Checks if there are more characters.
        Parameters:
        pos - the pos
        Returns:
        true, if more characters are available