summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/cms/client/cert/CertFindCLI.java')
-rw-r--r--base/common/src/com/netscape/cms/client/cert/CertFindCLI.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java b/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java
index 4890a6682..ea88c46cd 100644
--- a/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java
+++ b/base/common/src/com/netscape/cms/client/cert/CertFindCLI.java
@@ -103,10 +103,16 @@ public class CertFindCLI extends CLI {
searchData = new CertSearchData();
searchData.setSerialNumberRangeInUse(true);
}
+ String s = cmd.getOptionValue("start");
+ Integer start = s == null ? null : Integer.valueOf(s);
+
+ s = cmd.getOptionValue("size");
+ Integer size = s == null ? null : Integer.valueOf(s);
+
addSearchAttribute(cmd, searchData);
CertDataInfos certs = null;
try {
- certs = parent.client.findCerts(searchData);
+ certs = parent.client.findCerts(searchData, start, size);
} catch (CMSException e) {
System.err.println("Error: Cannot list certificates. " + e.getMessage());
System.exit(-1);
@@ -136,6 +142,15 @@ public class CertFindCLI extends CLI {
Option option = null;
+ //pagination options
+ option = new Option(null, "start", true, "Page start");
+ option.setArgName("start");
+ options.addOption(option);
+
+ option = new Option(null, "size", true, "Page size");
+ option.setArgName("size");
+ options.addOption(option);
+
//help
options.addOption(null, "help", false, "Show help options");