Example usage for org.springframework.web.servlet.mvc.condition ParamsRequestCondition ParamsRequestCondition

List of usage examples for org.springframework.web.servlet.mvc.condition ParamsRequestCondition ParamsRequestCondition

Introduction

In this page you can find the example usage for org.springframework.web.servlet.mvc.condition ParamsRequestCondition ParamsRequestCondition.

Prototype

private ParamsRequestCondition(Collection<ParamExpression> conditions) 

Source Link

Usage

From source file:net.sf.cocmvc.ConventionalHandlerMapping.java

private RequestMappingInfo createRequestMapping(RequestMapping annotation,
        RequestCondition<?> customCondition) {
    return new RequestMappingInfo(createPatternRequestCondition(annotation.value()),
            new RequestMethodsRequestCondition(annotation.method()),
            new ParamsRequestCondition(annotation.params()), new HeadersRequestCondition(annotation.headers()),
            new ConsumesRequestCondition(annotation.consumes(), annotation.headers()),
            new ProducesRequestCondition(annotation.produces(), annotation.headers()), customCondition);
}

From source file:org.makersoft.mvc.method.annotation.RESTfulMappingHandlerMapping.java

/**
 * Created a RequestMappingInfo from a RequestMapping annotation.
 *///www.j  av a2s.c o m
private RequestMappingInfo createRequestMappingInfo(Method method, RESTfull annotation,
        Class<?> controllerClass) {

    Mapping mapping = RESTfulHelper.matchMapping(method.getName());

    if (mapping != null) {
        PackageBasedUrlPathBuilder builder = new PackageBasedUrlPathBuilder(packageLocators, controllerPackages,
                controllerSuffix, root);

        String[] namespaceString = builder.buildUrlPath(controllerClass, mapping.getMethodName(),
                mapping.getValues());
        if (namespaceString != null) {
            return new RequestMappingInfo(
                    new PatternsRequestCondition(namespaceString, getUrlPathHelper(), getPathMatcher(),
                            this.useSuffixPatternMatch, this.useTrailingSlashMatch),
                    new RequestMethodsRequestCondition(mapping.getRequestMethods()),
                    new ParamsRequestCondition(mapping.getParams()),
                    new HeadersRequestCondition(mapping.getHeaders()),
                    new ConsumesRequestCondition(mapping.getConsumes(), mapping.getHeaders()),
                    new ProducesRequestCondition(mapping.getProduces(), mapping.getHeaders()),
                    getCustomMethodCondition(method));
        }

    }

    return null;
}