public class LdifPartition extends BTreePartition<Long>
/ou=example,ou=system.ldif
/ou=example,ou=system/
|
+--> cn=test.ldif
cn=test/
|
+--> cn=another test.ldif
...
cacheSize, contextEntry, id, optimizer, schemaManager, searchEngine, suffix, SYS_INDEX_OIDSinitialized| Constructor and Description |
|---|
LdifPartition()
Creates a new instance of LdifPartition.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Adds an entry to this ContextPartition.
|
void |
addIndexOn(Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) |
void |
bind(BindOperationContext bindContext)
Represents a bind operation issued to authenticate a client.
|
int |
count()
Gets the count of the total number of entries in the database.
|
void |
delete(Long id) |
protected void |
doDestroy()
Override this method to put your initialization code.
|
protected void |
doInit()
Override this method to put your initialization code.
|
Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getAliasIndex()
Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would
be the aliasedObjectName and for X.500 would be aliasedEntryName.
|
int |
getChildCount(Long id) |
org.apache.directory.shared.ldap.entry.Entry |
getContextEntry() |
String |
getEntryDn(Long id) |
Long |
getEntryId(String dn) |
String |
getEntryUpdn(Long id)
Gets the user provided distinguished name.
|
String |
getEntryUpdn(String dn)
Gets the user provided distinguished name.
|
String |
getId()
Gets the unique identifier for this partition.
|
Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getNdnIndex()
Gets the Index mapping the normalized distinguished names of entries as
Strings to the BigInteger primary keys of entries.
|
Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getOneAliasIndex()
Gets the alias index mapping parent entries with scope expanding aliases
children one level below them; this system index is used to dereference
aliases on one/single level scoped searches.
|
Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getOneLevelIndex()
Gets the Index mapping the primary keys of parents to the
primary keys of their children.
|
Long |
getParentId(Long childId) |
Long |
getParentId(String dn) |
Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getPresenceIndex() |
String |
getProperty(String propertyName) |
Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getSubAliasIndex()
Gets the alias index mapping relative entries with scope expanding
alias descendents; this system index is used to dereference aliases on
subtree scoped searches.
|
Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getSubLevelIndex()
Gets the Index mapping the primary keys of ancestors to the
primary keys of their descendants.
|
Index<?,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getSystemIndex(String id) |
Iterator<String> |
getSystemIndices() |
Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getUpdnIndex()
Gets the Index mapping user provided distinguished names of entries as
Strings to the BigInteger primary keys of entries.
|
Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
getUserIndex(String id) |
Iterator<String> |
getUserIndices() |
String |
getWorkingDirectory() |
Partition |
getWrappedPartition() |
boolean |
hasSystemIndexOn(String id) |
boolean |
hasUserIndexOn(String id) |
boolean |
isInitialized()
Returns true if this context partition is initialized successfully.
|
IndexCursor<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> |
list(Long id) |
ClonedServerEntry |
lookup(Long id) |
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 |
setAliasIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index)
Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would
be the aliasedObjectName and for X.500 would be aliasedEntryName.
|
void |
setContextEntry(String contextEntry) |
void |
setId(String id)
Sets the unique identifier for this partition.
|
void |
setLdifScanInterval(int ldifScanInterval)
the interval at which the config directory containing LDIF files
should be scanned, default value is 10 min
|
void |
setNdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index)
Sets the normalized distinguished name Index.
|
void |
setOneAliasIndexOn(Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index)
Sets the alias index mapping parent entries with scope expanding aliases
children one level below them; this system index is used to dereference
aliases on one/single level scoped searches.
|
void |
setOneLevelIndexOn(Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index)
Sets the one level Index.
|
void |
setPresenceIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index)
Sets the attribute existence Index.
|
void |
setProperty(String propertyName,
String propertyValue) |
void |
setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Sets the schema manager assigned to this Partition.
|
void |
setSubAliasIndexOn(Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index)
Sets the alias index mapping relative entries with scope expanding
alias descendents; this system index is used to dereference aliases on
subtree scoped searches.
|
void |
setSuffix(String suffix)
Sets the user provided suffix for this Partition as a String.
|
void |
setUpdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index)
Sets the user provided distinguished name Index.
|
void |
setWorkingDirectory(String workingDirectory) |
void |
setWrappedPartition(AvlPartition wrappedPartition) |
void |
sync()
This method does nothing by default.
|
void |
unbind(UnbindOperationContext unbindContext)
Represents an unbind operation issued by an authenticated client.
|
addIndexedAttributes, delete, getCacheSize, getIndexedAttributes, getPartitionDir, getSchemaManager, getSearchEngine, getSuffix, getSuffixDn, hasEntry, list, lookup, search, setCacheSize, setIndexedAttributes, setPartitionDirdestroy, initializeprotected void doInit()
throws Exception
doInit in class AbstractPartitionExceptionpublic void add(AddOperationContext addContext) throws Exception
public void bind(BindOperationContext bindContext) throws Exception
bindContext - the bind context, containing all the needed informations to bindException - if something goes wrongpublic void delete(Long id) throws Exception
delete in class BTreePartition<Long>Exceptionpublic void modify(ModifyOperationContext modifyContext) throws Exception
modify in interface Partitionmodify in class BTreePartition<Long>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 problemsDirContext,
DirContext.ADD_ATTRIBUTE,
DirContext.REMOVE_ATTRIBUTE,
DirContext.REPLACE_ATTRIBUTEpublic void move(MoveOperationContext moveContext) throws Exception
public void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws Exception
moveAndRename in interface PartitionmoveAndRename in class BTreePartition<Long>moveAndRenameContext - The context contain all the information about
the modifyDN operationException - if there are any problemspublic void rename(RenameOperationContext renameContext) throws Exception
public void addIndexOn(Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
addIndexOn in class BTreePartition<Long>Exceptionpublic int count()
throws Exception
BTreePartitioncount in class BTreePartition<Long>Exception - if there is a failure to read the countprotected void doDestroy()
throws Exception
AbstractPartitiondoDestroy in class AbstractPartitionExceptionpublic Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getAliasIndex()
BTreePartitiongetAliasIndex in class BTreePartition<Long>public int getChildCount(Long id) throws Exception
getChildCount in class BTreePartition<Long>Exceptionpublic String getEntryDn(Long id) throws Exception
getEntryDn in class BTreePartition<Long>Exceptionpublic Long getEntryId(String dn) throws Exception
getEntryId in class BTreePartition<Long>Exceptionpublic String getEntryUpdn(Long id) throws Exception
BTreePartitiongetEntryUpdn in class BTreePartition<Long>id - the entry idException - if the updn index cannot be accessedpublic String getEntryUpdn(String dn) throws Exception
BTreePartitiongetEntryUpdn in class BTreePartition<Long>dn - the normalized distinguished nameException - if the updn and ndn indices cannot be accessedpublic Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getNdnIndex()
BTreePartitiongetNdnIndex in class BTreePartition<Long>public Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getOneAliasIndex()
BTreePartitiongetOneAliasIndex in class BTreePartition<Long>public Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getOneLevelIndex()
BTreePartitiongetOneLevelIndex in class BTreePartition<Long>public Long getParentId(Long childId) throws Exception
getParentId in class BTreePartition<Long>Exceptionpublic Long getParentId(String dn) throws Exception
getParentId in class BTreePartition<Long>Exceptionpublic Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getPresenceIndex()
getPresenceIndex in class BTreePartition<Long>public String getProperty(String propertyName) throws Exception
getProperty in class BTreePartition<Long>Exceptionpublic Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getSubAliasIndex()
BTreePartitiongetSubAliasIndex in class BTreePartition<Long>public Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getSubLevelIndex()
BTreePartitiongetSubLevelIndex in class BTreePartition<Long>public Index<?,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getSystemIndex(String id) throws Exception
getSystemIndex in class BTreePartition<Long>Exceptionpublic Iterator<String> getSystemIndices()
getSystemIndices in class BTreePartition<Long>public Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getUpdnIndex()
BTreePartitiongetUpdnIndex in class BTreePartition<Long>public Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getUserIndex(String id) throws Exception
getUserIndex in class BTreePartition<Long>Exceptionpublic Iterator<String> getUserIndices()
getUserIndices in class BTreePartition<Long>public boolean hasSystemIndexOn(String id) throws Exception
hasSystemIndexOn in class BTreePartition<Long>Exceptionpublic boolean hasUserIndexOn(String id) throws Exception
hasUserIndexOn in class BTreePartition<Long>Exceptionpublic boolean isInitialized()
AbstractPartitionisInitialized in interface PartitionisInitialized in class AbstractPartitionpublic IndexCursor<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> list(Long id) throws Exception
list in class BTreePartition<Long>Exceptionpublic ClonedServerEntry lookup(Long id) throws Exception
lookup in class BTreePartition<Long>Exceptionpublic void setAliasIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartitionsetAliasIndexOn in class BTreePartition<Long>index - the index on the ALIAS_ATTRIBUTEException - if there is a problem setting up the indexpublic void setNdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartitionsetNdnIndexOn in class BTreePartition<Long>index - the ndn IndexException - if there is a problem setting up the indexpublic void setOneAliasIndexOn(Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartitionsetOneAliasIndexOn in class BTreePartition<Long>index - a one level alias indexException - if there is a problem setting up the indexpublic void setOneLevelIndexOn(Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartitionsetOneLevelIndexOn in class BTreePartition<Long>index - the one level IndexException - if there is a problem setting up the indexpublic void setPresenceIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartitionsetPresenceIndexOn in class BTreePartition<Long>index - the attribute existence IndexException - if there is a problem setting up the indexpublic void setProperty(String propertyName, String propertyValue) throws Exception
setProperty in class BTreePartition<Long>Exceptionpublic void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
BTreePartitionsetSchemaManager in interface PartitionsetSchemaManager in class BTreePartition<Long>public void setSubAliasIndexOn(Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartitionsetSubAliasIndexOn in class BTreePartition<Long>index - a subtree alias indexException - if there is a problem setting up the indexpublic void setUpdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartitionsetUpdnIndexOn in class BTreePartition<Long>index - the updn IndexException - if there is a problem setting up the indexpublic void sync()
throws Exception
AbstractPartitionpublic void unbind(UnbindOperationContext unbindContext) throws Exception
PartitionunbindContext - the context used to unbindException - if something goes wrongpublic String getId()
BTreePartitiongetId in interface PartitiongetId in class BTreePartition<Long>public void setId(String id)
BTreePartitionsetId in interface PartitionsetId in class BTreePartition<Long>id - the unique identifier for this partitionpublic void setSuffix(String suffix) throws org.apache.directory.shared.ldap.exception.LdapInvalidDnException
BTreePartitionsetSuffix in interface PartitionsetSuffix in class BTreePartition<Long>suffix - the suffix String for this Partition.org.apache.directory.shared.ldap.exception.LdapInvalidDnException - if the suffix does not conform to LDAP DN syntaxpublic void setLdifScanInterval(int ldifScanInterval)
ldifScanInterval - the scan interval time in minutespublic String getWorkingDirectory()
public void setWorkingDirectory(String workingDirectory)
workingDirectory - the workingDirectory to setpublic org.apache.directory.shared.ldap.entry.Entry getContextEntry()
public void setContextEntry(String contextEntry) throws org.apache.directory.shared.ldap.ldif.LdapLdifException
contextEntry - the contextEntry to setorg.apache.directory.shared.ldap.ldif.LdapLdifExceptionpublic Partition getWrappedPartition()
public void setWrappedPartition(AvlPartition wrappedPartition)
wrappedPartition - the wrappedPartition to setCopyright © 2003-2012 Apache Software Foundation. All Rights Reserved.