Examples of NoOpNormalizer


Examples of org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer

        SchemaManager schemaManager = loadSystem();
        int nrSize = schemaManager.getNormalizerRegistry().size();
        int goidSize = schemaManager.getGlobalOidRegistry().size();

        String oid = "0.0.0";
        Normalizer normalizer = new NoOpNormalizer( oid );

        assertTrue( schemaManager.add( normalizer ) );

        Normalizer added = schemaManager.lookupNormalizerRegistry( oid );

        assertNotNull( added );
        assertEquals( normalizer.getClass().getName(), added.getFqcn() );

        List<Throwable> errors = schemaManager.getErrors();
        assertEquals( 0, errors.size() );
        assertEquals( nrSize + 1, schemaManager.getNormalizerRegistry().size() );
        assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );

        Normalizer normalizer2 = new NoOpNormalizer( oid );

        assertFalse( schemaManager.add( normalizer2 ) );

        errors = schemaManager.getErrors();
        assertEquals( 1, errors.size() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer

        SchemaManager schemaManager = loadSystem();
        int nrSize = schemaManager.getNormalizerRegistry().size();
        int goidSize = schemaManager.getGlobalOidRegistry().size();

        String oid = "0.0.0";
        Normalizer normalizer = new NoOpNormalizer( oid );

        // using java.sql.ResultSet cause it is very unlikely to get loaded
        // in ADS, as the FQCN is not the one expected
        normalizer.setFqcn( "java.sql.ResultSet" );

        assertFalse( schemaManager.add( normalizer ) );

        List<Throwable> errors = schemaManager.getErrors();
        errors = schemaManager.getErrors();
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer

        if ( equality == null )
        {
            LOG.debug( "Attribute {} does not have an EQUALITY MatchingRule : using NoopNormalizer", attributeType
                .getName() );
            oidNormalizer = new OidNormalizer( oid, new NoOpNormalizer( attributeType.getOid() ) );
        }
        else
        {
            oidNormalizer = new OidNormalizer( oid, equality.getNormalizer() );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer

                normalizer = registries.getNormalizerRegistry().lookup( oid );
            }
            catch ( LdapException ne )
            {
                // Default to the NoOp normalizer
                normalizer = new NoOpNormalizer( oid );
            }

            try
            {
                // Get the associated LdapSyntax
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer

                if ( val.equals( "HIGH" ) ) { return 2; }
                throw new IllegalArgumentException( "Not a valid value" );
            }
        } );
       
        mr.setNormalizer( new NoOpNormalizer( mr.getOid() ) );
        at.setEquality( mr );
        at.setSyntax( s );

        // check that normalization and syntax checks work as expected
        StringValue value = new StringValue( at, "HIGH" );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer

            MatchingRule mr = attributeType.getEquality();

            if ( mr == null )
            {
                normalizer = new NoOpNormalizer( attributeType.getOid() );
                ldapComparator = null;
            }
            else
            {
                normalizer = mr.getNormalizer();
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer

        {
            normalizer = rule.getNormalizer();
        }
        else
        {
            normalizer = new NoOpNormalizer( attributeType.getSyntaxOid() );
        }

        // compile the regular expression to search for a matching attribute
        // if the attributeType is humanReadable
        if ( attributeType.getSyntax().isHumanReadable() )
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer

            MatchingRule mr = type.getEquality();

            if ( mr == null )
            {
                normalizer = new NoOpNormalizer( type.getOid() );
                comparator = null;
            }
            else
            {
                normalizer = mr.getNormalizer();
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer

        {
            normalizer = rule.getNormalizer();
        }
        else
        {
            normalizer = new NoOpNormalizer( type.getSyntaxOid() );
        }

        // compile the regular expression to search for a matching attribute
        regex = node.getRegex( normalizer );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer

    {
        store = new MemoryChangeLogStore();

        // The uid/UserId/0.9.2342.19200300.100.1.1 normalizer
        OidNormalizer uidOidNormalizer = new OidNormalizer( SchemaConstants.UID_AT_OID,
            new NoOpNormalizer( SchemaConstants.UID_AT_OID ) );
       
        oidsMap.put( SchemaConstants.UID_AT, uidOidNormalizer );
        oidsMap.put( SchemaConstants.USER_ID_AT, uidOidNormalizer );
        oidsMap.put( SchemaConstants.UID_AT_OID, uidOidNormalizer );
       
        // The ou/organizationalUnit/2.5.4.11 normalizer
        OidNormalizer ouOidNormalizer = new OidNormalizer( SchemaConstants.OU_AT_OID,
            new NoOpNormalizer( SchemaConstants.OU_AT_OID ) );
       
        oidsMap.put( SchemaConstants.OU_AT, ouOidNormalizer );
        oidsMap.put( SchemaConstants.ORGANIZATIONAL_UNIT_NAME_AT, ouOidNormalizer );
        oidsMap.put( SchemaConstants.OU_AT_OID, ouOidNormalizer );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.