com.netscape.certsrv.dbs.repository
Interface IRepository

All Known Subinterfaces:
ICertificateRepository, IKeyRepository, IReplicaIDRepository

public interface IRepository

An interface represents a generic repository. It maintains unique serial number within repository.

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

Method Summary
 void checkRanges()
          Checks to see if a new range is needed, or if we have reached the end of the current range, or if a range conflict has occurred.
 java.math.BigInteger getNextSerialNumber()
          Retrieves the next serial number, and also increase the serial number by one.
 java.math.BigInteger getTheSerialNumber()
          Retrieves the next serial number without increasing the serial number.
 void resetSerialNumber(java.math.BigInteger serial)
          Resets serial number.
 void setEnableSerialMgmt(boolean value)
          Sets whether serial number management is enabled for certs and requests.
 void setMaxSerial(java.lang.String serial)
          Set the maximum serial number.
 void setNextMaxSerial(java.lang.String serial)
          Set the maximum serial number in next range.
 

Method Detail

getNextSerialNumber

java.math.BigInteger getNextSerialNumber()
                                         throws EBaseException
Retrieves the next serial number, and also increase the serial number by one.

Returns:
serial number
Throws:
EBaseException - failed to retrieve next serial number

resetSerialNumber

void resetSerialNumber(java.math.BigInteger serial)
                       throws EBaseException
Resets serial number.

Throws:
EBaseException

getTheSerialNumber

java.math.BigInteger getTheSerialNumber()
                                        throws EBaseException
Retrieves the next serial number without increasing the serial number.

Returns:
serial number
Throws:
EBaseException - failed to retrieve next serial number

setMaxSerial

void setMaxSerial(java.lang.String serial)
                  throws EBaseException
Set the maximum serial number.

Parameters:
serial - maximum number
Throws:
EBaseException - failed to set maximum serial number

setNextMaxSerial

void setNextMaxSerial(java.lang.String serial)
                      throws EBaseException
Set the maximum serial number in next range.

Parameters:
serial - maximum number
Throws:
EBaseException - failed to set maximum serial number in next range

checkRanges

void checkRanges()
                 throws EBaseException
Checks to see if a new range is needed, or if we have reached the end of the current range, or if a range conflict has occurred.

Throws:
EBaseException - failed to check next range for conflicts

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