View Javadoc

1   /*
2    * GUMS2MapUser.java
3    *
4    * Created on June 9, 2004, 1:44 PM
5    */
6   package gov.bnl.gums.admin;
7   
8   
9   import org.apache.axis.AxisFault;
10  
11  import org.apache.commons.cli.*;
12  
13  /**
14   * @author carcassi
15   *  @depricated
16   */
17  public class ManualMapping_Remove extends RemoteCommand {
18      static {
19          command = new ManualMapping_Remove();
20      }
21  
22      /**
23       * Creates a new ManualMapping_Remove object.
24       */
25      public ManualMapping_Remove() {
26          syntax = "PERSISTANCE GROUP USERDN";
27          description = "Maps a DN to a user in a manually managed mapping. " +
28              "PERSISTANCE is the 'persistenceFactory' as defined in the configuration for the group." +
29              "GROUP is the 'name' as defined in the configuration for the group." +
30              "NOTE: This command is depricated in favor of ManualMappingRemove; required with 1.1 server";
31      }
32  
33      protected org.apache.commons.cli.Options buildOptions() {
34          Options options = new Options();
35  
36          return options;
37      }
38  
39      protected void execute(org.apache.commons.cli.CommandLine cmd)
40          throws Exception {
41          if (cmd.getArgs().length < 3) {
42              failForWrongParameters("Missing parameters...");
43          }
44  
45          String persistenceFactory = cmd.getArgs()[0];
46          String groupName = cmd.getArgs()[1];
47          String userDN = cmd.getArgs()[2];
48  
49          getGums().manualMappingRemove(persistenceFactory, groupName, userDN);
50      }
51  }