Java Code Examples for org.apache.directory.server.core.factory.PartitionFactory#createPartition()
The following examples show how to use
org.apache.directory.server.core.factory.PartitionFactory#createPartition() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LdapService.java From wildfly-core with GNU Lesser General Public License v2.1 | 6 votes |
/** * Add a new partition to the directory server. * * @param partitionName - The name of the partition. * @param indexes - The attributes to index. * @return This Builder for subsequent changes. */ public Builder addPartition(final String id, final String partitionName, final int indexSize, final String ... indexes) throws Exception { assertNotStarted(); if (directoryService == null) { throw new IllegalStateException("The Directory service has not been created."); } SchemaManager schemaManager = directoryService.getSchemaManager(); PartitionFactory partitionFactory = directoryServiceFactory.getPartitionFactory(); Partition partition = partitionFactory.createPartition(schemaManager, directoryService.getDnFactory(), id, partitionName, 1000, workingDir); for (String current : indexes) { partitionFactory.addIndex(partition, current, indexSize); } partition.setCacheService(directoryService.getCacheService()); partition.initialize(); directoryService.addPartition(partition); return this; }
Example 2
Source File: KerberosKDCUtil.java From quarkus-http with Apache License 2.0 | 5 votes |
private static void createPartition(final DirectoryServiceFactory dsf, final SchemaManager schemaManager, final String id, final String suffix) throws Exception { PartitionFactory pf = dsf.getPartitionFactory(); Partition p = pf.createPartition(schemaManager, id, suffix, 1000, workingDir.toFile()); pf.addIndex(p, "krb5PrincipalName", 10); p.initialize(); directoryService.addPartition(p); }
Example 3
Source File: ApacheDirectoryServer.java From light-oauth2 with Apache License 2.0 | 5 votes |
private static void createPartition(final DirectoryServiceFactory dsf, final SchemaManager schemaManager, final String id, final String suffix) throws Exception { PartitionFactory pf = dsf.getPartitionFactory(); Partition p = pf.createPartition(schemaManager, id, suffix, 1000, workingDir.toFile()); pf.addIndex(p, "krb5PrincipalName", 10); p.initialize(); directoryService.addPartition(p); }
Example 4
Source File: ApacheDirectoryServer.java From light-oauth2 with Apache License 2.0 | 5 votes |
private static void createPartition(final DirectoryServiceFactory dsf, final SchemaManager schemaManager, final String id, final String suffix) throws Exception { PartitionFactory pf = dsf.getPartitionFactory(); Partition p = pf.createPartition(schemaManager, id, suffix, 1000, workingDir.toFile()); pf.addIndex(p, "krb5PrincipalName", 10); p.initialize(); directoryService.addPartition(p); }
Example 5
Source File: LdapTestSuite.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
private static void createPartition(final DirectoryServiceFactory dsf, final SchemaManager schemaManager, final String id, final String suffix, final DirectoryService directoryService, final File workingDir) throws Exception { PartitionFactory pf = dsf.getPartitionFactory(); Partition p = pf.createPartition(schemaManager, id, suffix, 1000, workingDir); pf.addIndex(p, "uid", 10); pf.addIndex(p, "departmentNumber", 10); pf.addIndex(p, "member", 10); pf.addIndex(p, "memberOf", 10); p.initialize(); directoryService.addPartition(p); }