Search in sources :

Example 1 with CsvMessageConverter

use of com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvMessageConverter in project ma-core-public by infiniteautomation.

the class MangoRestSpringConfiguration method configureMessageConverters.

/**
 * Configure the Message Converters for the API for now only JSON
 */
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    converters.add(new ResourceHttpMessageConverter());
    converters.add(new MappingJackson2HttpMessageConverter(getObjectMapper()));
    converters.add(new CsvMessageConverter());
    converters.add(new CsvRowMessageConverter());
    converters.add(new CsvQueryArrayStreamMessageConverter());
    converters.add(new CsvDataPageQueryStreamMessageConverter());
    converters.add(new ByteArrayHttpMessageConverter());
    converters.add(new HtmlHttpMessageConverter());
    converters.add(new SerotoninJsonMessageConverter());
    converters.add(new ExceptionCsvMessageConverter());
    // Now is a good time to register our Sero Json Converter
    Common.JSON_CONTEXT.addConverter(new AbstractRestModelConverter(), AbstractRestModel.class);
}
Also used : CsvDataPageQueryStreamMessageConverter(com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvDataPageQueryStreamMessageConverter) SerotoninJsonMessageConverter(com.serotonin.m2m2.web.mvc.rest.v1.converters.SerotoninJsonMessageConverter) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) CsvQueryArrayStreamMessageConverter(com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvQueryArrayStreamMessageConverter) CsvRowMessageConverter(com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvRowMessageConverter) HtmlHttpMessageConverter(com.serotonin.m2m2.web.mvc.rest.v1.converters.HtmlHttpMessageConverter) ResourceHttpMessageConverter(org.springframework.http.converter.ResourceHttpMessageConverter) ByteArrayHttpMessageConverter(org.springframework.http.converter.ByteArrayHttpMessageConverter) AbstractRestModelConverter(com.serotonin.m2m2.util.AbstractRestModelConverter) ExceptionCsvMessageConverter(com.infiniteautomation.mango.rest.v2.converters.ExceptionCsvMessageConverter) CsvMessageConverter(com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvMessageConverter) ExceptionCsvMessageConverter(com.infiniteautomation.mango.rest.v2.converters.ExceptionCsvMessageConverter)

Aggregations

ExceptionCsvMessageConverter (com.infiniteautomation.mango.rest.v2.converters.ExceptionCsvMessageConverter)1 AbstractRestModelConverter (com.serotonin.m2m2.util.AbstractRestModelConverter)1 CsvDataPageQueryStreamMessageConverter (com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvDataPageQueryStreamMessageConverter)1 CsvMessageConverter (com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvMessageConverter)1 CsvQueryArrayStreamMessageConverter (com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvQueryArrayStreamMessageConverter)1 CsvRowMessageConverter (com.serotonin.m2m2.web.mvc.rest.v1.converters.CsvRowMessageConverter)1 HtmlHttpMessageConverter (com.serotonin.m2m2.web.mvc.rest.v1.converters.HtmlHttpMessageConverter)1 SerotoninJsonMessageConverter (com.serotonin.m2m2.web.mvc.rest.v1.converters.SerotoninJsonMessageConverter)1 ByteArrayHttpMessageConverter (org.springframework.http.converter.ByteArrayHttpMessageConverter)1 ResourceHttpMessageConverter (org.springframework.http.converter.ResourceHttpMessageConverter)1 MappingJackson2HttpMessageConverter (org.springframework.http.converter.json.MappingJackson2HttpMessageConverter)1