Package com.xebialabs.deployit.plumbing
Class DescriptorsJsonWriter
java.lang.Object
com.xebialabs.deployit.plumbing.DescriptorsJsonWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.deployit.plugin.api.reflect.Descriptor>>
@Component
@Provider
@Produces("application/json")
public class DescriptorsJsonWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.deployit.plugin.api.reflect.Descriptor>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(Collection<com.xebialabs.deployit.plugin.api.reflect.Descriptor> descriptors, 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.deployit.plugin.api.reflect.Descriptor> descriptors, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
DescriptorsJsonWriter
public DescriptorsJsonWriter()
-
-
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.deployit.plugin.api.reflect.Descriptor>>
-
getSize
public long getSize(Collection<com.xebialabs.deployit.plugin.api.reflect.Descriptor> descriptors, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<Collection<com.xebialabs.deployit.plugin.api.reflect.Descriptor>>
-
writeTo
public void writeTo(Collection<com.xebialabs.deployit.plugin.api.reflect.Descriptor> descriptors, 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.deployit.plugin.api.reflect.Descriptor>>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-