public Object normalizeByName( String name, String val ) throws LdapException { return normalizer.normalize( val ); }
/** * Sets the SchemaManager * * @param schemaManager The SchemaManager */ public void setSchemaManager( SchemaManager schemaManager ) { normalizer.setSchemaManager( schemaManager ); } }
normalizer.setBytecode( byteCodeStr ); normalizer.setFqcn( className ); normalizer.setOid( oid ); normalizer.setSchemaManager( schemaManager );
/** * {@inheritDoc} */ public void unregisterSchemaElements( String schemaName ) throws LdapException { if ( schemaName == null ) { return; } // Loop on all the SchemaObjects stored and remove those associated // with the give schemaName for ( Normalizer normalizer : this ) { if ( schemaName.equalsIgnoreCase( normalizer.getSchemaName() ) ) { String oid = normalizer.getOid(); SchemaObject removed = unregister( oid ); if ( DEBUG ) { LOG.debug( "Removed {} with oid {} from the registry", removed, oid ); } } } }
/** * Creates a CachingNormalizer that decorates another normalizer using a * specified cache size. * * @param normalizer the underlying Normalizer being decorated * @param cacheSz the maximum size of the name cache */ public CachingNormalizer( Normalizer normalizer, int cacheSz ) { super( normalizer.getOid() ); this.normalizer = normalizer; //cache = new SynchronizedLRUMap( cacheSz ); }
/** * Attempts to resolve the Normalizer * * @param normalizer the Normalizer * @param errors the list of errors to add exceptions to */ private void resolve( Normalizer normalizer, List<Throwable> errors ) { // This is currently doing nothing. try { normalizer.addToRegistries( errors, this ); } catch ( LdapException e ) { errors.add( e ); } }
if ( !normalizer.equals( that.normalizer ) )
/** * Overrides default behavior by returning the OID of the wrapped * Normalizer. */ @Override public String getOid() { return normalizer.getOid(); }
public Object normalizeByOid( String oid, String val ) throws LdapException { return normalizer.normalize( val ); }
/** * {@inheritDoc} */ public void setSchemaManager( SchemaManager schemaManager ) { super.normalizer.setSchemaManager( schemaManager ); } }
/** * Makes sure we update the oid property of the contained normalizer and * comparator. * * @param oid the object identifier */ @Override public void setOid( String oid ) { super.setOid( oid ); normalizer.setOid( oid ); comparator.setOid( oid ); } }
/** * Normalize the value. For a client String value, applies the given normalizer. * * It supposes that the client has access to the schema in order to select the * appropriate normalizer. * * @param Normalizer The normalizer to apply to the value * @exception LdapException If the value cannot be normalized */ public final void normalize( Normalizer normalizer ) throws LdapException { if ( normalizer != null ) { normalizedValue = (String)normalizer.normalize( wrappedValue ); normalized = true; } }
/** * {@inheritDoc} */ public Value<?> normalize( Value<?> value ) throws LdapException { if ( value == null ) { return null; } //Value<?> result = ( Value<?> ) cache.get( value ); //if ( result != null ) //{ // return result; //} Value<?> normalized = normalizer.normalize( value ); //cache.put( value, normalized ); return normalized; }
/** * {@inheritDoc} */ public String normalize( String value ) throws LdapException { if ( value == null ) { return null; } //String normalized = ( String ) cache.get( value ); //if ( normalized != null ) //{ // return normalized; //} String normalized = normalizer.normalize( value ); //cache.put( value, normalized ); return normalized; }
public Object normalizeByOid( String oid, byte[] val ) throws LdapException { return normalizer.normalize( new BinaryValue( val ) ); }
/** * Returns the normalized suffix of the {@link Partition}. */ public Name getNormalizedSuffix( Normalizer normalizer ) throws NamingException { return new LdapDN( normalizer.normalize( suffix ).toString() ); }
/** * @see NameComponentNormalizer#normalizeByName(String, String) */ public Object normalizeByName( String name, String value ) throws NamingException { return lookup( name ).normalize( value ); }