org.apache.directory.server.core.partition
Interface PartitionNexus

All Superinterfaces:
Partition
All Known Implementing Classes:
DefaultPartitionNexus

public interface PartitionNexus
extends Partition

A root Partition that contains all other partitions, and routes all operations to the child partition that matches to its base suffixes. It also provides some extended operations such as accessing rootDSE and listing base suffixes.

Version:
$Rev: 927404 $, $Date: 2010-03-25 14:55:18 +0100 (Do, 25. Mär 2010) $
Author:
Apache Directory Project

Field Summary
static byte[] ADMIN_PASSWORD_BYTES
           
static java.lang.String ADMIN_PASSWORD_STRING
          the initial admin passwd set on startup
static java.lang.String ADMIN_UID
          the admin super user uid
 
Method Summary
 void addContextPartition(AddContextPartitionOperationContext opContext)
          Add a partition to the server.
 boolean compare(CompareOperationContext opContext)
           
 org.apache.directory.shared.ldap.name.DN getMatchedName(GetMatchedNameOperationContext matchedNameContext)
          Gets the most significant Dn that exists within the server for any Dn.
 Partition getPartition(org.apache.directory.shared.ldap.name.DN dn)
          Get's the partition corresponding to a distinguished name.
 ClonedServerEntry getRootDSE(GetRootDSEOperationContext getRootDSEContext)
          Get's the RootDSE entry for the DSA.
 org.apache.directory.shared.ldap.name.DN getSuffix(GetSuffixOperationContext getSuffixContext)
          Gets the distinguished name of the suffix that would hold an entry with the supplied distinguished name parameter.
 Partition getSystemPartition()
           
 java.util.Set<java.lang.String> listSuffixes(ListSuffixOperationContext emptyContext)
          Gets an iteration over the Name suffixes of the partitions managed by this DefaultPartitionNexus.
 void registerSupportedExtensions(java.util.Set<java.lang.String> extensionOids)
          Adds a set of supportedExtension (OID Strings) to the RootDSE.
 void registerSupportedSaslMechanisms(java.util.Set<java.lang.String> supportedSaslMechanisms)
          Adds a set of supportedSaslMechanisms (OID Strings) to the RootDSE.
 void removeContextPartition(RemoveContextPartitionOperationContext removeContextPartition)
          Remove a partition from the server.
 
Methods inherited from interface org.apache.directory.server.core.partition.Partition
add, bind, delete, destroy, getId, getSchemaManager, getSuffix, getSuffixDn, hasEntry, initialize, isInitialized, list, lookup, modify, move, moveAndRename, rename, search, setId, setSchemaManager, setSuffix, sync, unbind
 

Field Detail

ADMIN_UID

static final java.lang.String ADMIN_UID
the admin super user uid

See Also:
Constant Field Values

ADMIN_PASSWORD_STRING

static final java.lang.String ADMIN_PASSWORD_STRING
the initial admin passwd set on startup

See Also:
Constant Field Values

ADMIN_PASSWORD_BYTES

static final byte[] ADMIN_PASSWORD_BYTES
Method Detail

getRootDSE

ClonedServerEntry getRootDSE(GetRootDSEOperationContext getRootDSEContext)
Get's the RootDSE entry for the DSA.

Returns:
the attributes of the RootDSE

addContextPartition

void addContextPartition(AddContextPartitionOperationContext opContext)
                         throws java.lang.Exception
Add a partition to the server.

Parameters:
opContext - The Add Partition context
Throws:
java.lang.Exception - If the addition can't be done

removeContextPartition

void removeContextPartition(RemoveContextPartitionOperationContext removeContextPartition)
                            throws java.lang.Exception
Remove a partition from the server.

Parameters:
opContext - The Remove Partition context
Throws:
java.lang.Exception - If the removal can't be done

getSystemPartition

Partition getSystemPartition()
Returns:
The ou=system partition

getPartition

Partition getPartition(org.apache.directory.shared.ldap.name.DN dn)
                       throws java.lang.Exception
Get's the partition corresponding to a distinguished name. This name need not be the name of the partition suffix. When used in conjunction with get suffix this can properly find the partition associated with the DN. Make sure to use the normalized DN.

Parameters:
dn - the normalized distinguished name to get a partition for
Returns:
the partition containing the entry represented by the dn
Throws:
java.lang.Exception - if there is no partition for the dn

getMatchedName

org.apache.directory.shared.ldap.name.DN getMatchedName(GetMatchedNameOperationContext matchedNameContext)
                                                        throws java.lang.Exception
Gets the most significant Dn that exists within the server for any Dn.

Parameters:
getMatchedNameContext - the context containing the distinguished name to use for matching.
Returns:
a distinguished name representing the matching portion of dn, as originally provided by the user on creation of the matched entry or the empty string distinguished name if no match was found.
Throws:
java.lang.Exception - if there are any problems

getSuffix

org.apache.directory.shared.ldap.name.DN getSuffix(GetSuffixOperationContext getSuffixContext)
                                                   throws java.lang.Exception
Gets the distinguished name of the suffix that would hold an entry with the supplied distinguished name parameter. If the DN argument does not fall under a partition suffix then the empty string Dn is returned.

Parameters:
suffixContext - the Context containing normalized distinguished name to use for finding a suffix.
Returns:
the suffix portion of dn, or the valid empty string Dn if no naming context was found for dn.
Throws:
java.lang.Exception - if there are any problems

listSuffixes

java.util.Set<java.lang.String> listSuffixes(ListSuffixOperationContext emptyContext)
                                             throws java.lang.Exception
Gets an iteration over the Name suffixes of the partitions managed by this DefaultPartitionNexus.

Returns:
Iteration over ContextPartition suffix names as Names.
Throws:
java.lang.Exception - if there are any problems

registerSupportedExtensions

void registerSupportedExtensions(java.util.Set<java.lang.String> extensionOids)
                                 throws java.lang.Exception
Adds a set of supportedExtension (OID Strings) to the RootDSE.

Parameters:
extensionOids - a set of OID strings to add to the supportedExtension attribute in the RootDSE
Throws:
java.lang.Exception

registerSupportedSaslMechanisms

void registerSupportedSaslMechanisms(java.util.Set<java.lang.String> supportedSaslMechanisms)
                                     throws java.lang.Exception
Adds a set of supportedSaslMechanisms (OID Strings) to the RootDSE.

Parameters:
extensionOids - a set of OID strings to add to the supportedSaslMechanisms attribute in the RootDSE
Throws:
java.lang.Exception

compare

boolean compare(CompareOperationContext opContext)
                throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.