All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.redback.components.apacheds.ApacheDs Maven / Gradle / Ivy

The newest version!
package org.codehaus.redback.components.apacheds;

import javax.naming.NamingException;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.Attributes;
import java.io.File;
import java.util.Set;

/**
 * @author Trygve Laugstøl
 * @version $Id: ApacheDs.java 1052 2011-05-07 07:07:12Z olamy $
 */
public interface ApacheDs
{
    String ROLE = ApacheDs.class.getName();

    // ----------------------------------------------------------------------
    // Configuration
    // ----------------------------------------------------------------------

    void setBasedir( File basedir );

    void setPort( int port );
    
    int getPort();
    
    void setEnableNetworking( boolean enableNetworking );

    void addPartition( String name, String root, Set indexedAttributes, Attributes partitionAttributes )
        throws NamingException;

    void addPartition( Partition partition )
        throws NamingException;

    /**
     * Creates a partition usable for testing and other light usage.
     *
     * @param name The name of the partition. Will be used as the directory name when persisted.
     * @param domainComponents E.g. "plexus", "codehaus", "org"
     * @throws NamingException
     */
    Partition addSimplePartition( String name, String[] domainComponents )
        throws NamingException;

    // ----------------------------------------------------------------------
    // Server control
    // ----------------------------------------------------------------------

    void startServer()
        throws Exception;

    void stopServer()
        throws Exception;

    void sync()
        throws Exception;

    boolean isStopped();

    // ----------------------------------------------------------------------
    //
    // ----------------------------------------------------------------------

    InitialDirContext getAdminContext()
        throws NamingException;

    InitialDirContext getSystemContext()
        throws NamingException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy