public interface DirectoryService extends ServerEntryFactory
Modifier and Type | Method and Description |
---|---|
void |
addAfter(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.
|
void |
addLast(Interceptor interceptor)
Add an interceptor in the last position in the interceptor list.
|
void |
addPartition(Partition partition) |
org.apache.directory.api.ldap.util.tree.DnNode<AccessControlAdministrativePoint> |
getAccessControlAPCache() |
CoreSession |
getAdminSession() |
AttributeTypeProvider |
getAtProvider()
Gets the
AttributeTypeProvider . |
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() |
String |
getInstanceId() |
InstanceLayout |
getInstanceLayout()
Returns the instance layout which contains the path for various directories
|
Interceptor |
getInterceptor(String interceptorName)
Get an Interceptor instance from its name
|
List<Interceptor> |
getInterceptors()
Returns interceptors in the server.
|
List<String> |
getInterceptors(OperationEnum operation)
Returns interceptors in the server.
|
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.
|
PartitionNexus |
getPartitionNexus() |
Set<? extends Partition> |
getPartitions()
Gets the
Partition s used by this DirectoryService. |
ReferralManager |
getReferralManager() |
int |
getReplicaId() |
org.apache.directory.api.ldap.model.schema.SchemaManager |
getSchemaManager() |
SchemaPartition |
getSchemaPartition() |
CoreSession |
getSession()
Gets a logical session to perform operations on this DirectoryService
as the anonymous user.
|
CoreSession |
getSession(org.apache.directory.api.ldap.model.name.Dn principalDn,
byte[] credentials)
Gets a logical session to perform operations on this DirectoryService
as a specific user with a separate authorization principal.
|
CoreSession |
getSession(org.apache.directory.api.ldap.model.name.Dn principalDn,
byte[] credentials,
String saslMechanism,
String saslAuthId)
Gets a logical session to perform operations on this DirectoryService
as a specific user with a separate authorization principal.
|
CoreSession |
getSession(LdapPrincipal principal)
Gets a logical session to perform operations on this DirectoryService
as a specific user.
|
SubentryCache |
getSubentryCache() |
org.apache.directory.api.ldap.util.tree.DnNode<SubschemaAdministrativePoint> |
getSubschemaAPCache() |
long |
getSyncPeriodMillis() |
Partition |
getSystemPartition() |
List<org.apache.directory.api.ldap.model.ldif.LdifEntry> |
getTestEntries()
Returns test directory entries(
LdifEntry ) to be loaded while
bootstrapping. |
org.apache.directory.api.util.TimeProvider |
getTimeProvider()
Gets the time provider.
|
org.apache.directory.api.ldap.util.tree.DnNode<TriggerExecutionAdministrativePoint> |
getTriggerExecutionAPCache() |
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() |
boolean |
isExitVmOnShutdown() |
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.
|
org.apache.directory.api.ldap.model.entry.Entry |
newEntry(String ldif,
String dn)
Create a new Entry.
|
void |
remove(String interceptorName)
Remove an interceptor from the list of interceptors
|
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 |
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.
|
void |
setDenormalizeOpAttrsEnabled(boolean denormalizeOpAttrsEnabled) |
void |
setDnFactory(DnFactory dnFactory)
Sets the Dn factory.
|
void |
setEventService(EventService eventService) |
void |
setExitVmOnShutdown(boolean exitVmOnShutdown) |
void |
setInstanceId(String instanceId)
Set the instance Identifier
|
void |
setInstanceLayout(InstanceLayout instanceLayout)
Sets the InstanceLayout used by the DirectoryService to store the files
|
void |
setInterceptors(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(Set<? extends Partition> partitions)
Sets
Partition s 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)
Associates a SchemaManager to the service
|
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(List<? extends org.apache.directory.api.ldap.model.ldif.LdifEntry> testEntries)
Sets test directory entries to be loaded while bootstrapping.
|
void |
setTimeProvider(org.apache.directory.api.util.TimeProvider timeProvider)
Sets the time provider.
|
void |
shutdown()
Shuts down this service.
|
void |
startup()
Starts up this service.
|
void |
sync()
Calls
Partition.sync() for all registered Partition s. |
newEntry
long revert(long revision) throws org.apache.directory.api.ldap.model.exception.LdapException
revision
- the revision number to revert toorg.apache.directory.api.ldap.model.exception.LdapException
- if there are problems reverting back to the earlier statelong revert() throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
- if there are problems reverting back to the earlier statePartitionNexus getPartitionNexus()
void addPartition(Partition partition) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
void removePartition(Partition partition) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.schema.SchemaManager getSchemaManager()
org.apache.directory.api.ldap.codec.api.LdapApiService getLdapCodecService()
ReferralManager getReferralManager()
void setReferralManager(ReferralManager referralManager)
referralManager
- The initialized referralManagerSchemaPartition getSchemaPartition()
void setSchemaPartition(SchemaPartition schemaPartition)
schemaPartition
- the SchemaPartition instanceEventService getEventService()
void setEventService(EventService eventService)
eventService
- The EventService
instancevoid startup() throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
- if failed to start upvoid shutdown() throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
- if failed to shut downvoid sync() throws org.apache.directory.api.ldap.model.exception.LdapException
Partition.sync()
for all registered Partition
s.org.apache.directory.api.ldap.model.exception.LdapException
- if synchronization failedboolean isStarted()
CoreSession getAdminSession()
SubentryCache getSubentryCache()
SubtreeEvaluator getEvaluator()
CoreSession getSession() throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
- If we weren't able to get the sessionCoreSession getSession(LdapPrincipal principal) throws org.apache.directory.api.ldap.model.exception.LdapException
principal
- The Principalorg.apache.directory.api.ldap.model.exception.LdapException
- If we weren't able to get the sessionCoreSession getSession(org.apache.directory.api.ldap.model.name.Dn principalDn, byte[] credentials) throws org.apache.directory.api.ldap.model.exception.LdapException
principalDn
- The principal Dncredentials
- The principal credentialsorg.apache.directory.api.ldap.model.exception.LdapException
- If we weren't able to get the sessionCoreSession getSession(org.apache.directory.api.ldap.model.name.Dn principalDn, byte[] credentials, String saslMechanism, String saslAuthId) throws org.apache.directory.api.ldap.model.exception.LdapException
principalDn
- The principal Dncredentials
- The principal credentialssaslMechanism
- The SASL mechanismssaslAuthId
- The SASL authorization IDorg.apache.directory.api.ldap.model.exception.LdapException
- If we weren't able to get the sessionvoid setInstanceId(String instanceId)
instanceId
- The instance identifierString getInstanceId()
Set<? extends Partition> getPartitions()
Partition
s used by this DirectoryService.void setPartitions(Set<? extends Partition> partitions)
Partition
s used by this DirectoryService.partitions
- the partitions to usedboolean isAccessControlEnabled()
void setAccessControlEnabled(boolean accessControlEnabled)
accessControlEnabled
- true to enable access control checks, false otherwiseboolean isAllowAnonymousAccess()
boolean isPasswordHidden()
void setPasswordHidden(boolean passwordHidden)
passwordHidden
- true to enable hide the userPassword attribute, false otherwisevoid setAllowAnonymousAccess(boolean enableAnonymousAccess)
enableAnonymousAccess
- true to enable anonymous access, false to disable itList<Interceptor> getInterceptors()
List<String> getInterceptors(OperationEnum operation)
operation
- The operation that the interceptors must implementvoid setInterceptors(List<Interceptor> interceptors)
interceptors
- the interceptors to be used in the server.void addFirst(Interceptor interceptor) throws org.apache.directory.api.ldap.model.exception.LdapException
interceptor
- The added interceptororg.apache.directory.api.ldap.model.exception.LdapException
- If the interceptor can't be addedvoid addLast(Interceptor interceptor) throws org.apache.directory.api.ldap.model.exception.LdapException
interceptor
- The added interceptororg.apache.directory.api.ldap.model.exception.LdapException
- If the interceptor can't be addedvoid addAfter(String interceptorName, Interceptor interceptor)
interceptorName
- The interceptor name to findinterceptor
- The added interceptorvoid remove(String interceptorName)
interceptorName
- The interceptor to removevoid setJournal(Journal journal)
journal
- the journal to be used in the server.List<org.apache.directory.api.ldap.model.ldif.LdifEntry> getTestEntries()
LdifEntry
) to be loaded while
bootstrapping.void setTestEntries(List<? extends org.apache.directory.api.ldap.model.ldif.LdifEntry> testEntries)
testEntries
- the test entries to load while bootstrappingInstanceLayout getInstanceLayout()
void setInstanceLayout(InstanceLayout instanceLayout) throws IOException
instanceLayout
- The InstanceLayout to setIOException
- If the layout could not be createdvoid setShutdownHookEnabled(boolean shutdownHookEnabled)
shutdownHookEnabled
- true to enable the shutdown hook, false to disableboolean isShutdownHookEnabled()
void setExitVmOnShutdown(boolean exitVmOnShutdown)
boolean isExitVmOnShutdown()
void setSystemPartition(Partition systemPartition)
Partition getSystemPartition()
boolean isDenormalizeOpAttrsEnabled()
void setDenormalizeOpAttrsEnabled(boolean denormalizeOpAttrsEnabled)
ChangeLog getChangeLog()
Journal getJournal()
void setChangeLog(ChangeLog changeLog)
changeLog
- the change log service to setorg.apache.directory.api.ldap.model.entry.Entry newEntry(String ldif, String dn)
ldif
- the String representing the attributes, in LDIF formatdn
- the Dn for this new entryOperationManager getOperationManager()
int getMaxPDUSize()
void setMaxPDUSize(int maxPDUSize)
maxPDUSize
- A positive number of bytes for the PDU. A negative or
null value will be transformed to Integer.MAX_VALUE
Interceptor getInterceptor(String interceptorName)
interceptorName
- The interceptor's name for which we want the instanceorg.apache.directory.api.ldap.model.csn.Csn getCSN()
int getReplicaId()
void setReplicaId(int replicaId)
replicaId
- the replicaId to setvoid setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
schemaManager
- The SchemaManager to associatevoid setSyncPeriodMillis(long syncPeriodMillis)
syncPeriodMillis
- the syncPeriodMillis to setlong getSyncPeriodMillis()
org.apache.directory.api.ldap.util.tree.DnNode<AccessControlAdministrativePoint> getAccessControlAPCache()
org.apache.directory.api.ldap.util.tree.DnNode<CollectiveAttributeAdministrativePoint> getCollectiveAttributeAPCache()
org.apache.directory.api.ldap.util.tree.DnNode<SubschemaAdministrativePoint> getSubschemaAPCache()
org.apache.directory.api.ldap.util.tree.DnNode<TriggerExecutionAdministrativePoint> getTriggerExecutionAPCache()
boolean isPwdPolicyEnabled()
DnFactory getDnFactory()
void setDnFactory(DnFactory dnFactory)
dnFactory
- The Dn factory to useAttributeTypeProvider getAtProvider()
AttributeTypeProvider
.AttributeTypeProvider
ObjectClassProvider getOcProvider()
ObjectClassProvider
.ObjectClassProvider
org.apache.directory.api.util.TimeProvider getTimeProvider()
void setTimeProvider(org.apache.directory.api.util.TimeProvider timeProvider)
timeProvider
- the time providerCopyright © 2003–2023 The Apache Software Foundation. All rights reserved.