public final class SchemaPartition extends AbstractPartition
cacheService, contextEntry, ctxCsnChanged, dnFactory, id, initialized, schemaManager, suffixDn
DEFAULT_ID, ROOT_ID
Constructor and Description |
---|
SchemaPartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) |
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.
|
protected void |
doDestroy()
Override this method to put your initialization code.
|
protected void |
doInit()
Override this method to put your initialization code.
|
int |
getChildCount(DeleteOperationContext deleteContext) |
String |
getContextCsn() |
Partition |
getWrappedPartition()
Gets the
Partition being wrapped. |
boolean |
hasEntry(HasEntryOperationContext hasEntryContext)
Fast operation to check and see if a particular entry exists.
|
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)
Has no affect: the id is fixed at
SCHEMA_ID : 'schema'. |
void |
setWrappedPartition(Partition wrapped)
Sets the wrapped
Partition which must be supplied or
Partition.initialize() will fail with a NullPointerException. |
void |
sync()
Flushes any changes made to this partition now.
|
String |
toString() |
void |
unbind(UnbindOperationContext unbindContext)
Represents an unbind operation issued by an authenticated client.
|
checkInitialized, destroy, dumpIndex, getContextEntry, getId, getSchemaManager, getSuffixDn, initialize, isInitialized, setContextCsn, setContextEntry, setSchemaManager, setSuffixDn
public SchemaPartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
public void setWrappedPartition(Partition wrapped)
Partition
which must be supplied or
Partition.initialize()
will fail with a NullPointerException.wrapped
- the Partition being wrappedpublic Partition getWrappedPartition()
Partition
being wrapped.public void setId(String id)
SCHEMA_ID
: 'schema'.
A warning is logged.setId
in interface Partition
setId
in class AbstractPartition
id
- the unique identifier for this partitionpublic void sync() throws Exception
Exception
- if buffers cannot be flushed to diskprotected void doInit() throws Exception
doInit
in class AbstractPartition
Exception
protected void doDestroy()
doDestroy
in class AbstractPartition
public 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 problemspublic int getChildCount(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
public org.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.org.apache.directory.api.ldap.model.exception.LdapException
public boolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
hasEntryContext
- The context used to pass informationsorg.apache.directory.api.ldap.model.exception.LdapException
public void 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
.org.apache.directory.api.ldap.model.exception.LdapException
DirContext
,
DirContext.ADD_ATTRIBUTE
,
DirContext.REMOVE_ATTRIBUTE
,
DirContext.REPLACE_ATTRIBUTE
public void move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveContext
- The context containing the DNs to moveorg.apache.directory.api.ldap.model.exception.LdapException
public void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRenameContext
- The context contain all the information about
the modifyDN operationorg.apache.directory.api.ldap.model.exception.LdapException
public void rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
renameContext
- the modify Dn contextorg.apache.directory.api.ldap.model.exception.LdapException
public EntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
searchContext
- The context containing the information used by the operationorg.apache.directory.api.ldap.model.exception.LdapException
public void unbind(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
unbindContext
- the context used to unbindorg.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
lookupContext
- The context containing the parametersorg.apache.directory.api.ldap.model.exception.LdapException
public String getContextCsn()
AbstractPartition
getContextCsn
in interface Partition
getContextCsn
in class AbstractPartition
public void saveContextCsn() throws Exception
Partition
Exception
public void setCacheService(CacheService cacheService)
AbstractPartition
setCacheService
in interface Partition
setCacheService
in class AbstractPartition
public String toString()
toString
in class Object
Object.toString()
Copyright © 2016. All rights reserved.