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 interfaceCoreConfigManager.EtimeServiceDefinition of a service providing etimes.static classCoreConfigManager.EtimeServicesImplementation 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 ConfigChangeResultapplyConfigurationChange(GlobalCfg configuration)Applies the configuration changes to this change listener.voidcheckSubordinateDns(BackendConfigManager backendConfigManager)Checks for misconfiguration of subordinate base DNs: it emits a warning for each subordinate base DNs which do not have a corresponding backend.Set<String>getAllowedTasks()Retrieves a set containing the names of the allowed tasks that may be invoked in the server.DngetDefaultPasswordPolicyDN()Retrieves the DN of the configuration entry for the default password policy for the Directory Server.CoreConfigManager.EtimeServicegetEtimeService()Returns aCoreConfigManager.EtimeServiceto compute processing time.com.forgerock.opendj.util.HostgetFirstAdvertisedHost()Retrieves the first advertised host for this server.StringgetGroupId()Retrieves the group identifier of this server.longgetIdleTimeLimit()Retrieves the idle time limit for the server.longgetMaxAllowedConnections()Retrieves the maximum number of connections that will be allowed at any given time.intgetMaxCandidateSetSize()Retrieves the default maximum number of entry IDs that the server may retrieve by cursoring through an index during a search.intgetMaxInternalBufferSize()Returns the threshold capacity beyond which internal cached buffers used for encoding and decoding entries and protocol messages will be trimmed after use.intgetMaxPSearches()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.StringgetServerId()Retrieves the identifier of this server.AcceptRejectWarngetSingleStructuralObjectClassPolicy()Retrieves the policy that should be used regarding enforcement of a single structural objectclass per entry.intgetSizeLimit()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 "".AcceptRejectWarngetSyntaxEnforcementPolicy()Retrieves the policy that should be used when an attribute value is found that is not valid according to the associated attribute syntax.intgetTimeLimit()Retrieves the default maximum length of time in seconds that should be allowed when processing a search.GlobalCfgDefn.UnauthenticatedRequestsPolicygetUnauthenticatedRequestsPolicy()Indicates how unauthenticated requests should be handled by the server.WritabilityModegetWritabilityMode()Retrieves the writability mode for the Directory Server.booleanisAddMissingRDNAttributes()Indicates whether the Directory Server should automatically add missing RDN attributes to an entry whenever it is added.booleanisBindWithDNRequiresPassword()Indicates whether simple bind requests that contain a bind DN will also be required to have a password.booleanisCheckSchema()Indicates whether the Directory Server should perform schema checking.booleanisConfigurationChangeAcceptable(GlobalCfg configuration, List<LocalizableMessage> unacceptableReasons)Indicates whether the proposed change to the configuration is acceptable to this change listener.booleanisDisabled(Privilege privilege)Indicates whether the specified privilege is disabled.booleanisNotifyAbandonedOperations()Indicates whether the Directory Server should send a response to an operation that has been abandoned.booleanisReturnBindErrorMessages()Indicates whether responses to failed bind operations should include a message explaining the reason for the failure.booleanisSaveConfigOnSuccessfulStartup()Indicates whether configuration should be saved on successful startup of the server.SchemaValidationPolicyserverPolicy()Returns the default schema validation policy that should be used by the server.booleanshouldTrustTransactionIds()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:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein 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
trueif the proposed change is acceptable, orfalseif it is not.
-
checkSubordinateDns
public void checkSubordinateDns(BackendConfigManager backendConfigManager)
Checks for misconfiguration of subordinate base DNs: it emits a warning for each subordinate base DNs which do not have a corresponding backend.- Parameters:
backendConfigManager- the backend config manager
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(GlobalCfg configuration)
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein 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
-
getMaxCandidateSetSize
public int getMaxCandidateSetSize()
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.EtimeServiceto compute processing time.- Returns:
- a
CoreConfigManager.EtimeServiceto 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:
trueif the Directory Server should automatically add missing RDN attributes to an entry, orfalseif 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:
trueif simple bind requests containing a bind DN will be required to have a password, orfalseif not (and therefore will be treated as anonymous binds).
-
isCheckSchema
public boolean isCheckSchema()
Indicates whether the Directory Server should perform schema checking.- Returns:
trueif the Directory Server should perform schema checking, orfalseif 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:
trueif the specified privilege is disabled, orfalseif 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:
trueif the Directory Server should send a response to an operation that has been abandoned, orfalseif 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:
trueif bind responses should include error messages, orfalseif not.
-
isSaveConfigOnSuccessfulStartup
public boolean isSaveConfigOnSuccessfulStartup()
Indicates whether configuration should be saved on successful startup of the server.- Returns:
trueif configuration should be saved,falseotherwise.
-
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:
trueif transactionIds should be trusted,falseotherwise
-
-