org.jasig.portlet.courses.dao.xml
Class Jaxb2CourseSummaryHttpMessageConverter

java.lang.Object
  extended by org.springframework.http.converter.AbstractHttpMessageConverter<T>
      extended by org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<T>
          extended by org.springframework.http.converter.xml.AbstractJaxb2HttpMessageConverter<Object>
              extended by org.jasig.portlet.courses.dao.xml.Jaxb2CourseSummaryHttpMessageConverter
All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<Object>

public class Jaxb2CourseSummaryHttpMessageConverter
extends org.springframework.http.converter.xml.AbstractJaxb2HttpMessageConverter<Object>


Field Summary
 
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
 
Constructor Summary
Jaxb2CourseSummaryHttpMessageConverter()
           
 
Method Summary
 boolean canRead(Class<?> clazz, org.springframework.http.MediaType mediaType)
           
 boolean canWrite(Class<?> clazz, org.springframework.http.MediaType mediaType)
           
protected  Marshaller createWrapperMarshaller(Class clazz)
          Creates a new Marshaller for the given class.
protected  Unmarshaller createWrapperUnmarshaller(Class clazz)
          Creates a new Unmarshaller for the given class.
protected  JAXBContext getWrapperJaxbContext(Class clazz)
          Returns a JAXBContext for the given class.
protected  boolean isSupported(org.springframework.http.MediaType mediaType)
           
protected  Object readFromSource(Class<? extends Object> clazz, org.springframework.http.HttpHeaders headers, Source source)
           
protected  boolean supports(Class<?> arg0)
           
protected  void writeToResult(Object o, org.springframework.http.HttpHeaders headers, Result result)
           
 
Methods inherited from class org.springframework.http.converter.xml.AbstractJaxb2HttpMessageConverter
createMarshaller, createUnmarshaller, getJaxbContext
 
Methods inherited from class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter
readInternal, transform, writeInternal
 
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
canRead, canWrite, getContentLength, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jaxb2CourseSummaryHttpMessageConverter

public Jaxb2CourseSummaryHttpMessageConverter()
Method Detail

isSupported

protected boolean isSupported(org.springframework.http.MediaType mediaType)

canRead

public boolean canRead(Class<?> clazz,
                       org.springframework.http.MediaType mediaType)
Specified by:
canRead in interface org.springframework.http.converter.HttpMessageConverter<Object>
Overrides:
canRead in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>

canWrite

public boolean canWrite(Class<?> clazz,
                        org.springframework.http.MediaType mediaType)
Specified by:
canWrite in interface org.springframework.http.converter.HttpMessageConverter<Object>
Overrides:
canWrite in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>

createWrapperMarshaller

protected final Marshaller createWrapperMarshaller(Class clazz)
Creates a new Marshaller for the given class.

Parameters:
clazz - the class to create the marshaller for
Returns:
the Marshaller
Throws:
org.springframework.http.converter.HttpMessageConversionException - in case of JAXB errors

createWrapperUnmarshaller

protected final Unmarshaller createWrapperUnmarshaller(Class clazz)
                                                throws JAXBException
Creates a new Unmarshaller for the given class.

Parameters:
clazz - the class to create the unmarshaller for
Returns:
the Unmarshaller
Throws:
org.springframework.http.converter.HttpMessageConversionException - in case of JAXB errors
JAXBException

getWrapperJaxbContext

protected final JAXBContext getWrapperJaxbContext(Class clazz)
Returns a JAXBContext for the given class.

Parameters:
clazz - the class to return the context for
Returns:
the JAXBContext
Throws:
org.springframework.http.converter.HttpMessageConversionException - in case of JAXB errors

readFromSource

protected Object readFromSource(Class<? extends Object> clazz,
                                org.springframework.http.HttpHeaders headers,
                                Source source)
                         throws IOException
Specified by:
readFromSource in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
Throws:
IOException

writeToResult

protected void writeToResult(Object o,
                             org.springframework.http.HttpHeaders headers,
                             Result result)
                      throws IOException
Specified by:
writeToResult in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
Throws:
IOException

supports

protected boolean supports(Class<?> arg0)
Specified by:
supports in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>


Copyright © 2012 Jasig. All Rights Reserved.