Interface BlockFactory
-
- All Known Subinterfaces:
DataSourceBlockFactory,JAXBBlockFactory,OMBlockFactory,SOAPEnvelopeBlockFactory,SourceBlockFactory,XMLStringBlockFactory
- All Known Implementing Classes:
BlockFactoryImpl,DataSourceBlockFactoryImpl,JAXBBlockFactoryImpl,OMBlockFactoryImpl,SOAPEnvelopeBlockFactoryImpl,SourceBlockFactoryImpl,XMLStringBlockFactoryImpl
public interface BlockFactoryBlockFactory Interface to create Block objects An object is created from either a reader, another Block or the BusinessObject. Some business objects (like JAXB) have an associated context object (JAXBContext), these are also passed to the createMethods. The implementation of BlockFactories should always be singleton objects and never carry any instance data. The FactoryRegistry should be used to get access to a Factory- See Also:
FactoryRegistry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockcreateFrom(Object businessObject, Object context, QName qName)Create from business objectBlockcreateFrom(XMLStreamReader reader, Object context, QName qName)createBlock from XMLStreamReaderBlockcreateFrom(OMElement omElement, Object context, QName qName)createBlock from XMLStreamReaderBlockcreateFrom(Block other, Object context)createBlock from another Block If the other Block was created with the same factory and has the same context, the other Block is returned.booleanisElement()
-
-
-
Method Detail
-
createFrom
Block createFrom(XMLStreamReader reader, Object context, QName qName) throws XMLStreamException, WebServiceException
createBlock from XMLStreamReader- Parameters:
reader- XMLStreamReadercontext- Associated Context or nullQName- must be supplied if known- Throws:
XMLStreamExceptionWebServiceException
-
createFrom
Block createFrom(OMElement omElement, Object context, QName qName) throws XMLStreamException, WebServiceException
createBlock from XMLStreamReader- Parameters:
omElement- OMElementcontext- Associated Context or nullQName- must be supplied if known- Throws:
XMLStreamExceptionWebServiceException
-
createFrom
Block createFrom(Block other, Object context) throws XMLStreamException, WebServiceException
createBlock from another Block If the other Block was created with the same factory and has the same context, the other Block is returned. If the other Block was created by a different factory or diffent context, a new block is returned (and the other block is consumed)- Parameters:
other- Blockcontext- Associated Context or null- Throws:
XMLStreamExceptionWebServiceException
-
createFrom
Block createFrom(Object businessObject, Object context, QName qName) throws WebServiceException
Create from business object- Parameters:
businessObject-context- Associated Context or nullQName- must be supplied if known- Throws:
XMLStreamExceptionWebServiceException
-
isElement
boolean isElement()
- Returns:
- true if business object must be rendered as an element example JAXBFactory ...true example SourceFactory...false
-
-