org.apache.directory.server.core.partition
Class DefaultPartitionNexus

java.lang.Object
  extended by org.apache.directory.server.core.partition.AbstractPartition
      extended by org.apache.directory.server.core.partition.DefaultPartitionNexus
All Implemented Interfaces:
Partition, PartitionNexus

public class DefaultPartitionNexus
extends AbstractPartition
implements PartitionNexus

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 15:55:18 +0200 (Thu, 25 Mar 2010) $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from interface org.apache.directory.server.core.partition.PartitionNexus
ADMIN_PASSWORD_BYTES, ADMIN_PASSWORD_STRING, ADMIN_UID
 
Constructor Summary
DefaultPartitionNexus(org.apache.directory.shared.ldap.entry.ServerEntry rootDSE)
          Creates the root nexus singleton of the entire system.
 
Method Summary
 void add(AddOperationContext addContext)
           
 void addContextPartition(AddContextPartitionOperationContext opContext)
           
 void bind(BindOperationContext bindContext)
           
 boolean compare(CompareOperationContext compareContext)
           
 void delete(DeleteOperationContext deleteContext)
           
protected  void doDestroy()
           
protected  void doInit()
           
 DirectoryService getDirectoryService()
           
 java.lang.String getId()
           
 org.apache.directory.shared.ldap.name.DN getMatchedName(GetMatchedNameOperationContext matchedNameContext)
           
 Partition getPartition(org.apache.directory.shared.ldap.name.DN dn)
           
 ClonedServerEntry getRootDSE(GetRootDSEOperationContext getRootDSEContext)
           
 org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()
          
 java.lang.String getSuffix()
           
 org.apache.directory.shared.ldap.name.DN getSuffix(GetSuffixOperationContext getSuffixContext)
           
 org.apache.directory.shared.ldap.name.DN getSuffixDn()
           
 Partition getSystemPartition()
           
 boolean hasEntry(EntryOperationContext opContext)
           
 boolean isInitialized()
           
 EntryFilteringCursor list(ListOperationContext opContext)
           
 java.util.Set<java.lang.String> listSuffixes(ListSuffixOperationContext emptyContext)
           
 ClonedServerEntry lookup(java.lang.Long id)
           
 ClonedServerEntry lookup(LookupOperationContext opContext)
           
 void modify(ModifyOperationContext modifyContext)
           
 void move(MoveOperationContext opContext)
           
 void moveAndRename(MoveAndRenameOperationContext opContext)
           
 void registerSupportedExtensions(java.util.Set<java.lang.String> extensionOids)
           
 void registerSupportedSaslMechanisms(java.util.Set<java.lang.String> supportedSaslMechanisms)
           
 void removeContextPartition(RemoveContextPartitionOperationContext removeContextPartition)
           
 void rename(RenameOperationContext opContext)
           
 EntryFilteringCursor search(SearchOperationContext opContext)
           
 void setDirectoryService(DirectoryService directoryService)
           
 void setId(java.lang.String id)
           
 void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
          
 void setSuffix(java.lang.String suffix)
           
 void sync()
           
 void unbind(UnbindOperationContext unbindContext)
           
 
Methods inherited from class org.apache.directory.server.core.partition.AbstractPartition
destroy, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.server.core.partition.Partition
destroy, initialize
 

Constructor Detail

DefaultPartitionNexus

public DefaultPartitionNexus(org.apache.directory.shared.ldap.entry.ServerEntry rootDSE)
                      throws java.lang.Exception
Creates the root nexus singleton of the entire system. The root DSE has several attributes that are injected into it besides those that may already exist. As partitions are added to the system more namingContexts attributes are added to the rootDSE.

Parameters:
rootDSE - the root entry for the DSA
Throws:
javax.naming.Exception - on failure to initialize
java.lang.Exception
See Also:
Vendor Information
Method Detail

doInit

protected void doInit()
               throws java.lang.Exception
Specified by:
doInit in class AbstractPartition
Throws:
java.lang.Exception

doDestroy

protected void doDestroy()
Specified by:
doDestroy in class AbstractPartition

getId

public java.lang.String getId()
Specified by:
getId in interface Partition

setId

public void setId(java.lang.String id)
Specified by:
setId in interface Partition

getSchemaManager

public org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()

Specified by:
getSchemaManager in interface Partition

setSchemaManager

public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)

Specified by:
setSchemaManager in interface Partition

getSuffixDn

public org.apache.directory.shared.ldap.name.DN getSuffixDn()
Specified by:
getSuffixDn in interface Partition

getSuffix

public java.lang.String getSuffix()
Specified by:
getSuffix in interface Partition

setSuffix

public void setSuffix(java.lang.String suffix)
Specified by:
setSuffix in interface Partition

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface Partition
Overrides:
isInitialized in class AbstractPartition

sync

public void sync()
          throws java.lang.Exception
Specified by:
sync in interface Partition
Specified by:
sync in class AbstractPartition
Throws:
java.lang.Exception

add

public void add(AddOperationContext addContext)
         throws java.lang.Exception
Specified by:
add in interface Partition
Throws:
java.lang.Exception

bind

public void bind(BindOperationContext bindContext)
          throws java.lang.Exception
Specified by:
bind in interface Partition
Throws:
java.lang.Exception

compare

public boolean compare(CompareOperationContext compareContext)
                throws java.lang.Exception
Specified by:
compare in interface PartitionNexus
Throws:
java.lang.Exception

delete

public void delete(DeleteOperationContext deleteContext)
            throws java.lang.Exception
Specified by:
delete in interface Partition
Throws:
java.lang.Exception

hasEntry

public boolean hasEntry(EntryOperationContext opContext)
                 throws java.lang.Exception
Specified by:
hasEntry in interface Partition
Overrides:
hasEntry in class AbstractPartition
Throws:
java.lang.Exception

list

public EntryFilteringCursor list(ListOperationContext opContext)
                          throws java.lang.Exception
Specified by:
list in interface Partition
Throws:
java.lang.Exception

lookup

public ClonedServerEntry lookup(LookupOperationContext opContext)
                         throws java.lang.Exception
Specified by:
lookup in interface Partition
Specified by:
lookup in class AbstractPartition
Throws:
java.lang.Exception

lookup

public ClonedServerEntry lookup(java.lang.Long id)
                         throws java.lang.Exception
Throws:
java.lang.Exception

modify

public void modify(ModifyOperationContext modifyContext)
            throws java.lang.Exception
Specified by:
modify in interface Partition
Throws:
java.lang.Exception

move

public void move(MoveOperationContext opContext)
          throws java.lang.Exception
Specified by:
move in interface Partition
Throws:
java.lang.Exception

moveAndRename

public void moveAndRename(MoveAndRenameOperationContext opContext)
                   throws java.lang.Exception
Specified by:
moveAndRename in interface Partition
Throws:
java.lang.Exception

rename

public void rename(RenameOperationContext opContext)
            throws java.lang.Exception
Specified by:
rename in interface Partition
Throws:
java.lang.Exception

search

public EntryFilteringCursor search(SearchOperationContext opContext)
                            throws java.lang.Exception
Specified by:
search in interface Partition
Throws:
java.lang.Exception

unbind

public void unbind(UnbindOperationContext unbindContext)
            throws java.lang.Exception
Specified by:
unbind in interface Partition
Throws:
java.lang.Exception

getRootDSE

public ClonedServerEntry getRootDSE(GetRootDSEOperationContext getRootDSEContext)
Specified by:
getRootDSE in interface PartitionNexus

addContextPartition

public void addContextPartition(AddContextPartitionOperationContext opContext)
                         throws java.lang.Exception
Specified by:
addContextPartition in interface PartitionNexus
Throws:
java.lang.Exception

removeContextPartition

public void removeContextPartition(RemoveContextPartitionOperationContext removeContextPartition)
                            throws java.lang.Exception
Specified by:
removeContextPartition in interface PartitionNexus
Throws:
java.lang.Exception

getSystemPartition

public Partition getSystemPartition()
Specified by:
getSystemPartition in interface PartitionNexus

getPartition

public Partition getPartition(org.apache.directory.shared.ldap.name.DN dn)
                       throws java.lang.Exception
Specified by:
getPartition in interface PartitionNexus
Throws:
java.lang.Exception

getMatchedName

public org.apache.directory.shared.ldap.name.DN getMatchedName(GetMatchedNameOperationContext matchedNameContext)
                                                        throws java.lang.Exception
Specified by:
getMatchedName in interface PartitionNexus
Throws:
java.lang.Exception

getSuffix

public org.apache.directory.shared.ldap.name.DN getSuffix(GetSuffixOperationContext getSuffixContext)
                                                   throws java.lang.Exception
Specified by:
getSuffix in interface PartitionNexus
Throws:
java.lang.Exception

listSuffixes

public java.util.Set<java.lang.String> listSuffixes(ListSuffixOperationContext emptyContext)
                                             throws java.lang.Exception
Specified by:
listSuffixes in interface PartitionNexus
Throws:
java.lang.Exception

registerSupportedExtensions

public void registerSupportedExtensions(java.util.Set<java.lang.String> extensionOids)
                                 throws java.lang.Exception
Specified by:
registerSupportedExtensions in interface PartitionNexus
Throws:
java.lang.Exception

registerSupportedSaslMechanisms

public void registerSupportedSaslMechanisms(java.util.Set<java.lang.String> supportedSaslMechanisms)
                                     throws java.lang.Exception
Specified by:
registerSupportedSaslMechanisms in interface PartitionNexus
Throws:
java.lang.Exception

getDirectoryService

public DirectoryService getDirectoryService()
Returns:
the directoryService

setDirectoryService

public void setDirectoryService(DirectoryService directoryService)
Parameters:
directoryService - the directoryService to set


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.