Example usage for org.springframework.web.servlet.mvc.condition ProducesRequestCondition getProducibleMediaTypes

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

Introduction

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

Prototype

public Set<MediaType> getProducibleMediaTypes() 

Source Link

Document

Return the contained producible media types excluding negated expressions.

Usage

From source file:springfox.documentation.spring.data.rest.EntitySearchRequestHandler.java

@Override
public Set<? extends MediaType> produces() {
    ProducesRequestCondition producesCondition = requestMapping.getProducesCondition();
    if (searchResource.getDescription() != null) {
        MediaType type = searchResource.getDescription().getType();
        producesCondition.combine(new ProducesRequestCondition(type.toString()));
    }//from  w  w w .ja  v a2s.  c  o m
    return producesCondition.getProducibleMediaTypes();
}