Class HierarchicalPropertyEntityProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<org.exoplatform.common.util.HierarchicalProperty>, javax.ws.rs.ext.MessageBodyWriter<org.exoplatform.common.util.HierarchicalProperty>, org.exoplatform.services.rest.provider.EntityProvider<org.exoplatform.common.util.HierarchicalProperty>

    @Provider
    public class HierarchicalPropertyEntityProvider
    extends Object
    implements org.exoplatform.services.rest.provider.EntityProvider<org.exoplatform.common.util.HierarchicalProperty>
    Converts stream to HierarchicalProperty and serializes HierarchicalProperty in given stream.
    Version:
    $Id: HierarchicalPropertyEntityProvider.java
    Author:
    Dmytro Katayev
    • Constructor Detail

      • HierarchicalPropertyEntityProvider

        public HierarchicalPropertyEntityProvider()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<org.exoplatform.common.util.HierarchicalProperty>
      • readFrom

        public org.exoplatform.common.util.HierarchicalProperty readFrom​(Class<org.exoplatform.common.util.HierarchicalProperty> t,
                                                                         Type genericType,
                                                                         Annotation[] annotations,
                                                                         javax.ws.rs.core.MediaType mediaType,
                                                                         javax.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                                                                         InputStream entityStream)
                                                                  throws IOException,
                                                                         javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<org.exoplatform.common.util.HierarchicalProperty>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException
      • getSize

        public long getSize​(org.exoplatform.common.util.HierarchicalProperty t,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<org.exoplatform.common.util.HierarchicalProperty>
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<org.exoplatform.common.util.HierarchicalProperty>
      • writeTo

        public void writeTo​(org.exoplatform.common.util.HierarchicalProperty t,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<org.exoplatform.common.util.HierarchicalProperty>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException