Package org.apache.directory.server.core.api

Examples of org.apache.directory.server.core.api.InstanceLayout


        // setup working directory
        directoryService = new DefaultDirectoryService();
        String tmpDirPath = System.getProperty( "workingDirectory", System.getProperty( "java.io.tmpdir" ) );
        File workingDirectory = new File( tmpDirPath + "/server-work-"
            + PartitionSchemaLoaderIT.class.getSimpleName() );
        instanceLayout = new InstanceLayout( workingDirectory );
        directoryService.setInstanceLayout( instanceLayout );

        if ( !workingDirectory.exists() )
        {
            workingDirectory.mkdirs();
View Full Code Here


        if ( instanceDirectory == null )
        {
            instanceDirectory = System.getProperty( "java.io.tmpdir" ) + "/server-work-" + name;
        }

        InstanceLayout instanceLayout = new InstanceLayout( instanceDirectory );

        if ( instanceLayout.getInstanceDirectory().exists() )
        {
            try
            {
                FileUtils.deleteDirectory( instanceLayout.getInstanceDirectory() );
            }
            catch ( IOException e )
            {
                LOG.warn( "couldn't delete the instance directory before initializing the DirectoryService", e );
            }
View Full Code Here

    {
        // Creating ApacheDS service
        service = new ApacheDsService();

        // Creating instance layouts from the argument
        InstanceLayout instanceLayout = new InstanceLayout( args[0] );

        // Initializing the service
        try
        {
            service.start( instanceLayout );
View Full Code Here

     * @throws IOException
     */
    protected void createInstanceLayout() throws IOException
    {
        // Getting the instance layout and creating directories
        InstanceLayout instanceLayout = getInstanceLayout();
        instanceLayout.mkdirs();

        // Copying the log4j.properties file
        MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
            getClass().getResourceAsStream( "/org/apache/directory/server/installers/log4j.properties" ),
            new File( instanceLayout.getConfDirectory(), "log4j.properties" ), true );

        // Copying the wrapper configuration file
        MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
            getClass().getResourceAsStream( "/org/apache/directory/server/installers/wrapper-instance.conf" ),
            new File( instanceLayout.getConfDirectory(), "wrapper.conf" ), true );

        // Copying ApacheDS LDIF configuration file
        MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
            getClass().getResourceAsStream( "/org/apache/directory/server/installers/config.ldif" ),
            new File( instanceLayout.getConfDirectory(), "config.ldif" ), false );
    }
View Full Code Here

     * @return
     *      the instance layout
     */
    protected InstanceLayout getInstanceLayout()
    {
        return new InstanceLayout( getInstanceDirectory() );
    }
View Full Code Here

        {
            // Creating ApacheDS service
            service = new ApacheDsService();

            // Creating instance layouts from the argument
            InstanceLayout instanceLayout = new InstanceLayout( args[0] );

            // Starting the service
            try
            {
                service.start( instanceLayout );
View Full Code Here

    initKDCServer();
  }

  private void initDirectoryService() throws Exception {
    ds = new DefaultDirectoryService();
    ds.setInstanceLayout(new InstanceLayout(workDir));

    CacheService cacheService = new CacheService();
    ds.setCacheService(cacheService);

    // first load the schema
    InstanceLayout instanceLayout = ds.getInstanceLayout();
    File schemaPartitionDirectory = new File(
            instanceLayout.getPartitionsDirectory(), "schema");
    SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor(
            instanceLayout.getPartitionsDirectory());
    extractor.extractOrCopy();

    SchemaLoader loader = new LdifSchemaLoader(schemaPartitionDirectory);
    SchemaManager schemaManager = new DefaultSchemaManager(loader);
    schemaManager.loadAllEnabled();
View Full Code Here

    public void validated()
    {
        service = new ApacheDsService();

        // Creating instance layouts from the argument
        InstanceLayout instanceLayout = new InstanceLayout( instanceDir );

        // Initializing the service
        try
        {
            service.start( instanceLayout );
View Full Code Here

        // setup working directory
        directoryService = new DefaultDirectoryService();
        String tmpDirPath = System.getProperty( "workingDirectory", System.getProperty( "java.io.tmpdir" ) );
        File workingDirectory = new File( tmpDirPath + "/server-work-"
            + PartitionSchemaLoaderIT.class.getSimpleName() );
        instanceLayout = new InstanceLayout( workingDirectory );
        directoryService.setInstanceLayout( instanceLayout );

        if ( !workingDirectory.exists() )
        {
            workingDirectory.mkdirs();
View Full Code Here

            service = factory.getDirectoryService();
            service.getChangeLog().setEnabled(false);
            service.setShutdownHookEnabled(true);

            final InstanceLayout il = new InstanceLayout(getWorkingDirectory());
            service.setInstanceLayout(il);

            final AvlPartition partition = new AvlPartition(
                    service.getSchemaManager());
            partition.setId("ApacheDS");
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.api.InstanceLayout

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.