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.

  • Constructor Details

    • CoreConfigManager

      public CoreConfigManager(ServerContext serverContext)
      Creates a new instance of this core config manager.
      Parameters:
      serverContext - The server context.
  • Method Details

    • 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 interface ConfigurationChangeListener<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, or false if 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: ConfigurationChangeListener
      Applies the configuration changes to this change listener.
      Specified by:
      applyConfigurationChange in interface ConfigurationChangeListener<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.
    • 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 object class per entry.
      Returns:
      The policy that should be used regarding enforcement of a single structural object class 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.
    • 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.
    • getResourceLimits

      public ResourceLimits getResourceLimits()
      Returns the server-configured resource limits.
      Returns:
      the server-configured resource limits
    • getEtimeService

      public CoreConfigManager.EtimeService getEtimeService()
      Returns a CoreConfigManager.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, or false 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, or false 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, or false 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, or false 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, or false 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, or false 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 to true, 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 to false, the server will discard all incoming transaction IDs and create new ones.
      Returns:
      true if transactionIds should be trusted, false otherwise