@Override public void setInstanceLayout(InstanceLayout instanceLayout) throws IOException { wrapped.setInstanceLayout(instanceLayout); }
/** * Build the working directory */ private void buildInstanceDirectory( String name ) throws IOException { String instanceDirectory = System.getProperty( "workingDirectory" ); 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 ); } } directoryService.setInstanceLayout( instanceLayout ); }
/** * Build the working directory */ private void buildInstanceDirectory( String name ) throws IOException { String instanceDirectory = System.getProperty( "workingDirectory" ); 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 ); } } directoryService.setInstanceLayout( instanceLayout ); }
directoryService.setInstanceLayout( instanceLayout ); directoryService.setCacheService(cacheService); directoryService.startup();
directoryService.setInstanceLayout( instanceLayout );
private void initDirectoryService() throws Exception { ds = new DefaultDirectoryService(); ds.setInstanceLayout(new InstanceLayout(workDir));
private void initDirectoryService() throws Exception { ds = new DefaultDirectoryService(); ds.setInstanceLayout(new InstanceLayout(workDir));
private void initDirectoryService() throws Exception { ds = new DefaultDirectoryService(); ds.setInstanceLayout(new InstanceLayout(workDir));
private void initDirectoryService() throws Exception { ds = new DefaultDirectoryService(); ds.setInstanceLayout(new InstanceLayout(workDir));
this.service = new DefaultDirectoryService(); this.service.setInstanceId(INSTANCE_NAME); this.service.setInstanceLayout(new InstanceLayout(this.dataDirectory.toFile()));
directoryService.setInstanceLayout(instanceLayout);
private ApacheDS startDirectoryService(String workDirStr) throws Exception { DefaultDirectoryServiceFactory factory = new DefaultDirectoryServiceFactory(); factory.init(realm); directoryService = factory.getDirectoryService(); directoryService.getChangeLog().setEnabled(false); directoryService.setShutdownHookEnabled(false); directoryService.setAllowAnonymousAccess(true); File workDir = new File(workDirStr); if (workDir.exists()) { FileUtils.deleteDirectory(workDir); } InstanceLayout instanceLayout = new InstanceLayout(workDir); directoryService.setInstanceLayout(instanceLayout); AvlPartition partition = new AvlPartition(directoryService.getSchemaManager()); partition.setId("Test"); partition.setSuffixDn(new Dn(directoryService.getSchemaManager(), baseDn)); partition.addIndexedAttributes( new AvlIndex<>("ou"), new AvlIndex<>("uid"), new AvlIndex<>("dc"), new AvlIndex<>("objectClass")); partition.initialize(); directoryService.addPartition(partition); directoryService.addLast(new KeyDerivationInterceptor()); directoryService.shutdown(); directoryService.startup(); return this; }
directoryService.setInstanceLayout(instanceLayout);
directoryService.setInstanceLayout( instanceLayout );
service.setInstanceLayout(layout);
directoryService.setInstanceLayout(new InstanceLayout(cwd));