Package org.apache.directory.shared.ldap.schema

Examples of org.apache.directory.shared.ldap.schema.Normalizer


        /*
         * Get ahold of the normalizer for the attribute and normalize the request
         * assertion value for comparisons with normalized attribute values.  Loop
         * through all values looking for a match.
         */
        Normalizer normalizer = attrType.getEquality().getNormalizer();
        Value<?> reqVal = normalizer.normalize( compareContext.getValue() );

        for ( Value<?> value:attr )
        {
            Value<?> attrValObj = normalizer.normalize( value );
           
            if ( attrValObj.equals( reqVal ) )
            {
                return true;
            }
View Full Code Here


               
                throw new IllegalArgumentException( I18n.err( I18n.ERR_472 ) );
            }
        } );
       
        Normalizer normalizer = new Normalizer( "1.1.1" )
        {
            private static final long serialVersionUID = 0L;

            public Value<?> normalize( Value<?> value ) throws LdapException
            {
View Full Code Here

        MatchingRule matchingRule = new MatchingRule( "1.2.2" );
        matchingRule.setSyntax( syntax );

        matchingRule.setLdapComparator( new ByteArrayComparator( "1.2.2" ) );
       
        matchingRule.setNormalizer( new Normalizer( "1.1.1" )
        {
            // The serial UID
            private static final long serialVersionUID = 1L;
           
            public Value<?> normalize( Value<?> value ) throws LdapException
View Full Code Here

        {
            ClonedServerEntry result = list.get();
            LdapDN resultDN = result.getDn();
            resultDN.normalize( atRegistry.getNormalizerMapping() );
            ServerEntry attrs = lookupPartition( resultDN );
            Normalizer normalizer = factory.getNormalizer( attrs, targetRegistries );
            NormalizerDescription normalizerDescription = getNormalizerDescription( schema.getSchemaName(), attrs );
            targetRegistries.getNormalizerRegistry().register( normalizerDescription, normalizer );
        }
    }
View Full Code Here

        /*
         * Get ahold of the normalizer for the attribute and normalize the request
         * assertion value for comparisons with normalized attribute values.  Loop
         * through all values looking for a match.
         */
        Normalizer normalizer = attrType.getEquality().getNormalizer();
        Value<?> reqVal = normalizer.normalize( compareContext.getValue() );

        for ( Value<?> value:attr )
        {
            Value<?> attrValObj = normalizer.normalize( value );
           
            if ( attrValObj.equals( reqVal ) )
            {
                return true;
            }
View Full Code Here

   
   
    protected boolean modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, boolean cascade ) throws Exception
    {
        String oid = getOid( entry );
        Normalizer normalizer = factory.getNormalizer( targetEntry, targetRegistries );
        Schema schema = getSchema( name );
       
        if ( ! schema.isDisabled() )
        {
            normalizerRegistry.unregister( oid );
View Full Code Here

        LdapDN parentDn = ( LdapDN ) name.clone();
        parentDn.remove( parentDn.size() - 1 );
        checkNewParent( parentDn );
        checkOidIsUniqueForNormalizer( entry );
       
        Normalizer normalizer = factory.getNormalizer( entry, targetRegistries );
        Schema schema = getSchema( name );
       
        if ( ! schema.isDisabled() )
        {
            NormalizerDescription normalizerDescription = getNormalizerDescription( schema.getSchemaName(), entry );
View Full Code Here

    }

   
    public void add( NormalizerDescription normalizerDescription ) throws Exception
    {
        Normalizer normalizer = factory.getNormalizer( normalizerDescription, targetRegistries );
        String schemaName = MetaSchemaConstants.SCHEMA_OTHER;
       
        if ( normalizerDescription.getExtensions().get( MetaSchemaConstants.X_SCHEMA ) != null )
        {
            schemaName = normalizerDescription.getExtensions().get( MetaSchemaConstants.X_SCHEMA ).get( 0 );
View Full Code Here

       
        Schema schema = getSchema( name );
       
        if ( ! schema.isDisabled() )
        {
            Normalizer normalizer = factory.getNormalizer( entry, targetRegistries );
            normalizerRegistry.unregister( oldOid );
           
            NormalizerDescription normalizerDescription = getNormalizerDescription( schema.getSchemaName(), entry );
            normalizerDescription.setNumericOid( oid );
            normalizerRegistry.register( normalizerDescription, normalizer );
View Full Code Here

        checkOidIsUniqueForNormalizer( oid );
       
        Schema oldSchema = getSchema( oriChildName );
        Schema newSchema = getSchema( newParentName );
       
        Normalizer normalizer = factory.getNormalizer( entry, targetRegistries );

        if ( ! oldSchema.isDisabled() )
        {
            normalizerRegistry.unregister( oldOid );
        }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.schema.Normalizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.