1 13 14 package org.ejbca.core.protocol.ws.client; 15 16 import org.ejbca.ui.cli.IAdminCommand; 17 18 23 public class EJBCAWSRACommandFactory { 24 27 private EJBCAWSRACommandFactory() { 28 } 29 30 37 public static IAdminCommand getCommand(String [] args) { 38 if (args.length < 1) { 39 return null; 40 } 41 42 if (args[0].equals("edituser")) { 43 return new EditUserCommand(args); 44 }else if (args[0].equals("finduser")) { 45 return new FindUserCommand(args); 46 }else if (args[0].equals("findcerts")) { 47 return new FindCertsCommand(args); 48 }else if (args[0].equals("pkcs10req")) { 49 return new PKCS10ReqCommand(args); 50 } else if (args[0].equals("pkcs12req")) { 51 return new PKCS12ReqCommand(args); 52 } else if (args[0].equals("revokecert")) { 53 return new RevokeCertCommand(args); 54 } else if (args[0].equals("revoketoken")) { 55 return new RevokeTokenCommand(args); 56 } else if (args[0].equals("revokeuser")) { 57 return new RevokeUserCommand(args); 58 } else if (args[0].equals("checkrevokationstatus")) { 59 return new CheckRevokeStatusCommand(args); 60 }else if (args[0].equals("generatenewuser")) { 61 return new GenerateNewUserCommand(args); 62 } 63 64 else { 65 return null; 66 } 67 } 68 69 } 71 72 73 | Popular Tags |