congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FacesServlet$HttpMethod.valueOf
Code IndexAdd Tabnine to your IDE (free)

How to use
valueOf
method
in
javax.faces.webapp.FacesServlet$HttpMethod

Best Java code snippets using javax.faces.webapp.FacesServlet$HttpMethod.valueOf (Showing top 20 results out of 315)

origin: javax/javaee-web-api

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
  }
  return result;
}
origin: com.sun.faces/jsf-api

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
    
  }
  return result;
}
origin: org.glassfish/javax.faces

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
  }
  return result;
}
origin: javax.faces/javax.faces-api

    HttpMethod.valueOf(cur);
    isKnownHttpMethod = true;
  } catch (IllegalArgumentException e) {
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4))
      );
} else if (4 == allowedKnownHttpMethodsStringList.size()) {
  allowedKnownHttpMethods = EnumSet.of(
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0))
      );
origin: jboss/jboss-javaee-specs

    HttpMethod.valueOf(cur);
    isKnownHttpMethod = true;
  } catch (IllegalArgumentException e) {
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4))
      );
} else if (4 == allowedKnownHttpMethodsStringList.size()) {
  allowedKnownHttpMethods = EnumSet.of(
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0))
      );
origin: com.sun.faces/jsf-api

    HttpMethod.valueOf(cur);
    isKnownHttpMethod = true;
  } catch (IllegalArgumentException e) {
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4))
      );
} else if (4 == allowedKnownHttpMethodsStringList.size()) {
  allowedKnownHttpMethods = EnumSet.of(
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0))
      );
origin: javax/javaee-web-api

    HttpMethod.valueOf(cur);
    isKnownHttpMethod = true;
  } catch (IllegalArgumentException e) {
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4))
      );
} else if (4 == allowedKnownHttpMethodsStringList.size()) {
  allowedKnownHttpMethods = EnumSet.of(
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1))
      );
      HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0))
      );
origin: eclipse-ee4j/mojarra

private void initializeAllowedKnownHttpMethods(List<String> allowedKnownHttpMethodsStringList) {
  if (5 == allowedKnownHttpMethodsStringList.size()) {
    allowedKnownHttpMethods = EnumSet.of(
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)));
        EnumSet.of(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)));
      restList.add(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(i)));
    HttpMethod first = HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0));
    HttpMethod[] rest = new HttpMethod[restList.size()];
    restList.toArray(rest);
origin: eclipse-ee4j/mojarra

private void initializeAllowedKnownHttpMethods(List<String> allowedKnownHttpMethodsStringList) {
  if (5 == allowedKnownHttpMethodsStringList.size()) {
    allowedKnownHttpMethods = EnumSet.of(
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)));
        EnumSet.of(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)));
      restList.add(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(i)));
    HttpMethod first = HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0));
    HttpMethod[] rest = new HttpMethod[restList.size()];
    restList.toArray(rest);
origin: org.glassfish/javax.faces

public void initializeAllowedKnownHttpMethods(List<String> allowedKnownHttpMethodsStringList) {
  if (5 == allowedKnownHttpMethodsStringList.size()) {
    allowedKnownHttpMethods = EnumSet.of(
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)));
        EnumSet.of(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)));
      restList.add(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(i)));
    HttpMethod first = HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0));
    HttpMethod[] rest = new HttpMethod[restList.size()];
    restList.toArray(rest);
origin: org.glassfish/jakarta.faces

private void initializeAllowedKnownHttpMethods(List<String> allowedKnownHttpMethodsStringList) {
  if (5 == allowedKnownHttpMethodsStringList.size()) {
    allowedKnownHttpMethods = EnumSet.of(
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(4)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(3)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)), 
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(2)));
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)),
        HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(1)));
        EnumSet.of(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0)));
      restList.add(HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(i)));
    HttpMethod first = HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0));
    HttpMethod[] rest = new HttpMethod[restList.size()];
    restList.toArray(rest);
origin: jboss/jboss-javaee-specs

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
  }
  return result;
}
origin: eclipse-ee4j/mojarra

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
  }
  return result;
}
origin: eclipse-ee4j/mojarra

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
  }
  return result;
}
origin: javax.faces/javax.faces-api

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
  }
  return result;
}
origin: org.glassfish/jakarta.faces

private boolean isHttpMethodValid(HttpServletRequest request) {
  boolean result = false;
  if (allowAllMethods) {
    result = true;
  } else {
    String requestMethodString = request.getMethod();
    HttpMethod requestMethod = null;
    boolean isKnownHttpMethod;
    try {
      requestMethod = HttpMethod.valueOf(requestMethodString);
      isKnownHttpMethod = true;
    } catch (IllegalArgumentException e) {
      isKnownHttpMethod = false;
    }
    if (isKnownHttpMethod) {
      result = allowedKnownHttpMethods.contains(requestMethod);
    } else {
      result = allowedUnknownHttpMethods.contains(requestMethodString);
    }
  }
  return result;
}
origin: eclipse-ee4j/mojarra

private boolean isKnownHttpMethod(String httpMethod) {
  try {
    HttpMethod.valueOf(httpMethod);
    return true;
  } catch (IllegalArgumentException e) {
    return false;
  }
}

origin: org.glassfish/jakarta.faces

private boolean isKnownHttpMethod(String httpMethod) {
  try {
    HttpMethod.valueOf(httpMethod);
    return true;
  } catch (IllegalArgumentException e) {
    return false;
  }
}

origin: eclipse-ee4j/mojarra

private boolean isKnownHttpMethod(String httpMethod) {
  try {
    HttpMethod.valueOf(httpMethod);
    return true;
  } catch (IllegalArgumentException e) {
    return false;
  }
}

origin: org.glassfish/javax.faces

private boolean isKnownHttpMethod(String httpMethod) {
  try {
    HttpMethod.valueOf(httpMethod);
    return true;
  } catch (IllegalArgumentException e) {
    return false;
  }
}

javax.faces.webappFacesServlet$HttpMethodvalueOf

Popular methods of FacesServlet$HttpMethod

  • ordinal
  • values

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • String (java.lang)
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now