Class LegacyAppHdr
- java.lang.Object
-
- com.prowidesoftware.swift.model.mx.dic.ApplicationHeaderImpl
-
- com.prowidesoftware.swift.model.mx.LegacyAppHdr
-
- All Implemented Interfaces:
AppHdr
- Direct Known Subclasses:
ApplicationHeader
public class LegacyAppHdr extends com.prowidesoftware.swift.model.mx.dic.ApplicationHeaderImpl implements AppHdr
Legacy SWIFT application header usually knonw from its namespace: $ahV10- Since:
- 9.0.1
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMESPACE-
Fields inherited from class com.prowidesoftware.swift.model.mx.dic.ApplicationHeaderImpl
crDate, dup, from, msgName, msgRef, svcName, to
-
Fields inherited from interface com.prowidesoftware.swift.model.mx.AppHdr
HEADER_LOCALNAME
-
-
Constructor Summary
Constructors Constructor Description LegacyAppHdr()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.time.OffsetDateTimecreationDate()Gets the creation datebooleanduplicate()Gets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) elementorg.w3c.dom.Elementelement()Gets the header as an Element object.org.w3c.dom.Elementelement(jakarta.xml.bind.JAXBContext inputContext)java.lang.Stringfrom()Gets the sender BIC from ApplicationHeader/From/Type+Id where if Type is BIC the Id is returned as is, otherwise the domain name is parsed to extract the SWIFT BICjava.lang.StringmessageName()Gets the message name.java.lang.Stringnamespace()Gets the specific namespace of the headerstatic LegacyAppHdrparse(java.lang.String xml)Parse the header from an XML with optional wrapper and sibling elements that will be ignored.static LegacyAppHdrparse(java.lang.String xml, MxReadParams params)Parse the header from an XML with optional wrapper and sibling elements that will be ignored.java.lang.Stringreference()Get the message reference.java.lang.StringserviceName()Gets the service name.voidsetCreationDate(boolean overwrite)Sets the creation date.java.lang.Stringto()Gets the receiver BIC code from ApplicationHeader/To/Type+Id where if Type is BIC the Id is returned as is, otherwise the domain name is parsed to extract the SWIFT BICjava.lang.Stringxml(MxWriteParams params)Get this header as an XML string.java.lang.Stringxml(java.lang.String prefix, boolean includeXMLDeclaration)Deprecated.usexml(MxWriteParams)insteadjava.lang.Stringxml(java.lang.String prefix, boolean includeXMLDeclaration, EscapeHandler escapeHandler)Deprecated.usexml(MxWriteParams)instead-
Methods inherited from class com.prowidesoftware.swift.model.mx.dic.ApplicationHeaderImpl
equals, getCrDate, getDup, getFrom, getMsgName, getMsgRef, getSvcName, getTo, hashCode, setCrDate, setDup, setFrom, setMsgName, setMsgRef, setSvcName, setTo, toString
-
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static LegacyAppHdr parse(java.lang.String xml)
Parse the header from an XML with optional wrapper and sibling elements that will be ignored.Default adapters are applied, for more options use
parse(String, MxReadParams)- Parameters:
xml- the XML content, can contain wrapper elements that will be ignored- Returns:
- parsed element or null if cannot be parsed
- Throws:
com.prowidesoftware.ProwideException- if severe errors occur during parse
-
parse
public static LegacyAppHdr parse(java.lang.String xml, MxReadParams params)
Parse the header from an XML with optional wrapper and sibling elements that will be ignored.Default adapters are applied, for more options use
parse(String, MxReadParams)- Parameters:
xml- the XML content, can contain wrapper elements that will be ignoredparams- not null unmarshalling parameters- Returns:
- parsed element or null if cannot be parsed
- Throws:
com.prowidesoftware.ProwideException- if severe errors occur during parse- Since:
- 9.2.6
-
from
public java.lang.String from()
Gets the sender BIC from ApplicationHeader/From/Type+Id where if Type is BIC the Id is returned as is, otherwise the domain name is parsed to extract the SWIFT BIC
-
to
public java.lang.String to()
Gets the receiver BIC code from ApplicationHeader/To/Type+Id where if Type is BIC the Id is returned as is, otherwise the domain name is parsed to extract the SWIFT BIC
-
reference
public java.lang.String reference()
Get the message reference.
-
messageName
public java.lang.String messageName()
Gets the message name.- Specified by:
messageNamein interfaceAppHdr- Returns:
- the message name from the header or null if the element is not found
- See Also:
ApplicationHeaderImpl.getMsgName()
-
serviceName
public java.lang.String serviceName()
Gets the service name.- Specified by:
serviceNamein interfaceAppHdr- Returns:
- the service name from the header or null if the element is not found
- See Also:
ApplicationHeaderImpl.getSvcName()
-
duplicate
public boolean duplicate()
Description copied from interface:AppHdrGets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) element
-
creationDate
public java.time.OffsetDateTime creationDate()
Gets the creation date- Specified by:
creationDatein interfaceAppHdr- Returns:
- found date or null if the element is not found
- See Also:
ApplicationHeaderImpl.getCrDate()
-
setCreationDate
public void setCreationDate(boolean overwrite)
Sets the creation date.- Specified by:
setCreationDatein interfaceAppHdr- Parameters:
overwrite- if true, the creation date will always be set overwriting any previous value;- See Also:
ApplicationHeaderImpl.setCrDate(OffsetDateTime)
-
xml
@Deprecated @ProwideDeprecated(phase2=SRU2023) public java.lang.String xml(java.lang.String prefix, boolean includeXMLDeclaration)Deprecated.usexml(MxWriteParams)instead
-
xml
@Deprecated @ProwideDeprecated(phase2=SRU2023) public java.lang.String xml(java.lang.String prefix, boolean includeXMLDeclaration, EscapeHandler escapeHandler)Deprecated.usexml(MxWriteParams)instead
-
xml
public java.lang.String xml(MxWriteParams params)
Description copied from interface:AppHdrGet this header as an XML string.
-
element
public org.w3c.dom.Element element()
Description copied from interface:AppHdrGets the header as an Element object.
-
element
public org.w3c.dom.Element element(jakarta.xml.bind.JAXBContext inputContext)
- Since:
- 9.3.5
-
-