org.springframework.web.servlet.mvc.method.condition
Class RequestConditionFactory

java.lang.Object
  extended by org.springframework.web.servlet.mvc.method.condition.RequestConditionFactory

public abstract class RequestConditionFactory
extends Object

Factory for RequestCondition objects.

Since:
3.1
Author:
Arjen Poutsma, Rossen Stoyanchev

Constructor Summary
RequestConditionFactory()
           
 
Method Summary
static ConsumesRequestCondition parseConsumes(String... consumes)
          Parses the given consumes, and returns them as a single request condition.
static ConsumesRequestCondition parseConsumes(String[] consumes, String[] headers)
          Parses the given consumes and Content-Type headers, and returns them as a single request condition.
static HeadersRequestCondition parseHeaders(String... headers)
          Parses the given headers, and returns them as a single request condition.
static RequestMethodsRequestCondition parseMethods(RequestMethod... methods)
          Parses the given request methods, and returns them as a single request condition.
static ParamsRequestCondition parseParams(String... params)
          Parses the given parameters, and returns them as a single request condition.
static ProducesRequestCondition parseProduces(String... produces)
          Parses the given produces, and returns them as a single request condition.
static ProducesRequestCondition parseProduces(String[] produces, String[] headers)
          Parses the given produces and Accept headers, and returns them as a single request condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestConditionFactory

public RequestConditionFactory()
Method Detail

parseMethods

public static RequestMethodsRequestCondition parseMethods(RequestMethod... methods)
Parses the given request methods, and returns them as a single request condition.

Parameters:
methods - the methods
Returns:
the request condition
See Also:
RequestMapping.method()

parseParams

public static ParamsRequestCondition parseParams(String... params)
Parses the given parameters, and returns them as a single request condition.

Parameters:
params - the parameters
Returns:
the request condition
See Also:
RequestMapping.params()

parseHeaders

public static HeadersRequestCondition parseHeaders(String... headers)
Parses the given headers, and returns them as a single request condition.

Parameters:
headers - the headers
Returns:
the request condition
See Also:
RequestMapping.headers()

parseConsumes

public static ConsumesRequestCondition parseConsumes(String... consumes)
Parses the given consumes, and returns them as a single request condition.

Parameters:
consumes - the consumes
Returns:
the request condition
See Also:
RequestMapping.consumes()

parseConsumes

public static ConsumesRequestCondition parseConsumes(String[] consumes,
                                                     String[] headers)
Parses the given consumes and Content-Type headers, and returns them as a single request condition.

Only Content-Type headers will be used, all other headers will be ignored.

Parameters:
consumes - the consumes
headers - the headers
Returns:
the request condition
See Also:
RequestMapping.consumes()

parseProduces

public static ProducesRequestCondition parseProduces(String... produces)
Parses the given produces, and returns them as a single request condition.

Parameters:
produces - the produces
Returns:
the request condition
See Also:
RequestMapping.produces()

parseProduces

public static ProducesRequestCondition parseProduces(String[] produces,
                                                     String[] headers)
Parses the given produces and Accept headers, and returns them as a single request condition.

Only Accept headers will be used, all other headers will be ignored.

Parameters:
produces - the consumes
headers - the headers
Returns:
the request condition
See Also:
RequestMapping.produces()