|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.partition.AbstractPartition
org.apache.directory.server.core.partition.DefaultPartitionNexus
public class DefaultPartitionNexus
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.
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)
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()
|
java.lang.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. |
java.lang.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. |
java.util.Set<java.lang.String> |
listSuffixes(ListSuffixOperationContext emptyContext)
Gets an iteration over the Name suffixes of the partitions managed by this DefaultPartitionNexus . |
ClonedServerEntry |
lookup(java.lang.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(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. |
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(java.lang.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(java.lang.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. |
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 |
---|
public DefaultPartitionNexus(org.apache.directory.shared.ldap.entry.ServerEntry rootDSE) throws java.lang.Exception
rootDSE
- the root entry for the DSA
javax.naming.Exception
- on failure to initialize
java.lang.Exception
Method Detail |
---|
protected void doInit() throws java.lang.Exception
AbstractPartition
doInit
in class AbstractPartition
java.lang.Exception
protected void doDestroy()
AbstractPartition
doDestroy
in class AbstractPartition
public java.lang.String getId()
Partition
getId
in interface Partition
public void setId(java.lang.String id)
Partition
setId
in interface Partition
id
- the unique identifier for this partitionpublic org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()
getSchemaManager
in interface Partition
public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
setSchemaManager
in interface Partition
public org.apache.directory.shared.ldap.name.DN getSuffixDn()
Partition
getSuffixDn
in interface Partition
public java.lang.String getSuffix()
Partition
getSuffix
in interface Partition
public void setSuffix(java.lang.String suffix)
Partition
setSuffix
in interface Partition
suffix
- the suffix String for this Partition.public boolean isInitialized()
AbstractPartition
isInitialized
in interface Partition
isInitialized
in class AbstractPartition
public void sync() throws java.lang.Exception
AbstractPartition
sync
in interface Partition
sync
in class AbstractPartition
java.lang.Exception
- if buffers cannot be flushed to diskpublic void add(AddOperationContext addContext) throws java.lang.Exception
Partition
add
in interface Partition
addContext
- the context used to add and entry to this ContextPartition
java.lang.Exception
- if there are any problemspublic void bind(BindOperationContext bindContext) throws java.lang.Exception
Partition
bind
in interface Partition
bindContext
- the bind context, containing all the needed informations to bind
java.lang.Exception
- if something goes wrongpublic boolean compare(CompareOperationContext compareContext) throws java.lang.Exception
compare
in interface PartitionNexus
java.lang.Exception
public void delete(DeleteOperationContext deleteContext) throws java.lang.Exception
Partition
delete
in interface Partition
deleteContext
- the context of the entry to
delete from this ContextPartition.
java.lang.Exception
- if there are any problemspublic boolean hasEntry(EntryOperationContext opContext) throws java.lang.Exception
AbstractPartition
Partition.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 Partition
hasEntry
in class AbstractPartition
opContext
- The context used to pass informations
java.lang.Exception
- if there are any problemspublic EntryFilteringCursor list(ListOperationContext opContext) throws java.lang.Exception
Partition
list
in interface Partition
opContext
- the context containing the distinguished/absolute name for the search/listing
ServerSearchResult
java.lang.Exception
- if there are any problemspublic ClonedServerEntry lookup(LookupOperationContext opContext) throws java.lang.Exception
AbstractPartition
Partition.lookup(LookupOperationContext)
with null attributeIds by default. Please override
this method if there is more effective way for your implementation.
lookup
in interface Partition
lookup
in class AbstractPartition
opContext
- The context containing the parameters
java.lang.Exception
- if there are any problemspublic ClonedServerEntry lookup(java.lang.Long id) throws java.lang.Exception
java.lang.Exception
public void modify(ModifyOperationContext modifyContext) throws java.lang.Exception
Partition
modify
in interface Partition
modifyContext
- 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
.
java.lang.Exception
- if there are any problemsDirContext
,
DirContext.ADD_ATTRIBUTE
,
DirContext.REMOVE_ATTRIBUTE
,
DirContext.REPLACE_ATTRIBUTE
public void move(MoveOperationContext opContext) throws java.lang.Exception
Partition
move
in interface Partition
opContext
- The context containing the DNs to move
java.lang.Exception
- if there are any problemspublic void moveAndRename(MoveAndRenameOperationContext opContext) throws java.lang.Exception
Partition
moveAndRename
in interface Partition
opContext
- The context contain all the information about
the modifyDN operation
java.lang.Exception
- if there are any problemspublic void rename(RenameOperationContext opContext) throws java.lang.Exception
Partition
rename
in interface Partition
opContext
- the modify DN context
java.lang.Exception
- if there are any problemspublic EntryFilteringCursor search(SearchOperationContext opContext) throws java.lang.Exception
Partition
search
in interface Partition
opContext
- The context containing the information used by the operation
java.lang.Exception
- if there are any problemspublic void unbind(UnbindOperationContext unbindContext) throws java.lang.Exception
Partition
unbind
in interface Partition
unbindContext
- the context used to unbind
java.lang.Exception
- if something goes wrongpublic ClonedServerEntry getRootDSE(GetRootDSEOperationContext getRootDSEContext)
PartitionNexus
getRootDSE
in interface PartitionNexus
public void addContextPartition(AddContextPartitionOperationContext opContext) throws java.lang.Exception
PartitionNexus
addContextPartition
in interface PartitionNexus
opContext
- The Add Partition context
java.lang.Exception
- If the addition can't be donepublic void removeContextPartition(RemoveContextPartitionOperationContext removeContextPartition) throws java.lang.Exception
PartitionNexus
removeContextPartition
in interface PartitionNexus
java.lang.Exception
- If the removal can't be donepublic Partition getSystemPartition()
getSystemPartition
in interface PartitionNexus
public Partition getPartition(org.apache.directory.shared.ldap.name.DN dn) throws java.lang.Exception
PartitionNexus
getPartition
in interface PartitionNexus
dn
- the normalized distinguished name to get a partition for
java.lang.Exception
- if there is no partition for the dnpublic org.apache.directory.shared.ldap.name.DN getMatchedName(GetMatchedNameOperationContext matchedNameContext) throws java.lang.Exception
PartitionNexus
getMatchedName
in interface PartitionNexus
java.lang.Exception
- if there are any problemspublic org.apache.directory.shared.ldap.name.DN getSuffix(GetSuffixOperationContext getSuffixContext) throws java.lang.Exception
PartitionNexus
getSuffix
in interface PartitionNexus
java.lang.Exception
- if there are any problemspublic java.util.Set<java.lang.String> listSuffixes(ListSuffixOperationContext emptyContext) throws java.lang.Exception
PartitionNexus
DefaultPartitionNexus
.
listSuffixes
in interface PartitionNexus
java.lang.Exception
- if there are any problemspublic void registerSupportedExtensions(java.util.Set<java.lang.String> extensionOids) throws java.lang.Exception
PartitionNexus
registerSupportedExtensions
in interface PartitionNexus
extensionOids
- a set of OID strings to add to the supportedExtension
attribute in the RootDSE
java.lang.Exception
public void registerSupportedSaslMechanisms(java.util.Set<java.lang.String> supportedSaslMechanisms) throws java.lang.Exception
PartitionNexus
registerSupportedSaslMechanisms
in interface PartitionNexus
java.lang.Exception
public DirectoryService getDirectoryService()
public void setDirectoryService(DirectoryService directoryService)
directoryService
- the directoryService to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |