summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/client/group
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/cms/client/group')
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupAddCLI.java81
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupAddMemberCLI.java57
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupCLI.java124
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupClient.java89
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupFindCLI.java98
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupFindMemberCLI.java104
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupModifyCLI.java80
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupRemoveCLI.java54
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupRemoveMemberCLI.java54
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupShowCLI.java56
-rw-r--r--base/common/src/com/netscape/cms/client/group/GroupShowMemberCLI.java57
11 files changed, 0 insertions, 854 deletions
diff --git a/base/common/src/com/netscape/cms/client/group/GroupAddCLI.java b/base/common/src/com/netscape/cms/client/group/GroupAddCLI.java
deleted file mode 100644
index f32fffd5d..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupAddCLI.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-
-import com.netscape.certsrv.group.GroupData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupAddCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupAddCLI(GroupCLI parent) {
- super("add", "Add group");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- Option option = new Option(null, "description", true, "Description");
- option.setArgName("description");
- option.setRequired(true);
- options.addOption(option);
-
- CommandLine cmd = null;
-
- try {
- cmd = parser.parse(options, args);
-
- } catch (Exception e) {
- System.err.println("Error: " + e.getMessage());
- printHelp();
- System.exit(1);
- }
-
- String[] cmdArgs = cmd.getArgs();
-
- if (cmdArgs.length != 1) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = cmdArgs[0];
-
- GroupData groupData = new GroupData();
- groupData.setID(groupID);
- groupData.setDescription(cmd.getOptionValue("description"));
-
- groupData = parent.client.addGroup(groupData);
-
- MainCLI.printMessage("Added group \""+groupID+"\"");
-
- GroupCLI.printGroup(groupData);
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupAddMemberCLI.java b/base/common/src/com/netscape/cms/client/group/GroupAddMemberCLI.java
deleted file mode 100644
index 965ad4ee9..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupAddMemberCLI.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import com.netscape.certsrv.group.GroupMemberData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupAddMemberCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupAddMemberCLI(GroupCLI parent) {
- super("add-member", "Add group member");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> <Member ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- if (args.length != 2) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = args[0];
- String memberID = args[1];
-
- GroupMemberData groupMemberData = parent.client.addGroupMember(groupID, memberID);
-
- MainCLI.printMessage("Added group member \""+memberID+"\"");
-
- GroupCLI.printGroupMember(groupMemberData);
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupCLI.java b/base/common/src/com/netscape/cms/client/group/GroupCLI.java
deleted file mode 100644
index b106c6fc1..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupCLI.java
+++ /dev/null
@@ -1,124 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import java.util.Arrays;
-
-import org.apache.commons.lang.StringUtils;
-import org.jboss.resteasy.plugins.providers.atom.Link;
-
-import com.netscape.certsrv.group.GroupData;
-import com.netscape.certsrv.group.GroupMemberData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupCLI extends CLI {
-
- public MainCLI parent;
- public GroupClient client;
-
- public GroupCLI(MainCLI parent) {
- super("group", "Group management commands");
- this.parent = parent;
-
- addModule(new GroupFindCLI(this));
- addModule(new GroupShowCLI(this));
- addModule(new GroupAddCLI(this));
- addModule(new GroupModifyCLI(this));
- addModule(new GroupRemoveCLI(this));
-
- addModule(new GroupFindMemberCLI(this));
- addModule(new GroupShowMemberCLI(this));
- addModule(new GroupAddMemberCLI(this));
- addModule(new GroupRemoveMemberCLI(this));
- }
-
- public void printHelp() {
-
- System.out.println("Commands:");
-
- int leftPadding = 1;
- int rightPadding = 25;
-
- for (CLI module : modules.values()) {
- String label = name+"-"+module.getName();
-
- int padding = rightPadding - leftPadding - label.length();
- if (padding < 1) padding = 1;
-
- System.out.print(StringUtils.repeat(" ", leftPadding));
- System.out.print(label);
- System.out.print(StringUtils.repeat(" ", padding));
- System.out.println(module.getDescription());
- }
- }
-
- public void execute(String[] args) throws Exception {
-
- client = new GroupClient(parent.config);
- client.setVerbose(verbose);
-
- if (args.length == 0) {
- printHelp();
- System.exit(1);
- }
-
- String command = args[0];
- String[] commandArgs = Arrays.copyOfRange(args, 1, args.length);
-
- if (command == null) {
- printHelp();
- System.exit(1);
- }
-
- CLI module = getModule(command);
- if (module != null) {
- module.execute(commandArgs);
-
- } else {
- System.err.println("Error: Invalid command \""+command+"\"");
- printHelp();
- System.exit(1);
- }
- }
-
- public static void printGroup(GroupData groupData) {
- System.out.println(" Group ID: "+groupData.getID());
-
- String description = groupData.getDescription();
- if (!StringUtils.isEmpty(description)) System.out.println(" Description: "+description);
-
- Link link = groupData.getLink();
- if (verbose && link != null) {
- System.out.println(" Link: " + link.getHref());
- }
- }
-
- public static void printGroupMember(GroupMemberData groupMemberData) {
- System.out.println(" Member: "+groupMemberData.getID());
-
- Link link = groupMemberData.getLink();
- if (verbose && link != null) {
- System.out.println(" Link: " + link.getHref());
- }
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupClient.java b/base/common/src/com/netscape/cms/client/group/GroupClient.java
deleted file mode 100644
index b3784ef46..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupClient.java
+++ /dev/null
@@ -1,89 +0,0 @@
-//--- BEGIN COPYRIGHT BLOCK ---
-//This program is free software; you can redistribute it and/or modify
-//it under the terms of the GNU General Public License as published by
-//the Free Software Foundation; version 2 of the License.
-//
-//This program is distributed in the hope that it will be useful,
-//but WITHOUT ANY WARRANTY; without even the implied warranty of
-//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-//GNU General Public License for more details.
-//
-//You should have received a copy of the GNU General Public License along
-//with this program; if not, write to the Free Software Foundation, Inc.,
-//51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-//(C) 2012 Red Hat, Inc.
-//All rights reserved.
-//--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.client.group;
-
-import java.net.URISyntaxException;
-
-import org.jboss.resteasy.client.ClientResponse;
-
-import com.netscape.certsrv.group.GroupCollection;
-import com.netscape.certsrv.group.GroupData;
-import com.netscape.certsrv.group.GroupMemberCollection;
-import com.netscape.certsrv.group.GroupMemberData;
-import com.netscape.certsrv.group.GroupMemberResource;
-import com.netscape.certsrv.group.GroupResource;
-import com.netscape.cms.client.ClientConfig;
-import com.netscape.cms.client.PKIClient;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupClient extends PKIClient {
-
- public GroupResource groupClient;
- public GroupMemberResource groupMemberClient;
-
- public GroupClient(ClientConfig config) throws URISyntaxException {
- super(config);
-
- groupClient = createProxy(GroupResource.class);
- groupMemberClient = createProxy(GroupMemberResource.class);
- }
-
- public GroupCollection findGroups(String groupIDFilter, Integer start, Integer size) {
- return groupClient.findGroups(groupIDFilter, start, size);
- }
-
- public GroupData getGroup(String groupID) {
- return groupClient.getGroup(groupID);
- }
-
- public GroupData addGroup(GroupData groupData) {
- @SuppressWarnings("unchecked")
- ClientResponse<GroupData> response = (ClientResponse<GroupData>)groupClient.addGroup(groupData);
- return getEntity(response);
- }
-
- public GroupData modifyGroup(String groupID, GroupData groupData) {
- @SuppressWarnings("unchecked")
- ClientResponse<GroupData> response = (ClientResponse<GroupData>)groupClient.modifyGroup(groupID, groupData);
- return getEntity(response);
- }
-
- public void removeGroup(String groupID) {
- groupClient.removeGroup(groupID);
- }
-
- public GroupMemberCollection findGroupMembers(String groupID, Integer start, Integer size) {
- return groupMemberClient.findGroupMembers(groupID, start, size);
- }
-
- public GroupMemberData getGroupMember(String groupID, String memberID) {
- return groupMemberClient.getGroupMember(groupID, memberID);
- }
-
- public GroupMemberData addGroupMember(String groupID, String memberID) {
- @SuppressWarnings("unchecked")
- ClientResponse<GroupMemberData> response = (ClientResponse<GroupMemberData>)groupMemberClient.addGroupMember(groupID, memberID);
- return getEntity(response);
- }
-
- public void removeGroupMember(String groupID, String memberID) {
- groupMemberClient.removeGroupMember(groupID, memberID);
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupFindCLI.java b/base/common/src/com/netscape/cms/client/group/GroupFindCLI.java
deleted file mode 100644
index 41263c7b9..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupFindCLI.java
+++ /dev/null
@@ -1,98 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import java.util.Collection;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-
-import com.netscape.certsrv.group.GroupCollection;
-import com.netscape.certsrv.group.GroupData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupFindCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupFindCLI(GroupCLI parent) {
- super("find", "Find groups");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " [FILTER] [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- Option 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);
-
- CommandLine cmd = null;
-
- try {
- cmd = parser.parse(options, args);
-
- } catch (Exception e) {
- System.err.println("Error: " + e.getMessage());
- printHelp();
- 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);
-
- GroupCollection response = parent.client.findGroups(filter, start, size);
-
- Collection<GroupData> entries = response.getGroups();
-
- MainCLI.printMessage(entries.size()+" group(s) matched");
-
- boolean first = true;
-
- for (GroupData groupData : entries) {
-
- if (first) {
- first = false;
- } else {
- System.out.println();
- }
-
- GroupCLI.printGroup(groupData);
- }
-
- MainCLI.printMessage("Number of entries returned "+entries.size());
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupFindMemberCLI.java b/base/common/src/com/netscape/cms/client/group/GroupFindMemberCLI.java
deleted file mode 100644
index ca8273270..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupFindMemberCLI.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import java.util.Collection;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-
-import com.netscape.certsrv.group.GroupMemberCollection;
-import com.netscape.certsrv.group.GroupMemberData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupFindMemberCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupFindMemberCLI(GroupCLI parent) {
- super("find-member", "Find group members");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- Option 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);
-
- CommandLine cmd = null;
-
- try {
- cmd = parser.parse(options, args);
-
- } catch (Exception e) {
- System.err.println("Error: " + e.getMessage());
- printHelp();
- System.exit(1);
- }
-
- String[] cmdArgs = cmd.getArgs();
-
- if (cmdArgs.length != 1) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = cmdArgs[0];
-
- 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);
-
- GroupMemberCollection response = parent.client.findGroupMembers(groupID, start, size);
-
- Collection<GroupMemberData> entries = response.getMembers();
-
- MainCLI.printMessage(entries.size()+" group member(s) matched");
-
- boolean first = true;
-
- for (GroupMemberData groupMemberData : entries) {
-
- if (first) {
- first = false;
- } else {
- System.out.println();
- }
-
- GroupCLI.printGroupMember(groupMemberData);
- }
-
- MainCLI.printMessage("Number of entries returned "+entries.size());
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupModifyCLI.java b/base/common/src/com/netscape/cms/client/group/GroupModifyCLI.java
deleted file mode 100644
index b2b5c8553..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupModifyCLI.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-
-import com.netscape.certsrv.group.GroupData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupModifyCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupModifyCLI(GroupCLI parent) {
- super("mod", "Modify group");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- Option option = new Option(null, "description", true, "Description");
- option.setArgName("description");
- options.addOption(option);
-
- CommandLine cmd = null;
-
- try {
- cmd = parser.parse(options, args);
-
- } catch (Exception e) {
- System.err.println("Error: " + e.getMessage());
- printHelp();
- System.exit(1);
- }
-
- String[] cmdArgs = cmd.getArgs();
-
- if (cmdArgs.length != 1) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = cmdArgs[0];
-
- GroupData groupData = new GroupData();
- groupData.setID(groupID);
- groupData.setDescription(cmd.getOptionValue("description"));
-
- groupData = parent.client.modifyGroup(groupID, groupData);
-
- MainCLI.printMessage("Modified group \""+groupID+"\"");
-
- GroupCLI.printGroup(groupData);
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupRemoveCLI.java b/base/common/src/com/netscape/cms/client/group/GroupRemoveCLI.java
deleted file mode 100644
index 45e779860..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupRemoveCLI.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupRemoveCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupRemoveCLI(GroupCLI parent) {
- super("del", "Remove group");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- if (args.length != 1) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = args[0];
-
- parent.client.removeGroup(groupID);
-
- MainCLI.printMessage("Deleted group \""+groupID+"\"");
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupRemoveMemberCLI.java b/base/common/src/com/netscape/cms/client/group/GroupRemoveMemberCLI.java
deleted file mode 100644
index 25807ae31..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupRemoveMemberCLI.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupRemoveMemberCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupRemoveMemberCLI(GroupCLI parent) {
- super("remove-member", "Remove group member");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> <Member ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- if (args.length != 2) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = args[0];
- String memberID = args[1];
-
- parent.client.removeGroupMember(groupID, memberID);
-
- MainCLI.printMessage("Deleted group member \""+memberID+"\"");
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupShowCLI.java b/base/common/src/com/netscape/cms/client/group/GroupShowCLI.java
deleted file mode 100644
index 3e24f3e5d..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupShowCLI.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import com.netscape.certsrv.group.GroupData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupShowCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupShowCLI(GroupCLI parent) {
- super("show", "Show group");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- if (args.length != 1) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = args[0];
-
- GroupData groupData = parent.client.getGroup(groupID);
-
- MainCLI.printMessage("Group \""+groupID+"\"");
-
- GroupCLI.printGroup(groupData);
- }
-}
diff --git a/base/common/src/com/netscape/cms/client/group/GroupShowMemberCLI.java b/base/common/src/com/netscape/cms/client/group/GroupShowMemberCLI.java
deleted file mode 100644
index 9d828416f..000000000
--- a/base/common/src/com/netscape/cms/client/group/GroupShowMemberCLI.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-
-package com.netscape.cms.client.group;
-
-import com.netscape.certsrv.group.GroupMemberData;
-import com.netscape.cms.client.cli.CLI;
-import com.netscape.cms.client.cli.MainCLI;
-
-/**
- * @author Endi S. Dewata
- */
-public class GroupShowMemberCLI extends CLI {
-
- public GroupCLI parent;
-
- public GroupShowMemberCLI(GroupCLI parent) {
- super("show-member", "Show group member");
- this.parent = parent;
- }
-
- public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Group ID> <Member ID> [OPTIONS...]", options);
- }
-
- public void execute(String[] args) throws Exception {
-
- if (args.length != 2) {
- printHelp();
- System.exit(1);
- }
-
- String groupID = args[0];
- String memberID = args[1];
-
- GroupMemberData groupMemberData = parent.client.getGroupMember(groupID, memberID);
-
- MainCLI.printMessage("Group member \""+memberID+"\"");
-
- GroupCLI.printGroupMember(groupMemberData);
- }
-}