summaryrefslogtreecommitdiffstats
path: root/base/common/src
diff options
context:
space:
mode:
authorJack Magne <jmagne@dhcp-16-206.sjc.redhat.com>2016-08-03 18:01:23 -0700
committerJack Magne <jmagne@dhcp-16-206.sjc.redhat.com>2016-08-05 11:12:09 -0700
commitf0b1854a8f5cfe97d2d267ea16e4556d94666bb6 (patch)
tree695a043097e9034b091bc237f4f012f30a6ff034 /base/common/src
parent5178567bf5c65d23d3903b0956a47813bdc1fe23 (diff)
Fix to sort the output of a cert search by serialno.
Diffstat (limited to 'base/common/src')
-rw-r--r--base/common/src/com/netscape/certsrv/dbs/IDBSSession.java35
-rw-r--r--base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java27
2 files changed, 60 insertions, 2 deletions
diff --git a/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java b/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java
index 656950570..9ab2fde6d 100644
--- a/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java
+++ b/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java
@@ -17,11 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
+import netscape.ldap.LDAPSearchResults;
+
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
-import netscape.ldap.LDAPSearchResults;
-
/**
* An interface represents the database session. Operations
* can be performed with a session.
@@ -132,6 +132,21 @@ public interface IDBSSession extends AutoCloseable {
* @param base starting point of the search
* @param filter search filter
* @param maxSize max number of entries
+ * @param sortAttribute Field to sort the records on
+ * @return search results
+ * @exception EBaseException failed to search
+ */
+ public IDBSearchResults search(String base, String filter, int maxSize,String sortAttribute)
+ throws EBaseException;
+
+
+ /**
+ * Searchs for a list of objects that match the
+ * filter.
+ *
+ * @param base starting point of the search
+ * @param filter search filter
+ * @param maxSize max number of entries
* @param timeLimit timeout limit
* @return search results
* @exception EBaseException failed to search
@@ -140,6 +155,22 @@ public interface IDBSSession extends AutoCloseable {
int timeLimit) throws EBaseException;
/**
+ * Searchs for a list of objects that match the
+ * filter.
+ *
+ * @param base starting point of the search
+ * @param filter search filter
+ * @param maxSize max number of entries
+ * @param timeLimit timeout limit
+ * @param sortAttribute Field to sort the records on
+ * @return search results
+ * @exception EBaseException failed to search
+ */
+ public IDBSearchResults search(String base, String filter, int maxSize,
+ int timeLimit, String sortAttribute) throws EBaseException;
+
+
+ /**
* Retrieves a list of object that satifies the given
* filter.
*
diff --git a/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java b/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
index f113ea03e..2efb023cc 100644
--- a/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
+++ b/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
@@ -239,6 +239,33 @@ public interface ICertificateRepository extends IRepository {
* the filter.
*
* @param filter search filter
+ * @param maxSize max size to return
+ * @param timeLimit timeout value
+ * @param sortAttribute Attribute of ICertRecord to sort the results
+ * @return a list of certificates
+ * @exception EBaseException failed to search
+ */
+ public Enumeration<ICertRecord> searchCertificates(String filter, int maxSize,
+ int timeLimit,String sortAttribute) throws EBaseException;
+
+ /**
+ * Finds a list of certificate records that satisifies
+ * the filter.
+ *
+ * @param filter search filter
+ * @param maxSize max size to return
+ * @param sortAttribute Attribute of ICertRecord to sort the results
+ * @return a list of certificates
+ * @exception EBaseException failed to search
+ */
+ public Enumeration<Object> searchCertificates(String filter, int maxSize,
+ String sortAttribute) throws EBaseException;
+
+ /**
+ * Finds a list of certificate records that satisifies
+ * the filter.
+ *
+ * @param filter search filter
* @param attrs selected attribute
* @param pageSize page size
* @return a list of certificates