Class MidpointAbstractProvider<T>

java.lang.Object
org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
com.evolveum.midpoint.common.rest.MidpointAbstractProvider<T>
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<T>, jakarta.ws.rs.ext.MessageBodyWriter<T>
Direct Known Subclasses:
MidpointJsonProvider, MidpointXmlProvider, MidpointYamlProvider

public abstract class MidpointAbstractProvider<T> extends org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider implements jakarta.ws.rs.ext.MessageBodyReader<T>, jakarta.ws.rs.ext.MessageBodyWriter<T>
  • Field Details

  • Constructor Details

    • MidpointAbstractProvider

      public MidpointAbstractProvider()
  • Method Details

    • init

      public void init(List<org.apache.cxf.jaxrs.model.ClassResourceInfo> cris)
      Overrides:
      init in class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
    • isWriteable

      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
    • getSize

      public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
    • writeTo

      public void writeTo(T object, 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:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException
    • getSerializer

      protected abstract PrismSerializer<String> getSerializer()
    • getParser

      protected abstract PrismParser getParser(InputStream entityStream)
    • isReadable

      public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<T>
    • readFrom

      public T readFrom(Class<T> 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:
      readFrom in interface jakarta.ws.rs.ext.MessageBodyReader<T>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException