public class DefaultDirectoryService extends java.lang.Object implements DirectoryService
DirectoryService.| Modifier and Type | Field and Description |
|---|---|
private org.apache.directory.api.ldap.util.tree.DnNode<AccessControlAdministrativePoint> |
accessControlAPCache
The AccessControl AdministrativePoint cache
|
private boolean |
accessControlEnabled
Manage the basic access control checks
|
private org.apache.directory.api.ldap.model.name.Dn |
adminDn
the distinguished name of the administrative user
|
private CoreSession |
adminSession
session used as admin for internal operations
|
private boolean |
allowAnonymousAccess
Manage anonymous access to entries other than the RootDSE
|
private AttributeTypeProvider |
atProvider
The attribute type provider
|
private CacheService |
cacheService
the ehcache based cache service
|
private ChangeLog |
changeLog
the change log service
|
private org.apache.directory.api.ldap.util.tree.DnNode<CollectiveAttributeAdministrativePoint> |
collectiveAttributeAPCache
The CollectiveAttribute AdministrativePoint cache
|
private org.apache.directory.api.ldap.model.csn.CsnFactory |
csnFactory
The service's CSN factory
|
private static long |
DEFAULT_SYNC_PERIOD
The default delay to wait between sync on disk : 15 seconds
|
private boolean |
denormalizeOpAttrsEnabled
Manage the operational attributes denormalization
|
private DnFactory |
dnFactory
The Dn factory
|
private SubtreeEvaluator |
evaluator
The Subtree evaluator instance
|
private EventService |
eventService
The event service
|
private boolean |
exitVmOnShutdown
A flag used to shutdown the VM when stopping the server.
|
private boolean |
firstStart
whether or not server is started for the first time
|
private java.lang.String |
instanceId
The instance Id
|
private InstanceLayout |
instanceLayout
The server directory layout
|
private java.util.Map<java.lang.String,Interceptor> |
interceptorNames |
private java.util.List<Interceptor> |
interceptors
The list of declared interceptors
|
private java.util.concurrent.locks.ReadWriteLock |
interceptorsLock
A lock to protect the interceptors List
|
private Journal |
journal
the journal service
|
private org.apache.directory.api.ldap.codec.api.LdapApiService |
ldapCodecService
The LDAP Codec Service
|
private static java.lang.String |
LOCK_FILE_NAME |
private java.io.RandomAccessFile |
lockFile
lock file for directory service's working directory
|
private static org.slf4j.Logger |
LOG
The logger
|
static int |
MAX_SIZE_LIMIT_DEFAULT
The default timeLimit : 100 entries
|
static int |
MAX_TIME_LIMIT_DEFAULT
The default timeLimit : 10 seconds
|
private int |
maxPDUSize
The maximum size for an incoming PDU
|
private ObjectClassProvider |
ocProvider
The object class provider
|
private java.util.Map<OperationEnum,java.util.List<java.lang.String>> |
operationInterceptors
A map associating a list of interceptor to each operation
|
private OperationManager |
operationManager
the interface used to perform various operations on this
DirectoryService
|
private static java.lang.String |
PARTIAL_IMPL_WARNING
remove me after implementation is completed
|
private DefaultPartitionNexus |
partitionNexus
the root nexus
|
private java.util.Set<Partition> |
partitions
The set of all declared partitions
|
private boolean |
passwordHidden
A flag to tell if the userPassword attribute's value must be hidden
|
private java.util.concurrent.locks.Lock |
readLock
The read and write locks
|
private ReferralManager |
referralManager
The referral manager
|
private int |
replicaId
The directory instance replication ID
|
private org.apache.directory.api.ldap.model.schema.SchemaManager |
schemaManager
A reference on the SchemaManager
|
private SchemaPartition |
schemaPartition |
private boolean |
shutdownHookEnabled
A flag used to indicate that a shutdown hook has been installed
|
private boolean |
started
whether or not this instance has been shutdown
|
(package private) SubentryCache |
subentryCache
The Subentry cache
|
private org.apache.directory.api.ldap.util.tree.DnNode<SubschemaAdministrativePoint> |
subschemaAPCache
The Subschema AdministrativePoint cache
|
private long |
syncPeriodMillis
The delay to wait between each sync on disk
|
private Partition |
systemPartition
The System partition
|
private java.util.List<? extends org.apache.directory.api.ldap.model.ldif.LdifEntry> |
testEntries
A list of LDIF entries to inject at startup
|
private org.apache.directory.api.ldap.util.tree.DnNode<TriggerExecutionAdministrativePoint> |
triggerExecutionAPCache
The TriggerExecution AdministrativePoint cache
|
private java.lang.Thread |
workerThread |
private java.util.concurrent.locks.Lock |
writeLock |
JNDI_KEY| Constructor and Description |
|---|
DefaultDirectoryService()
Creates a new instance of the directory service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAfter(java.lang.String interceptorName,
Interceptor interceptor)
Add an interceptor after a given interceptor in the interceptor list.
|
void |
addFirst(Interceptor interceptor)
Add an interceptor in the first position in the interceptor list.
|
private void |
addInterceptor(Interceptor interceptor,
int position)
Add an interceptor to the list of interceptors to call for each operation
|
void |
addLast(Interceptor interceptor)
Add an interceptor in the last position in the interceptor list.
|
void |
addPartition(Partition partition) |
private boolean |
createBootstrapEntries()
Returns true if we had to create the bootstrap entries on the first
start of the server.
|
private void |
createTestEntries()
Adds test entries into the core.
|
private void |
gatherInterceptors(Interceptor interceptor,
java.lang.Class<?> interceptorClz,
OperationEnum operation,
java.util.List<java.lang.String> selectedInterceptorList)
Recursively checks if the given interceptor can be added to the list of interceptors for a given
operation and adds to the list of interceptors if it implements the respective operation
|
org.apache.directory.api.ldap.util.tree.DnNode<AccessControlAdministrativePoint> |
getAccessControlAPCache() |
CoreSession |
getAdminSession() |
AttributeTypeProvider |
getAtProvider()
Gets the
AttributeTypeProvider. |
CacheService |
getCacheService() |
ChangeLog |
getChangeLog()
Gets the ChangeLog service for this DirectoryService used for tracking
changes (revisions) to the server and using them to revert the server
to earlier revisions.
|
org.apache.directory.api.ldap.util.tree.DnNode<CollectiveAttributeAdministrativePoint> |
getCollectiveAttributeAPCache() |
org.apache.directory.api.ldap.model.csn.Csn |
getCSN()
Get a new CSN
|
DnFactory |
getDnFactory()
Gets the Dn factory.
|
SubtreeEvaluator |
getEvaluator() |
EventService |
getEventService() |
java.lang.String |
getInstanceId() |
InstanceLayout |
getInstanceLayout()
Returns the instance layout which contains the path for various directories
|
Interceptor |
getInterceptor(java.lang.String interceptorName)
Get an Interceptor instance from its name
|
java.util.List<Interceptor> |
getInterceptors()
Returns interceptors in the server.
|
java.util.List<java.lang.String> |
getInterceptors(OperationEnum operation)
Returns interceptors in the server for a given operation.
|
Journal |
getJournal()
Gets the Journal service for this DirectoryService used for tracking
changes to the server.
|
org.apache.directory.api.ldap.codec.api.LdapApiService |
getLdapCodecService() |
int |
getMaxPDUSize() |
ObjectClassProvider |
getOcProvider()
Gets the
ObjectClassProvider. |
OperationManager |
getOperationManager()
Gets the operation manager.
|
DefaultPartitionNexus |
getPartitionNexus() |
java.util.Set<? extends Partition> |
getPartitions()
Gets the
Partitions used by this DirectoryService. |
ReferralManager |
getReferralManager() |
int |
getReplicaId() |
org.apache.directory.api.ldap.model.schema.SchemaManager |
getSchemaManager() |
SchemaPartition |
getSchemaPartition() |
CoreSession |
getSession()
Get back an anonymous session
|
CoreSession |
getSession(org.apache.directory.api.ldap.model.name.Dn principalDn,
byte[] credentials)
Get back a session for the give user and credentials bound with Simple Bind
|
CoreSession |
getSession(org.apache.directory.api.ldap.model.name.Dn principalDn,
byte[] credentials,
java.lang.String saslMechanism,
java.lang.String saslAuthId)
Get back a session for a given user bound with SASL Bind
|
CoreSession |
getSession(LdapPrincipal principal)
Get back a session for a given principal
|
SubentryCache |
getSubentryCache() |
org.apache.directory.api.ldap.util.tree.DnNode<SubschemaAdministrativePoint> |
getSubschemaAPCache() |
long |
getSyncPeriodMillis() |
Partition |
getSystemPartition() |
java.util.List<org.apache.directory.api.ldap.model.ldif.LdifEntry> |
getTestEntries()
Returns test directory entries(
LdifEntry) to be loaded while
bootstrapping. |
org.apache.directory.api.ldap.util.tree.DnNode<TriggerExecutionAdministrativePoint> |
getTriggerExecutionAPCache() |
private void |
initialize()
Kicks off the initialization of the entire system.
|
private void |
initializeSystemPartition() |
private void |
initInterceptors()
Initialize the interceptors
|
private void |
initOperationsList()
Compute the list of to call for each operation
|
boolean |
isAccessControlEnabled()
Returns true if access control checks are enabled.
|
boolean |
isAllowAnonymousAccess()
Returns true if anonymous access is allowed on entries besides the RootDSE.
|
boolean |
isDenormalizeOpAttrsEnabled()
return true if the operational attributes must be normalized when returned
|
boolean |
isExitVmOnShutdown() |
boolean |
isFirstStart() |
boolean |
isPasswordHidden()
Returns true if the service requires the userPassword attribute
to be masked.
|
boolean |
isPwdPolicyEnabled() |
boolean |
isShutdownHookEnabled()
Checks to see if this DirectoryService has registered a JVM shutdown hook
to flush caches and synchronize to disk safely.
|
boolean |
isStarted()
Returns true if this service is started.
|
private void |
lockWorkDir()
checks if the working directory is already in use by some other directory service, if yes
then throws a runtime exception else will obtain the lock on the working directory
|
private void |
moddn(org.apache.directory.api.ldap.model.name.Dn oldDn,
org.apache.directory.api.ldap.model.name.Dn newDn,
boolean delOldRdn)
We handle the ModDN/ModRDN operation for the revert here.
|
org.apache.directory.api.ldap.model.entry.Entry |
newEntry(org.apache.directory.api.ldap.model.name.Dn dn)
Creates a new ServerEntry which has not yet been added to the
directory.
|
org.apache.directory.api.ldap.model.entry.Entry |
newEntry(java.lang.String ldif,
java.lang.String dn)
Create a new Entry
|
private org.apache.directory.api.ldap.model.entry.Entry |
readEntry(java.lang.String text)
Read an entry (without Dn)
|
void |
remove(java.lang.String interceptorName)
Remove an interceptor from the list of interceptors
|
private void |
removeOperationsList(java.lang.String interceptorName)
Remove an interceptor to the list of interceptors to call for each operation
|
void |
removePartition(Partition partition) |
long |
revert()
Reverts the server's state to the latest tagged snapshot if one was taken.
|
long |
revert(long revision)
Reverts the server's state to an earlier revision.
|
void |
setAccessControlEnabled(boolean accessControlEnabled)
Sets whether to enable basic access control checks or not.
|
void |
setAllowAnonymousAccess(boolean enableAnonymousAccess)
Sets whether to allow anonymous access to entries other than the RootDSE.
|
void |
setCacheService(CacheService cacheService)
Sets the CacheService
|
void |
setChangeLog(ChangeLog changeLog)
Sets the ChangeLog service for this DirectoryService used for tracking
changes (revisions) to the server and using them to revert the server
to earlier revisions.
|
private void |
setDefaultInterceptorConfigurations()
Define a default list of interceptors that has to be used if no other
configuration is defined.
|
void |
setDenormalizeOpAttrsEnabled(boolean denormalizeOpAttrsEnabled)
Sets whether the operational attributes are denormalized when returned
|
void |
setDnFactory(DnFactory dnFactory)
Sets the Dn factory.
|
void |
setEventService(EventService eventService) |
void |
setExitVmOnShutdown(boolean exitVmOnShutdown) |
void |
setInstanceId(java.lang.String instanceId) |
void |
setInstanceLayout(InstanceLayout instanceLayout)
Sets the InstanceLayout used by the DirectoryService to store the files
|
void |
setInterceptors(java.util.List<Interceptor> interceptors)
Sets the interceptors in the server.
|
void |
setJournal(Journal journal)
Sets the journal in the server.
|
void |
setMaxPDUSize(int maxPDUSize)
Set the maximum allowed size for an incoming PDU
|
void |
setPartitions(java.util.Set<? extends Partition> partitions)
Sets
Partitions used by this DirectoryService. |
void |
setPasswordHidden(boolean passwordHidden)
Sets whether the userPassword attribute is readable, or hidden.
|
void |
setReferralManager(ReferralManager referralManager)
Set the referralManager
|
void |
setReplicaId(int replicaId) |
void |
setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Set the SchemaManager instance.
|
void |
setSchemaPartition(SchemaPartition schemaPartition)
Set the SchemaPartition
|
void |
setShutdownHookEnabled(boolean shutdownHookEnabled)
Sets the shutdown hook flag which controls whether or not this DirectoryService
registers a JVM shutdown hook to flush caches and synchronize to disk safely.
|
void |
setSyncPeriodMillis(long syncPeriodMillis)
the time interval at which the DirectoryService's data is flushed to disk
|
void |
setSystemPartition(Partition systemPartition) |
void |
setTestEntries(java.util.List<? extends org.apache.directory.api.ldap.model.ldif.LdifEntry> testEntries)
Sets test directory entries(
Attributes) to be loaded while
bootstrapping. |
protected void |
showSecurityWarnings()
Displays security warning messages if any possible secutiry issue is found.
|
void |
shutdown()
Shuts down this service.
|
void |
startup()
Starts up this service.
|
void |
sync()
Calls
Partition.sync() for all registered Partitions. |
private static final org.slf4j.Logger LOG
private SchemaPartition schemaPartition
private org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
private org.apache.directory.api.ldap.codec.api.LdapApiService ldapCodecService
private DefaultPartitionNexus partitionNexus
private boolean firstStart
private boolean started
private ChangeLog changeLog
private Journal journal
private OperationManager operationManager
private org.apache.directory.api.ldap.model.name.Dn adminDn
private CoreSession adminSession
private ReferralManager referralManager
private boolean passwordHidden
private org.apache.directory.api.ldap.model.csn.CsnFactory csnFactory
private int replicaId
private static final java.lang.String PARTIAL_IMPL_WARNING
private long syncPeriodMillis
private static final long DEFAULT_SYNC_PERIOD
private java.lang.Thread workerThread
public static final int MAX_SIZE_LIMIT_DEFAULT
public static final int MAX_TIME_LIMIT_DEFAULT
private java.lang.String instanceId
private InstanceLayout instanceLayout
private boolean exitVmOnShutdown
private boolean shutdownHookEnabled
private boolean allowAnonymousAccess
private boolean accessControlEnabled
private boolean denormalizeOpAttrsEnabled
private java.util.List<Interceptor> interceptors
private java.util.Map<java.lang.String,Interceptor> interceptorNames
private java.util.concurrent.locks.ReadWriteLock interceptorsLock
private java.util.concurrent.locks.Lock readLock
private java.util.concurrent.locks.Lock writeLock
private java.util.Map<OperationEnum,java.util.List<java.lang.String>> operationInterceptors
private Partition systemPartition
private java.util.Set<Partition> partitions
private java.util.List<? extends org.apache.directory.api.ldap.model.ldif.LdifEntry> testEntries
private EventService eventService
private int maxPDUSize
private java.io.RandomAccessFile lockFile
private static final java.lang.String LOCK_FILE_NAME
private CacheService cacheService
private org.apache.directory.api.ldap.util.tree.DnNode<AccessControlAdministrativePoint> accessControlAPCache
private org.apache.directory.api.ldap.util.tree.DnNode<CollectiveAttributeAdministrativePoint> collectiveAttributeAPCache
private org.apache.directory.api.ldap.util.tree.DnNode<SubschemaAdministrativePoint> subschemaAPCache
private org.apache.directory.api.ldap.util.tree.DnNode<TriggerExecutionAdministrativePoint> triggerExecutionAPCache
private DnFactory dnFactory
SubentryCache subentryCache
private SubtreeEvaluator evaluator
private AttributeTypeProvider atProvider
private ObjectClassProvider ocProvider
public DefaultDirectoryService()
throws java.lang.Exception
java.lang.Exceptionpublic void setInstanceId(java.lang.String instanceId)
setInstanceId in interface DirectoryServicepublic java.lang.String getInstanceId()
getInstanceId in interface DirectoryServicepublic java.util.Set<? extends Partition> getPartitions()
Partitions used by this DirectoryService.getPartitions in interface DirectoryServicepublic void setPartitions(java.util.Set<? extends Partition> partitions)
Partitions used by this DirectoryService.setPartitions in interface DirectoryServicepartitions - the partitions to usedpublic boolean isAccessControlEnabled()
isAccessControlEnabled in interface DirectoryServicepublic void setAccessControlEnabled(boolean accessControlEnabled)
setAccessControlEnabled in interface DirectoryServiceaccessControlEnabled - true to enable access control checks, false otherwisepublic boolean isAllowAnonymousAccess()
isAllowAnonymousAccess in interface DirectoryServicepublic void setAllowAnonymousAccess(boolean enableAnonymousAccess)
setAllowAnonymousAccess in interface DirectoryServiceenableAnonymousAccess - true to enable anonymous access, false to disable itpublic java.util.List<Interceptor> getInterceptors()
getInterceptors in interface DirectoryServicepublic java.util.List<java.lang.String> getInterceptors(OperationEnum operation)
getInterceptors in interface DirectoryServiceprivate void initOperationsList()
private void gatherInterceptors(Interceptor interceptor, java.lang.Class<?> interceptorClz, OperationEnum operation, java.util.List<java.lang.String> selectedInterceptorList)
interceptor - the instance of the interceptorinterceptorClz - the class of the interceptoroperation - type of operationselectedInterceptorList - the list of selected interceptorsprivate void addInterceptor(Interceptor interceptor, int position) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate void removeOperationsList(java.lang.String interceptorName)
public void setInterceptors(java.util.List<Interceptor> interceptors)
setInterceptors in interface DirectoryServiceinterceptors - the interceptors to be used in the server.private void initInterceptors()
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic java.util.List<org.apache.directory.api.ldap.model.ldif.LdifEntry> getTestEntries()
LdifEntry) to be loaded while
bootstrapping.getTestEntries in interface DirectoryServicepublic void setTestEntries(java.util.List<? extends org.apache.directory.api.ldap.model.ldif.LdifEntry> testEntries)
Attributes) to be loaded while
bootstrapping.setTestEntries in interface DirectoryServicetestEntries - the test entries to load while bootstrappingpublic InstanceLayout getInstanceLayout()
getInstanceLayout in interface DirectoryServicepublic void setInstanceLayout(InstanceLayout instanceLayout) throws java.io.IOException
setInstanceLayout in interface DirectoryServiceinstanceLayout - The InstanceLayout to setjava.io.IOException - If the layout could not be createdpublic void setShutdownHookEnabled(boolean shutdownHookEnabled)
DirectoryServicesetShutdownHookEnabled in interface DirectoryServiceshutdownHookEnabled - true to enable the shutdown hook, false to disablepublic boolean isShutdownHookEnabled()
DirectoryServiceisShutdownHookEnabled in interface DirectoryServicepublic void setExitVmOnShutdown(boolean exitVmOnShutdown)
setExitVmOnShutdown in interface DirectoryServicepublic boolean isExitVmOnShutdown()
isExitVmOnShutdown in interface DirectoryServicepublic void setSystemPartition(Partition systemPartition)
setSystemPartition in interface DirectoryServicepublic Partition getSystemPartition()
getSystemPartition in interface DirectoryServicepublic boolean isDenormalizeOpAttrsEnabled()
isDenormalizeOpAttrsEnabled in interface DirectoryServicepublic void setDenormalizeOpAttrsEnabled(boolean denormalizeOpAttrsEnabled)
setDenormalizeOpAttrsEnabled in interface DirectoryServicedenormalizeOpAttrsEnabled - The flag valuepublic ChangeLog getChangeLog()
getChangeLog in interface DirectoryServicepublic Journal getJournal()
getJournal in interface DirectoryServicepublic void setChangeLog(ChangeLog changeLog)
setChangeLog in interface DirectoryServicechangeLog - the change log service to setpublic void setJournal(Journal journal)
setJournal in interface DirectoryServicejournal - the journal to be used in the server.public void addPartition(Partition partition) throws java.lang.Exception
addPartition in interface DirectoryServicejava.lang.Exceptionpublic void removePartition(Partition partition) throws java.lang.Exception
removePartition in interface DirectoryServicejava.lang.Exceptionprivate void setDefaultInterceptorConfigurations()
public CoreSession getAdminSession()
getAdminSession in interface DirectoryServicepublic CoreSession getSession()
getSession in interface DirectoryServicepublic CoreSession getSession(LdapPrincipal principal)
getSession in interface DirectoryServicepublic CoreSession getSession(org.apache.directory.api.ldap.model.name.Dn principalDn, byte[] credentials) throws org.apache.directory.api.ldap.model.exception.LdapException
getSession in interface DirectoryServiceorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic CoreSession getSession(org.apache.directory.api.ldap.model.name.Dn principalDn, byte[] credentials, java.lang.String saslMechanism, java.lang.String saslAuthId) throws java.lang.Exception
getSession in interface DirectoryServicejava.lang.Exceptionpublic long revert()
throws org.apache.directory.api.ldap.model.exception.LdapException
DirectoryServicerevert in interface DirectoryServiceorg.apache.directory.api.ldap.model.exception.LdapExceptionprivate void moddn(org.apache.directory.api.ldap.model.name.Dn oldDn,
org.apache.directory.api.ldap.model.name.Dn newDn,
boolean delOldRdn)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic long revert(long revision)
throws org.apache.directory.api.ldap.model.exception.LdapException
DirectoryServicerevert in interface DirectoryServicerevision - the revision number to revert toorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic OperationManager getOperationManager()
DirectoryServicegetOperationManager in interface DirectoryServicepublic void startup()
throws java.lang.Exception
DirectoryServicestartup in interface DirectoryServicejava.lang.Exception - if the LDAP server cannot be startedpublic void sync()
throws java.lang.Exception
DirectoryServicePartition.sync() for all registered Partitions.sync in interface DirectoryServicejava.lang.Exception - if synchronization failedpublic void shutdown()
throws java.lang.Exception
DirectoryServiceshutdown in interface DirectoryServicejava.lang.Exception - if failed to shut downpublic ReferralManager getReferralManager()
getReferralManager in interface DirectoryServicepublic void setReferralManager(ReferralManager referralManager)
setReferralManager in interface DirectoryServicereferralManager - The initialized referralManagerpublic org.apache.directory.api.ldap.model.schema.SchemaManager getSchemaManager()
getSchemaManager in interface DirectoryServicepublic void setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
setSchemaManager in interface DirectoryServiceschemaManager - The server schemaManagerpublic org.apache.directory.api.ldap.codec.api.LdapApiService getLdapCodecService()
getLdapCodecService in interface DirectoryServicepublic SchemaPartition getSchemaPartition()
getSchemaPartition in interface DirectoryServicepublic void setSchemaPartition(SchemaPartition schemaPartition)
setSchemaPartition in interface DirectoryServiceschemaPartition - the SchemaPartition instancepublic DefaultPartitionNexus getPartitionNexus()
getPartitionNexus in interface DirectoryServicepublic boolean isFirstStart()
public boolean isStarted()
DirectoryServiceisStarted in interface DirectoryServicepublic org.apache.directory.api.ldap.model.entry.Entry newEntry(org.apache.directory.api.ldap.model.name.Dn dn)
ServerEntryFactorynewEntry in interface ServerEntryFactoryprivate boolean createBootstrapEntries()
throws java.lang.Exception
java.lang.Exception - if entries cannot be createdprotected void showSecurityWarnings()
throws java.lang.Exception
java.lang.Exception - if there are failures parsing and accessing internal structuresprivate void createTestEntries()
throws java.lang.Exception
java.lang.Exception - if the creation of test entries fails.private void initializeSystemPartition()
throws java.lang.Exception
java.lang.Exceptionprivate void initialize()
throws java.lang.Exception
java.lang.Exception - if there are problems along the wayprivate org.apache.directory.api.ldap.model.entry.Entry readEntry(java.lang.String text)
text - The ldif format filepublic org.apache.directory.api.ldap.model.entry.Entry newEntry(java.lang.String ldif,
java.lang.String dn)
newEntry in interface DirectoryServiceldif - The String representing the attributes, as a LDIF filedn - The Dn for this new entrypublic EventService getEventService()
getEventService in interface DirectoryServicepublic void setEventService(EventService eventService)
setEventService in interface DirectoryServicepublic boolean isPasswordHidden()
isPasswordHidden in interface DirectoryServicepublic void setPasswordHidden(boolean passwordHidden)
setPasswordHidden in interface DirectoryServicepasswordHidden - true to enable hide the userPassword attribute, false otherwisepublic int getMaxPDUSize()
getMaxPDUSize in interface DirectoryServicepublic void setMaxPDUSize(int maxPDUSize)
setMaxPDUSize in interface DirectoryServicemaxPDUSize - A positive number of bytes for the PDU. A negative or
null value will be transformed to Integer.MAX_VALUEpublic Interceptor getInterceptor(java.lang.String interceptorName)
getInterceptor in interface DirectoryServiceinterceptorName - The interceptor's name for which we want the instancepublic void addFirst(Interceptor interceptor) throws org.apache.directory.api.ldap.model.exception.LdapException
addFirst in interface DirectoryServiceinterceptor - The added interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void addLast(Interceptor interceptor) throws org.apache.directory.api.ldap.model.exception.LdapException
addLast in interface DirectoryServiceinterceptor - The added interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void addAfter(java.lang.String interceptorName,
Interceptor interceptor)
addAfter in interface DirectoryServiceinterceptorName - The interceptor name to findinterceptor - The added interceptorpublic void remove(java.lang.String interceptorName)
remove in interface DirectoryServiceinterceptorName - The interceptor to removepublic org.apache.directory.api.ldap.model.csn.Csn getCSN()
getCSN in interface DirectoryServicepublic int getReplicaId()
getReplicaId in interface DirectoryServicepublic void setReplicaId(int replicaId)
setReplicaId in interface DirectoryServicereplicaId - the replicaId to setpublic long getSyncPeriodMillis()
getSyncPeriodMillis in interface DirectoryServicepublic void setSyncPeriodMillis(long syncPeriodMillis)
setSyncPeriodMillis in interface DirectoryServicesyncPeriodMillis - the syncPeriodMillis to setprivate void lockWorkDir()
public CacheService getCacheService()
getCacheService in interface DirectoryServicepublic org.apache.directory.api.ldap.util.tree.DnNode<AccessControlAdministrativePoint> getAccessControlAPCache()
getAccessControlAPCache in interface DirectoryServicepublic org.apache.directory.api.ldap.util.tree.DnNode<CollectiveAttributeAdministrativePoint> getCollectiveAttributeAPCache()
getCollectiveAttributeAPCache in interface DirectoryServicepublic org.apache.directory.api.ldap.util.tree.DnNode<SubschemaAdministrativePoint> getSubschemaAPCache()
getSubschemaAPCache in interface DirectoryServicepublic org.apache.directory.api.ldap.util.tree.DnNode<TriggerExecutionAdministrativePoint> getTriggerExecutionAPCache()
getTriggerExecutionAPCache in interface DirectoryServicepublic boolean isPwdPolicyEnabled()
isPwdPolicyEnabled in interface DirectoryServicepublic DnFactory getDnFactory()
getDnFactory in interface DirectoryServicepublic void setDnFactory(DnFactory dnFactory)
setDnFactory in interface DirectoryServicepublic SubentryCache getSubentryCache()
getSubentryCache in interface DirectoryServicepublic SubtreeEvaluator getEvaluator()
getEvaluator in interface DirectoryServicepublic void setCacheService(CacheService cacheService)
setCacheService in interface DirectoryServicecacheService - the cache servicepublic AttributeTypeProvider getAtProvider()
AttributeTypeProvider.getAtProvider in interface DirectoryServiceAttributeTypeProviderpublic ObjectClassProvider getOcProvider()
ObjectClassProvider.getOcProvider in interface DirectoryServiceObjectClassProvider