public abstract class BlockImpl extends Object implements Block
| Modifier and Type | Field and Description |
|---|---|
protected Object |
busContext |
protected Object |
busObject |
protected boolean |
consumed |
protected BlockFactory |
factory |
protected org.apache.axiom.om.OMElement |
omElement |
protected Message |
parent |
protected QName |
qName |
| Modifier | Constructor and Description |
|---|---|
protected |
BlockImpl(Object busObject,
Object busContext,
QName qName,
BlockFactory factory)
A Block has the following components
|
protected |
BlockImpl(org.apache.axiom.om.OMElement omElement,
Object busContext,
QName qName,
BlockFactory factory)
A Block has the following components
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
_getBOFromBO(Object busObject,
Object busContext,
boolean consume)
The default implementation is to return the business object.
|
protected Object |
_getBOFromOM(org.apache.axiom.om.OMElement omElement,
Object busContext)
Default method for getting business object from OM.
|
protected abstract Object |
_getBOFromReader(javax.xml.stream.XMLStreamReader reader,
Object busContext)
The derived class must provide an implementation that builds the business object from the
reader
|
protected org.apache.axiom.om.OMElement |
_getOMFromBO(Object busObject,
Object busContext) |
protected abstract javax.xml.stream.XMLStreamReader |
_getReaderFromBO(Object busObj,
Object busContext)
Get an XMLStreamReader for the BusinessObject The derived Block must implement this method
|
protected javax.xml.stream.XMLStreamReader |
_getReaderFromOM(org.apache.axiom.om.OMElement omElement) |
protected abstract void |
_outputFromBO(Object busObject,
Object busContext,
javax.xml.stream.XMLStreamWriter writer)
Output BusinessObject contents to a Writer.
|
protected void |
_outputFromOM(org.apache.axiom.om.OMElement omElement,
javax.xml.stream.XMLStreamWriter writer,
boolean consume)
Output OMElement contents to a Writer.
|
protected void |
_outputFromReader(javax.xml.stream.XMLStreamReader reader,
javax.xml.stream.XMLStreamWriter writer)
Output Reader contents to a Writer.
|
protected javax.xml.stream.XMLStreamReader |
_postPivot_getXMLStreamReader()
Called if we have passed the pivot point but someone wants to output the block.
|
protected void |
_postPivot_outputTo(javax.xml.stream.XMLStreamWriter writer)
Called if we have passed the pivot point but someone wants to output the block.
|
org.apache.axiom.om.OMDataSourceExt |
copy() |
BlockFactory |
getBlockFactory()
Get BlockFactory
|
Object |
getBusinessContext()
GetBusinesContext Some business objects have an associated context object (i.e.
|
Object |
getBusinessObject(boolean consume)
Get a reference to the Business Object represented by this Block
|
org.apache.axiom.om.OMElement |
getOMElement()
Get the OMElement represented by this Block.
|
Message |
getParent()
Get the Message associated with this block
|
Object |
getProperty(String key) |
QName |
getQName()
Get the QName (namespace, localpart) of the Block.
|
javax.xml.stream.XMLStreamReader |
getReader() |
javax.xml.stream.XMLStreamReader |
getXMLStreamReader(boolean consume)
Get the XMLStreamReader represented by this Block
|
boolean |
hasProperty(String key) |
protected boolean |
isBusinessObject() |
boolean |
isConsumed()
isConsumed Return true if the block is consumed.
|
boolean |
isQNameAvailable() |
void |
outputTo(javax.xml.stream.XMLStreamWriter writer,
boolean consume)
Write out the Block
|
void |
serialize(OutputStream output,
org.apache.axiom.om.OMOutputFormat format) |
void |
serialize(Writer writerTarget,
org.apache.axiom.om.OMOutputFormat format) |
void |
serialize(javax.xml.stream.XMLStreamWriter writer) |
void |
setConsumed(boolean consume)
Once consumed, all instance data objects are nullified to prevent subsequent access
|
void |
setParent(Message p)
Set the Message associated with this block (This method is intended to be called by the
Message Implementation only)
|
Object |
setProperty(String key,
Object value) |
protected void |
setQName(QName qName)
This method is intended for derived objects to set the qName
|
String |
traceString(String indent)
Get a traceString...the trace string dumps the contents of the Block without forcing an
underlying ill-performant transformation of the message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisElementDataprotected Object busObject
protected Object busContext
protected org.apache.axiom.om.OMElement omElement
protected QName qName
protected BlockFactory factory
protected boolean consumed
protected Message parent
protected BlockImpl(Object busObject, Object busContext, QName qName, BlockFactory factory)
busObject - busContext - or nullqName - or null if unknownfactory - that creates the Blockprotected BlockImpl(org.apache.axiom.om.OMElement omElement,
Object busContext,
QName qName,
BlockFactory factory)
reader - busContext - or nullqName - or null if unknownfactory - that creates the Blockpublic BlockFactory getBlockFactory()
BlockgetBlockFactory in interface Blockpublic Object getBusinessContext()
BlockgetBusinessContext in interface Blockpublic Message getParent()
Blockpublic void setParent(Message p)
Blockpublic Object getBusinessObject(boolean consume) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
BlockgetBusinessObject in interface Blockconsume - true if this is the last request on the block.javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionpublic QName getQName() throws javax.xml.ws.WebServiceException
BlockgetQName in interface Blockjavax.xml.ws.WebServiceExceptionisQNameAvailableprotected void setQName(QName qName)
qName - public javax.xml.stream.XMLStreamReader getXMLStreamReader(boolean consume) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
BlockgetXMLStreamReader in interface Blockconsume - true if this is the last request on the block.javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionpublic javax.xml.stream.XMLStreamReader getReader() throws javax.xml.stream.XMLStreamException
getReader in interface org.apache.axiom.om.OMDataSourcejavax.xml.stream.XMLStreamExceptionpublic void serialize(OutputStream output, org.apache.axiom.om.OMOutputFormat format) throws javax.xml.stream.XMLStreamException
serialize in interface org.apache.axiom.om.OMDataSourcejavax.xml.stream.XMLStreamExceptionpublic void serialize(Writer writerTarget, org.apache.axiom.om.OMOutputFormat format) throws javax.xml.stream.XMLStreamException
serialize in interface org.apache.axiom.om.OMDataSourcejavax.xml.stream.XMLStreamExceptionpublic void serialize(javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
serialize in interface org.apache.axiom.om.OMDataSourcejavax.xml.stream.XMLStreamExceptionpublic org.apache.axiom.om.OMElement getOMElement()
throws javax.xml.stream.XMLStreamException,
javax.xml.ws.WebServiceException
BlockgetOMElement in interface Blockjavax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionpublic boolean isConsumed()
BlockisConsumed in interface Blockpublic void setConsumed(boolean consume)
consume - public boolean isQNameAvailable()
isQNameAvailable in interface Blockpublic void outputTo(javax.xml.stream.XMLStreamWriter writer, boolean consume) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
BlockoutputTo in interface Blockwriter - XMLStreamWriterconsume - true if this is the last request on the block.javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionprotected void _postPivot_outputTo(javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
protected javax.xml.stream.XMLStreamReader _postPivot_getXMLStreamReader() throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
protected boolean isBusinessObject()
public String traceString(String indent)
BlocktraceString in interface Blockprotected Object _getBOFromBO(Object busObject, Object busContext, boolean consume)
busObject - busContext - consume - protected abstract Object _getBOFromReader(javax.xml.stream.XMLStreamReader reader, Object busContext) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
reader - XMLStreamReader, which is consumedbusContext - javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionprotected Object _getBOFromOM(org.apache.axiom.om.OMElement omElement, Object busContext) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
om - busContext - javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionprotected abstract javax.xml.stream.XMLStreamReader _getReaderFromBO(Object busObj, Object busContext) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
busObj - busContext - javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionprotected javax.xml.stream.XMLStreamReader _getReaderFromOM(org.apache.axiom.om.OMElement omElement)
omElement - protected org.apache.axiom.om.OMElement _getOMFromBO(Object busObject, Object busContext) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
busObject - busContext - javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionprotected void _outputFromReader(javax.xml.stream.XMLStreamReader reader, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
reader - writer - javax.xml.stream.XMLStreamExceptionprotected void _outputFromOM(org.apache.axiom.om.OMElement omElement,
javax.xml.stream.XMLStreamWriter writer,
boolean consume)
throws javax.xml.stream.XMLStreamException
om - writer - javax.xml.stream.XMLStreamExceptionpublic org.apache.axiom.om.OMDataSourceExt copy()
throws org.apache.axiom.om.OMException
copy in interface org.apache.axiom.om.OMDataSourceExtorg.apache.axiom.om.OMExceptionprotected abstract void _outputFromBO(Object busObject, Object busContext, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException, javax.xml.ws.WebServiceException
busObject - busContext - writer - javax.xml.stream.XMLStreamExceptionjavax.xml.ws.WebServiceExceptionpublic Object getProperty(String key)
getProperty in interface org.apache.axiom.om.OMDataSourceExtpublic Object setProperty(String key, Object value)
setProperty in interface org.apache.axiom.om.OMDataSourceExtpublic boolean hasProperty(String key)
hasProperty in interface org.apache.axiom.om.OMDataSourceExtCopyright © 2004–2015 The Apache Software Foundation. All rights reserved.