sb.append( " dn" ); if ( dn.isNormalized() )
public DN getDn( Object obj ) throws LdapInvalidDnException { DN dn = null; if ( obj instanceof DN ) { dn = (DN)obj; dn = ( dn.isNormalized() ? dn : DN.normalize( dn, schemaManager.getNormalizerMapping() ) ); } else if ( obj instanceof String ) { dn = new DN( ( String ) obj ); dn.normalize( schemaManager.getNormalizerMapping() ); } else { throw new IllegalStateException( I18n.err( I18n.ERR_04218, (obj == null ? null : obj.getClass() ) ) ); } return dn; }
public DN getDn( Object obj ) throws LdapInvalidDnException { DN dn = null; if ( obj instanceof DN ) { dn = ( DN ) obj; dn = ( dn.isNormalized() ? dn : DN.normalize( dn, schemaManager.getNormalizerMapping() ) ); } else if ( obj instanceof String ) { dn = new DN( ( String ) obj ); dn.normalize( schemaManager.getNormalizerMapping() ); } else { throw new IllegalStateException( I18n.err( I18n.ERR_04218, ( obj == null ? null : obj.getClass() ) ) ); } return dn; } }
/** * {@inheritDoc} */ public DN addAll( int posn, DN dn ) throws LdapInvalidDnException { if ( ( dn == null ) || ( dn.size() == 0 ) ) { return this; } // Concatenate the rdns rdns.addAll( size() - posn, dn.rdns ); // Regenerate the normalized name and the original string if ( this.isNormalized() && dn.isNormalized() ) { if ( this.size() != 0 ) { normName = dn.getNormName() + "," + normName; bytes = StringTools.getBytesUtf8( normName ); upName = dn.getName() + "," + upName; } } else { normalizeInternal(); toUpName(); } return this; }