public class DefaultPartitionNexus extends AbstractPartition implements PartitionNexus
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.ADMIN_PASSWORD_BYTES, ADMIN_PASSWORD_STRING, ADMIN_UID| Constructor and Description |
|---|
DefaultPartitionNexus(org.apache.directory.shared.ldap.entry.ServerEntry rootDSE)
Creates the root nexus singleton of the entire system.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Adds an entry to this ContextPartition.
|
void |
addContextPartition(AddContextPartitionOperationContext opContext)
Add a partition to the server.
|
void |
bind(BindOperationContext bindContext)
Represents a bind operation issued to authenticate a client.
|
boolean |
compare(CompareOperationContext compareContext) |
void |
delete(DeleteOperationContext deleteContext)
Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be
deleted until this operation has been applied to their children.
|
protected void |
doDestroy()
Override this method to put your initialization code.
|
protected void |
doInit()
Override this method to put your initialization code.
|
DirectoryService |
getDirectoryService() |
String |
getId()
Gets the unique identifier for this partition.
|
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.schema.SchemaManager |
getSchemaManager()
Gets the schema manager assigned to this Partition.
|
String |
getSuffix()
Gets the user provided suffix for this Partition as a String.
|
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.
|
org.apache.directory.shared.ldap.name.DN |
getSuffixDn()
Gets the normalized suffix as an DN for this Partition after it has
been initialized.
|
Partition |
getSystemPartition() |
boolean |
hasEntry(EntryOperationContext opContext)
This method calls
Partition.lookup(LookupOperationContext) and return true
if it returns an entry by default. |
boolean |
isInitialized()
Returns true if this context partition is initialized successfully.
|
EntryFilteringCursor |
list(ListOperationContext opContext)
A specialized form of one level search used to return a minimal set of
information regarding child entries under a base.
|
Set<String> |
listSuffixes(ListSuffixOperationContext emptyContext)
Gets an iteration over the Name suffixes of the partitions managed by this
DefaultPartitionNexus. |
ClonedServerEntry |
lookup(Long id) |
ClonedServerEntry |
lookup(LookupOperationContext opContext)
This method calls
Partition.lookup(LookupOperationContext)
with null attributeIds by default. |
void |
modify(ModifyOperationContext modifyContext)
Modifies an entry by adding, removing or replacing a set of attributes.
|
void |
move(MoveOperationContext opContext)
Transplants a child entry, to a position in the namespace under a new
parent entry.
|
void |
moveAndRename(MoveAndRenameOperationContext opContext)
Transplants a child entry, to a position in the namespace under a new
parent entry and changes the RN of the child entry which can optionally
have its old RN attributes removed.
|
void |
registerSupportedExtensions(Set<String> extensionOids)
Adds a set of supportedExtension (OID Strings) to the RootDSE.
|
void |
registerSupportedSaslMechanisms(Set<String> supportedSaslMechanisms)
Adds a set of supportedSaslMechanisms (OID Strings) to the RootDSE.
|
void |
removeContextPartition(RemoveContextPartitionOperationContext removeContextPartition)
Remove a partition from the server.
|
void |
rename(RenameOperationContext opContext)
Modifies an entry by changing its relative name.
|
EntryFilteringCursor |
search(SearchOperationContext opContext)
Conducts a search against this ContextPartition.
|
void |
setDirectoryService(DirectoryService directoryService) |
void |
setId(String id)
Sets the unique identifier for this partition.
|
void |
setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Sets the schema manager assigned to this Partition.
|
void |
setSuffix(String suffix)
Sets the user provided suffix for this Partition as a String.
|
void |
sync()
This method does nothing by default.
|
void |
unbind(UnbindOperationContext unbindContext)
Represents an unbind operation issued by an authenticated client.
|
destroy, initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, initializepublic DefaultPartitionNexus(org.apache.directory.shared.ldap.entry.ServerEntry rootDSE)
throws Exception
rootDSE - the root entry for the DSAjavax.naming.Exception - on failure to initializeExceptionprotected void doInit()
throws Exception
AbstractPartitiondoInit in class AbstractPartitionExceptionprotected void doDestroy()
AbstractPartitiondoDestroy in class AbstractPartitionpublic String getId()
Partitionpublic void setId(String id)
Partitionpublic org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()
getSchemaManager in interface Partitionpublic void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
setSchemaManager in interface Partitionpublic org.apache.directory.shared.ldap.name.DN getSuffixDn()
PartitiongetSuffixDn in interface Partitionpublic String getSuffix()
Partitionpublic void setSuffix(String suffix)
Partitionpublic boolean isInitialized()
AbstractPartitionisInitialized in interface PartitionisInitialized in class AbstractPartitionpublic void sync()
throws Exception
AbstractPartitionsync in interface Partitionsync in class AbstractPartitionException - if buffers cannot be flushed to diskpublic void add(AddOperationContext addContext) throws Exception
Partitionpublic void bind(BindOperationContext bindContext) throws Exception
Partitionpublic boolean compare(CompareOperationContext compareContext) throws Exception
compare in interface PartitionNexusExceptionpublic void delete(DeleteOperationContext deleteContext) throws Exception
Partitionpublic boolean hasEntry(EntryOperationContext opContext) throws Exception
AbstractPartitionPartition.lookup(LookupOperationContext) and return true
if it returns an entry by default. Please override this method if
there is more effective way for your implementation.hasEntry in interface PartitionhasEntry in class AbstractPartitionopContext - The context used to pass informationsException - if there are any problemspublic EntryFilteringCursor list(ListOperationContext opContext) throws Exception
Partitionlist in interface PartitionopContext - the context containing the distinguished/absolute name for the search/listingServerSearchResultException - if there are any problemspublic ClonedServerEntry lookup(LookupOperationContext opContext) throws Exception
AbstractPartitionPartition.lookup(LookupOperationContext)
with null attributeIds by default. Please override
this method if there is more effective way for your implementation.lookup in interface Partitionlookup in class AbstractPartitionopContext - The context containing the parametersException - if there are any problemspublic ClonedServerEntry lookup(Long id) throws Exception
Exceptionpublic void modify(ModifyOperationContext modifyContext) throws Exception
Partitionmodify in interface PartitionmodifyContext - The context containing the modification operation
to perform on the entry which is one of constants specified by the
DirContext interface:
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE.Exception - if there are any problemsDirContext,
DirContext.ADD_ATTRIBUTE,
DirContext.REMOVE_ATTRIBUTE,
DirContext.REPLACE_ATTRIBUTEpublic void move(MoveOperationContext opContext) throws Exception
Partitionpublic void moveAndRename(MoveAndRenameOperationContext opContext) throws Exception
PartitionmoveAndRename in interface PartitionopContext - The context contain all the information about
the modifyDN operationException - if there are any problemspublic void rename(RenameOperationContext opContext) throws Exception
Partitionpublic EntryFilteringCursor search(SearchOperationContext opContext) throws Exception
Partitionpublic void unbind(UnbindOperationContext unbindContext) throws Exception
Partitionpublic ClonedServerEntry getRootDSE(GetRootDSEOperationContext getRootDSEContext)
PartitionNexusgetRootDSE in interface PartitionNexuspublic void addContextPartition(AddContextPartitionOperationContext opContext) throws Exception
PartitionNexusaddContextPartition in interface PartitionNexusopContext - The Add Partition contextException - If the addition can't be donepublic void removeContextPartition(RemoveContextPartitionOperationContext removeContextPartition) throws Exception
PartitionNexusremoveContextPartition in interface PartitionNexusException - If the removal can't be donepublic Partition getSystemPartition()
getSystemPartition in interface PartitionNexuspublic Partition getPartition(org.apache.directory.shared.ldap.name.DN dn) throws Exception
PartitionNexusgetPartition in interface PartitionNexusdn - the normalized distinguished name to get a partition forException - if there is no partition for the dnpublic org.apache.directory.shared.ldap.name.DN getMatchedName(GetMatchedNameOperationContext matchedNameContext) throws Exception
PartitionNexusgetMatchedName in interface PartitionNexusException - if there are any problemspublic org.apache.directory.shared.ldap.name.DN getSuffix(GetSuffixOperationContext getSuffixContext) throws Exception
PartitionNexusgetSuffix in interface PartitionNexusException - if there are any problemspublic Set<String> listSuffixes(ListSuffixOperationContext emptyContext) throws Exception
PartitionNexusDefaultPartitionNexus.listSuffixes in interface PartitionNexusException - if there are any problemspublic void registerSupportedExtensions(Set<String> extensionOids) throws Exception
PartitionNexusregisterSupportedExtensions in interface PartitionNexusextensionOids - a set of OID strings to add to the supportedExtension
attribute in the RootDSEExceptionpublic void registerSupportedSaslMechanisms(Set<String> supportedSaslMechanisms) throws Exception
PartitionNexusregisterSupportedSaslMechanisms in interface PartitionNexusExceptionpublic DirectoryService getDirectoryService()
public void setDirectoryService(DirectoryService directoryService)
directoryService - the directoryService to setCopyright © 2003-2012 Apache Software Foundation. All Rights Reserved.