1 13 14 package org.ejbca.ui.cli; 15 16 21 public class RaAdminCommandFactory { 22 25 private RaAdminCommandFactory() { 26 } 27 28 35 public static IAdminCommand getCommand(String [] args) { 36 if (args.length < 1) { 37 return null; 38 } 39 40 if (args[0].equals("adduser")) { 41 return new RaAddUserCommand(args); 42 } else if (args[0].equals("deluser")) { 43 return new RaDelUserCommand(args); 44 } else if (args[0].equals("setpwd")) { 45 return new RaSetPwdCommand(args); 46 } else if (args[0].equals("setclearpwd")) { 47 return new RaSetClearPwdCommand(args); 48 } else if (args[0].equals("setuserstatus")) { 49 return new RaSetUserStatusCommand(args); 50 } else if (args[0].equals("finduser")) { 51 return new RaFindUserCommand(args); 52 } else if (args[0].equals("listnewusers")) { 53 return new RaListNewUsersCommand(args); 54 } else if (args[0].equals("listusers")) { 55 return new RaListUsersCommand(args); 56 } else if (args[0].equals("revokeuser")) { 57 return new RaRevokeUserCommand(args); 58 } else if (args[0].equals("unrevokeuser")) { 59 return new RaUnRevokeUserCommand(args); 60 } else if (args[0].equals("keyrecover")) { 61 return new RaKeyRecoverCommand(args); 62 } else if (args[0].equals("keyrecovernewest")) { 63 return new RaKeyRecoverNewestCommand(args); 64 } else if (args[0].equals("setsubjectdirattr")) { 65 return new RaSetSubjDirAttrCommand(args); 66 } else { 67 return null; 68 } 69 } 70 71 } 73 74 75 | Popular Tags |