Interface BlockFactory

All Known Subinterfaces:
DataSourceBlockFactory, JAXBBlockFactory, OMBlockFactory, SOAPEnvelopeBlockFactory, SourceBlockFactory, XMLStringBlockFactory
All Known Implementing Classes:
BlockFactoryImpl, DataSourceBlockFactoryImpl, JAXBBlockFactoryImpl, OMBlockFactoryImpl, SOAPEnvelopeBlockFactoryImpl, SourceBlockFactoryImpl, XMLStringBlockFactoryImpl

public interface BlockFactory
BlockFactory

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:
  • Method Details

    • createFrom

      Block createFrom(XMLStreamReader reader, Object context, QName qName) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      createBlock from XMLStreamReader
      Parameters:
      reader - XMLStreamReader
      context - Associated Context or null
      QName - must be supplied if known
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • createFrom

      Block createFrom(org.apache.axiom.om.OMElement omElement, Object context, QName qName) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      createBlock from XMLStreamReader
      Parameters:
      omElement - OMElement
      context - Associated Context or null
      QName - must be supplied if known
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • createFrom

      Block createFrom(Block other, Object context) throws XMLStreamException, jakarta.xml.ws.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 - Block
      context - Associated Context or null
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • createFrom

      Block createFrom(Object businessObject, Object context, QName qName) throws jakarta.xml.ws.WebServiceException
      Create from business object
      Parameters:
      businessObject -
      context - Associated Context or null
      QName - must be supplied if known
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • isElement

      boolean isElement()
      Returns:
      true if business object must be rendered as an element example JAXBFactory ...true example SourceFactory...false