/** * Validate a NameComponent : <br> * <p> * <name-component> ::= <attributeType> <spaces> '=' * <spaces> <attributeValue> <nameComponents> * </p> * * @param schemaManager The Schemamanager to use * @param dn The string to parse * @return <code>true</code> if the Rdn is valid */ public static boolean isValid( SchemaManager schemaManager, String dn ) { Rdn rdn = new Rdn( schemaManager ); try { parse( schemaManager, dn, rdn ); return true; } catch ( LdapInvalidDnException e ) { return false; } }
/** * Validate a NameComponent : <br> * <p> * <name-component> ::= <attributeType> <spaces> '=' * <spaces> <attributeValue> <nameComponents> * </p> * * @param dn The string to parse * @return <code>true</code> if the Rdn is valid */ public static boolean isValid( String dn ) { Rdn rdn = new Rdn(); try { parse( null, dn, rdn ); return true; } catch ( LdapInvalidDnException e ) { return false; } }
/** * Validate a NameComponent : <br> * <p> * <name-component> ::= <attributeType> <spaces> '=' * <spaces> <attributeValue> <nameComponents> * </p> * * @param schemaManager The Schemamanager to use * @param dn The string to parse * @return <code>true</code> if the Rdn is valid */ public static boolean isValid( SchemaManager schemaManager, String dn ) { Rdn rdn = new Rdn( schemaManager ); try { parse( schemaManager, dn, rdn ); return true; } catch ( LdapInvalidDnException e ) { return false; } }
/** * Validate a NameComponent : <br> * <p> * <name-component> ::= <attributeType> <spaces> '=' * <spaces> <attributeValue> <nameComponents> * </p> * * @param dn The string to parse * @return <code>true</code> if the Rdn is valid */ public static boolean isValid( String dn ) { Rdn rdn = new Rdn(); try { parse( null, dn, rdn ); return true; } catch ( LdapInvalidDnException e ) { return false; } }
/** * Validate a NameComponent : <br> * <p> * <name-component> ::= <attributeType> <spaces> '=' * <spaces> <attributeValue> <nameComponents> * </p> * * @param dn The string to parse * @return <code>true</code> if the Rdn is valid */ public static boolean isValid( String dn ) { Rdn rdn = new Rdn(); try { parse( null, dn, rdn ); return true; } catch ( LdapInvalidDnException e ) { return false; } }
/** * Validate a NameComponent : <br> * <p> * <name-component> ::= <attributeType> <spaces> '=' * <spaces> <attributeValue> <nameComponents> * </p> * * @param schemaManager The Schemamanager to use * @param dn The string to parse * @return <code>true</code> if the Rdn is valid */ public static boolean isValid( SchemaManager schemaManager, String dn ) { Rdn rdn = new Rdn( schemaManager ); try { parse( schemaManager, dn, rdn ); return true; } catch ( LdapInvalidDnException e ) { return false; } }
/** * A constructor that parse a String representing a schema aware Rdn. * * @param schemaManager the schema manager * @param rdn the String containing the Rdn to parse * @throws LdapInvalidDnException if the Rdn is invalid */ public Rdn( SchemaManager schemaManager, String rdn ) throws LdapInvalidDnException { if ( Strings.isNotEmpty( rdn ) ) { // Parse the string. The Rdn will be updated. parse( schemaManager, rdn, this ); if ( upName.length() < rdn.length() ) { throw new LdapInvalidDnException( I18n.err( I18n.ERR_13625_INVALID_RDN ) ); } upName = rdn; } else { upName = ""; normName = ""; normalized = true; } hashCode(); }
/** * A constructor that parse a String representing a schema aware Rdn. * * @param schemaManager the schema manager * @param rdn the String containing the Rdn to parse * @throws LdapInvalidDnException if the Rdn is invalid */ public Rdn( SchemaManager schemaManager, String rdn ) throws LdapInvalidDnException { if ( Strings.isNotEmpty( rdn ) ) { // Parse the string. The Rdn will be updated. parse( schemaManager, rdn, this ); if ( upName.length() < rdn.length() ) { throw new LdapInvalidDnException( I18n.err( I18n.ERR_13625_INVALID_RDN ) ); } upName = rdn; } else { upName = ""; normName = ""; normalized = true; } hashCode(); }
/** * A constructor that parse a String representing a schema aware Rdn. * * @param schemaManager the schema manager * @param rdn the String containing the Rdn to parse * @throws LdapInvalidDnException if the Rdn is invalid */ public Rdn( SchemaManager schemaManager, String rdn ) throws LdapInvalidDnException { if ( Strings.isNotEmpty( rdn ) ) { // Parse the string. The Rdn will be updated. parse( schemaManager, rdn, this ); if ( upName.length() < rdn.length() ) { throw new LdapInvalidDnException( I18n.err( I18n.ERR_13625_INVALID_RDN ) ); } upName = rdn; } else { upName = ""; normName = ""; normalized = true; } hashCode(); }