Codota Logo
FacesServlet$HttpMethod
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain FacesServlet$HttpMethod
private void myMethod () {
FacesServlet$HttpMethod f =
  • Codota IconFacesServlet.HttpMethod HttpMethod;String requestMethodString;HttpMethod.valueOf(requestMethodString)
  • Codota IconFacesServlet.HttpMethod HttpMethod;List allowedKnownHttpMethodsStringList;HttpMethod.valueOf(allowedKnownHttpMethodsStringList.get(0))
  • Smart code suggestions by Codota
}
origin: org.glassfish/javax.faces

private void logUnknownHttpMethod(String httpMethod) {
  if (LOGGER.isLoggable(WARNING)) {
    HttpMethod[] values = HttpMethod.values();
    Object[] arg = new Object[values.length + 1];
    arg[0] = httpMethod;
    System.arraycopy(values, HttpMethod.OPTIONS.ordinal(), arg, 1, values.length);
    
    LOGGER.log(WARNING, "warning.webapp.facesservlet.init_invalid_http_method", arg);
  }
}

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: 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/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: eclipse-ee4j/mojarra

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

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: 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: 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: eclipse-ee4j/mojarra

private void logUnknownHttpMethod(String httpMethod) {
  if (LOGGER.isLoggable(WARNING)) {
    HttpMethod[] values = HttpMethod.values();
    Object[] arg = new Object[values.length + 1];
    arg[0] = httpMethod;
    System.arraycopy(values, HttpMethod.OPTIONS.ordinal(), arg, 1, values.length);
    
    LOGGER.log(WARNING, "warning.webapp.facesservlet.init_invalid_http_method", arg);
  }
}

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 boolean isKnownHttpMethod(String httpMethod) {
  try {
    HttpMethod.valueOf(httpMethod);
    return true;
  } catch (IllegalArgumentException e) {
    return false;
  }
}

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/jakarta.faces

private void logUnknownHttpMethod(String httpMethod) {
  if (LOGGER.isLoggable(WARNING)) {
    HttpMethod[] values = HttpMethod.values();
    Object[] arg = new Object[values.length + 1];
    arg[0] = httpMethod;
    System.arraycopy(values, HttpMethod.OPTIONS.ordinal(), arg, 1, values.length);
    
    LOGGER.log(WARNING, "warning.webapp.facesservlet.init_invalid_http_method", arg);
  }
}

origin: com.sun.faces/jsf-api

    HttpMethod.valueOf(cur);
    isKnownHttpMethod = true;
  } catch (IllegalArgumentException e) {
      HttpMethod [] values = HttpMethod.values();
      Object [] arg = new Object[values.length + 1];
      arg[0] = cur;
      System.arraycopy(values, HttpMethod.OPTIONS.ordinal(), 
               arg, 1, values.length);
      LOGGER.log(Level.WARNING,
      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))
      );
origin: org.glassfish/javax.faces

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

origin: javax/javaee-web-api

    HttpMethod.valueOf(cur);
    isKnownHttpMethod = true;
  } catch (IllegalArgumentException e) {
      HttpMethod [] values = HttpMethod.values();
      Object [] arg = new Object[values.length + 1];
      arg[0] = cur;
      System.arraycopy(values, HttpMethod.OPTIONS.ordinal(),
               arg, 1, values.length);
      LOGGER.log(Level.WARNING,
      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))
      );
origin: org.glassfish/jakarta.faces

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

javax.faces.webappFacesServlet$HttpMethod

Most used methods

  • ordinal
  • valueOf
  • values

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JFrame (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now