com.netscape.certsrv.dbs
Interface IDBSubsystem

All Superinterfaces:
ISubsystem

public interface IDBSubsystem
extends ISubsystem

An interface represents certificate server backend database.

This interface separate the database subsystem functionalities from internal implementation.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
static int CERTS
           
static int NUM_REPOS
           
static int REPLICA_ID
           
static int REQUESTS
           
static java.lang.String SUB_ID
           
 
Method Summary
 IDBSSession createSession()
          Creates a database session.
 boolean enableSerialNumberRecovery()
          Avoids losing serial number.
 java.lang.String getBaseDN()
          Retrieves the base DN.
 boolean getEnableSerialMgmt()
          Determines if serial number management has been enabled
 java.lang.String getIncrementConfig(int repo)
          Gets range increment limit for next range in config file
 java.lang.String getLowWaterMarkConfig(int repo)
          Gets low water mark limit in config file
 java.lang.String getMaxSerialConfig(int repo)
          Gets the maximum serial number limit in config file
 java.lang.String getMinSerialConfig(int repo)
          Gets minimum serial number limit in config file
 java.lang.String getNextMaxSerialConfig(int repo)
          Gets the maximum serial number limit for next range in config file
 java.lang.String getNextMinSerialConfig(int repo)
          Gets minimum serial number limit for next range in config file
 java.lang.String getNextRange(int repo)
          Gets number corresponding to start of next range from database
 java.math.BigInteger getNextSerialConfig()
          Gets the next serial number in config file
 IDBRegistry getRegistry()
          Retrieves the registry.
 boolean hasRangeConflict(int repo)
          Determines if a range conflict has been observed in database
 void 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 file
 void setMinSerialConfig(int repo, java.lang.String serial)
          Records minimum serial number limit in config file
 void setNextMaxSerialConfig(int repo, java.lang.String serial)
          Records maximum serial number limit for the next range in config file
 void setNextMinSerialConfig(int repo, java.lang.String serial)
          Records minimum serial number limit for the next range in config file
 void setNextSerialConfig(java.math.BigInteger serial)
          Records next serial number in config file
 
Methods inherited from interface com.netscape.certsrv.base.ISubsystem
getConfigStore, getId, init, setId, shutdown, startup
 

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 number
repo - 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 number
repo - 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 number
repo - 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 number
repo - 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

returnConn

void returnConn(netscape.ldap.LDAPConnection conn)
Returns LDAP connection to connection pool.

Parameters:
conn - connection to be returned