diff options
Diffstat (limited to 'base/java-tools/src')
8 files changed, 40 insertions, 16 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/logging/ActivityFindCLI.java b/base/java-tools/src/com/netscape/cmstools/logging/ActivityFindCLI.java index 88b817798..d9daf921c 100644 --- a/base/java-tools/src/com/netscape/cmstools/logging/ActivityFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/logging/ActivityFindCLI.java @@ -41,7 +41,7 @@ public class ActivityFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class ActivityFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - ActivityCollection result = activityCLI.activityClient.findActivities(start, size); + ActivityCollection result = activityCLI.activityClient.findActivities(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; diff --git a/base/java-tools/src/com/netscape/cmstools/selftests/SelfTestFindCLI.java b/base/java-tools/src/com/netscape/cmstools/selftests/SelfTestFindCLI.java index 241f6c300..82909f67f 100644 --- a/base/java-tools/src/com/netscape/cmstools/selftests/SelfTestFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/selftests/SelfTestFindCLI.java @@ -41,7 +41,7 @@ public class SelfTestFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class SelfTestFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - SelfTestCollection result = selfTestCLI.selfTestClient.findSelfTests(start, size); + SelfTestCollection result = selfTestCLI.selfTestClient.findSelfTests(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; diff --git a/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorFindCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorFindCLI.java index 683d2891c..552fc3040 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorFindCLI.java @@ -41,7 +41,7 @@ public class AuthenticatorFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class AuthenticatorFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - AuthenticatorCollection result = authenticatorCLI.authenticatorClient.findAuthenticators(start, size); + AuthenticatorCollection result = authenticatorCLI.authenticatorClient.findAuthenticators(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; diff --git a/base/java-tools/src/com/netscape/cmstools/tps/cert/TPSCertFindCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/cert/TPSCertFindCLI.java index 12ec1b9da..91c460bf6 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/cert/TPSCertFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/cert/TPSCertFindCLI.java @@ -41,7 +41,7 @@ public class TPSCertFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class TPSCertFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - TPSCertCollection result = certCLI.certClient.findCerts(start, size); + TPSCertCollection result = certCLI.certClient.findCerts(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; diff --git a/base/java-tools/src/com/netscape/cmstools/tps/connection/ConnectionFindCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/connection/ConnectionFindCLI.java index d78727d7b..9d2165ef0 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/connection/ConnectionFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/connection/ConnectionFindCLI.java @@ -41,7 +41,7 @@ public class ConnectionFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class ConnectionFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - ConnectionCollection result = connectionCLI.connectionClient.findConnections(start, size); + ConnectionCollection result = connectionCLI.connectionClient.findConnections(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; diff --git a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileFindCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileFindCLI.java index cabacaacd..251d14d23 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileFindCLI.java @@ -41,7 +41,7 @@ public class ProfileFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class ProfileFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - ProfileCollection result = profileCLI.profileClient.findProfiles(start, size); + ProfileCollection result = profileCLI.profileClient.findProfiles(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; diff --git a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileMappingFindCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileMappingFindCLI.java index 9d87cc43c..e125629e6 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileMappingFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileMappingFindCLI.java @@ -41,7 +41,7 @@ public class ProfileMappingFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class ProfileMappingFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - ProfileMappingCollection result = profileMappingCLI.profileMappingClient.findProfileMappings(start, size); + ProfileMappingCollection result = profileMappingCLI.profileMappingClient.findProfileMappings(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; diff --git a/base/java-tools/src/com/netscape/cmstools/tps/token/TokenFindCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/token/TokenFindCLI.java index 6cfb1fb00..22fbad944 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/token/TokenFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/token/TokenFindCLI.java @@ -41,7 +41,7 @@ public class TokenFindCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [FILTER] [OPTIONS...]", options); } public void execute(String[] args) throws Exception { @@ -65,13 +65,16 @@ public class TokenFindCLI extends CLI { System.exit(1); } + String[] cmdArgs = cmd.getArgs(); + String filter = cmdArgs.length > 0 ? cmdArgs[0] : null; + 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); - TokenCollection result = tokenCLI.tokenClient.findTokens(start, size); + TokenCollection result = tokenCLI.tokenClient.findTokens(filter, start, size); MainCLI.printMessage(result.getTotal() + " entries matched"); if (result.getTotal() == 0) return; |
