All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xipki.scep.transaction.Operation Maven / Gradle / Ivy

There is a newer version: 6.5.3
Show newest version
// Copyright (c) 2013-2023 xipki. All rights reserved.
// License Apache License 2.0

package org.xipki.scep.transaction;

import org.xipki.util.Args;

/**
 * Operation enum.
 *
 * @author Lijun Liao (xipki)
 */

public enum Operation {

  GetCACaps("GetCACaps"),
  PKIOperation("PKIOperation"),
  GetCACert("GetCACert"),
  GetNextCACert("GetNextCACert");

  private final String code;

  Operation(String code) {
    this.code = code;
  }

  public String getCode() {
    return code;
  }

  public static Operation forValue(String code) {
    Args.notBlank(code, "code");
    for (Operation m : values()) {
      if (code.equalsIgnoreCase(m.code)) {
        return m;
      }
    }
    throw new IllegalArgumentException("invalid Operation " + code);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy