Package com.netscape.cmscore.dbs
Interface IDBSubsystem
-
- All Superinterfaces:
ISubsystem
- All Known Implementing Classes:
DBSubsystem
public interface IDBSubsystem extends ISubsystem
An interface represents certificate server backend database.This interface separate the database subsystem functionalities from internal implementation.
- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static int
CERTS
static int
NUM_REPOS
static int
REPLICA_ID
static int
REQUESTS
static java.lang.String
SUB_ID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IDBSSession
createSession()
Creates a database session.boolean
enableSerialNumberRecovery()
Avoids losing serial number.java.lang.String
getBaseDN()
Retrieves the base DN.IConfigStore
getConfigStore()
Gets internal DB configuration storeIConfigStore
getDBConfigStore()
Gets DB subsystem configuration storeboolean
getEnableSerialMgmt()
Determines if serial number management has been enabledjava.lang.String
getEntryAttribute(java.lang.String dn, java.lang.String attrName, java.lang.String defaultValue, java.lang.String errorValue)
Gets attribute value for specified entryjava.lang.String
getIncrementConfig(int repo)
Gets range increment limit for next range in config filejava.lang.String
getLowWaterMarkConfig(int repo)
Gets low water mark limit in config filejava.lang.String
getMaxSerialConfig(int repo)
Gets the maximum serial number limit in config filejava.lang.String
getMinSerialConfig(int repo)
Gets minimum serial number limit in config filejava.lang.String
getNextMaxSerialConfig(int repo)
Gets the maximum serial number limit for next range in config filejava.lang.String
getNextMinSerialConfig(int repo)
Gets minimum serial number limit for next range in config filejava.lang.String
getNextRange(int repo)
Gets number corresponding to start of next range from databasejava.math.BigInteger
getNextSerialConfig()
Gets the next serial number in config fileIDBRegistry
getRegistry()
Retrieves the registry.boolean
hasRangeConflict(int repo)
Determines if a range conflict has been observed in databasevoid
returnConn(netscape.ldap.LDAPConnection conn)
Returns LDAP connection to connection pool.void
setEnableSerialMgmt(boolean value)
Sets whether serial number management is enabled for certs and requests.void
setMaxSerialConfig(int repo, java.lang.String serial)
Records maximum serial number limit in config filevoid
setMinSerialConfig(int repo, java.lang.String serial)
Records minimum serial number limit in config filevoid
setNextMaxSerialConfig(int repo, java.lang.String serial)
Records maximum serial number limit for the next range in config filevoid
setNextMinSerialConfig(int repo, java.lang.String serial)
Records minimum serial number limit for the next range in config filevoid
setNextSerialConfig(java.math.BigInteger serial)
Records next serial number in config file
-
-
-
Field Detail
-
SUB_ID
static final java.lang.String SUB_ID
- See Also:
- Constant Field Values
-
CERTS
static final int CERTS
- See Also:
- Constant Field Values
-
REQUESTS
static final int REQUESTS
- See Also:
- Constant Field Values
-
REPLICA_ID
static final int REPLICA_ID
- See Also:
- Constant Field Values
-
NUM_REPOS
static final int NUM_REPOS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBaseDN
java.lang.String getBaseDN()
Retrieves the base DN.- Returns:
- base DN of the subsystem
-
getRegistry
IDBRegistry getRegistry()
Retrieves the registry.- Returns:
- registry
-
createSession
IDBSSession createSession() throws EDBException
Creates a database session.- Returns:
- database session
- Throws:
EDBException
- failed to create session
-
enableSerialNumberRecovery
boolean enableSerialNumberRecovery()
Avoids losing serial number.- Returns:
- true if serial number recovery option is enabled
-
setNextSerialConfig
void setNextSerialConfig(java.math.BigInteger serial) throws EBaseException
Records next serial number in config file- Parameters:
serial
- next serial number- Throws:
EBaseException
- failed to set
-
getNextSerialConfig
java.math.BigInteger getNextSerialConfig()
Gets the next serial number in config file- Returns:
- next serial number
-
setMaxSerialConfig
void setMaxSerialConfig(int repo, java.lang.String serial) throws EBaseException
Records maximum serial number limit in config file- Parameters:
serial
- max serial numberrepo
- repo identifier- Throws:
EBaseException
- failed to set
-
setMinSerialConfig
void setMinSerialConfig(int repo, java.lang.String serial) throws EBaseException
Records minimum serial number limit in config file- Parameters:
serial
- min serial numberrepo
- repo identifier- Throws:
EBaseException
- failed to set
-
setNextMaxSerialConfig
void setNextMaxSerialConfig(int repo, java.lang.String serial) throws EBaseException
Records maximum serial number limit for the next range in config file- Parameters:
serial
- max serial numberrepo
- repo identifier- Throws:
EBaseException
- failed to set
-
setNextMinSerialConfig
void setNextMinSerialConfig(int repo, java.lang.String serial) throws EBaseException
Records minimum serial number limit for the next range in config file- Parameters:
serial
- min serial numberrepo
- repo identifier- Throws:
EBaseException
- failed to set
-
getMinSerialConfig
java.lang.String getMinSerialConfig(int repo)
Gets minimum serial number limit in config file- Parameters:
repo
- repo identifier- Returns:
- min serial number
-
getMaxSerialConfig
java.lang.String getMaxSerialConfig(int repo)
Gets the maximum serial number limit in config file- Parameters:
repo
- repo identifier- Returns:
- max serial number
-
getNextMaxSerialConfig
java.lang.String getNextMaxSerialConfig(int repo)
Gets the maximum serial number limit for next range in config file- Parameters:
repo
- repo identifier- Returns:
- max serial number
-
getNextMinSerialConfig
java.lang.String getNextMinSerialConfig(int repo)
Gets minimum serial number limit for next range in config file- Parameters:
repo
- repo identifier- Returns:
- min serial number
-
getLowWaterMarkConfig
java.lang.String getLowWaterMarkConfig(int repo)
Gets low water mark limit in config file- Parameters:
repo
- repo identifier- Returns:
- low water mark
-
getIncrementConfig
java.lang.String getIncrementConfig(int repo)
Gets range increment limit for next range in config file- Parameters:
repo
- repo identifier- Returns:
- range increment
-
getNextRange
java.lang.String getNextRange(int repo)
Gets number corresponding to start of next range from database- Parameters:
repo
- repo identifier- Returns:
- start of next range
-
hasRangeConflict
boolean hasRangeConflict(int repo)
Determines if a range conflict has been observed in database- Parameters:
repo
- repo identifier- Returns:
- true if range conflict, false otherwise
-
getEnableSerialMgmt
boolean getEnableSerialMgmt()
Determines if serial number management has been enabled- Returns:
- true if enabled, false otherwise
-
setEnableSerialMgmt
void setEnableSerialMgmt(boolean value) throws EBaseException
Sets whether serial number management is enabled for certs and requests.- Parameters:
value
- true/false- Throws:
EBaseException
- failed to set
-
getConfigStore
IConfigStore getConfigStore()
Gets internal DB configuration store- Specified by:
getConfigStore
in interfaceISubsystem
- Returns:
- internal DB configuration store
-
getDBConfigStore
IConfigStore getDBConfigStore()
Gets DB subsystem configuration store- Returns:
- DB subsystem configuration store
-
getEntryAttribute
java.lang.String getEntryAttribute(java.lang.String dn, java.lang.String attrName, java.lang.String defaultValue, java.lang.String errorValue)
Gets attribute value for specified entry- Parameters:
dn
- entry's distinguished nameattrName
- attribute's namedefaultValue
- attribute's default valueerrorValue
- attribute's error value- Returns:
- attribute value
-
returnConn
void returnConn(netscape.ldap.LDAPConnection conn)
Returns LDAP connection to connection pool.- Parameters:
conn
- connection to be returned
-
-