Package org.opends.server.core
Class CoreConfigManager
- java.lang.Object
-
- org.opends.server.core.CoreConfigManager
-
- All Implemented Interfaces:
ConfigurationChangeListener<GlobalCfg>
public class CoreConfigManager extends Object implements ConfigurationChangeListener<GlobalCfg>
Manages the set of core configuration attributes of the Directory Server.These configuration attributes appear in the "cn=config" configuration entry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CoreConfigManager.EtimeService
Definition of a service providing etimes.static class
CoreConfigManager.EtimeServices
Implementation of services providing etimes.
-
Constructor Summary
Constructors Constructor Description CoreConfigManager(ServerContext serverContext)
Creates a new instance of this core config manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResult
applyConfigurationChange(GlobalCfg configuration)
Applies the configuration changes to this change listener.Set<String>
getAllowedTasks()
Retrieves a set containing the names of the allowed tasks that may be invoked in the server.int
getCursorEntryLimit()
Retrieves the default maximum number of entry IDs that the server may retrieve by cursoring through an index during a search.Dn
getDefaultPasswordPolicyDN()
Retrieves the DN of the configuration entry for the default password policy for the Directory Server.CoreConfigManager.EtimeService
getEtimeService()
Returns aCoreConfigManager.EtimeService
to compute processing time.com.forgerock.opendj.util.Host
getFirstAdvertisedHost()
Retrieves the first advertised host for this server.String
getGroupId()
Retrieves the group identifier of this server.long
getIdleTimeLimit()
Retrieves the idle time limit for the server.int
getLookthroughLimit()
Retrieves the default maximum number of entries that should checked for matches during a search.long
getMaxAllowedConnections()
Retrieves the maximum number of connections that will be allowed at any given time.int
getMaxInternalBufferSize()
Returns the threshold capacity beyond which internal cached buffers used for encoding and decoding entries and protocol messages will be trimmed after use.int
getMaxPSearches()
Retrieves the maximum number of concurrent persistent searches that will be allowed.SortedSet<Dn>
getProxiedAuthorizationIdentityMapperDNs()
Retrieves the DNs of the configuration entry for the identity mappers that should be used in conjunction with proxied authorization V2 controls.String
getServerId()
Retrieves the identifier of this server.AcceptRejectWarn
getSingleStructuralObjectClassPolicy()
Retrieves the policy that should be used regarding enforcement of a single structural objectclass per entry.int
getSizeLimit()
Retrieves the default maximum number of entries that should be returned for a search.Set<Dn>
getSubordinateBaseDNs()
Retrieves the restricted set of subordinate base DNs to use when searching the root suffix "".AcceptRejectWarn
getSyntaxEnforcementPolicy()
Retrieves the policy that should be used when an attribute value is found that is not valid according to the associated attribute syntax.int
getTimeLimit()
Retrieves the default maximum length of time in seconds that should be allowed when processing a search.GlobalCfgDefn.UnauthenticatedRequestsPolicy
getUnauthenticatedRequestsPolicy()
Indicates how unauthenticated requests should be handled by the server.WritabilityMode
getWritabilityMode()
Retrieves the writability mode for the Directory Server.boolean
isAddMissingRDNAttributes()
Indicates whether the Directory Server should automatically add missing RDN attributes to an entry whenever it is added.boolean
isBindWithDNRequiresPassword()
Indicates whether simple bind requests that contain a bind DN will also be required to have a password.boolean
isCheckSchema()
Indicates whether the Directory Server should perform schema checking.boolean
isConfigurationChangeAcceptable(GlobalCfg configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener.boolean
isDisabled(Privilege privilege)
Indicates whether the specified privilege is disabled.boolean
isNotifyAbandonedOperations()
Indicates whether the Directory Server should send a response to an operation that has been abandoned.boolean
isReturnBindErrorMessages()
Indicates whether responses to failed bind operations should include a message explaining the reason for the failure.boolean
isSaveConfigOnSuccessfulStartup()
Indicates whether configuration should be saved on successful startup of the server.SchemaValidationPolicy
serverPolicy()
Returns the default schema validation policy that should be used by the server.boolean
shouldTrustTransactionIds()
Indicates if transaction IDs received from requests should be trusted and logged.
-
-
-
Constructor Detail
-
CoreConfigManager
public CoreConfigManager(ServerContext serverContext)
Creates a new instance of this core config manager.- Parameters:
serverContext
- The server context.
-
-
Method Detail
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(GlobalCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<GlobalCfg>
- Parameters:
configuration
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed change is acceptable, orfalse
if it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(GlobalCfg configuration)
Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<GlobalCfg>
- Parameters:
configuration
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
getAllowedTasks
public Set<String> getAllowedTasks()
Retrieves a set containing the names of the allowed tasks that may be invoked in the server.- Returns:
- A set containing the names of the allowed tasks that may be invoked in the server.
-
getDefaultPasswordPolicyDN
public Dn getDefaultPasswordPolicyDN()
Retrieves the DN of the configuration entry for the default password policy for the Directory Server.- Returns:
- The DN of the configuration entry for the default password policy for the Directory Server.
-
getIdleTimeLimit
public long getIdleTimeLimit()
Retrieves the idle time limit for the server.- Returns:
- the idle time limit
-
getLookthroughLimit
public int getLookthroughLimit()
Retrieves the default maximum number of entries that should checked for matches during a search.- Returns:
- The default maximum number of entries that should checked for matches during a search.
-
getCursorEntryLimit
public int getCursorEntryLimit()
Retrieves the default maximum number of entry IDs that the server may retrieve by cursoring through an index during a search.- Returns:
- The default maximum number of entries that should checked for matches during a search.
-
getMaxAllowedConnections
public long getMaxAllowedConnections()
Retrieves the maximum number of connections that will be allowed at any given time.- Returns:
- the max number of connections allowed
-
getMaxInternalBufferSize
public int getMaxInternalBufferSize()
Returns the threshold capacity beyond which internal cached buffers used for encoding and decoding entries and protocol messages will be trimmed after use.- Returns:
- The threshold capacity beyond which internal cached buffers used for encoding and decoding entries and protocol messages will be trimmed after use.
-
getMaxPSearches
public int getMaxPSearches()
Retrieves the maximum number of concurrent persistent searches that will be allowed.- Returns:
- the max number of persistent searches
-
getProxiedAuthorizationIdentityMapperDNs
public SortedSet<Dn> getProxiedAuthorizationIdentityMapperDNs()
Retrieves the DNs of the configuration entry for the identity mappers that should be used in conjunction with proxied authorization V2 controls.- Returns:
- The DNs of the configuration entry for the identity mappers that should be used in conjunction with proxied authorization V2 controls, or an empty set if none is defined.
-
getServerId
public String getServerId()
Retrieves the identifier of this server.- Returns:
- the server id
-
getGroupId
public String getGroupId()
Retrieves the group identifier of this server.- Returns:
- the group id
-
getFirstAdvertisedHost
public com.forgerock.opendj.util.Host getFirstAdvertisedHost()
Retrieves the first advertised host for this server.- Returns:
- the first advertised host for this server.
-
getSingleStructuralObjectClassPolicy
public AcceptRejectWarn getSingleStructuralObjectClassPolicy()
Retrieves the policy that should be used regarding enforcement of a single structural objectclass per entry.- Returns:
- The policy that should be used regarding enforcement of a single structural objectclass per entry.
-
serverPolicy
public SchemaValidationPolicy serverPolicy()
Returns the default schema validation policy that should be used by the server.- Returns:
- the default schema validation policy that should be used by the server.
-
getSizeLimit
public int getSizeLimit()
Retrieves the default maximum number of entries that should be returned for a search.- Returns:
- The default maximum number of entries that should be returned for a search.
-
getSubordinateBaseDNs
public Set<Dn> getSubordinateBaseDNs()
Retrieves the restricted set of subordinate base DNs to use when searching the root suffix "".- Returns:
- the subordinate base DNs, which is empty if there is no restriction
-
getSyntaxEnforcementPolicy
public AcceptRejectWarn getSyntaxEnforcementPolicy()
Retrieves the policy that should be used when an attribute value is found that is not valid according to the associated attribute syntax.- Returns:
- The policy that should be used when an attribute value is found that is not valid according to the associated attribute syntax.
-
getTimeLimit
public int getTimeLimit()
Retrieves the default maximum length of time in seconds that should be allowed when processing a search.- Returns:
- The default maximum length of time in seconds that should be allowed when processing a search.
-
getEtimeService
public CoreConfigManager.EtimeService getEtimeService()
Returns aCoreConfigManager.EtimeService
to compute processing time.- Returns:
- a
CoreConfigManager.EtimeService
to compute processing time.
-
getWritabilityMode
public WritabilityMode getWritabilityMode()
Retrieves the writability mode for the Directory Server. This will only be applicable for user suffixes.- Returns:
- The writability mode for the Directory Server.
-
isAddMissingRDNAttributes
public boolean isAddMissingRDNAttributes()
Indicates whether the Directory Server should automatically add missing RDN attributes to an entry whenever it is added.- Returns:
true
if the Directory Server should automatically add missing RDN attributes to an entry, orfalse
if it should return an error to the client.
-
isBindWithDNRequiresPassword
public boolean isBindWithDNRequiresPassword()
Indicates whether simple bind requests that contain a bind DN will also be required to have a password.- Returns:
true
if simple bind requests containing a bind DN will be required to have a password, orfalse
if not (and therefore will be treated as anonymous binds).
-
isCheckSchema
public boolean isCheckSchema()
Indicates whether the Directory Server should perform schema checking.- Returns:
true
if the Directory Server should perform schema checking, orfalse
if not.
-
isDisabled
public boolean isDisabled(Privilege privilege)
Indicates whether the specified privilege is disabled.- Parameters:
privilege
- The privilege for which to make the determination.- Returns:
true
if the specified privilege is disabled, orfalse
if not.
-
isNotifyAbandonedOperations
public boolean isNotifyAbandonedOperations()
Indicates whether the Directory Server should send a response to an operation that has been abandoned. Sending such a response is technically a violation of the LDAP protocol specification, but not doing so in that case can cause problems with clients that are expecting a response and may hang until they get one.- Returns:
true
if the Directory Server should send a response to an operation that has been abandoned, orfalse
if not.
-
getUnauthenticatedRequestsPolicy
public GlobalCfgDefn.UnauthenticatedRequestsPolicy getUnauthenticatedRequestsPolicy()
Indicates how unauthenticated requests should be handled by the server.- Returns:
- The policy specifying how unauthenticated requests should be handled by the server.
-
isReturnBindErrorMessages
public boolean isReturnBindErrorMessages()
Indicates whether responses to failed bind operations should include a message explaining the reason for the failure.- Returns:
true
if bind responses should include error messages, orfalse
if not.
-
isSaveConfigOnSuccessfulStartup
public boolean isSaveConfigOnSuccessfulStartup()
Indicates whether configuration should be saved on successful startup of the server.- Returns:
true
if configuration should be saved,false
otherwise.
-
shouldTrustTransactionIds
public boolean shouldTrustTransactionIds()
Indicates if transaction IDs received from requests should be trusted and logged. If set totrue
, the server will add a transaction ID control to all the requests which do not already include one, and the server will add a sub-transaction ID control to all the forwarded requests. If set tofalse
, the server will discard all incoming transaction IDs and create new ones.- Returns:
true
if transactionIds should be trusted,false
otherwise
-
-