Package org.apache.ldap.common.schema

Examples of org.apache.ldap.common.schema.AttributeType


        }

        list = attributeTypeRegistry.list();
        while ( list.hasNext() )
        {
            AttributeType at = ( AttributeType ) list.next();
            resolve( at, errors );
        }

        list = matchingRuleRegistry.list();
        while ( list.hasNext() )
View Full Code Here


        }


        public String normalizeByName( String name, String value ) throws NamingException
        {
            AttributeType type = registry.lookup( name );

            return ( String ) type.getEquality().getNormalizer().normalize( value );
        }
View Full Code Here

        }


        public String normalizeByOid( String oid, String value ) throws NamingException
        {
            AttributeType type = registry.lookup( oid );

            return ( String ) type.getEquality().getNormalizer().normalize( value );
        }
View Full Code Here

                + id + " not registered!" );
            monitor.lookupFailed( id, e );
            throw e;
        }

        AttributeType attributeType = ( AttributeType ) byOid.get( id );

        if ( attributeType == null )
        {
            attributeType = bootstrap.lookup( id );
        }
View Full Code Here

        throws NamingException
    {
        RE regex = null;
        Index idx = null;
        final SubstringNode snode = ( SubstringNode ) node;
        AttributeType type = attributeTypeRegistry.lookup( snode.getAttribute() );
        Normalizer normalizer = type.getSubstr().getNormalizer();

        if ( db.hasUserIndexOn( snode.getAttribute() ) )
        {
            /*
             * Build out regex in this block so we do not do it twice in the
View Full Code Here

    private MatchingRule getMatchingRule( String attrId, int matchType )
        throws NamingException
    {
        MatchingRule mrule = null;
        String oid = oidRegistry.getOid( attrId );
        AttributeType type = attributeTypeRegistry.lookup( oid );

        switch( matchType )
        {
            case( EQUALITY_MATCH ):
                mrule = type.getEquality();
                break;
            case( SUBSTRING_MATCH ):
                mrule = type.getSubstr();
                break;
            case( ORDERING_MATCH ):
                mrule = type.getOrdering();
                break;
            default:
                throw new NamingException( "Unknown match type: " + matchType );
        }
View Full Code Here

     * @return the Normalizer to use for normalizing the value of the attribute
     * @throws NamingException if there are failures resolving the Normalizer
     */
    private Normalizer lookup( String id ) throws NamingException
    {
        AttributeType type = registry.lookup( id );
        return type.getEquality().getNormalizer();
    }
View Full Code Here

        while ( list.hasMore() )
        {
            String attrId = ( String ) list.next();

            AttributeType type = null;

            if ( registry.hasAttributeType( attrId ) )
            {
                type = registry.lookup( attrId );
            }

            if ( type != null && type.getUsage() != UsageEnum.USERAPPLICATIONS )
            {
                attributes.remove( attrId );
            }
        }
        return true;
View Full Code Here

        throws NamingException
    {
        RE regex = null;
        SubstringNode snode = ( SubstringNode ) node;
        String oid = oidRegistry.getOid( snode.getAttribute() );
        AttributeType type = attributeTypeRegistry.lookup( oid );
        Normalizer normalizer = type.getSubstr().getNormalizer();

        if ( db.hasUserIndexOn( snode.getAttribute() ) )
        {
            Index idx = db.getUserIndex( snode.getAttribute() );
       
View Full Code Here

            "org.apache.ldap.server.schema.bootstrap.Krb5kdcSchema",
            "org.apache.ldap.server.schema.bootstrap.NisSchema",
            "org.apache.ldap.server.schema.bootstrap.SystemSchema"
        };
        loader.load( schemaClasses, registries );
        AttributeType type;

        // from autofs.schema
        type = registries.getAttributeTypeRegistry().lookup( "automountInformation" );
        assertNotNull( type );
View Full Code Here

TOP

Related Classes of org.apache.ldap.common.schema.AttributeType

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.