Class CiJsonMessageBodyReaderWriter

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>, javax.ws.rs.ext.MessageBodyWriter<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>

    @Component
    @Provider
    @Consumes("application/json")
    @Produces("application/json")
    public class CiJsonMessageBodyReaderWriter
    extends java.lang.Object
    implements javax.ws.rs.ext.MessageBodyWriter<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>, javax.ws.rs.ext.MessageBodyReader<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getSize​(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      boolean isReadable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      boolean isWriteable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      com.xebialabs.deployit.plugin.api.udm.ConfigurationItem readFrom​(java.lang.Class<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpHeaders, java.io.InputStream entityStream)  
      static java.lang.String toString​(java.io.InputStream in)  
      void writeTo​(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem ci, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders, java.io.OutputStream entityStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CiJsonMessageBodyReaderWriter

        @Autowired
        public CiJsonMessageBodyReaderWriter​(ReaderPostProcessor postProcessor)
    • Method Detail

      • isWriteable

        public boolean isWriteable​(java.lang.Class<?> type,
                                   java.lang.reflect.Type genericType,
                                   java.lang.annotation.Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
      • isReadable

        public boolean isReadable​(java.lang.Class<?> type,
                                  java.lang.reflect.Type genericType,
                                  java.lang.annotation.Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
      • getSize

        public long getSize​(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem t,
                            java.lang.Class<?> type,
                            java.lang.reflect.Type genericType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
      • writeTo

        public void writeTo​(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem ci,
                            java.lang.Class<?> type,
                            java.lang.reflect.Type genericType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders,
                            java.io.OutputStream entityStream)
                     throws java.io.IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException
      • readFrom

        public com.xebialabs.deployit.plugin.api.udm.ConfigurationItem readFrom​(java.lang.Class<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> type,
                                                                                java.lang.reflect.Type genericType,
                                                                                java.lang.annotation.Annotation[] annotations,
                                                                                javax.ws.rs.core.MediaType mediaType,
                                                                                javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpHeaders,
                                                                                java.io.InputStream entityStream)
                                                                         throws javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
        Throws:
        javax.ws.rs.WebApplicationException
      • toString

        public static java.lang.String toString​(java.io.InputStream in)