|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.DefaultDirectoryService
public class DefaultDirectoryService
Default implementation of DirectoryService
.
Field Summary | |
---|---|
static int |
MAX_SIZE_LIMIT_DEFAULT
|
static int |
MAX_TIME_LIMIT_DEFAULT
|
Fields inherited from interface org.apache.directory.server.core.DirectoryService |
---|
JNDI_KEY |
Constructor Summary | |
---|---|
DefaultDirectoryService()
Creates a new instance of the directory service. |
Method Summary | |
---|---|
void |
addPartition(Partition parition)
|
CoreSession |
getAdminSession()
|
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 earier revisions. |
EventService |
getEventService()
|
java.lang.String |
getInstanceId()
|
InterceptorChain |
getInterceptorChain()
|
java.util.List<Interceptor> |
getInterceptors()
Returns interceptors in the server. |
int |
getMaxSizeLimit()
|
int |
getMaxTimeLimit()
|
OperationManager |
getOperationManager()
Gets the operation manager. |
PartitionNexus |
getPartitionNexus()
|
java.util.Set<? extends Partition> |
getPartitions()
Gets the Partition s used by this DirectoryService. |
Registries |
getRegistries()
|
SchemaService |
getSchemaService()
|
CoreSession |
getSession()
Gets a logical session to perform operations on this DirectoryService as the anonymous user. |
CoreSession |
getSession(org.apache.directory.shared.ldap.name.LdapDN 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.shared.ldap.name.LdapDN principalDn,
byte[] credentials,
java.lang.String saslMechanism,
java.lang.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. |
Partition |
getSystemPartition()
|
java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> |
getTestEntries()
Returns test directory entries( LdifEntry ) to be loaded while
bootstrapping. |
java.io.File |
getWorkingDirectory()
Returns working directory (counterpart of var/lib) where partitions are stored by default. |
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 |
isFirstStart()
|
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. |
ServerEntry |
newEntry(org.apache.directory.shared.ldap.name.LdapDN dn)
Creates a new ServerEntry which has not yet been added to the directory. |
ServerEntry |
newEntry(java.lang.String ldif,
java.lang.String dn)
Create a new ServerEntry |
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 earier revisions. |
void |
setDenormalizeOpAttrsEnabled(boolean denormalizeOpAttrsEnabled)
|
void |
setEventService(EventService eventService)
|
void |
setExitVmOnShutdown(boolean exitVmOnShutdown)
|
void |
setInstanceId(java.lang.String instanceId)
|
void |
setInterceptors(java.util.List<Interceptor> interceptors)
Sets the interceptors in the server. |
void |
setMaxSizeLimit(int maxSizeLimit)
|
void |
setMaxTimeLimit(int maxTimeLimit)
|
void |
setPartitions(java.util.Set<? extends Partition> partitions)
Sets Partition s used by this DirectoryService. |
void |
setRegistries(Registries registries)
|
void |
setSchemaService(SchemaService schemaService)
|
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 |
setSystemPartition(Partition systemPartition)
|
void |
setTestEntries(java.util.List<? extends org.apache.directory.shared.ldap.ldif.LdifEntry> testEntries)
Sets test directory entries( Attributes ) to be loaded while
bootstrapping. |
void |
setWorkingDirectory(java.io.File workingDirectory)
Sets working directory (counterpart of var/lib) where partitions are stored by default. |
void |
shutdown()
Shuts down this service. |
void |
startup()
Starts up this service. |
void |
sync()
Calls Partition.sync() for all registered Partition s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_SIZE_LIMIT_DEFAULT
public static final int MAX_TIME_LIMIT_DEFAULT
Constructor Detail |
---|
public DefaultDirectoryService()
Method Detail |
---|
public void setInstanceId(java.lang.String instanceId)
setInstanceId
in interface DirectoryService
public java.lang.String getInstanceId()
getInstanceId
in interface DirectoryService
public java.util.Set<? extends Partition> getPartitions()
Partition
s used by this DirectoryService.
getPartitions
in interface DirectoryService
public void setPartitions(java.util.Set<? extends Partition> partitions)
Partition
s used by this DirectoryService.
setPartitions
in interface DirectoryService
partitions
- the partitions to usedpublic boolean isAccessControlEnabled()
isAccessControlEnabled
in interface DirectoryService
public void setAccessControlEnabled(boolean accessControlEnabled)
setAccessControlEnabled
in interface DirectoryService
accessControlEnabled
- true to enable access control checks, false otherwisepublic boolean isAllowAnonymousAccess()
isAllowAnonymousAccess
in interface DirectoryService
public void setAllowAnonymousAccess(boolean enableAnonymousAccess)
setAllowAnonymousAccess
in interface DirectoryService
enableAnonymousAccess
- true to enable anonymous access, false to disable itpublic java.util.List<Interceptor> getInterceptors()
getInterceptors
in interface DirectoryService
public void setInterceptors(java.util.List<Interceptor> interceptors)
setInterceptors
in interface DirectoryService
interceptors
- the interceptors to be used in the server.public java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> getTestEntries()
LdifEntry
) to be loaded while
bootstrapping.
getTestEntries
in interface DirectoryService
public void setTestEntries(java.util.List<? extends org.apache.directory.shared.ldap.ldif.LdifEntry> testEntries)
Attributes
) to be loaded while
bootstrapping.
setTestEntries
in interface DirectoryService
testEntries
- the test entries to load while bootstrappingpublic java.io.File getWorkingDirectory()
getWorkingDirectory
in interface DirectoryService
public void setWorkingDirectory(java.io.File workingDirectory)
setWorkingDirectory
in interface DirectoryService
workingDirectory
- the directory where the server's partitions are stored by default.public void setShutdownHookEnabled(boolean shutdownHookEnabled)
DirectoryService
setShutdownHookEnabled
in interface DirectoryService
shutdownHookEnabled
- true to enable the shutdown hook, false to disablepublic boolean isShutdownHookEnabled()
DirectoryService
isShutdownHookEnabled
in interface DirectoryService
public void setExitVmOnShutdown(boolean exitVmOnShutdown)
setExitVmOnShutdown
in interface DirectoryService
public boolean isExitVmOnShutdown()
isExitVmOnShutdown
in interface DirectoryService
public void setMaxSizeLimit(int maxSizeLimit)
setMaxSizeLimit
in interface DirectoryService
public int getMaxSizeLimit()
getMaxSizeLimit
in interface DirectoryService
public void setMaxTimeLimit(int maxTimeLimit)
setMaxTimeLimit
in interface DirectoryService
public int getMaxTimeLimit()
getMaxTimeLimit
in interface DirectoryService
public void setSystemPartition(Partition systemPartition)
setSystemPartition
in interface DirectoryService
public Partition getSystemPartition()
getSystemPartition
in interface DirectoryService
public boolean isDenormalizeOpAttrsEnabled()
isDenormalizeOpAttrsEnabled
in interface DirectoryService
public void setDenormalizeOpAttrsEnabled(boolean denormalizeOpAttrsEnabled)
setDenormalizeOpAttrsEnabled
in interface DirectoryService
public ChangeLog getChangeLog()
DirectoryService
getChangeLog
in interface DirectoryService
public void setChangeLog(ChangeLog changeLog)
DirectoryService
setChangeLog
in interface DirectoryService
changeLog
- the change log service to setpublic void addPartition(Partition parition) throws java.lang.Exception
addPartition
in interface DirectoryService
java.lang.Exception
public void removePartition(Partition partition) throws java.lang.Exception
removePartition
in interface DirectoryService
java.lang.Exception
public CoreSession getAdminSession()
getAdminSession
in interface DirectoryService
public CoreSession getSession()
DirectoryService
getSession
in interface DirectoryService
public CoreSession getSession(LdapPrincipal principal)
DirectoryService
getSession
in interface DirectoryService
public CoreSession getSession(org.apache.directory.shared.ldap.name.LdapDN principalDn, byte[] credentials) throws java.lang.Exception
DirectoryService
getSession
in interface DirectoryService
java.lang.Exception
public CoreSession getSession(org.apache.directory.shared.ldap.name.LdapDN principalDn, byte[] credentials, java.lang.String saslMechanism, java.lang.String saslAuthId) throws java.lang.Exception
DirectoryService
getSession
in interface DirectoryService
java.lang.Exception
public long revert() throws java.lang.Exception
DirectoryService
revert
in interface DirectoryService
java.lang.Exception
- if there are problems reverting back to the earlier state
java.lang.UnsupportedOperationException
- if this feature is not supported by the
change logpublic long revert(long revision) throws java.lang.Exception
DirectoryService
revert
in interface DirectoryService
revision
- the revision number to revert to
java.lang.Exception
- if there are problems reverting back to the earlier state
java.lang.IllegalArgumentException
- if the revision provided is greater than the current
revision or less than 0
java.lang.UnsupportedOperationException
- if this feature is not supported by the
change logpublic OperationManager getOperationManager()
DirectoryService
getOperationManager
in interface DirectoryService
public void startup() throws java.lang.Exception
DirectoryService
startup
in interface DirectoryService
javax.naming.NamingException
- if the LDAP server cannot be started
java.lang.Exception
- if failed to start uppublic void sync() throws java.lang.Exception
DirectoryService
Partition.sync()
for all registered Partition
s.
sync
in interface DirectoryService
java.lang.Exception
- if synchronization failedpublic void shutdown() throws java.lang.Exception
DirectoryService
shutdown
in interface DirectoryService
java.lang.Exception
- if failed to shut downpublic Registries getRegistries()
getRegistries
in interface DirectoryService
public void setRegistries(Registries registries)
setRegistries
in interface DirectoryService
public SchemaService getSchemaService()
getSchemaService
in interface DirectoryService
public void setSchemaService(SchemaService schemaService)
setSchemaService
in interface DirectoryService
public PartitionNexus getPartitionNexus()
getPartitionNexus
in interface DirectoryService
public InterceptorChain getInterceptorChain()
getInterceptorChain
in interface DirectoryService
public boolean isFirstStart()
public boolean isStarted()
DirectoryService
isStarted
in interface DirectoryService
public ServerEntry newEntry(org.apache.directory.shared.ldap.name.LdapDN dn)
ServerEntryFactory
newEntry
in interface ServerEntryFactory
public ServerEntry newEntry(java.lang.String ldif, java.lang.String dn)
newEntry
in interface DirectoryService
ldif
- The String representing the attributes, as a LDIF filedn
- The DN for this new entrypublic EventService getEventService()
getEventService
in interface DirectoryService
public void setEventService(EventService eventService)
setEventService
in interface DirectoryService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |