1 13 14 package org.ejbca.ui.cli; 15 16 21 public class CaAdminCommandFactory { 22 25 private CaAdminCommandFactory() { 26 } 27 28 35 public static IAdminCommand getCommand(String [] args) { 36 if (args.length < 1) { 37 return null; 38 } 39 if (args[0].equals("getrootcert")) { 40 return new CaGetRootCertCommand(args); 41 } else if (args[0].equals("listexpired")) { 42 return new CaListExpiredCommand(args); 43 } else if (args[0].equals("info")) { 44 return new CaInfoCommand(args); 45 } else if (args[0].equals("listcas")) { 46 return new CaListCAsCommand(args); 47 } else if (args[0].equals("init")) { 48 return new CaInitCommand(args); 49 } else if (args[0].equals("createcrl")) { 50 return new CaCreateCrlCommand(args); 51 } else if (args[0].equals("getcrl")) { 52 return new CaGetCrlCommand(args); 53 } else if (args[0].equals("exportprofiles")) { 54 return new CaExportProfilesCommand(args); 55 } else if (args[0].equals("importprofiles")) { 56 return new CaImportProfilesCommand(args); 57 } else if (args[0].equals("exportca")) { 58 return new CaExportCACommand(args); 59 } else if (args[0].equals("importca")) { 60 return new CaImportCACommand(args); 61 } else if (args[0].equals("importcert")) { 62 return new CaImportCertCommand(args); 63 } else if (args[0].equals("republish")) { 64 return new CARepublishCommand(args); 65 } else if (args[0].equals("activateca")) { 66 return new CaActivateCACommand(args); 67 } else if (args[0].equals("deactivateca")) { 68 return new CaDeactivateCACommand(args); 69 } 70 else { 71 return null; 72 } 73 } } | Popular Tags |