public interface AppHdr
When the header is used, its AppHdr element is a sibling of the Document element containing the specific message type content. The parent wrapper structure that holds the AppHdr and Document is implementation/network specific and not part of the scope of this model and parser.
As for the AppHdr there are at the moment two main specifications:
This interface exports shared information applicable to all header implementations (legacy and ISO based).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HEADER_LOCALNAME |
Modifier and Type | Method and Description |
---|---|
javax.xml.datatype.XMLGregorianCalendar |
creationDate()
Gets the message creation date from the "CreDate" (BAH) or "CrDate" (AH) element.
|
boolean |
duplicate()
Gets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) element
|
org.w3c.dom.Element |
element()
Gets the header as an Element object.
|
java.lang.String |
from()
Gets the header sender form the "Fr" element.
|
java.lang.String |
messageName()
Gets the message name from the "MsgDefIdr" (BAH) or "MsgName" (AH) element.
|
default java.lang.String |
namespace()
Gets the specific namespace of the header
|
java.lang.String |
reference()
Gets the message reference from the "BizMsgIdr" (BAH) or "MsgRef" (AH) element.
|
java.lang.String |
serviceName()
Gets the service name from the "BizSvc" (BAH) or "SvcName" (AH) element.
|
void |
setCreationDate(boolean overwrite)
Sets the creation date in the header object with current moment in UTC time zone.
|
java.lang.String |
to()
Gets the header receiver form the "To" element.
|
default java.lang.String |
xml()
Get this header as an XML string.
|
default java.lang.String |
xml(MxWriteParams params)
Get this header as an XML string.
|
java.lang.String |
xml(java.lang.String prefix,
boolean includeXMLDeclaration)
Deprecated.
use
xml(MxWriteParams) instead |
default java.lang.String |
xml(java.lang.String prefix,
boolean includeXMLDeclaration,
EscapeHandler escapeHandler)
Deprecated.
use
xml(MxWriteParams) instead |
static final java.lang.String HEADER_LOCALNAME
java.lang.String from()
The From element is used for the identification of the sender, whether as a BIC, a name and address, a proprietary identification or a Uniform Resource Identifier (URI).
java.lang.String to()
The To element is used for identification of the receiver, whether as a BIC, a name and address, a proprietary identification or a Uniform Resource Identifier (URI).
java.lang.String reference()
java.lang.String messageName()
java.lang.String serviceName()
boolean duplicate()
javax.xml.datatype.XMLGregorianCalendar creationDate()
void setCreationDate(boolean overwrite)
overwrite
- if true, the creation date will always be set overwriting any previous value;
if false it will be set only if it is not already setdefault java.lang.String xml()
The implementation uses xml(MxWriteParams)
with no prefix and no XML declaration.
@Deprecated @ProwideDeprecated(phase2=SRU2023) java.lang.String xml(java.lang.String prefix, boolean includeXMLDeclaration)
xml(MxWriteParams)
instead@Deprecated @ProwideDeprecated(phase2=SRU2023) default java.lang.String xml(java.lang.String prefix, boolean includeXMLDeclaration, EscapeHandler escapeHandler)
xml(MxWriteParams)
insteaddefault java.lang.String xml(MxWriteParams params)
params
- not null marshalling parametersorg.w3c.dom.Element element()
default java.lang.String namespace()