|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.partition.AbstractPartition
org.apache.directory.server.core.partition.impl.btree.BTreePartition<java.lang.Long>
org.apache.directory.server.core.partition.ldif.LdifPartition
public class LdifPartition
A LDIF based partition. Data are stored on disk as LDIF, following this organisation :
/ou=example,ou=system.ldif /ou=example,ou=system/ | +--> cn=test.ldif cn=test/ | +--> cn=another test.ldif ...
Field Summary |
---|
Fields inherited from class org.apache.directory.server.core.partition.impl.btree.BTreePartition |
---|
cacheSize, contextEntry, id, optimizer, schemaManager, searchEngine, suffix, SYS_INDEX_OIDS |
Fields inherited from class org.apache.directory.server.core.partition.AbstractPartition |
---|
initialized |
Constructor Summary | |
---|---|
LdifPartition()
Creates a new instance of LdifPartition. |
Method Summary | |
---|---|
void |
add(AddOperationContext addContext)
Adds an entry to this ContextPartition. |
void |
addIndexOn(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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(java.lang.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<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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(java.lang.Long id)
|
org.apache.directory.shared.ldap.entry.Entry |
getContextEntry()
|
java.lang.String |
getEntryDn(java.lang.Long id)
|
java.lang.Long |
getEntryId(java.lang.String dn)
|
java.lang.String |
getEntryUpdn(java.lang.Long id)
Gets the user provided distinguished name. |
java.lang.String |
getEntryUpdn(java.lang.String dn)
Gets the user provided distinguished name. |
java.lang.String |
getId()
Gets the unique identifier for this partition. |
Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> |
getNdnIndex()
Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries. |
Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> |
getOneLevelIndex()
Gets the Index mapping the primary keys of parents to the primary keys of their children. |
java.lang.Long |
getParentId(java.lang.Long childId)
|
java.lang.Long |
getParentId(java.lang.String dn)
|
Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> |
getPresenceIndex()
|
java.lang.String |
getProperty(java.lang.String propertyName)
|
Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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,java.lang.Long> |
getSystemIndex(java.lang.String id)
|
java.util.Iterator<java.lang.String> |
getSystemIndices()
|
Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> |
getUpdnIndex()
Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries. |
Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> |
getUserIndex(java.lang.String id)
|
java.util.Iterator<java.lang.String> |
getUserIndices()
|
java.lang.String |
getWorkingDirectory()
|
Partition |
getWrappedPartition()
|
boolean |
hasSystemIndexOn(java.lang.String id)
|
boolean |
hasUserIndexOn(java.lang.String id)
|
boolean |
isInitialized()
Returns true if this context partition is initialized successfully. |
IndexCursor<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> |
list(java.lang.Long id)
|
ClonedServerEntry |
lookup(java.lang.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<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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(java.lang.String contextEntry)
|
void |
setId(java.lang.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<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
Sets the normalized distinguished name Index. |
void |
setOneAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
Sets the one level Index. |
void |
setPresenceIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
Sets the attribute existence Index. |
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
|
void |
setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Sets the schema manager assigned to this Partition. |
void |
setSubAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.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(java.lang.String suffix)
Sets the user provided suffix for this Partition as a String. |
void |
setUpdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
Sets the user provided distinguished name Index. |
void |
setWorkingDirectory(java.lang.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. |
Methods inherited from class org.apache.directory.server.core.partition.impl.btree.BTreePartition |
---|
addIndexedAttributes, delete, getCacheSize, getIndexedAttributes, getPartitionDir, getSchemaManager, getSearchEngine, getSuffix, getSuffixDn, hasEntry, list, lookup, search, setCacheSize, setIndexedAttributes, setPartitionDir |
Methods inherited from class org.apache.directory.server.core.partition.AbstractPartition |
---|
destroy, initialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LdifPartition()
Method Detail |
---|
protected void doInit() throws java.lang.Exception
doInit
in class AbstractPartition
java.lang.Exception
public void add(AddOperationContext addContext) throws java.lang.Exception
add
in interface Partition
add
in class BTreePartition<java.lang.Long>
addContext
- the context used to add and entry to this ContextPartition
java.lang.Exception
- if there are any problemspublic void bind(BindOperationContext bindContext) throws java.lang.Exception
bindContext
- the bind context, containing all the needed informations to bind
java.lang.Exception
- if something goes wrongpublic void delete(java.lang.Long id) throws java.lang.Exception
delete
in class BTreePartition<java.lang.Long>
java.lang.Exception
public void modify(ModifyOperationContext modifyContext) throws java.lang.Exception
modify
in interface Partition
modify
in class BTreePartition<java.lang.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
.
java.lang.Exception
- if there are any problemsDirContext
,
DirContext.ADD_ATTRIBUTE
,
DirContext.REMOVE_ATTRIBUTE
,
DirContext.REPLACE_ATTRIBUTE
public void move(MoveOperationContext moveContext) throws java.lang.Exception
move
in interface Partition
move
in class BTreePartition<java.lang.Long>
moveContext
- The context containing the DNs to move
java.lang.Exception
- if there are any problemspublic void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws java.lang.Exception
moveAndRename
in interface Partition
moveAndRename
in class BTreePartition<java.lang.Long>
moveAndRenameContext
- The context contain all the information about
the modifyDN operation
java.lang.Exception
- if there are any problemspublic void rename(RenameOperationContext renameContext) throws java.lang.Exception
rename
in interface Partition
rename
in class BTreePartition<java.lang.Long>
renameContext
- the modify DN context
java.lang.Exception
- if there are any problemspublic void addIndexOn(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
addIndexOn
in class BTreePartition<java.lang.Long>
java.lang.Exception
public int count() throws java.lang.Exception
BTreePartition
count
in class BTreePartition<java.lang.Long>
java.lang.Exception
- if there is a failure to read the countprotected void doDestroy() throws java.lang.Exception
AbstractPartition
doDestroy
in class AbstractPartition
java.lang.Exception
public Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getAliasIndex()
BTreePartition
getAliasIndex
in class BTreePartition<java.lang.Long>
public int getChildCount(java.lang.Long id) throws java.lang.Exception
getChildCount
in class BTreePartition<java.lang.Long>
java.lang.Exception
public java.lang.String getEntryDn(java.lang.Long id) throws java.lang.Exception
getEntryDn
in class BTreePartition<java.lang.Long>
java.lang.Exception
public java.lang.Long getEntryId(java.lang.String dn) throws java.lang.Exception
getEntryId
in class BTreePartition<java.lang.Long>
java.lang.Exception
public java.lang.String getEntryUpdn(java.lang.Long id) throws java.lang.Exception
BTreePartition
getEntryUpdn
in class BTreePartition<java.lang.Long>
id
- the entry id
java.lang.Exception
- if the updn index cannot be accessedpublic java.lang.String getEntryUpdn(java.lang.String dn) throws java.lang.Exception
BTreePartition
getEntryUpdn
in class BTreePartition<java.lang.Long>
dn
- the normalized distinguished name
java.lang.Exception
- if the updn and ndn indices cannot be accessedpublic Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getNdnIndex()
BTreePartition
getNdnIndex
in class BTreePartition<java.lang.Long>
public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getOneAliasIndex()
BTreePartition
getOneAliasIndex
in class BTreePartition<java.lang.Long>
public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getOneLevelIndex()
BTreePartition
getOneLevelIndex
in class BTreePartition<java.lang.Long>
public java.lang.Long getParentId(java.lang.Long childId) throws java.lang.Exception
getParentId
in class BTreePartition<java.lang.Long>
java.lang.Exception
public java.lang.Long getParentId(java.lang.String dn) throws java.lang.Exception
getParentId
in class BTreePartition<java.lang.Long>
java.lang.Exception
public Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getPresenceIndex()
getPresenceIndex
in class BTreePartition<java.lang.Long>
public java.lang.String getProperty(java.lang.String propertyName) throws java.lang.Exception
getProperty
in class BTreePartition<java.lang.Long>
java.lang.Exception
public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSubAliasIndex()
BTreePartition
getSubAliasIndex
in class BTreePartition<java.lang.Long>
public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSubLevelIndex()
BTreePartition
getSubLevelIndex
in class BTreePartition<java.lang.Long>
public Index<?,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSystemIndex(java.lang.String id) throws java.lang.Exception
getSystemIndex
in class BTreePartition<java.lang.Long>
java.lang.Exception
public java.util.Iterator<java.lang.String> getSystemIndices()
getSystemIndices
in class BTreePartition<java.lang.Long>
public Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getUpdnIndex()
BTreePartition
getUpdnIndex
in class BTreePartition<java.lang.Long>
public Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getUserIndex(java.lang.String id) throws java.lang.Exception
getUserIndex
in class BTreePartition<java.lang.Long>
java.lang.Exception
public java.util.Iterator<java.lang.String> getUserIndices()
getUserIndices
in class BTreePartition<java.lang.Long>
public boolean hasSystemIndexOn(java.lang.String id) throws java.lang.Exception
hasSystemIndexOn
in class BTreePartition<java.lang.Long>
java.lang.Exception
public boolean hasUserIndexOn(java.lang.String id) throws java.lang.Exception
hasUserIndexOn
in class BTreePartition<java.lang.Long>
java.lang.Exception
public boolean isInitialized()
AbstractPartition
isInitialized
in interface Partition
isInitialized
in class AbstractPartition
public IndexCursor<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> list(java.lang.Long id) throws java.lang.Exception
list
in class BTreePartition<java.lang.Long>
java.lang.Exception
public ClonedServerEntry lookup(java.lang.Long id) throws java.lang.Exception
lookup
in class BTreePartition<java.lang.Long>
java.lang.Exception
public void setAliasIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
BTreePartition
setAliasIndexOn
in class BTreePartition<java.lang.Long>
index
- the index on the ALIAS_ATTRIBUTE
java.lang.Exception
- if there is a problem setting up the indexpublic void setNdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
BTreePartition
setNdnIndexOn
in class BTreePartition<java.lang.Long>
index
- the ndn Index
java.lang.Exception
- if there is a problem setting up the indexpublic void setOneAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
BTreePartition
setOneAliasIndexOn
in class BTreePartition<java.lang.Long>
index
- a one level alias index
java.lang.Exception
- if there is a problem setting up the indexpublic void setOneLevelIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
BTreePartition
setOneLevelIndexOn
in class BTreePartition<java.lang.Long>
index
- the one level Index
java.lang.Exception
- if there is a problem setting up the indexpublic void setPresenceIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
BTreePartition
setPresenceIndexOn
in class BTreePartition<java.lang.Long>
index
- the attribute existence Index
java.lang.Exception
- if there is a problem setting up the indexpublic void setProperty(java.lang.String propertyName, java.lang.String propertyValue) throws java.lang.Exception
setProperty
in class BTreePartition<java.lang.Long>
java.lang.Exception
public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
BTreePartition
setSchemaManager
in interface Partition
setSchemaManager
in class BTreePartition<java.lang.Long>
public void setSubAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
BTreePartition
setSubAliasIndexOn
in class BTreePartition<java.lang.Long>
index
- a subtree alias index
java.lang.Exception
- if there is a problem setting up the indexpublic void setUpdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index) throws java.lang.Exception
BTreePartition
setUpdnIndexOn
in class BTreePartition<java.lang.Long>
index
- the updn Index
java.lang.Exception
- if there is a problem setting up the indexpublic void sync() throws java.lang.Exception
AbstractPartition
sync
in interface Partition
sync
in class BTreePartition<java.lang.Long>
java.lang.Exception
- if buffers cannot be flushed to diskpublic void unbind(UnbindOperationContext unbindContext) throws java.lang.Exception
Partition
unbindContext
- the context used to unbind
java.lang.Exception
- if something goes wrongpublic java.lang.String getId()
BTreePartition
getId
in interface Partition
getId
in class BTreePartition<java.lang.Long>
public void setId(java.lang.String id)
BTreePartition
setId
in interface Partition
setId
in class BTreePartition<java.lang.Long>
id
- the unique identifier for this partitionpublic void setSuffix(java.lang.String suffix) throws org.apache.directory.shared.ldap.exception.LdapInvalidDnException
BTreePartition
setSuffix
in interface Partition
setSuffix
in class BTreePartition<java.lang.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 java.lang.String getWorkingDirectory()
public void setWorkingDirectory(java.lang.String workingDirectory)
workingDirectory
- the workingDirectory to setpublic org.apache.directory.shared.ldap.entry.Entry getContextEntry()
public void setContextEntry(java.lang.String contextEntry) throws org.apache.directory.shared.ldap.ldif.LdapLdifException
contextEntry
- the contextEntry to set
org.apache.directory.shared.ldap.ldif.LdapLdifException
public Partition getWrappedPartition()
public void setWrappedPartition(AvlPartition wrappedPartition)
wrappedPartition
- the wrappedPartition to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |