Examples of LdifPartition


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

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

        // Init the LdifPartition
        schemaLdifPartition = new LdifPartition( schemaManager, dnFactory );
        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(schemaPartitionDirectory);
    SchemaManager schemaManager = new DefaultSchemaManager(loader);
    schemaManager.loadAllEnabled();
    ds.setSchemaManager(schemaManager);
    // Init the LdifPartition with schema
    LdifPartition schemaLdifPartition = new LdifPartition(schemaManager);
    schemaLdifPartition.setPartitionPath(schemaPartitionDirectory.toURI());

    // The schema partition
    SchemaPartition schemaPartition = new SchemaPartition(schemaManager);
    schemaPartition.setWrappedPartition(schemaLdifPartition);
    ds.setSchemaPartition(schemaPartition);
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

        schemaManager.loadAllEnabled();

        directoryService.setSchemaManager( schemaManager );

        // Init the LdifPartition
        LdifPartition ldifPartition = new LdifPartition( schemaManager );
        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

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

     * {@inheritDoc}
     */
    public LdifPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize, File workingDirectory )
        throws Exception
    {
        LdifPartition partition = new LdifPartition( schemaManager );
        partition.setId( id );
        partition.setSuffixDn( new Dn( suffix ) );
        partition.setCacheSize( 500 );
        partition.setPartitionPath( workingDirectory.toURI() );
       
        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<?, Entry, Long>> indexedAttributes = ldifPartition.getIndexedAttributes();

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

        indexedAttributes.add( index );
        ldifPartition.setIndexedAttributes( indexedAttributes );
    }
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

        wkdir = folder.newFile( "db" );
        wkdir = folder.getRoot();

        // initialize the store
        // initialize the partition
        partition = new LdifPartition( schemaManager );
        partition.setId( "test-ldif" );
        partition.setSuffixDn( new Dn( "ou=test,ou=system" ) );
        partition.setSchemaManager( schemaManager );
        partition.setPartitionPath( wkdir.toURI() );
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 + File.separator + "schema");

        // Extract the schema on disk (a brand new one) and load the registries
        File schemaRepository = new File(workingDirectory, "schema");
        if (!schemaRepository.exists()) {
            SchemaLdifExtractor extractor =
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.