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_OIDS
initialized
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, setPartitionDir
destroy, initialize
protected void doInit() throws Exception
doInit
in class AbstractPartition
Exception
public 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>
Exception
public void modify(ModifyOperationContext modifyContext) throws Exception
modify
in interface Partition
modify
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_ATTRIBUTE
public void move(MoveOperationContext moveContext) throws Exception
public void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws Exception
moveAndRename
in interface Partition
moveAndRename
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>
Exception
public int count() throws Exception
BTreePartition
count
in class BTreePartition<Long>
Exception
- if there is a failure to read the countprotected void doDestroy() throws Exception
AbstractPartition
doDestroy
in class AbstractPartition
Exception
public Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getAliasIndex()
BTreePartition
getAliasIndex
in class BTreePartition<Long>
public int getChildCount(Long id) throws Exception
getChildCount
in class BTreePartition<Long>
Exception
public String getEntryDn(Long id) throws Exception
getEntryDn
in class BTreePartition<Long>
Exception
public Long getEntryId(String dn) throws Exception
getEntryId
in class BTreePartition<Long>
Exception
public String getEntryUpdn(Long id) throws Exception
BTreePartition
getEntryUpdn
in class BTreePartition<Long>
id
- the entry idException
- if the updn index cannot be accessedpublic String getEntryUpdn(String dn) throws Exception
BTreePartition
getEntryUpdn
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()
BTreePartition
getNdnIndex
in class BTreePartition<Long>
public Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getOneAliasIndex()
BTreePartition
getOneAliasIndex
in class BTreePartition<Long>
public Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getOneLevelIndex()
BTreePartition
getOneLevelIndex
in class BTreePartition<Long>
public Long getParentId(Long childId) throws Exception
getParentId
in class BTreePartition<Long>
Exception
public Long getParentId(String dn) throws Exception
getParentId
in class BTreePartition<Long>
Exception
public 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>
Exception
public Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getSubAliasIndex()
BTreePartition
getSubAliasIndex
in class BTreePartition<Long>
public Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getSubLevelIndex()
BTreePartition
getSubLevelIndex
in class BTreePartition<Long>
public Index<?,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getSystemIndex(String id) throws Exception
getSystemIndex
in class BTreePartition<Long>
Exception
public Iterator<String> getSystemIndices()
getSystemIndices
in class BTreePartition<Long>
public Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> getUpdnIndex()
BTreePartition
getUpdnIndex
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>
Exception
public Iterator<String> getUserIndices()
getUserIndices
in class BTreePartition<Long>
public boolean hasSystemIndexOn(String id) throws Exception
hasSystemIndexOn
in class BTreePartition<Long>
Exception
public boolean hasUserIndexOn(String id) throws Exception
hasUserIndexOn
in class BTreePartition<Long>
Exception
public boolean isInitialized()
AbstractPartition
isInitialized
in interface Partition
isInitialized
in class AbstractPartition
public IndexCursor<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> list(Long id) throws Exception
list
in class BTreePartition<Long>
Exception
public ClonedServerEntry lookup(Long id) throws Exception
lookup
in class BTreePartition<Long>
Exception
public void setAliasIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartition
setAliasIndexOn
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
BTreePartition
setNdnIndexOn
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
BTreePartition
setOneAliasIndexOn
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
BTreePartition
setOneLevelIndexOn
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
BTreePartition
setPresenceIndexOn
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>
Exception
public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
BTreePartition
setSchemaManager
in interface Partition
setSchemaManager
in class BTreePartition<Long>
public void setSubAliasIndexOn(Index<Long,org.apache.directory.shared.ldap.entry.ServerEntry,Long> index) throws Exception
BTreePartition
setSubAliasIndexOn
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
BTreePartition
setUpdnIndexOn
in class BTreePartition<Long>
index
- the updn IndexException
- if there is a problem setting up the indexpublic void sync() throws Exception
AbstractPartition
public void unbind(UnbindOperationContext unbindContext) throws Exception
Partition
unbindContext
- the context used to unbindException
- if something goes wrongpublic String getId()
BTreePartition
getId
in interface Partition
getId
in class BTreePartition<Long>
public void setId(String id)
BTreePartition
setId
in interface Partition
setId
in class BTreePartition<Long>
id
- the unique identifier for this partitionpublic void setSuffix(String suffix) throws org.apache.directory.shared.ldap.exception.LdapInvalidDnException
BTreePartition
setSuffix
in interface Partition
setSuffix
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.LdapLdifException
public Partition getWrappedPartition()
public void setWrappedPartition(AvlPartition wrappedPartition)
wrappedPartition
- the wrappedPartition to setCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.