Package com.xebialabs.deployit.plumbing
Class ImportResultsJsonWriter
java.lang.Object
com.xebialabs.deployit.plumbing.ImportResultsJsonWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.xlrelease.views.ImportResult>>
@Component
@Provider
@Produces({"application/json","text/html"})
public class ImportResultsJsonWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.xlrelease.views.ImportResult>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(Collection<com.xebialabs.xlrelease.views.ImportResult> importResults, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) voidwriteTo(Collection<com.xebialabs.xlrelease.views.ImportResult> importResults, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
ImportResultsJsonWriter
public ImportResultsJsonWriter()
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.xlrelease.views.ImportResult>>
-
getSize
public long getSize(Collection<com.xebialabs.xlrelease.views.ImportResult> importResults, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.xlrelease.views.ImportResult>>
-
writeTo
public void writeTo(Collection<com.xebialabs.xlrelease.views.ImportResult> importResults, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.xlrelease.views.ImportResult>>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-