@Override
    public Dn parseValue(String value) throws GuacamoleException {

        if (value == null)
            return null;

        try {
            return new Dn(value);
        }
        catch (LdapInvalidDnException e) {
            throw new GuacamoleServerException("The DN \"" + value + "\" is invalid.", e);
        }

    }
A GuacamoleProperty that converts a string to a Dn that can be used
in LDAP connections.  An exception is thrown if the provided DN is invalid
and cannot be parsed.
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/conf/LdapDnGuacamoleProperty.java