
com.liferay.headless.batch.engine.internal.jaxrs.application.ObjectMessageBodyReader Maven / Gradle / Ivy
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.headless.batch.engine.internal.jaxrs.application;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;
import javax.ws.rs.Consumes;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.Provider;
import org.osgi.service.component.annotations.Component;
/**
* @author Javier Gamarra
*/
@Component(
property = {
"osgi.jaxrs.application.select=(osgi.jaxrs.name=Liferay.Headless.Batch.Engine)",
"osgi.jaxrs.extension=true",
"osgi.jaxrs.name=Liferay.Headless.Batch.Engine.ObjectMessageBodyReader"
},
service = MessageBodyReader.class
)
@Consumes({"application/x-ndjson", "text/csv"})
@Provider
public class ObjectMessageBodyReader implements MessageBodyReader
© 2015 - 2025 Weber Informatics LLC | Privacy Policy