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.cacheService, contextEntry, ctxCsnChanged, dnFactory, id, initialized, schemaManager, suffixDnADMIN_PASSWORD_BYTES, ADMIN_PASSWORD_STRING, ADMIN_UIDDEFAULT_ID, ROOT_ID| Constructor and Description |
|---|
DefaultPartitionNexus(org.apache.directory.api.ldap.model.entry.Entry 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(Partition partition)
Add a partition to the server.
|
boolean |
compare(CompareOperationContext compareContext) |
org.apache.directory.api.ldap.model.entry.Entry |
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.
|
String |
getContextCsn() |
DirectoryService |
getDirectoryService() |
Partition |
getPartition(org.apache.directory.api.ldap.model.name.Dn dn)
Get's the partition corresponding to a distinguished name.
|
org.apache.directory.api.ldap.model.entry.Entry |
getRootDse(GetRootDseOperationContext getRootDseContext)
Get's the RootDSE entry for the DSA.
|
org.apache.directory.api.ldap.model.entry.Value<?> |
getRootDseValue(org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
Get's the RootDSE value associated with an AttributeType
|
org.apache.directory.api.ldap.model.name.Dn |
getSuffixDn(org.apache.directory.api.ldap.model.name.Dn dn)
Finds the distinguished name of the suffix that would hold an entry with
the supplied distinguished name parameter.
|
boolean |
hasEntry(HasEntryOperationContext hasEntryContext)
Fast operation to check and see if a particular entry exists.
|
Set<String> |
listSuffixes()
Gets an iteration over the Name suffixes of the partitions managed by this
DefaultPartitionNexus. |
org.apache.directory.api.ldap.model.entry.Entry |
lookup(LookupOperationContext lookupContext)
Looks up an entry by distinguished/absolute name.
|
void |
modify(ModifyOperationContext modifyContext)
Modifies an entry by adding, removing or replacing a set of attributes.
|
void |
move(MoveOperationContext moveContext)
Transplants a child entry, to a position in the namespace under a new
parent entry.
|
void |
moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
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(org.apache.directory.api.ldap.model.name.Dn partitionDn)
Remove a partition from the server.
|
void |
rename(RenameOperationContext renameContext)
Modifies an entry by changing its relative name.
|
void |
saveContextCsn()
saves the context CSN value in the context entry of the partition
|
EntryFilteringCursor |
search(SearchOperationContext searchContext)
Conducts a search against this ContextPartition.
|
void |
setDirectoryService(DirectoryService directoryService) |
void |
setId(String id)
Sets the unique identifier for this partition.
|
void |
setSuffixDn(org.apache.directory.api.ldap.model.name.Dn suffix)
Sets the suffix Dn, must be normalized.
|
void |
sync()
Flushes any changes made to this partition now.
|
void |
unbind(UnbindOperationContext unbindContext)
Represents an unbind operation issued by an authenticated client.
|
checkInitialized, destroy, dumpIndex, getContextEntry, getId, getSchemaManager, getSuffixDn, initialize, isInitialized, setCacheService, setContextCsn, setContextEntry, setSchemaManagerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, dumpIndex, getId, getSchemaManager, getSuffixDn, initialize, isInitialized, setCacheService, setSchemaManagerpublic DefaultPartitionNexus(org.apache.directory.api.ldap.model.entry.Entry 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 void setId(String id)
setId in interface PartitionsetId in class AbstractPartitionid - the unique identifier for this partitionpublic void setSuffixDn(org.apache.directory.api.ldap.model.name.Dn suffix)
setSuffixDn in interface PartitionsetSuffixDn in class AbstractPartitionsuffix - the new suffix Dnpublic void sync()
throws Exception
Partitionpublic void add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public boolean compare(CompareOperationContext compareContext) throws org.apache.directory.api.ldap.model.exception.LdapException
compare in interface PartitionNexusorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.entry.Entry delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public boolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public org.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public void modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
modify 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.org.apache.directory.api.ldap.model.exception.LdapExceptionDirContext,
DirContext.ADD_ATTRIBUTE,
DirContext.REMOVE_ATTRIBUTE,
DirContext.REPLACE_ATTRIBUTEpublic void move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename in interface PartitionmoveAndRenameContext - The context contain all the information about
the modifyDN operationorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public EntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public void unbind(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
public org.apache.directory.api.ldap.model.entry.Entry getRootDse(GetRootDseOperationContext getRootDseContext)
getRootDse in interface PartitionNexuspublic org.apache.directory.api.ldap.model.entry.Value<?> getRootDseValue(org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
getRootDseValue in interface PartitionNexusattributeType - The attribute type for which we want a valuepublic void addContextPartition(Partition partition) throws org.apache.directory.api.ldap.model.exception.LdapException
addContextPartition in interface PartitionNexusorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void removeContextPartition(org.apache.directory.api.ldap.model.name.Dn partitionDn)
throws org.apache.directory.api.ldap.model.exception.LdapException
removeContextPartition in interface PartitionNexuspartitionDn - the partition Dnorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic Partition getPartition(org.apache.directory.api.ldap.model.name.Dn dn) throws org.apache.directory.api.ldap.model.exception.LdapException
getPartition in interface PartitionNexusdn - the normalized distinguished name to get a partition fororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.name.Dn getSuffixDn(org.apache.directory.api.ldap.model.name.Dn dn)
throws org.apache.directory.api.ldap.model.exception.LdapException
getSuffixDn in interface PartitionNexusorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic Set<String> listSuffixes() throws org.apache.directory.api.ldap.model.exception.LdapException
PartitionNexusDefaultPartitionNexus.listSuffixes in interface PartitionNexusorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void registerSupportedExtensions(Set<String> extensionOids) throws org.apache.directory.api.ldap.model.exception.LdapException
registerSupportedExtensions in interface PartitionNexusextensionOids - a set of OID strings to add to the supportedExtension
attribute in the RootDSEorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void registerSupportedSaslMechanisms(Set<String> supportedSaslMechanisms) throws org.apache.directory.api.ldap.model.exception.LdapException
registerSupportedSaslMechanisms in interface PartitionNexusorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic DirectoryService getDirectoryService()
public void setDirectoryService(DirectoryService directoryService)
directoryService - the directoryService to setpublic String getContextCsn()
AbstractPartitiongetContextCsn in interface PartitiongetContextCsn in class AbstractPartitionpublic void saveContextCsn()
throws Exception
PartitionsaveContextCsn in interface PartitionExceptionCopyright © 2021. All rights reserved.