public void addPartition( Partition partition ) throws Exception { partition.setSchemaManager( schemaManager ); try { // can be null when called before starting up if ( partitionNexus != null ) { partitionNexus.addContextPartition( partition ); } } catch ( LdapException le ) { // We've got an exception, we cannot add the partition to the partitions throw le; } // Now, add the partition to the set of managed partitions partitions.add( partition ); }
/** * {@inheritDoc} */ @Override protected void doInit() throws LdapException { if ( !initialized ) { // ----------------------------------------------------------------------- // Load apachemeta schema from within the ldap-schema Jar with all the // schema it depends on. This is a minimal mandatory set of schemas. // ----------------------------------------------------------------------- wrapped.setId( SCHEMA_ID ); wrapped.setSuffixDn( schemaDN ); wrapped.setSchemaManager( schemaManager ); try { wrapped.initialize(); synchronizer = new RegistrySynchronizerAdaptor( schemaManager ); } catch ( Exception e ) { LOG.error( I18n.err( I18n.ERR_90 ), e ); throw new RuntimeException( e ); } schemaModificationDN = new Dn( schemaManager, SchemaConstants.SCHEMA_MODIFICATIONS_DN ); } }
/** * Inits the system partition. * * @throws Exception the exception */ private void initSystemPartition() throws Exception { // change the working directory to something that is unique // on the system and somewhere either under target directory // or somewhere in a temp area of the machine. // Inject the System Partition Partition systemPartition = partitionFactory.createPartition( directoryService.getSchemaManager(), //directoryService.getDnFactory(), "system", ServerDNConstants.SYSTEM_DN, 500, new File( directoryService.getInstanceLayout().getPartitionsDirectory(), "system" ) ); systemPartition.setSchemaManager( directoryService.getSchemaManager() ); partitionFactory.addIndex( systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100 ); directoryService.setSystemPartition( systemPartition ); }
/** * Inits the system partition. * * @throws Exception the exception */ private void initSystemPartition() throws Exception { // change the working directory to something that is unique // on the system and somewhere either under target directory // or somewhere in a temp area of the machine. // Inject the System Partition Partition systemPartition = partitionFactory.createPartition( directoryService.getSchemaManager(), directoryService.getDnFactory(), "system", ServerDNConstants.SYSTEM_DN, 500, new File( directoryService.getInstanceLayout().getPartitionsDirectory(), "system" ) ); systemPartition.setSchemaManager( directoryService.getSchemaManager() ); partitionFactory.addIndex( systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100 ); directoryService.setSystemPartition( systemPartition ); }
.getDnFactory(), "system", ServerDNConstants.SYSTEM_DN, 500, new File(directoryService.getInstanceLayout() .getPartitionsDirectory(), "system")); systemPartition.setSchemaManager(directoryService.getSchemaManager()); partitionFactory.addIndex(systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100); directoryService.setSystemPartition(systemPartition); directoryService.getDnFactory(), "sonatype", "o=sonatype", 500, new File(directoryService.getInstanceLayout() .getPartitionsDirectory(), "sonatype")); sonatypePartition.setSchemaManager(directoryService.getSchemaManager()); partitionFactory.addIndex(sonatypePartition, SchemaConstants.OBJECT_CLASS_AT, 100); directoryService.addPartition(sonatypePartition); .getDnFactory(), "groups", "ou=groups,dc=company,dc=com", 500, new File(directoryService.getInstanceLayout() .getPartitionsDirectory(), "groups")); groupsPartition.setSchemaManager(directoryService.getSchemaManager()); partitionFactory.addIndex(groupsPartition, SchemaConstants.OBJECT_CLASS_AT, 100); directoryService.addPartition(groupsPartition); .getDnFactory(), "users", "ou=users,dc=company,dc=com", 500, new File(directoryService.getInstanceLayout() .getPartitionsDirectory(), "users")); usersPartition.setSchemaManager(directoryService.getSchemaManager()); partitionFactory.addIndex(usersPartition, SchemaConstants.OBJECT_CLASS_AT, 100); directoryService.addPartition(usersPartition); directoryService.getDnFactory(), "acme_brick", "dc=acme brick,dc=com", 500, new File(directoryService .getInstanceLayout().getPartitionsDirectory(), "acme_brick")); acmeBrickPartition.setSchemaManager(directoryService.getSchemaManager()); partitionFactory.addIndex(acmeBrickPartition, SchemaConstants.OBJECT_CLASS_AT, 100); directoryService.addPartition(acmeBrickPartition);
ServerDNConstants.SYSTEM_DN, 500, new File(directoryService.getInstanceLayout().getPartitionsDirectory(), "system")); systemPartition.setSchemaManager(directoryService.getSchemaManager()); partitionFactory.addIndex(systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100); directoryService.setSystemPartition(systemPartition);
directoryService.getDnFactory(), "system", ServerDNConstants.SYSTEM_DN, 500, new File(directoryService.getInstanceLayout().getPartitionsDirectory(), "system")); systemPartition.setSchemaManager(directoryService.getSchemaManager()); partitionFactory.addIndex(systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100); directoryService.setSystemPartition(systemPartition);
partition.setSchemaManager( schemaManager );