Class DBSubsystem
java.lang.Object
com.netscape.cmscore.dbs.DBSubsystem
A class represents the database subsystem that manages
the backend data storage.
This subsystem maintains multiple sessions that allows
operations to be performed, and provide a registry
where all the schema information is stored.
- Author:
- thomask
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EngineConfigstatic final Stringstatic final org.slf4j.Loggerstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure LDAP attributes that need to be excluded from enrollment records.Creates a database session.booleanRetrieves base DN of backend database.Retrieves DB subsystem configuration store.booleangetEntryAttribute(String dn, String attrName, String defaultValue, String errorValue) getId()Retrieves subsystem identifier.Retrieves LDAP connection info (host, port, secure)Retrieves the registry.netscape.ldap.LDAPSocketFactoryvoidinit(DatabaseConfig dbConfig, LDAPConfig ldapConfig, PasswordStore passwordStore) Initializes the internal registry.voidreturnConn(netscape.ldap.LDAPConnection conn) voidsetEnableSerialMgmt(boolean v) voidsetEngineConfig(EngineConfig engineConfig) voidSets subsystem identifier.voidsetNextSerialConfig(BigInteger serial) voidsetSocketFactory(netscape.ldap.LDAPSocketFactory socketFactory) voidshutdown()Shutdowns this subsystem gracefully.
-
Field Details
-
logger
public static final org.slf4j.Logger logger -
ID
- See Also:
-
PROP_NEXT_RANGE
- See Also:
-
DEFAULT_EXCLUDED_LDAP_ATTRS
-
engineConfig
-
excludedLdapAttrs
-
-
Constructor Details
-
DBSubsystem
public DBSubsystem()Constructs database subsystem.
-
-
Method Details
-
getEngineConfig
-
setEngineConfig
-
getId
Retrieves subsystem identifier. -
setId
Sets subsystem identifier.- Throws:
EBaseException
-
getSocketFactory
public netscape.ldap.LDAPSocketFactory getSocketFactory() -
setSocketFactory
public void setSocketFactory(netscape.ldap.LDAPSocketFactory socketFactory) -
enableSerialNumberRecovery
public boolean enableSerialNumberRecovery() -
getEnableSerialMgmt
public boolean getEnableSerialMgmt() -
setEnableSerialMgmt
- Throws:
EBaseException
-
setNextSerialConfig
- Throws:
EBaseException
-
getExcludedLdapAttr
-
configureExcludedLdapAttrs
Configure LDAP attributes that need to be excluded from enrollment records. Default config: excludedLdapAttrs.enabled=false; (excludedLdapAttrs.attrs unspecified to take default)- Throws:
EBaseException
-
init
public void init(DatabaseConfig dbConfig, LDAPConfig ldapConfig, PasswordStore passwordStore) throws EBaseException Initializes the internal registry. Connects to the data source, and create a pool of connection of which applications can use. Optionally, check the integrity of the database.- Throws:
EBaseException
-
getEntryAttribute
-
getDBConfigStore
Retrieves DB subsystem configuration store. -
getBaseDN
Retrieves base DN of backend database. -
getLdapConnInfo
Retrieves LDAP connection info (host, port, secure) -
getLdapAuthInfo
-
shutdown
public void shutdown()Shutdowns this subsystem gracefully. -
getRegistry
Retrieves the registry. -
createSession
Creates a database session.- Throws:
DBException
-
returnConn
public void returnConn(netscape.ldap.LDAPConnection conn)
-