Package org.apache.directory.server.core

Examples of org.apache.directory.server.core.DefaultDirectoryService$SynchWorker


   
    @BeforeClass
    public static void setup() throws Exception
    {
        service = new DefaultDirectoryService();

        ENTRY_NAME = new DN( "ou=test, ou=system" );
        PROTECTED_ITEMS.add( new ProtectedItem.MaxImmSub( 2 ) );
        ENTRY = new DefaultServerEntry( service.getSchemaManager(), ENTRY_NAME );
    }
View Full Code Here


    private final String root;
    private int port = 53389;

    public ApacheDSContainer(String root, String ldifs) throws Exception {
        this.ldifResources = ldifs;
        service = new DefaultDirectoryService();
        List<Interceptor> list = new ArrayList<Interceptor>();

        list.add( new NormalizationInterceptor() );
        list.add( new AuthenticationInterceptor() );
        list.add( new ReferralInterceptor() );
View Full Code Here

  public void init() throws Exception {
   
    Properties properties = loadTestProperties();   
    String port = properties.getProperty("ldap.server.port");
   
    service = new DefaultDirectoryService();
    service.setWorkingDirectory(new File("target/ldap-work"));
   
    service.getChangeLog().setEnabled(false);
    service.setDenormalizeOpAttrsEnabled(true);   
View Full Code Here

            apacheDS = ( ApacheDS ) factory.getBean( "apacheDS" ); //$NON-NLS-1$
        }
        else
        {
            LOG.info( "server: using default settings ..." ); //$NON-NLS-1$
            DirectoryService directoryService = new DefaultDirectoryService();
            directoryService.startup();
            ldapServer = new LdapServer();
            ldapServer.setDirectoryService( directoryService );
            TcpTransport tcpTransportSsl = new TcpTransport( 10636 );
            tcpTransportSsl.enableSSL( true );
            ldapServer.setTransports( new TcpTransport( 10389 ), tcpTransportSsl );
View Full Code Here

    initDirectoryService();
    initKDCServer();
  }

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

    CacheService cacheService = new CacheService();
    ds.setCacheService(cacheService);
View Full Code Here

        try
        {
            // creating the instance here so that
            // we we can set some properties like accesscontrol, anon access
            // before starting up the service
            directoryService = new DefaultDirectoryService();
            // no need to register a shutdown hook during tests because this
            // starts a lot of threads and slows down test execution
            directoryService.setShutdownHookEnabled( false );
        }
        catch ( Exception e )
View Full Code Here

       
        directoryService = ldapServer.getDirectoryService();
       
        if ( directoryService == null )
        {
            directoryService = new DefaultDirectoryService();
        }
    }
View Full Code Here

     * @return An instance of DirectoryService
     * @throws Exception
     */
    public static DirectoryService createDirectoryService( DirectoryServiceBean directoryServiceBean, InstanceLayout instanceLayout, SchemaManager schemaManager ) throws Exception
    {
        DirectoryService directoryService = new DefaultDirectoryService();
       
        // The schemaManager
        directoryService.setSchemaManager( schemaManager );

        // MUST attributes
        // DirectoryService ID
        directoryService.setInstanceId( directoryServiceBean.getDirectoryServiceId() );
       
        // Replica ID
        directoryService.setReplicaId( directoryServiceBean.getDsReplicaId() );

        // WorkingDirectory
        directoryService.setInstanceLayout( instanceLayout );

        // Interceptors
        List<Interceptor> interceptors = createInterceptors( directoryServiceBean.getInterceptors() );
        directoryService.setInterceptors( interceptors );
       
        // Partitions
        Map<String, Partition> partitions = createPartitions( directoryService, directoryServiceBean.getPartitions() );

        Partition systemPartition = partitions.remove( "system" );

        if ( systemPartition == null )
        {
            //throw new Exception( I18n.err( I18n.ERR_505 ) );
        }

        directoryService.setSystemPartition( systemPartition );
        directoryService.setPartitions( new HashSet<Partition>( partitions.values() ) );

        // MAY attributes
        // AccessControlEnabled
        directoryService.setAccessControlEnabled( directoryServiceBean.isDsAccessControlEnabled() );
       
        // AllowAnonymousAccess
        directoryService.setAllowAnonymousAccess( directoryServiceBean.isDsAllowAnonymousAccess() );
       
        // ChangeLog
        ChangeLog cl = createChangeLog( directoryServiceBean.getChangeLog() );
       
        if ( cl != null )
        {
            directoryService.setChangeLog( cl );
        }
       
        // DenormalizedOpAttrsEnabled
        directoryService.setDenormalizeOpAttrsEnabled( directoryServiceBean.isDsDenormalizeOpAttrsEnabled() );
       
        // Journal
        Journal journal = createJournal( directoryServiceBean.getJournal() );
       
        if ( journal != null )
        {
            directoryService.setJournal( journal );
        }
       
        AuthenticationInterceptor authenticationInterceptor = (AuthenticationInterceptor)directoryService.getInterceptor( AuthenticationInterceptor.class.getName() );

        // MaxPDUSize
        directoryService.setMaxPDUSize( directoryServiceBean.getDsMaxPDUSize() );
       
        // PasswordHidden
        directoryService.setPasswordHidden( directoryServiceBean.isDsPasswordHidden() );

        // SyncPeriodMillis
        directoryService.setSyncPeriodMillis( directoryServiceBean.getDsSyncPeriodMillis() );

        // testEntries
        String entryFilePath = directoryServiceBean.getDsTestEntries();
       
        if ( entryFilePath != null )
        {
            directoryService.setTestEntries( readTestEntries( entryFilePath ) );
        }
       
        // Enabled
        if ( !directoryServiceBean.isEnabled() )
        {
View Full Code Here

    CarbonDirectoryServiceFactory() {
        try {
            // creating the instance here so that
            // we we can set some properties like access control, anon access
            // before starting up the service
            directoryService = new DefaultDirectoryService();

        } catch (Exception e) {
            String errorMessage = "Error in initializing the default directory service.";
            LOG.error(errorMessage);
            throw new RuntimeException(errorMessage, e);
View Full Code Here

   
    @BeforeClass
    public static void setup() throws Exception
    {
        service = new DefaultDirectoryService();

        ENTRY_NAME = new DN( "ou=test, ou=system" );
        PROTECTED_ITEMS.add( new ProtectedItem.MaxImmSub( 2 ) );
        ENTRY = new DefaultServerEntry( service.getSchemaManager(), ENTRY_NAME );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.DefaultDirectoryService$SynchWorker

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.