com.fabula.timeline.service.rest.impl
Class JAXBContextResolver

java.lang.Object
  extended by com.fabula.timeline.service.rest.impl.JAXBContextResolver
All Implemented Interfaces:
javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext>

@Provider
public class JAXBContextResolver
extends java.lang.Object
implements javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext>

This context resolver was created to serialize/deserialize JSON with one element correctly. This way brackets [] are added even if the list contains one element. All lists must be added to this this context resolver.

Author:
andekr

Constructor Summary
JAXBContextResolver()
           
 
Method Summary
 javax.xml.bind.JAXBContext getContext(java.lang.Class<?> objectType)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBContextResolver

public JAXBContextResolver()
                    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getContext

public javax.xml.bind.JAXBContext getContext(java.lang.Class<?> objectType)
Specified by:
getContext in interface javax.ws.rs.ext.ContextResolver<javax.xml.bind.JAXBContext>