Examples of LdifPartition


Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

    private void initSchema() throws Exception
    {
        SchemaPartition schemaPartition = directoryService.getSchemaService().getSchemaPartition();

        // Init the LdifPartition
        LdifPartition ldifPartition = new LdifPartition();
        String workingDirectory = directoryService.getWorkingDirectory().getPath();
        ldifPartition.setWorkingDirectory( workingDirectory + "/schema" );

        // Extract the schema on disk (a brand new one) and load the registries
        File schemaRepository = new File( workingDirectory, "schema" );
        SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory ) );
        extractor.extractOrCopy();
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

     * {@inheritDoc}
     */
    public LdifPartition createPartition( String id, String suffix, int cacheSize, File workingDirectory )
        throws Exception
    {
        LdifPartition partition = new LdifPartition();
        partition.setId( id );
        partition.setSuffix( suffix );
        partition.setCacheSize( 500 );
        partition.setWorkingDirectory( workingDirectory.getAbsolutePath() );
        partition.setPartitionDir( workingDirectory );
        return partition;
    }
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

        if ( !( partition instanceof LdifPartition ) )
        {
            throw new IllegalArgumentException( "Partition must be a LdifPartition" );
        }

        LdifPartition ldifPartition = ( LdifPartition ) partition;
        Set<Index<? extends Object, ServerEntry, Long>> indexedAttributes = ldifPartition.getIndexedAttributes();

        AvlIndex<Object, ServerEntry> index = new AvlIndex<Object, ServerEntry>( attributeId );
        //index.setCacheSize( cacheSize );

        indexedAttributes.add( index );
        ldifPartition.setIndexedAttributes( indexedAttributes );
    }
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        // initialize the partition
        partition = new LdifPartition();
        partition.setId( "test-ldif" );
        partition.setSuffix( "ou=test,ou=system" );
        partition.setSchemaManager( schemaManager );
        partition.setWorkingDirectory( wkdir.getAbsolutePath() );
       
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

    private void initSchemaLdifPartition( InstanceLayout instanceLayout ) throws Exception
    {
        File schemaPartitionDirectory = new File( instanceLayout.getPartitionsDirectory(), "schema" );

        // Init the LdifPartition
        schemaLdifPartition = new LdifPartition( schemaManager );
        schemaLdifPartition.setPartitionPath( schemaPartitionDirectory.toURI() );
    }
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

    private void initSchemaLdifPartition( InstanceLayout instanceLayout ) throws Exception
    {
        File schemaPartitionDirectory = new File( instanceLayout.getPartitionsDirectory(), "schema" );

        // Init the LdifPartition
        schemaLdifPartition = new LdifPartition( schemaManager );
        schemaLdifPartition.setPartitionPath( schemaPartitionDirectory.toURI() );
    }
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

        SchemaLoader loader = new LdifSchemaLoader( schemaRepository );
        SchemaManager schemaManager = new DefaultSchemaManager( loader );
        directoryService.setSchemaManager( schemaManager );

        // Init the LdifPartition
        LdifPartition ldifPartition = new LdifPartition( schemaManager );
        ldifPartition.setPartitionPath( new File( workingDirectory, "schema" ).toURI() );

        schemaPartition.setWrappedPartition( ldifPartition );

        // We have to load the schema now, otherwise we won't be able
        // to initialize the Partitions, as we won't be able to parse
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

    private void initSchema() throws Exception
    {
        SchemaPartition schemaPartition = directoryService.getSchemaService().getSchemaPartition();

        // Init the LdifPartition
        LdifPartition ldifPartition = new LdifPartition();
        String workingDirectory = directoryService.getWorkingDirectory().getPath();
        ldifPartition.setWorkingDirectory( workingDirectory + "/schema" );

        // Extract the schema on disk (a brand new one) and load the registries
        File schemaRepository = new File( workingDirectory, "schema" );
       
        if( schemaRepository.exists() )
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

        }

        final SchemaPartition schemaPartition = service.getSchemaService().getSchemaPartition();

        // Init the LdifPartition
        final LdifPartition ldifPartition = new LdifPartition();
        final String workingDirectory = service.getWorkingDirectory().getPath();
        ldifPartition.setWorkingDirectory(workingDirectory + "/schema");

        // Extract the schema on disk (a brand new one) and load the registries
        final File schemaRepository = new File(workingDirectory, "schema");
        final SchemaLdifExtractor extractor = new JarSchemaLdifExtractor(new File(workingDirectory), found);
        extractor.extractOrCopy(true);
View Full Code Here

Examples of org.apache.directory.server.core.partition.ldif.LdifPartition

    }

    directoryService.setSchemaManager( schemaManager );

    // Init the LdifPartition
    LdifPartition ldifPartition = new LdifPartition( schemaManager /*, directoryService.getDnFactory()*/ );
    ldifPartition.setPartitionPath( new File( workingDirectory, "schema" ).toURI() );
    SchemaPartition schemaPartition = new SchemaPartition( schemaManager );
    schemaPartition.setWrappedPartition( ldifPartition );
    directoryService.setSchemaPartition( schemaPartition );

    List<Throwable> errors = schemaManager.getErrors();
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.