Class CiReaderWriter
java.lang.Object
com.xebialabs.xltype.serialization.rest.CiReaderWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<Object>,jakarta.ws.rs.ext.MessageBodyWriter<Object>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCiReaderWriter(com.xebialabs.deployit.plugin.api.services.Repository repository) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConfigurationItemConverterprotected intReturns the maximum depth that child CIs are rendered.longgetSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisReadable(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) readFrom(Class<Object> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidwriteTo(Object ci, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Field Details
-
formats
-
-
Constructor Details
-
CiReaderWriter
public CiReaderWriter(com.xebialabs.deployit.plugin.api.services.Repository repository)
-
-
Method Details
-
createConverter
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<Object>
-
getSize
public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<Object>
-
writeTo
public void writeTo(Object ci, 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<Object>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
getCiRefsFromLevel
protected int getCiRefsFromLevel()Returns the maximum depth that child CIs are rendered. Default is0, meaning that only simple properties of the top-level CI are written and all child CIs are written as references.- Returns:
- an integer between
0andInteger.MAX_VALUE.
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isReadablein interfacejakarta.ws.rs.ext.MessageBodyReader<Object>
-
readFrom
public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
readFromin interfacejakarta.ws.rs.ext.MessageBodyReader<Object>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-