/** * Returns parameter value in a normalized form (uppercase, trimmed and {@code null} if empty string) * considering the config flags. * * @param source Config flag to look for (if set in the config, this method returns the param value, * if not set, this method returns {@code null}). * @param paramsMap Map to retrieve the parameter from. * @param paramName Name of the parameter to retrieve. * @return Normalized parameter value. Never returns an empty string - converts it to {@code null}. */ private String getParamValue(final Source source, final MultivaluedMap<String, String> paramsMap, final String paramName) { String value = source.isPresentIn(config) ? paramsMap.getFirst(paramName) : null; if (value == null) { return null; } value = value.trim(); return value.length() == 0 ? null : value.toUpperCase(); }
for (int i = 0; i < stringValues.length; i++) { try { result[i] = Source.valueOf(stringValues[i]); } catch (final IllegalArgumentException e) { Logger.getLogger(HttpMethodOverrideFilter.class.getName()).log(Level.WARNING,
for (int i = 0; i < stringValues.length; i++) { try { result[i] = Source.valueOf(stringValues[i]); } catch (final IllegalArgumentException e) { Logger.getLogger(HttpMethodOverrideFilter.class.getName()).log(Level.WARNING,
for (int i = 0; i < stringValues.length; i++) { try { result[i] = Source.valueOf(stringValues[i]); } catch (final IllegalArgumentException e) { Logger.getLogger(HttpMethodOverrideFilter.class.getName()).log(Level.WARNING,
for (int i = 0; i < stringValues.length; i++) { try { result[i] = Source.valueOf(stringValues[i]); } catch (final IllegalArgumentException e) { Logger.getLogger(HttpMethodOverrideFilter.class.getName()).log(Level.WARNING,
for (int i = 0; i < stringValues.length; i++) { try { result[i] = Source.valueOf(stringValues[i]); } catch (final IllegalArgumentException e) { Logger.getLogger(HttpMethodOverrideFilter.class.getName()).log(Level.WARNING,
/** * Initializes this filter setting the sources of information the filter should look for. * * @param sources Sources of method override information. If empty, both * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#HEADER} and * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#QUERY} will * be added to the config by default. */ public HttpMethodOverrideFilter(final Source... sources) { int c = 0; for (final Source cf : sources) { if (cf != null) { c |= cf.getFlag(); } } if (c == 0) { c = 3; } this.config = c; }
/** * Initializes this filter setting the sources of information the filter should look for. * * @param sources Sources of method override information. If empty, both * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#HEADER} and * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#QUERY} will * be added to the config by default. */ public HttpMethodOverrideFilter(final Source... sources) { int c = 0; for (final Source cf : sources) { if (cf != null) { c |= cf.getFlag(); } } if (c == 0) { c = 3; } this.config = c; }
/** * Initializes this filter setting the sources of information the filter should look for. * * @param sources Sources of method override information. If empty, both * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#HEADER} and * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#QUERY} will * be added to the config by default. */ public HttpMethodOverrideFilter(final Source... sources) { int c = 0; for (final Source cf : sources) { if (cf != null) { c |= cf.getFlag(); } } if (c == 0) { c = 3; } this.config = c; }
/** * Initializes this filter setting the sources of information the filter should look for. * * @param sources Sources of method override information. If empty, both * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#HEADER} and * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#QUERY} will * be added to the config by default. */ public HttpMethodOverrideFilter(final Source... sources) { int c = 0; for (final Source cf : sources) { if (cf != null) { c |= cf.getFlag(); } } if (c == 0) { c = 3; } this.config = c; }
/** * Returns parameter value in a normalized form (uppercase, trimmed and {@code null} if empty string) * considering the config flags. * * @param source Config flag to look for (if set in the config, this method returns the param value, * if not set, this method returns {@code null}). * @param paramsMap Map to retrieve the parameter from. * @param paramName Name of the parameter to retrieve. * @return Normalized parameter value. Never returns an empty string - converts it to {@code null}. */ private String getParamValue(final Source source, final MultivaluedMap<String, String> paramsMap, final String paramName) { String value = source.isPresentIn(config) ? paramsMap.getFirst(paramName) : null; if (value == null) { return null; } value = value.trim(); return value.length() == 0 ? null : value.toUpperCase(); }
/** * Returns parameter value in a normalized form (uppercase, trimmed and {@code null} if empty string) * considering the config flags. * * @param source Config flag to look for (if set in the config, this method returns the param value, * if not set, this method returns {@code null}). * @param paramsMap Map to retrieve the parameter from. * @param paramName Name of the parameter to retrieve. * @return Normalized parameter value. Never returns an empty string - converts it to {@code null}. */ private String getParamValue(final Source source, final MultivaluedMap<String, String> paramsMap, final String paramName) { String value = source.isPresentIn(config) ? paramsMap.getFirst(paramName) : null; if (value == null) { return null; } value = value.trim(); return value.length() == 0 ? null : value.toUpperCase(); }
/** * Returns parameter value in a normalized form (uppercase, trimmed and {@code null} if empty string) * considering the config flags. * * @param source Config flag to look for (if set in the config, this method returns the param value, * if not set, this method returns {@code null}). * @param paramsMap Map to retrieve the parameter from. * @param paramName Name of the parameter to retrieve. * @return Normalized parameter value. Never returns an empty string - converts it to {@code null}. */ private String getParamValue(final Source source, final MultivaluedMap<String, String> paramsMap, final String paramName) { String value = source.isPresentIn(config) ? paramsMap.getFirst(paramName) : null; if (value == null) { return null; } value = value.trim(); return value.length() == 0 ? null : value.toUpperCase(); }
/** * Returns parameter value in a normalized form (uppercase, trimmed and {@code null} if empty string) * considering the config flags. * * @param source Config flag to look for (if set in the config, this method returns the param value, * if not set, this method returns {@code null}). * @param paramsMap Map to retrieve the parameter from. * @param paramName Name of the parameter to retrieve. * @return Normalized parameter value. Never returns an empty string - converts it to {@code null}. */ private String getParamValue(final Source source, final MultivaluedMap<String, String> paramsMap, final String paramName) { String value = source.isPresentIn(config) ? paramsMap.getFirst(paramName) : null; if (value == null) { return null; } value = value.trim(); return value.length() == 0 ? null : value.toUpperCase(); }
for (int i = 0; i < stringValues.length; i++) { try { result[i] = Source.valueOf(stringValues[i]); } catch (final IllegalArgumentException e) { Logger.getLogger(HttpMethodOverrideFilter.class.getName()).log(Level.WARNING,
/** * Initializes this filter setting the sources of information the filter should look for. * * @param sources Sources of method override information. If empty, both * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#HEADER} and * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#QUERY} will * be added to the config by default. */ public HttpMethodOverrideFilter(final Source... sources) { int c = 0; for (final Source cf : sources) { if (cf != null) { c |= cf.getFlag(); } } if (c == 0) { c = 3; } this.config = c; }
/** * Returns parameter value in a normalized form (uppercase, trimmed and {@code null} if empty string) * considering the config flags. * * @param source Config flag to look for (if set in the config, this method returns the param value, * if not set, this method returns {@code null}). * @param paramsMap Map to retrieve the parameter from. * @param paramName Name of the parameter to retrieve. * @return Normalized parameter value. Never returns an empty string - converts it to {@code null}. */ private String getParamValue(final Source source, final MultivaluedMap<String, String> paramsMap, final String paramName) { String value = source.isPresentIn(config) ? paramsMap.getFirst(paramName) : null; if (value == null) { return null; } value = value.trim(); return value.length() == 0 ? null : value.toUpperCase(); }
for (int i = 0; i < stringValues.length; i++) { try { result[i] = Source.valueOf(stringValues[i]); } catch (final IllegalArgumentException e) { Logger.getLogger(HttpMethodOverrideFilter.class.getName()).log(Level.WARNING,
/** * Initializes this filter setting the sources of information the filter should look for. * * @param sources Sources of method override information. If empty, both * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#HEADER} and * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#QUERY} will * be added to the config by default. */ public HttpMethodOverrideFilter(final Source... sources) { int c = 0; for (final Source cf : sources) { if (cf != null) { c |= cf.getFlag(); } } if (c == 0) { c = 3; } this.config = c; }
/** * Initializes this filter setting the sources of information the filter should look for. * * @param sources Sources of method override information. If empty, both * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#HEADER} and * {@link org.glassfish.jersey.server.filter.HttpMethodOverrideFilter.Source#QUERY} will * be added to the config by default. */ public HttpMethodOverrideFilter(final Source... sources) { int c = 0; for (final Source cf : sources) { if (cf != null) { c |= cf.getFlag(); } } if (c == 0) { c = 3; } this.config = c; }