private static XFrameOption getEnum(String value) {
      Preconditions.checkState(value != null && !value.isEmpty());
      for (XFrameOption xoption : values()) {
        if (value.equals(xoption.toString())) {
          return xoption;
        }
      }
      throw new IllegalArgumentException("Unexpected value in xFrameOption.");
    }
We cannot use valueOf since the AllowFrom enum differs from its value
Allow-From. This is a helper method that does exactly what valueof does,
but allows us to handle the AllowFrom issue gracefully.

@param value - String must be DENY, SAMEORIGIN or ALLOW-FROM.
@return XFrameOption or throws IllegalException.
common/src/java/org/apache/hive/http/HttpServer.java