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 String normalize( String value ) throws LdapException { DN dn = null; dn = new DN( value ); dn.normalize( schemaManager.getNormalizerMapping() ); return dn.getNormName(); }
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; } }
/** * Normalize a DN * @param value The DN to normalize * @return A normalized DN * @throws LdapException */ public String normalize( DN value ) throws LdapException { DN dn = null; dn = new DN( value ); dn.normalize( schemaManager.getNormalizerMapping() ); return dn.getNormName(); }
/** * Initializes the SchemaService * * @throws Exception If the initialization fails */ public void initialize() throws Exception { try { schemaModificationAttributesDN = new DN( SchemaConstants.SCHEMA_MODIFICATIONS_DN ); schemaModificationAttributesDN .normalize( getRegistries().getAttributeTypeRegistry().getNormalizerMapping() ); } catch ( LdapInvalidDnException e ) { throw new RuntimeException( e ); } }
public final DN distinguishedName() throws RecognitionException, TokenStreamException { DN name ; Token token = null; log.debug( "entered distinguishedName()" ); name = null; try { // for error handling token = LT(1); match(SAFEUTF8STRING); name = new DN( token.getText() ); if ( oidsMap != null ) { name.normalize( oidsMap ); } log.debug( "recognized a DistinguishedName: " + token.getText() ); } catch (Exception e) { throw new RecognitionException( "dnParser failed for " + token.getText() + " " + e.getMessage() ); } return name ; }
/** * {@inheritDoc} */ public Value<?> normalize( Value<?> value ) throws LdapException { DN dn = null; String dnStr = value.getString(); dn = new DN( dnStr ); dn.normalize( schemaManager.getNormalizerMapping() ); return new StringValue( dn.getNormName() ); }
name.normalize( oidsMap );
dn.normalize( schemaManager.getNormalizerMapping() );
attributeTypeAndValueSetAsDn.normalize( oidsMap );
crowdDN.normalize( m_SchemaManager.getRegistries().getAttributeTypeRegistry() .getNormalizerMapping()
/** * {@inheritDoc} * TODO why this and initRegistries on Store interface ??? */ public void init( SchemaManager schemaManager ) throws Exception { this.schemaManager = schemaManager; OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT ); ALIASED_OBJECT_NAME_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ALIASED_OBJECT_NAME_AT ); // Create the master table (the table containing all the entries) master = new AvlMasterTable<ServerEntry>( name, new LongComparator(), null, false ); suffixDn.normalize( schemaManager.getNormalizerMapping() ); // ------------------------------------------------------------------- // Initializes the user and system indices // ------------------------------------------------------------------- setupSystemIndices(); setupUserIndices(); // We are done ! initialized = true; }
suffix.normalize( schemaManager.getNormalizerMapping() ); store.setSuffixDn( suffix.getName() );
dn.normalize( schemaManager.getNormalizerMapping() );
DN prefix = dn.getPrefix(2); try { prefix.normalize(m_SchemaManager.getNormalizerMapping()); } catch (Exception ex) { log.error("hasEntry()", ex);
suffixDn.normalize( schemaManager.getNormalizerMapping() ); dn.normalize( schemaManager.getNormalizerMapping() ); entry = new DefaultServerEntry( schemaManager, dn ); entry.add( "objectClass", "top", "organizationalUnit" ); dn.normalize( schemaManager.getNormalizerMapping() ); entry = new DefaultServerEntry( schemaManager, dn ); entry.add( "objectClass", "top", "organizationalUnit" ); dn.normalize( schemaManager.getNormalizerMapping() ); entry = new DefaultServerEntry( schemaManager, dn ); entry.add( "objectClass", "top", "organizationalUnit" ); dn.normalize( schemaManager.getNormalizerMapping() ); entry = new DefaultServerEntry( schemaManager, dn ); entry.add( "objectClass", "top", "person", "organizationalPerson" ); dn.normalize( schemaManager.getNormalizerMapping() ); entry = new DefaultServerEntry( schemaManager, dn ); entry.add( "objectClass", "top", "person", "organizationalPerson" ); dn.normalize( schemaManager.getNormalizerMapping() ); entry = new DefaultServerEntry( schemaManager, dn ); entry.add( "objectClass", "top", "organizationalUnit" ); dn.normalize( schemaManager.getNormalizerMapping() ); entry = new DefaultServerEntry( schemaManager, dn ); entry.add( "objectClass", "top", "person", "organizationalPerson" );
normalizedAliasTargetDn.normalize( schemaManager.getNormalizerMapping() );
newUpdn.normalize( schemaManager.getNormalizerMapping() );