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$, $Date$
    • 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
      • 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
      • getConfigStore

        IConfigStore getConfigStore()
        Gets internal DB configuration store
        Specified by:
        getConfigStore in interface ISubsystem
        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 name
        attrName - attribute's name
        defaultValue - attribute's default value
        errorValue - 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