Package com.netscape.cmscore.request
Class RequestRepository
java.lang.Object
com.netscape.cmscore.dbs.Repository
com.netscape.cmscore.request.RequestRepository
TODO: what does this class provide beyond the Repository
base class??
- Version:
- $Revision$ $Date$
- Author:
- thayes
-
Nested Class Summary
Nested classes/interfaces inherited from class com.netscape.cmscore.dbs.Repository
Repository.IDGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final int
protected String
static org.slf4j.Logger
static final String
static final String
Fields inherited from class com.netscape.cmscore.dbs.Repository
dbSubsystem, engine, idGenerator, idLength, maxSerialName, mBaseDN, mCounter, mIncrementNo, minSerialName, mLowWaterMarkNo, mMaxSerialNo, mMinSerialNo, mNextMaxSerialNo, mNextMinSerialNo, mRadix, nextMaxSerialName, nextMinSerialName, rangeDN, repositoryConfig, secureRandom
-
Constructor Summary
ConstructorsConstructorDescriptionRequestRepository
(SecureRandom secureRandom, DBSubsystem dbSubsystem, String filter) Create a request repository that uses the LDAP database -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRequest
(Request request) createRequest
(RequestId requestID, String requestType) createRequest
(String requestType) Locates a request from the SourceId.Locates all requests with a particular SourceId.getLastSerialNumberInRange
(BigInteger min, BigInteger max) getPagedRequestsByFilter
(RequestId fromID, boolean jumpToEnd, String filter, int pageSize, String sortKey) Gets a pageable list of Request entries in this queue.getPagedRequestsByFilter
(RequestId fromID, String filter, int pageSize, String sortKey) Gets a paginated list of Request entries in this queue.getPagedRequestsByFilter
(String filter, int pageSize, String sortKey) Gets a paginated list of Request entries in this queue.int
getTotalRequestsByFilter
(String filter) Gets the total number of request entries.void
init()
void
void
listRequestsByFilter
(String filter) listRequestsByFilter
(String filter, int maxSize) listRequestsByFilter
(String filter, int maxSize, int timeLimit) void
modifyRequest
(Request request) readRequest
(RequestId id) void
Removes all objects with this repository.void
removeRequest
(RequestId requestID) searchRequest
(String filter, int timeLimit, int start, int size) Finds a list of request records that satisfies the filter.void
setPublishingStatus
(String status) void
updateRequest
(Request request) Update the request in the permanent data store.Methods inherited from class com.netscape.cmscore.dbs.Repository
checkRange, checkRanges, getBaseDN, getCMSEngine, getIDGenerator, getMaxSerial, getMinSerial, getNextMaxSerial, getNextRange, getNextSerialNumber, getNumbersInRange, getRadix, getRandomLimit, getRangeLength, hasRangeConflict, initCache, peekNextSerialNumber, setCMSEngine, setEnableSerialMgmt, setIDGenerator, setIDGenerator, setLastSerialNo, setMaxSerial, setMaxSerialConfig, setMinSerialConfig, setNextMaxSerial, setNextMaxSerialConfig, setNextMinSerialConfig, setTheSerialNumber
-
Field Details
-
logger
public static org.slf4j.Logger logger -
PROP_REQUEST_ID_GENERATOR
- See Also:
-
DEFAULT_REQUEST_ID_GENERATOR
- See Also:
-
PROP_REQUEST_ID_LENGTH
- See Also:
-
DEFAULT_REQUEST_ID_LENGTH
public static final int DEFAULT_REQUEST_ID_LENGTH- See Also:
-
filter
-
-
Constructor Details
-
RequestRepository
Create a request repository that uses the LDAP database- Parameters:
dbSubsystem
- the LDAP database system.
-
-
Method Details
-
init
- Overrides:
init
in classRepository
- Throws:
Exception
-
initLegacyGenerator
- Throws:
Exception
-
init
- Throws:
Exception
-
createRequestID
- Throws:
EBaseException
-
createRequest
- Throws:
EBaseException
-
createRequest
- Throws:
EBaseException
-
addRequest
- Throws:
EBaseException
-
readRequest
- Throws:
EBaseException
-
getUserIdentity
-
updateRequest
Update the request in the permanent data store. This call can be made after changing a value like source ID or owner, to force the new value to be written. The request must be locked to make this call.- Parameters:
request
- the request that is being updated- Throws:
EBaseException
- failed to update request
-
modifyRequest
- Throws:
EBaseException
-
removeRequest
- Throws:
EBaseException
-
removeAllObjects
Removes all objects with this repository.- Throws:
EBaseException
-
searchRequest
public Iterator<RequestRecord> searchRequest(String filter, int timeLimit, int start, int size) throws EBaseException Finds a list of request records that satisfies the filter. The filter should follow RFC1558 LDAP filter syntax. For example,- Parameters:
filter
- search filtertimeLimit
- timeout valuestart
- first entry to return from the listsize
- max size to return- Returns:
- a list of certificates
- Throws:
EBaseException
- failed to search
-
listRequestsByFilter
- Throws:
EBaseException
-
listRequestsByFilter
public Collection<RequestRecord> listRequestsByFilter(String filter, int maxSize) throws EBaseException - Throws:
EBaseException
-
listRequestsByFilter
public Collection<RequestRecord> listRequestsByFilter(String filter, int maxSize, int timeLimit) throws EBaseException - Throws:
EBaseException
-
getPagedRequestsByFilter
public RecordPagedList<RequestRecord> getPagedRequestsByFilter(RequestId fromID, String filter, int pageSize, String sortKey) throws EBaseException Gets a paginated list of Request entries in this queue.- Parameters:
fromID
- request id to start withfilter
- search filterpageSize
- page sizesortKey
- the attributes to sort by- Returns:
- request list
- Throws:
EBaseException
-
getPagedRequestsByFilter
public RecordPagedList<RequestRecord> getPagedRequestsByFilter(String filter, int pageSize, String sortKey) throws EBaseException Gets a paginated list of Request entries in this queue.- Parameters:
filter
- search filterpageSize
- page sizesortKey
- the attributes to sort by- Returns:
- request list
- Throws:
EBaseException
-
getTotalRequestsByFilter
Gets the total number of request entries.- Parameters:
filter
- search filter- Returns:
- number of entries
- Throws:
EBaseException
-
getPagedRequestsByFilter
public IRequestVirtualList getPagedRequestsByFilter(RequestId fromID, boolean jumpToEnd, String filter, int pageSize, String sortKey) throws EBaseException Gets a pageable list of Request 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:
getLastSerialNumberInRange
in classRepository
- Throws:
EBaseException
-
getPublishingStatus
-
setPublishingStatus
-
findRequestsBySourceId
Locates all requests with a particular SourceId.- Parameters:
id
- an identifier for the record that is based on the source of the request- Returns:
- A list of requests corresponding to this source id. null is returned if the source id does not exist.
- Throws:
EBaseException
-
findRequestBySourceId
Locates a request from the SourceId.- Parameters:
id
- a unique identifier for the record that is based on the source of the request, and possibly an identify assigned by the source.- Returns:
- The requestid corresponding to this source id. null is returned if the source id does not exist.
- Throws:
EBaseException
-