Package org.springframework.http.converter

Examples of org.springframework.http.converter.FormHttpMessageConverter$MultipartHttpOutputMessage


    objectMapper.configure(WRITE_DATES_AS_TIMESTAMPS, false);
    objectMapper.configure(FAIL_ON_EMPTY_BEANS, false);
    objectMapper.setSerializationInclusion(NON_NULL);
    jsonConverter.setObjectMapper(objectMapper);
   
    FormHttpMessageConverter formHttpMessageConverter = new FormHttpMessageConverter();
    formHttpMessageConverter.addPartConverter(jsonConverter);
   
    List<HttpMessageConverter<?>> messageConverters = new ArrayList<HttpMessageConverter<?>>();
    messageConverters.add(jsonConverter);
    messageConverters.add(new ByteArrayHttpMessageConverter());
    messageConverters.add(formHttpMessageConverter);
View Full Code Here


    messageConverters.add(new MappingJacksonHttpMessageConverter());
    return messageConverters;
  }

  private FormHttpMessageConverter getFormHttpMessageConverter() {
    FormHttpMessageConverter formPartsMessageConverter = new CloudControllerClientImpl.CloudFoundryFormHttpMessageConverter();
    formPartsMessageConverter.setPartConverters(getFormPartsMessageConverters());
    return formPartsMessageConverter;
  }
View Full Code Here

  private final FormHttpMessageConverter delegateMessageConverter;

  public FormOAuth2AccessTokenMessageConverter() {
    super(MediaType.APPLICATION_FORM_URLENCODED, MediaType.TEXT_PLAIN);
    this.delegateMessageConverter = new FormHttpMessageConverter();
  }
View Full Code Here

    }
   
    @Override
    protected RestTemplate createRestTemplate() {
        RestTemplate restTemplate = new RestTemplate(ClientHttpRequestFactorySelector.getRequestFactory());
        FormHttpMessageConverter messageConverter = new FormHttpMessageConverter() {
            public boolean canRead(Class<?> clazz, MediaType mediaType) {
                return true;
            }
        };
        restTemplate.setMessageConverters(Collections.<HttpMessageConverter<?>>singletonList(messageConverter));
View Full Code Here

@Configuration
public class WebConfig extends WebMvcConfigurationSupport {

  @Override
  protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    FormHttpMessageConverter formConverter = new FormHttpMessageConverter();
    formConverter.addPartConverter(new BufferedImageHttpMessageConverter());
    formConverter.addPartConverter(new MappingJacksonHttpMessageConverter());
    converters.add(formConverter);
  }
View Full Code Here

  /** Create a new instance of the {@link RestTemplate} using default settings. */
  public RestTemplate() {
    this.messageConverters.add(new ByteArrayHttpMessageConverter());
    this.messageConverters.add(new StringHttpMessageConverter());
    this.messageConverters.add(new FormHttpMessageConverter());
    this.messageConverters.add(new SourceHttpMessageConverter());
    if (jaxb2Present) {
      this.messageConverters.add(new Jaxb2RootElementHttpMessageConverter());
    }
    if (jacksonPresent) {
View Full Code Here

    private RestTemplate restTemplate = new RestTemplate();
    private EmailValidator emailValidator = new EmailValidator();

    public AuthenticationController() {
        HttpMessageConverter<?> formHttpMessageConverter = new FormHttpMessageConverter();
        HttpMessageConverter<?> stringHttpMessageConverternew = new StringHttpMessageConverter();
        restTemplate.getMessageConverters().add(formHttpMessageConverter);
        restTemplate.getMessageConverters().add(stringHttpMessageConverternew);
    }
View Full Code Here

public class FormMapHttpMessageConverter implements HttpMessageConverter<Map<String, String>> {

  private final FormHttpMessageConverter delegate;
 
  public FormMapHttpMessageConverter() {
    delegate = new FormHttpMessageConverter();
  }
View Full Code Here

     * @param clientSecret
     * @param authorizeUrl
     * @param accessTokenUrl
     */
    public OAuth2Support(String clientId, String clientSecret, String authorizeUrl, String accessTokenUrl) {
        super(Arrays.<HttpMessageConverter<?>> asList(new FormHttpMessageConverter() {
             public boolean canRead(Class<?> clazz, MediaType mediaType) {
                 return clazz.equals(Map.class) && mediaType != null && mediaType.getType().equals("text")
                         && mediaType.getSubtype().equals("plain");
             }
         }, new MappingJackson2HttpMessageConverter()));
View Full Code Here

     * Constructs an OAuth1Template.
     * @param oauth10a if true this template operates against an OAuth 1.0a provider. If false, it works in OAuth 1.0 mode.
     */
    public OAuth1Support(String consumerKey, String consumerSecret, String requestTokenUrl, String authorizeUrl, String accessTokenUrl, boolean oauth10a) {
        super(Arrays.<HttpMessageConverter<?>> asList(
                new StringHttpMessageConverter(), new FormHttpMessageConverter()));
        this.consumerKey = consumerKey;
        this.consumerSecret = consumerSecret;
        this.requestTokenUrl = requestTokenUrl;
        this.oauth10a = oauth10a;
        this.authorizeUrlTemplate = new UriTemplate(authorizeUrl);
View Full Code Here

TOP

Related Classes of org.springframework.http.converter.FormHttpMessageConverter$MultipartHttpOutputMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.