public interface Partition
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ID
Default id used for context entry if context entry doesn't exists
|
static String |
ROOT_ID
root ID common to all partitions
|
Modifier and Type | Method and Description |
---|---|
void |
add(AddOperationContext addContext)
Adds an entry to this ContextPartition.
|
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.
|
void |
destroy()
Instructs this Partition to synchronize with it's persistent store, and
destroy all held resources, in preparation for a shutdown event.
|
void |
dumpIndex(OutputStream stream,
String name)
Dump the requested index to a given stream
|
String |
getContextCsn() |
String |
getId()
Gets the unique identifier for this partition.
|
org.apache.directory.api.ldap.model.schema.SchemaManager |
getSchemaManager()
Gets the schema manager assigned to this Partition.
|
org.apache.directory.api.ldap.model.name.Dn |
getSuffixDn()
Gets the normalized suffix as an Dn for this Partition after it has
been initialized.
|
boolean |
hasEntry(HasEntryOperationContext hasEntryContext)
Fast operation to check and see if a particular entry exists.
|
void |
initialize()
Initializes this partition.
|
boolean |
isInitialized()
Checks to see if this partition is initialized or not.
|
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 |
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 |
setCacheService(CacheService cacheService)
set the Cache service
|
void |
setId(String id)
Sets the unique identifier for this partition.
|
void |
setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Sets the schema manager assigned to this Partition.
|
void |
setSuffixDn(org.apache.directory.api.ldap.model.name.Dn suffixDn)
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.
|
static final String ROOT_ID
static final String DEFAULT_ID
String getId()
void setId(String id)
id
- the unique identifier for this partitionorg.apache.directory.api.ldap.model.schema.SchemaManager getSchemaManager()
void setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
registries
- the manager to assign to this Partition.void initialize() throws org.apache.directory.api.ldap.model.exception.LdapException
isInitialized()
will return true if
#doInit()
returns without any errors. destroy()
is called automatically
as a clean-up process if #doInit()
throws an exception.Exception
- if initialization fails in any wayorg.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.name.Dn getSuffixDn()
IllegalStateException
- if the Partition has not been initializedvoid setSuffixDn(org.apache.directory.api.ldap.model.name.Dn suffixDn) throws org.apache.directory.api.ldap.model.exception.LdapInvalidDnException
suffixDn
- the new suffix Dnorg.apache.directory.api.ldap.model.exception.LdapInvalidDnException
void destroy() throws Exception
Exception
boolean isInitialized()
void sync() throws Exception
Exception
- if buffers cannot be flushed to diskorg.apache.directory.api.ldap.model.entry.Entry delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
deleteContext
- the context of the entry to
delete from this ContextPartition.Exception
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
void add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
addContext
- the context used to add and entry to this ContextPartitionorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsvoid modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
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
.Exception
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
DirContext
,
DirContext.ADD_ATTRIBUTE
,
DirContext.REMOVE_ATTRIBUTE
,
DirContext.REPLACE_ATTRIBUTE
EntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
searchContext
- The context containing the information used by the operationException
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
lookupContext
- The context containing the parametersException
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
boolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
hasEntryContext
- The context used to pass informationsException
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
void rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
renameContext
- the modify Dn contextException
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
void move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveContext
- The context containing the DNs to moveException
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRenameContext
- The context contain all the information about
the modifyDN operationException
- if there are any problemsorg.apache.directory.api.ldap.model.exception.LdapException
void unbind(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
unbindContext
- the context used to unbindException
- if something goes wrongorg.apache.directory.api.ldap.model.exception.LdapException
void dumpIndex(OutputStream stream, String name) throws IOException
name
- The index to dump to stdoutIOException
- if we can't write the datavoid setCacheService(CacheService cacheService)
cacheService
- String getContextCsn()
Copyright © 2016. All rights reserved.