Class BusinessHeader
- java.lang.Object
-
- com.prowidesoftware.swift.model.mx.BusinessHeader
-
- All Implemented Interfaces:
AppHdr
@Deprecated @ProwideDeprecated(phase4=SRU2023) public class BusinessHeader extends java.lang.Object implements AppHdr
Deprecated.use specific implementation ofAppHdrinstead, such asBusinessAppHdrV01This header model was the original implemented as a holder for the two available headers:- The ISO 20022 business application header:
ApplicationHeader - The application header originally defined by swift:
BusinessApplicationHeaderV01
A more flexible and scalable solution is done is provided now by the
AppHdrinterface and its implementing classes. Usage of this BusinessHeader is discourage in favor of AppHdr implementations such asBusinessAppHdrV01orLegacyAppHdr- Since:
- 7.7
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMESPACE_AHDeprecated.useLegacyAppHdr.NAMESPACEinsteadstatic java.lang.StringNAMESPACE_BAHDeprecated.useBusinessAppHdrV01.NAMESPACEinstead-
Fields inherited from interface com.prowidesoftware.swift.model.mx.AppHdr
HEADER_LOCALNAME
-
-
Constructor Summary
Constructors Constructor Description BusinessHeader()Deprecated.use a specific implementation ofAppHdrinstead, such asBusinessAppHdrV01BusinessHeader(BusinessAppHdrV01 businessAppHdrV01)Deprecated.use specific implementation ofAppHdrinstead, such asBusinessAppHdrV01BusinessHeader(ApplicationHeader applicationHeader)Deprecated.use specific implementation ofAppHdrinstead, such asLegacyAppHdrBusinessHeader(BusinessApplicationHeaderV01 businessApplicationHeader)Deprecated.use specific implementation ofAppHdrinstead, such asBusinessAppHdrV01BusinessHeader(LegacyAppHdr legacyAppHdr)Deprecated.use specific implementation ofAppHdrinstead, such asLegacyAppHdr
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BusinessHeadercreate(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)Deprecated.static ApplicationHeadercreateApplicationHeader(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)Deprecated.static BusinessApplicationHeaderV01createBusinessApplicationHeaderV01(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)Deprecated.java.time.OffsetDateTimecreationDate()Deprecated.Gets the message creation date from the "CreDate" (BAH) or "CrDate" (AH) element.booleanduplicate()Deprecated.Gets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) elementorg.w3c.dom.Elementelement()Deprecated.Gets the header as an Element object.java.lang.Stringfrom()Deprecated.Gets the sender BIC code.ApplicationHeadergetApplicationHeader()Deprecated.BusinessApplicationHeaderV01getBusinessApplicationHeader()Deprecated.java.lang.StringmessageName()Deprecated.Gets the message name from the "MsgDefIdr" (BAH) or "MsgName" (AH) element.java.lang.Stringreference()Deprecated.Get the message reference.java.lang.StringserviceName()Deprecated.Gets the service name from the "BizSvc" (BAH) or "SvcName" (AH) element.voidsetApplicationHeader(ApplicationHeader applicationHeader)Deprecated.voidsetBusinessApplicationHeader(BusinessApplicationHeaderV01 businessApplicationHeader)Deprecated.voidsetCreationDate(boolean overwrite)Deprecated.Sets the creation date in the inner header object with current moment in UTC time zone.java.lang.Stringto()Deprecated.Gets the receiver BIC code
If the header is a BAH, tries to gets the BIC code from this elements in the following order: BusinessApplicationHeaderV01/To/FIId/FinInstnId/BICFI BusinessApplicationHeaderV01/To/OrgId/Id/OrgId/Id/AnyBIC
If the header is an AH, gets the same 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()Deprecated.Get this header as an XML string.java.lang.Stringxml(java.lang.String prefix, boolean includeXMLDeclaration)Deprecated.Get this header as an XML string.
-
-
-
Field Detail
-
NAMESPACE_AH
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static final transient java.lang.String NAMESPACE_AH
Deprecated.useLegacyAppHdr.NAMESPACEinstead- See Also:
- Constant Field Values
-
NAMESPACE_BAH
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static final transient java.lang.String NAMESPACE_BAH
Deprecated.useBusinessAppHdrV01.NAMESPACEinstead- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader()
Deprecated.use a specific implementation ofAppHdrinstead, such asBusinessAppHdrV01
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(ApplicationHeader applicationHeader)
Deprecated.use specific implementation ofAppHdrinstead, such asLegacyAppHdr
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(LegacyAppHdr legacyAppHdr)
Deprecated.use specific implementation ofAppHdrinstead, such asLegacyAppHdr
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(BusinessApplicationHeaderV01 businessApplicationHeader)
Deprecated.use specific implementation ofAppHdrinstead, such asBusinessAppHdrV01
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(BusinessAppHdrV01 businessAppHdrV01)
Deprecated.use specific implementation ofAppHdrinstead, such asBusinessAppHdrV01
-
-
Method Detail
-
createBusinessApplicationHeaderV01
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static BusinessApplicationHeaderV01 createBusinessApplicationHeaderV01(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)
Deprecated.
-
create
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static BusinessHeader create(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)
Deprecated.
-
createApplicationHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static ApplicationHeader createApplicationHeader(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)
Deprecated.
-
getApplicationHeader
public ApplicationHeader getApplicationHeader()
Deprecated.
-
setApplicationHeader
public void setApplicationHeader(ApplicationHeader applicationHeader)
Deprecated.
-
getBusinessApplicationHeader
public BusinessApplicationHeaderV01 getBusinessApplicationHeader()
Deprecated.
-
setBusinessApplicationHeader
public void setBusinessApplicationHeader(BusinessApplicationHeaderV01 businessApplicationHeader)
Deprecated.
-
from
public java.lang.String from()
Deprecated.Gets the sender BIC code.
If the header is a BAH, tries to gets the BIC code from this elements in the following order:- BusinessApplicationHeaderV01/Fr/FIId/FinInstnId/BICFI
- BusinessApplicationHeaderV01/Fr/OrgId/Id/OrgId/Id/AnyBIC
If the header is an AH, gets the same 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()
Deprecated.Gets the receiver BIC code
If the header is a BAH, tries to gets the BIC code from this elements in the following order:- BusinessApplicationHeaderV01/To/FIId/FinInstnId/BICFI
- BusinessApplicationHeaderV01/To/OrgId/Id/OrgId/Id/AnyBIC
If the header is an AH, gets the same 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()
Deprecated.Get the message reference.
-
messageName
public java.lang.String messageName()
Deprecated.Description copied from interface:AppHdrGets the message name from the "MsgDefIdr" (BAH) or "MsgName" (AH) element.- Specified by:
messageNamein interfaceAppHdr- Returns:
- the message name from the header or null if the element is not found
- Since:
- 9.0.1
-
serviceName
public java.lang.String serviceName()
Deprecated.Description copied from interface:AppHdrGets the service name from the "BizSvc" (BAH) or "SvcName" (AH) element.- Specified by:
serviceNamein interfaceAppHdr- Returns:
- the service name from the header or null if the element is not found
- Since:
- 9.0.1
-
duplicate
public boolean duplicate()
Deprecated.Description copied from interface:AppHdrGets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) element
-
creationDate
public java.time.OffsetDateTime creationDate()
Deprecated.Description copied from interface:AppHdrGets the message creation date from the "CreDate" (BAH) or "CrDate" (AH) element.- Specified by:
creationDatein interfaceAppHdr- Returns:
- found date or null if the element is not found
- Since:
- 9.0.1
-
xml
public java.lang.String xml()
Deprecated.Get this header as an XML string.- Specified by:
xmlin interfaceAppHdr- Returns:
- header serialized into XML string or null if neither header version is present
- Since:
- 7.8
- See Also:
xml(String, boolean)
-
xml
public java.lang.String xml(java.lang.String prefix, boolean includeXMLDeclaration)Deprecated.Get this header as an XML string. Since this class contains a dual model supporting two type of headers (swift and ISO), if both headers are present in the object the BusinessApplicationHeaderV01 will be used.
-
element
public org.w3c.dom.Element element()
Deprecated.Gets the header as an Element object.
-
setCreationDate
public void setCreationDate(boolean overwrite)
Deprecated.Sets the creation date in the inner header object with current moment in UTC time zone.
Either of the inner headers must be not null. If both are null this method does nothing.- Specified by:
setCreationDatein interfaceAppHdr- Parameters:
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 set- Since:
- 7.8.5
-
-