/** * 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(); }
/** * {@inheritDoc} */ @Override public BindFuture bindAsync( String name, String credentials ) throws LdapException { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04102_BIND_REQUEST, name ) ); } // The password must not be empty or null if ( Strings.isEmpty( credentials ) && Strings.isNotEmpty( name ) ) { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04105_MISSING_PASSWORD ) ); } throw new LdapAuthenticationException( I18n.msg( I18n.MSG_04105_MISSING_PASSWORD ) ); } // Create the BindRequest BindRequest bindRequest = createBindRequest( name, Strings.getBytesUtf8( credentials ) ); return bindAsync( bindRequest ); }
/** * {@inheritDoc} */ @Override public BindFuture bindAsync( String name, String credentials ) throws LdapException { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04102_BIND_REQUEST, name ) ); } // The password must not be empty or null if ( Strings.isEmpty( credentials ) && Strings.isNotEmpty( name ) ) { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04105_MISSING_PASSWORD ) ); } throw new LdapAuthenticationException( I18n.msg( I18n.MSG_04105_MISSING_PASSWORD ) ); } // Create the BindRequest BindRequest bindRequest = createBindRequest( name, Strings.getBytesUtf8( credentials ) ); return bindAsync( bindRequest ); }
/** * {@inheritDoc} */ @Override public BindFuture bindAsync( String name, String credentials ) throws LdapException { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04102_BIND_REQUEST, name ) ); } // The password must not be empty or null if ( Strings.isEmpty( credentials ) && Strings.isNotEmpty( name ) ) { if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04105_MISSING_PASSWORD ) ); } throw new LdapAuthenticationException( I18n.msg( I18n.MSG_04105_MISSING_PASSWORD ) ); } // Create the BindRequest BindRequest bindRequest = createBindRequest( name, Strings.getBytesUtf8( credentials ) ); return bindAsync( bindRequest ); }