public final class SchemaPartition extends AbstractPartition
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.
|
PartitionReadTxn |
beginReadTransaction()
Start a read transaction
|
PartitionWriteTxn |
beginWriteTransaction()
Start a write transaction
|
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(PartitionTxn partitionTxn)
Override this method to put your initialization code.
|
protected void |
doInit()
Override this method to put your initialization code.
|
protected void |
doRepair()
Override this method to implement a repair method
|
int |
getChildCount(DeleteOperationContext deleteContext) |
String |
getContextCsn(PartitionTxn partitionTxn)
Get the contextCSN
|
Subordinates |
getSubordinates(PartitionTxn partitionTxn,
org.apache.directory.api.ldap.model.entry.Entry entry)
Return the number of children and subordinates for a given entry
|
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(PartitionTxn partitionTxn)
Saves the context CSN value in the context entry of the partition
|
EntryFilteringCursor |
search(SearchOperationContext searchContext)
Conducts a search against this ContextPartition.
|
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, repair, 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 org.apache.directory.api.ldap.model.exception.LdapException
sync
in interface Partition
sync
in class AbstractPartition
org.apache.directory.api.ldap.model.exception.LdapException
- if buffers cannot be flushed to diskprotected void doRepair() throws org.apache.directory.api.ldap.model.exception.LdapException
doRepair
in class AbstractPartition
org.apache.directory.api.ldap.model.exception.LdapException
- If the repair failedprotected void doInit() throws org.apache.directory.api.ldap.model.exception.LdapException
doInit
in class AbstractPartition
org.apache.directory.api.ldap.model.exception.LdapException
- If the initialization failedprotected void doDestroy(PartitionTxn partitionTxn)
doDestroy
in class AbstractPartition
partitionTxn
- The transaction to usepublic 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
- if there are any problemspublic 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
- if there are any problemspublic 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
- if there are any problemspublic 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
- if there are any problemspublic 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
- if there are any problemspublic 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
- if there are any problemspublic 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
- if there are any problemspublic 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
- if something goes wrongpublic 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
- if there are any problemspublic String getContextCsn(PartitionTxn partitionTxn)
AbstractPartition
getContextCsn
in interface Partition
getContextCsn
in class AbstractPartition
partitionTxn
- The transaction to usepublic void saveContextCsn(PartitionTxn partitionTxn) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition
partitionTxn
- The transaction to useorg.apache.directory.api.ldap.model.exception.LdapException
- If the context can't be savedpublic String toString()
toString
in class Object
Object.toString()
public Subordinates getSubordinates(PartitionTxn partitionTxn, org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
partitionTxn
- The transactionentry
- The entry we want the subordinates fororg.apache.directory.api.ldap.model.exception.LdapException
- If we had an issue while processing the requestpublic PartitionReadTxn beginReadTransaction()
Partition
public PartitionWriteTxn beginWriteTransaction()
Partition
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.