OcspCertStoreDbImporter(
     final DataSourceWrapper dataSource,
     final Unmarshaller unmarshaller,
     final String srcDir,
     final int numCertsPerCommit,
     final boolean resume,
     final AtomicBoolean stopMe,
     final boolean evaluateOnly)
     throws Exception {
   super(dataSource, srcDir, stopMe, evaluateOnly);
   if (numCertsPerCommit < 1) {
     throw new IllegalArgumentException(
         "numCertsPerCommit could not be less than 1: " + numCertsPerCommit);
   }
   ParamUtil.assertNotNull("unmarshaller", unmarshaller);
   this.unmarshaller = unmarshaller;
   this.numCertsPerCommit = numCertsPerCommit;
   File processLogFile = new File(baseDir, DbPorter.IMPORT_PROCESS_LOG_FILENAME);
   if (resume) {
     if (!processLogFile.exists()) {
       throw new Exception("could not process with '--resume' option");
     }
   } else {
     if (processLogFile.exists()) {
       throw new Exception(
           "please either specify '--resume' option or delete the file "
               + processLogFile.getPath()
               + " first");
     }
   }
   this.resume = resume;
 }
예제 #2
0
  public CAEntry(
      final String name,
      final String signerType,
      final String signerConf,
      final int expirationPeriod)
      throws CAMgmtException {
    ParamUtil.assertNotBlank("name", name);
    ParamUtil.assertNotBlank("signerType", signerType);

    if (expirationPeriod < 0) {
      throw new IllegalArgumentException(
          "expirationPeriod is negative (" + expirationPeriod + " < 0)");
    }
    this.expirationPeriod = expirationPeriod;

    this.name = name.toUpperCase();
    this.signerType = signerType;
    this.signerConf = signerConf;
  }
예제 #3
0
 public void setValidityMode(final ValidityMode mode) {
   ParamUtil.assertNotNull("mode", mode);
   this.validityMode = mode;
 }
예제 #4
0
 public void setDuplicateSubjectMode(final DuplicationMode mode) {
   ParamUtil.assertNotNull("mode", mode);
   this.duplicateSubjectMode = mode;
 }
예제 #5
0
 public CmpControlEntry(final String name, final String conf) {
   ParamUtil.assertNotBlank("name", name);
   ParamUtil.assertNotBlank("conf", conf);
   this.name = name;
   this.conf = conf;
 }