class ExpirationAction implements Serializable {

  public static ExpirationAction fromXmlString(String xmlValue) {
    switch (xmlValue) {
      case "invalidate":
        return INVALIDATE;
      case "destroy":
        return DESTROY;
      case "local-destroy":
        return LOCAL_DESTROY;
      case "local-invalidate":
        return LOCAL_INVALIDATE;
      default:
        throw new IllegalArgumentException("invalid expiration action: " + xmlValue);
    }
  }

  private  ExpirationAction(String name);

}