Package org.apache.directory.server.core

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


        shutdown();
        testEntries.clear();
        ldifPath = null;
        loadClass = null;
        overrides.clear();
        service = new DefaultDirectoryService();
        doDelete( service.getWorkingDirectory() );
    }
View Full Code Here


    public static class MyFactory implements DirectoryServiceFactory
    {
        public DirectoryService newInstance() throws NamingException
        {
            DirectoryService service = new DefaultDirectoryService();
            service.getChangeLog().setEnabled( true );

            JdbmPartition partition = new JdbmPartition();
            partition.setId( "apache" );
            partition.setSuffix( SUFFIX_DN );

            HashSet<Index<?, ServerEntry>> indexedAttributes = new HashSet<Index<?, ServerEntry>>();
            indexedAttributes.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );
            indexedAttributes.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
            indexedAttributes.add( new JdbmIndex<String,ServerEntry>( "uid" ) );
            partition.setIndexedAttributes( indexedAttributes );

            Set<Partition> partitions = new HashSet<Partition>();
            partitions.add( partition );

            service.setPartitions( partitions );
            return service;
        }
View Full Code Here

   
    public static class MyFactory implements DirectoryServiceFactory
    {
        public DirectoryService newInstance()
        {
            DirectoryService service = new DefaultDirectoryService();
            service.getChangeLog().setEnabled( true );

            // -------------------------------------------------------------------
            // Alter the partition configuration to index gidNumber
            // -------------------------------------------------------------------

            JdbmPartition partition = new JdbmPartition();
            partition.setId( "system" );
            partition.setSuffix( "ou=system" );

            Set<Index<?, ServerEntry>> indices = new HashSet<Index<?, ServerEntry>>();
            indices.addAll( partition.getIndexedAttributes() );
            indices.add( new JdbmIndex<String,ServerEntry>( "gidNumber" ) );
            partition.setIndexedAttributes( indices );
            service.setSystemPartition( partition );

            return service;
        }
View Full Code Here

    public static class ServiceFactory implements DirectoryServiceFactory
    {
        public DirectoryService newInstance()
        {
            DefaultDirectoryService service = new DefaultDirectoryService();
            service.setAccessControlEnabled( true );
            service.getChangeLog().setEnabled( true );
            AutzIntegUtils.service = service;
            return service;
        }
View Full Code Here

    public static class DefaultServiceFactory implements DirectoryServiceFactory
    {
        public DirectoryService newInstance()
        {
            DefaultDirectoryService service = new DefaultDirectoryService();
            service.setAccessControlEnabled( false );
            service.getChangeLog().setEnabled( true );
            AutzIntegUtils.service = service;
            return service;
        }
View Full Code Here


    @BeforeClass public static void setUp() throws Exception
    {
        // setup working directory
        directoryService = new DefaultDirectoryService();
        File workingDirectory = new File( System.getProperty( "workingDirectory", System.getProperty( "user.dir" ) ) );
       
        if ( ! workingDirectory.exists() )
        {
            workingDirectory.mkdirs();
View Full Code Here

    private static DirectoryService service;
   
    @Before
    public void init() throws Exception
    {
        service = new DefaultDirectoryService();

        OidRegistry oidRegistry = service.getRegistries().getOidRegistry();
        AttributeTypeRegistry attributeRegistry = service.getRegistries().getAttributeTypeRegistry();
        NameComponentNormalizer ncn = new ConcreteNameComponentNormalizer( attributeRegistry, oidRegistry );
        normVisitor = new FilterNormalizingVisitor( ncn, service.getRegistries() );
View Full Code Here

     * Initializes the global registries.
     * @throws javax.naming.NamingException if there is a failure loading the schema
     */
    @BeforeClass public static void init() throws NamingException
    {
        service = new DefaultDirectoryService();
        registries = service.getRegistries();
        OBJECT_CLASS = registries.getAttributeTypeRegistry().lookup( "objectClass" );
    }
View Full Code Here

     * Initializes the global registries.
     * @throws javax.naming.NamingException if there is a failure loading the schema
     */
    @BeforeClass public static void init() throws NamingException
    {
        service = new DefaultDirectoryService();
        registries = service.getRegistries();
    }
View Full Code Here

    private static AttributeType SN_AT;

   
    @BeforeClass public static void setup() throws NamingException
    {
        service = new DefaultDirectoryService();
        OID_REGISTRY = service.getRegistries().getOidRegistry();

        GROUP_NAME = new LdapDN( "ou=test,ou=groups,ou=system" );
        USER_NAME = new LdapDN( "ou=test, ou=users, ou=system" );
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.