001package co.codewizards.cloudstore.ls.rest.client; 002 003import javax.ws.rs.ext.ContextResolver; 004import javax.ws.rs.ext.Provider; 005import javax.xml.bind.JAXBContext; 006 007import co.codewizards.cloudstore.core.dto.jaxb.CloudStoreJaxbContext; 008 009/** 010 * {@link ContextResolver} implementation providing the {@link CloudStoreJaxbContext}. 011 * <p> 012 * Due to this {@link ContextResolver}, the REST client is able to serialise and deserialise all our DTOs 013 * to and from XML. 014 * 015 * @author Marco หงุ่ยตระกูล-Schulze - marco at codewizards dot co 016 */ 017@Provider 018public class CloudStoreJaxbContextResolver implements ContextResolver<JAXBContext> { 019 020 @Override 021 public JAXBContext getContext(final Class<?> type) { 022 return CloudStoreJaxbContext.getJaxbContext(); 023 } 024 025}