Package com.netscape.cmscore.dbs
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.
- Version:
- $Revision$, $Date$
- Author:
- thomask
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CMSEngineprotected 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 internal DB configuration store.Retrieves LDAP connection info (host, port, secure)Retrieves the registry.voidinit(DatabaseConfig dbConfig, LDAPConfig ldapConfig, PKISocketConfig socketConfig, PasswordStore passwordStore) Initializes the internal registry.voidreturnConn(netscape.ldap.LDAPConnection conn) voidsetCMSEngine(CMSEngine engine) voidsetEnableSerialMgmt(boolean v) voidsetEngineConfig(EngineConfig engineConfig) voidSets subsystem identifier.voidsetNextSerialConfig(BigInteger serial) 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
-
engine
-
engineConfig
-
excludedLdapAttrs
-
-
Constructor Details
-
DBSubsystem
public DBSubsystem()Constructs database subsystem.
-
-
Method Details
-
getCMSEngine
-
setCMSEngine
-
getEngineConfig
-
setEngineConfig
-
getId
Retrieves subsystem identifier. -
setId
Sets subsystem identifier.- Throws:
EBaseException
-
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, PKISocketConfig socketConfig, 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
-
getLDAPConfig
Retrieves internal DB configuration store. -
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:
EDBException
-
returnConn
public void returnConn(netscape.ldap.LDAPConnection conn)
-