Package org.ejbca.ui.cli

Examples of org.ejbca.ui.cli.ErrorAdminCommandException


              }
            } catch (AuthorizationDeniedException e) {
              getLogger().error("Not authorized to reactivate user.");
            }
        } catch (Exception e) {
            throw new ErrorAdminCommandException(e);
        }
    }
View Full Code Here


                    return;
                }
            }
            getLogger().info("Could not find any matching admin in group \"" + groupName + "\" .");
        } catch (Exception e) {
            throw new ErrorAdminCommandException(e);
        }
    }
View Full Code Here

            AdminEntity adminEntity = new AdminEntity(matchWith, matchType, matchValue, caid);
            Collection<AdminEntity> adminEntities = new ArrayList<AdminEntity>();
            adminEntities.add(adminEntity);
            ejb.getAdminEntitySession().addAdminEntities(getAdmin(), groupName, adminEntities);
        } catch (Exception e) {
            throw new ErrorAdminCommandException(e);
        }
    }
View Full Code Here

            getLogger().info("CAId for created CA: " + caid);
            getLogger().info("-Created and published initial CRL.");
            getLogger().info("CA initialized");
        } catch (Exception e) {
          getLogger().debug("An error occured: ", e);
            throw new ErrorAdminCommandException(e);
        }
    }
View Full Code Here

          alias = aliases.nextElement();
          getLogger().info("Keystore contains alias: " + alias);
          length++;
        }
        if (length > 1) {
          throw new ErrorAdminCommandException("Keystore contains more than one alias, alias must be provided as argument.");
        } else if (length < 1) {
          throw new ErrorAdminCommandException("Keystore does not contains any aliases. It can not be used for a CA.");
        }
        // else alias already contains the only alias, so we can use that
      }
      ejb.getCAAdminSession().restoreCAKeyStore(getAdmin(), caName, keystorebytes, kspwd, kspwd, alias, encryptionAlias);
    } catch (ErrorAdminCommandException e) {
      throw e;
    } catch (Exception e) {
      throw new ErrorAdminCommandException(e);
    }
  }
View Full Code Here

            byte[] keyStoreBytes = ejb.getCAAdminSession().exportCAKeyStore(getAdmin(), caName, kspwd, kspwd, signatureKeyAlias, encryptionKeyAlias);
            FileOutputStream fos = new FileOutputStream(p12file);
            fos.write(keyStoreBytes);
            fos.close();
        } catch (Exception e) {
            throw new ErrorAdminCommandException(e);
        }
    }
View Full Code Here

                        encoder.close();
                    }
                }
            }        
        } catch (Exception e) {
            throw new ErrorAdminCommandException(e);
        }
    }
View Full Code Here

              getLogger().info("CA token deactivated.");
            }else{
              getLogger().error("CA or CAToken must be active to be put offline.");
            }
        } catch (Exception e) {
            throw new ErrorAdminCommandException(e);
        }
    }
View Full Code Here

          chain[0] = cacert;
          ejb.getCAAdminSession().importCAFromKeys(getAdmin(), caName, "foo123", chain, pubKey, privKey, null, null);         
        } catch (ErrorAdminCommandException e) {
          throw e;
        } catch (Exception e) {
            throw new ErrorAdminCommandException(e);
        }
    } // execute
View Full Code Here

              sb.append(" NO_DELTACRL_ISSUED");
            }
            getLogger().info(sb.toString());
          }
        } catch (Exception e) {
          throw new ErrorAdminCommandException(e);
        }         
  }
View Full Code Here

TOP

Related Classes of org.ejbca.ui.cli.ErrorAdminCommandException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.