Package org.apache.directory.server.schema.bootstrap

Examples of org.apache.directory.server.schema.bootstrap.ProducerTypeEnum


        List types = new ArrayList();
        types.addAll( ProducerTypeEnum.getList() );
        types.remove( ProducerTypeEnum.ATTRIBUTE_TYPE_PRODUCER );
        types.remove( ProducerTypeEnum.OBJECT_CLASS_PRODUCER );

        ProducerTypeEnum type = null;
        for ( int ii = 0; ii < types.size(); ii++ )
        {
            type = ( ProducerTypeEnum ) types.get( ii );

            if ( exists( schema.getFullDefaultBaseClassName( type ), type ) )
            {
                continue;
            }

            VelocityContext context = new VelocityContext();
            context.put( "package", schema.getPackageName() );
            context.put( "classname", schema.getUnqualifiedClassName( type ) );
            context.put( "schema", schema.getSchemaName() );
            context.put( "owner", schema.getOwner() );
            context.put( "type", type.getName().substring( 0, type.getName().length() - 8 ) );

            String typeName = null;
           
            switch ( type )
            {
                case COMPARATOR_PRODUCER :
                    typeName = "ProducerTypeEnum.COMPARATOR_PRODUCER";
                    break;
                   
                case DIT_CONTENT_RULE_PRODUCER :
                    typeName = "ProducerTypeEnum.DIT_CONTENT_RULE_PRODUCER";
                    break;
                   
                case DIT_STRUCTURE_RULE_PRODUCER :
                    typeName = "ProducerTypeEnum.DIT_STRUCTURE_RULE_PRODUCER";
                    break;
                   
                case MATCHING_RULE_PRODUCER :
                    typeName = "ProducerTypeEnum.MATCHING_RULE_PRODUCER";
                    break;
                   
                case MATCHING_RULE_USE_PRODUCER :
                    typeName = "ProducerTypeEnum.MATCHING_RULE_USE_PRODUCER";
                    break;
                   
                case NAME_FORM_PRODUCER :
                    typeName = "ProducerTypeEnum.NAME_FORM_PRODUCER";
                    break;
                   
                case NORMALIZER_PRODUCER :
                    typeName = "ProducerTypeEnum.NORMALIZER_PRODUCER";
                    break;
                   
                case SYNTAX_CHECKER_PRODUCER :
                    typeName = "ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER";
                    break;
                   
                case SYNTAX_PRODUCER :
                    typeName = "ProducerTypeEnum.SYNTAX_PRODUCER";
                    break;
                   
                default:
                    throw new IllegalStateException( "Unexpected producer: " + type.getName() );
            }

            context.put( "typeName", typeName );
            runVelocity( schema.getPackageName(), schema.getUnqualifiedClassName( type ), context, "typeless.template",
                type );
View Full Code Here


    }


    protected void generateAttributeTypes( OpenLdapSchemaParser parser, BootstrapSchema schema ) throws Exception
    {
        final ProducerTypeEnum type = ProducerTypeEnum.ATTRIBUTE_TYPE_PRODUCER;

        // check to see if the producer exists for this type
        if ( exists( schema.getFullDefaultBaseClassName( type ), type ) )
        {
            return;
View Full Code Here

    }


    protected void generateObjectClasses( OpenLdapSchemaParser parser, BootstrapSchema schema ) throws Exception
    {
        final ProducerTypeEnum type = ProducerTypeEnum.OBJECT_CLASS_PRODUCER;

        // check to see if the producer exists for this type
        if ( exists( schema.getFullDefaultBaseClassName( type ), type ) )
        {
            return;
View Full Code Here

TOP

Related Classes of org.apache.directory.server.schema.bootstrap.ProducerTypeEnum

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.