Package org.apache.directory.server.core.partition.ldif

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


        }

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

        // Init the LdifPartition
        LdifPartition ldifPartition = new LdifPartition();
        String workingDirectory = service.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 JarSchemaLdifExtractor(new File(workingDirectory), found);
        extractor.extractOrCopy(true);
View Full Code Here


    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

    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

   private void initSchemaPartition() throws Exception
   {
       SchemaPartition schemaPartition = service.getSchemaService().getSchemaPartition();

       // Init the LdifPartition
       LdifPartition ldifPartition = new LdifPartition();
       String workingDirectory = service.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( true );
View Full Code Here

        }

        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

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

        // Init the LdifPartition
        schemaLdifPartition = new LdifPartition();
        schemaLdifPartition.setPartitionPath( schemaPartitionDirectory.toURI() );

        // Extract the schema on disk (a brand new one) and load the registries
        if ( schemaPartitionDirectory.exists() )
        {
View Full Code Here

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

        // Init the LdifPartition
        LdifPartition ldifPartition = new LdifPartition();
        String workingDirectory = service.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( true );
View Full Code Here

     */
    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

        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

    private void initSchemaPartition() throws Exception
    {
        SchemaPartition schemaPartition = service.getSchemaService().getSchemaPartition();

        // Init the LdifPartition
        LdifPartition ldifPartition = new LdifPartition();
        String workingDirectory = service.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( true );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.partition.ldif.LdifPartition

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.