eXo WS :: REST :: Extentions 2.3.0-GA

org.exoplatform.services.rest.ext.provider
Class HierarchicalPropertyEntityProvider

java.lang.Object
  extended by org.exoplatform.services.rest.ext.provider.HierarchicalPropertyEntityProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<HierarchicalProperty>, javax.ws.rs.ext.MessageBodyWriter<HierarchicalProperty>, EntityProvider<HierarchicalProperty>

@Provider
public class HierarchicalPropertyEntityProvider
extends Object
implements EntityProvider<HierarchicalProperty>

Converts stream to HierarchicalProperty and serializes HierarchicalProperty in given stream.

Version:
$Id: HierarchicalPropertyEntityProvider.java
Author:
Dmytro Katayev

Constructor Summary
HierarchicalPropertyEntityProvider()
           
 
Method Summary
 long getSize(HierarchicalProperty t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
          
 boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
          
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
          
 HierarchicalProperty readFrom(Class<HierarchicalProperty> t, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
          
 void writeTo(HierarchicalProperty t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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<HierarchicalProperty>

readFrom

public HierarchicalProperty readFrom(Class<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<HierarchicalProperty>
Throws:
IOException
javax.ws.rs.WebApplicationException

getSize

public long getSize(HierarchicalProperty t,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)

Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<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<HierarchicalProperty>

writeTo

public void writeTo(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<HierarchicalProperty>
Throws:
IOException
javax.ws.rs.WebApplicationException

eXo WS :: REST :: Extentions 2.3.0-GA

Copyright © 2012 eXo Platform SAS. All Rights Reserved.