uk.org.retep.util.xml.jaxb
Class MarshallerFacade

java.lang.Object
  extended by uk.org.retep.util.xml.jaxb.MarshallerFacade
All Implemented Interfaces:
Marshaller

public class MarshallerFacade
extends Object
implements Marshaller

A facade wrapping a Marshaller. Usually a subclass provoides additional logic to the implementation as this class simply passes all calls to the wrapped Marshaller instance

Since:
9.3
Author:
peter

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.xml.bind.Marshaller
Marshaller.Listener
 
Field Summary
protected  Marshaller marshaller
           
 
Fields inherited from interface javax.xml.bind.Marshaller
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION
 
Constructor Summary
MarshallerFacade(Marshaller marshaller)
          Construct a facade around an existing marshaller
 
Method Summary
<A extends XmlAdapter>
A
getAdapter(Class<A> type)
          
 AttachmentMarshaller getAttachmentMarshaller()
          
 ValidationEventHandler getEventHandler()
          
 Marshaller.Listener getListener()
          
 Node getNode(Object contentTree)
          
 Object getProperty(String name)
          
 Schema getSchema()
          
 Marshaller getWrappedMarshaller()
          Return the wrapped Marshaller instance
 void marshal(Object jaxbElement, ContentHandler handler)
          
 void marshal(Object jaxbElement, File output)
          
 void marshal(Object jaxbElement, Node node)
          
 void marshal(Object jaxbElement, OutputStream os)
          
 void marshal(Object jaxbElement, Result result)
          
 void marshal(Object jaxbElement, Writer writer)
          
 void marshal(Object jaxbElement, XMLEventWriter writer)
          
 void marshal(Object jaxbElement, XMLStreamWriter writer)
          
<A extends XmlAdapter>
void
setAdapter(Class<A> type, A adapter)
          
 void setAdapter(XmlAdapter adapter)
          
 void setAttachmentMarshaller(AttachmentMarshaller am)
          
 void setEventHandler(ValidationEventHandler handler)
          
 void setListener(Marshaller.Listener listener)
          
 void setProperty(String name, Object value)
          
 void setSchema(Schema schema)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

marshaller

protected final Marshaller marshaller
Constructor Detail

MarshallerFacade

public MarshallerFacade(Marshaller marshaller)
Construct a facade around an existing marshaller

Parameters:
marshaller -
Method Detail

getWrappedMarshaller

public final Marshaller getWrappedMarshaller()
Return the wrapped Marshaller instance

Returns:

marshal

public void marshal(Object jaxbElement,
                    Result result)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object jaxbElement,
                    OutputStream os)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object jaxbElement,
                    File output)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object jaxbElement,
                    Writer writer)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object jaxbElement,
                    ContentHandler handler)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object jaxbElement,
                    Node node)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object jaxbElement,
                    XMLStreamWriter writer)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object jaxbElement,
                    XMLEventWriter writer)
             throws JAXBException

Specified by:
marshal in interface Marshaller
Throws:
JAXBException

getNode

public Node getNode(Object contentTree)
             throws JAXBException

Specified by:
getNode in interface Marshaller
Throws:
JAXBException

setProperty

public void setProperty(String name,
                        Object value)
                 throws PropertyException

Specified by:
setProperty in interface Marshaller
Throws:
PropertyException

getProperty

public Object getProperty(String name)
                   throws PropertyException

Specified by:
getProperty in interface Marshaller
Throws:
PropertyException

setEventHandler

public void setEventHandler(ValidationEventHandler handler)
                     throws JAXBException

Specified by:
setEventHandler in interface Marshaller
Throws:
JAXBException

getEventHandler

public ValidationEventHandler getEventHandler()
                                       throws JAXBException

Specified by:
getEventHandler in interface Marshaller
Throws:
JAXBException

setAdapter

public void setAdapter(XmlAdapter adapter)

Specified by:
setAdapter in interface Marshaller

setAdapter

public <A extends XmlAdapter> void setAdapter(Class<A> type,
                                              A adapter)

Specified by:
setAdapter in interface Marshaller

getAdapter

public <A extends XmlAdapter> A getAdapter(Class<A> type)

Specified by:
getAdapter in interface Marshaller

setAttachmentMarshaller

public void setAttachmentMarshaller(AttachmentMarshaller am)

Specified by:
setAttachmentMarshaller in interface Marshaller

getAttachmentMarshaller

public AttachmentMarshaller getAttachmentMarshaller()

Specified by:
getAttachmentMarshaller in interface Marshaller

setSchema

public void setSchema(Schema schema)

Specified by:
setSchema in interface Marshaller

getSchema

public Schema getSchema()

Specified by:
getSchema in interface Marshaller

setListener

public void setListener(Marshaller.Listener listener)

Specified by:
setListener in interface Marshaller

getListener

public Marshaller.Listener getListener()

Specified by:
getListener in interface Marshaller


Copyright © 1998-2009 Retep Development Group. All Rights Reserved.