Class RequestRepository
java.lang.Object
com.netscape.cmscore.dbs.Repository
com.netscape.cmscore.request.RequestRepository
- All Implemented Interfaces:
IRepository
TODO: what does this class provide beyond the Repository
base class??
- Version:
- $Revision$ $Date$
- Author:
- thayes
-
Field Summary
FieldsFields inherited from class Repository
dbSubsystem, maxSerialName, mBaseDN, mCounter, mEnableRandomSerialNumbers, mIncrementNo, minSerialName, mLowWaterMarkNo, mMaxSerialNo, mMinSerialNo, mNextMaxSerialNo, mNextMinSerialNo, mRadix, nextMaxSerialName, nextMinSerialName, rangeDN, repositoryConfigModifier and TypeFieldDescriptionprotected DBSubsystemprotected Stringprotected Stringprotected BigIntegerprotected booleanprotected BigIntegerprotected Stringprotected BigIntegerprotected BigIntegerprotected BigIntegerprotected BigIntegerprotected BigIntegerprotected intprotected Stringprotected Stringprotected String -
Constructor Summary
ConstructorsConstructorDescriptionRequestRepository(DBSubsystem dbSubsystem, String filter) Create a request repository that uses the LDAP databaseRequestRepository(DBSubsystem dbSubsystem, String filter, Hashtable<String, String> repositoryConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequest(IRequest request) createRequest(RequestId requestID, String requestType) createRequest(String requestType) createRequestID(boolean ephemeral) getLastSerialNumberInRange(BigInteger min, BigInteger max) getPagedRequestsByFilter(RequestId fromID, boolean jumpToEnd, String filter, int pageSize, String sortKey) Gets a pageable list of IRequest entries in this queue.listRequestsByFilter(String filter) listRequestsByFilter(String filter, int maxSize) listRequestsByFilter(String filter, int maxSize, int timeLimit) voidmodifyRequest(IRequest request) readRequest(RequestId id) voidRemoves all objects with this repository.voidsetPublishingStatus(String status) Methods inherited from class Repository
checkRange, checkRanges, getBaseDN, getMaxSerial, getMinSerial, getNextMaxSerial, getNextRange, getNextSerialNumber, getRadix, hasRangeConflict, initCacheIfNeeded, peekNextSerialNumber, setEnableSerialMgmt, setLastSerialNo, setMaxSerial, setMaxSerialConfig, setMinSerialConfig, setNextMaxSerial, setNextMaxSerialConfig, setNextMinSerialConfig, setTheSerialNumberModifier and TypeMethodDescriptionprotected voidChecks if the given number is in the current range.voidChecks 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.Get the LDAP base DN for this repository.Get the maximum serial number.Get the minimum serial number.Get the maximum serial number in next range.Gets start of next range from database.Retrieves the next serial number, and also increase the serial number by one.intgetRadix()booleanDetermines if a range conflict has been observed in database.protected voidPeek at the next serial number in cache (does not consume the number).voidsetEnableSerialMgmt(boolean value) Sets whether serial number management is enabled for certs and requests.protected voidsetLastSerialNo(BigInteger lastSN) voidsetMaxSerial(BigInteger serial) Set the maximum serial number.voidSets maximum serial number limit in config filevoidSets minimum serial number limit in config filevoidsetNextMaxSerial(BigInteger serial) Set the maximum serial number in next rangevoidSets maximum serial number limit for next range in config filevoidSets minimum serial number limit for next range in config filevoidUpdates the serial number to the specified in db and cache.
-
Field Details
-
logger
public static org.slf4j.Logger logger -
filter
-
-
Constructor Details
-
RequestRepository
Create a request repository that uses the LDAP database- Parameters:
dbSubsystem- the LDAP database system.- Throws:
EBaseException
-
RequestRepository
public RequestRepository(DBSubsystem dbSubsystem, String filter, Hashtable<String, String> repositoryConfig) throws EBaseException- Throws:
EBaseException
-
-
Method Details
-
createRequestID
- Throws:
EBaseException
-
createRequestID
- Throws:
EBaseException
-
createRequest
- Throws:
EBaseException
-
createRequest
- Throws:
EBaseException
-
addRequest
- Throws:
EBaseException
-
readRequest
- Throws:
EBaseException
-
modifyRequest
- Throws:
EBaseException
-
removeAllObjects
Removes all objects with this repository.- Throws:
EBaseException
-
listRequestsByFilter
- Throws:
EBaseException
-
listRequestsByFilter
- Throws:
EBaseException
-
listRequestsByFilter
public IRequestList listRequestsByFilter(String filter, int maxSize, int timeLimit) throws EBaseException - Throws:
EBaseException
-
getPagedRequestsByFilter
public IRequestVirtualList getPagedRequestsByFilter(RequestId fromID, boolean jumpToEnd, String filter, int pageSize, String sortKey) throws EBaseException Gets a pageable list of IRequest entries in this queue. This jumps right to the end of the list.- Parameters:
fromID- request id to start withjumpToEnd- jump to end of list (set fromID to null)filter- search filterpageSize- page sizesortKey- the attributes to sort by- Returns:
- request list
- Throws:
EBaseException
-
getLastSerialNumberInRange
- Specified by:
getLastSerialNumberInRangein classRepository- Throws:
EBaseException
-
getPublishingStatus
-
setPublishingStatus
-