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 ofAppHdr
instead, such asBusinessAppHdrV01
This 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
AppHdr
interface and its implementing classes. Usage of this BusinessHeader is discourage in favor of AppHdr implementations such asBusinessAppHdrV01
orLegacyAppHdr
- Since:
- 7.7
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAMESPACE_AH
Deprecated.useLegacyAppHdr.NAMESPACE
insteadstatic java.lang.String
NAMESPACE_BAH
Deprecated.useBusinessAppHdrV01.NAMESPACE
instead-
Fields inherited from interface com.prowidesoftware.swift.model.mx.AppHdr
HEADER_LOCALNAME
-
-
Constructor Summary
Constructors Constructor Description BusinessHeader()
Deprecated.use a specific implementation ofAppHdr
instead, such asBusinessAppHdrV01
BusinessHeader(BusinessAppHdrV01 businessAppHdrV01)
Deprecated.use specific implementation ofAppHdr
instead, such asBusinessAppHdrV01
BusinessHeader(ApplicationHeader applicationHeader)
Deprecated.use specific implementation ofAppHdr
instead, such asLegacyAppHdr
BusinessHeader(BusinessApplicationHeaderV01 businessApplicationHeader)
Deprecated.use specific implementation ofAppHdr
instead, such asBusinessAppHdrV01
BusinessHeader(LegacyAppHdr legacyAppHdr)
Deprecated.use specific implementation ofAppHdr
instead, such asLegacyAppHdr
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BusinessHeader
create(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)
Deprecated.static ApplicationHeader
createApplicationHeader(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)
Deprecated.static BusinessApplicationHeaderV01
createBusinessApplicationHeaderV01(java.lang.String sender, java.lang.String receiver, java.lang.String reference, MxId id)
Deprecated.java.time.OffsetDateTime
creationDate()
Deprecated.Gets the message creation date from the "CreDate" (BAH) or "CrDate" (AH) element.boolean
duplicate()
Deprecated.Gets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) elementorg.w3c.dom.Element
element()
Deprecated.Gets the header as an Element object.java.lang.String
from()
Deprecated.Gets the sender BIC code.ApplicationHeader
getApplicationHeader()
Deprecated.BusinessApplicationHeaderV01
getBusinessApplicationHeader()
Deprecated.java.lang.String
messageName()
Deprecated.Gets the message name from the "MsgDefIdr" (BAH) or "MsgName" (AH) element.java.lang.String
reference()
Deprecated.Get the message reference.java.lang.String
serviceName()
Deprecated.Gets the service name from the "BizSvc" (BAH) or "SvcName" (AH) element.void
setApplicationHeader(ApplicationHeader applicationHeader)
Deprecated.void
setBusinessApplicationHeader(BusinessApplicationHeaderV01 businessApplicationHeader)
Deprecated.void
setCreationDate(boolean overwrite)
Deprecated.Sets the creation date in the inner header object with current moment in UTC time zone.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 BICjava.lang.String
xml()
Deprecated.Get this header as an XML string.java.lang.String
xml(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.NAMESPACE
instead- See Also:
- Constant Field Values
-
NAMESPACE_BAH
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static final transient java.lang.String NAMESPACE_BAH
Deprecated.useBusinessAppHdrV01.NAMESPACE
instead- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader()
Deprecated.use a specific implementation ofAppHdr
instead, such asBusinessAppHdrV01
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(ApplicationHeader applicationHeader)
Deprecated.use specific implementation ofAppHdr
instead, such asLegacyAppHdr
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(LegacyAppHdr legacyAppHdr)
Deprecated.use specific implementation ofAppHdr
instead, such asLegacyAppHdr
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(BusinessApplicationHeaderV01 businessApplicationHeader)
Deprecated.use specific implementation ofAppHdr
instead, such asBusinessAppHdrV01
-
BusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader(BusinessAppHdrV01 businessAppHdrV01)
Deprecated.use specific implementation ofAppHdr
instead, 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:AppHdr
Gets the message name from the "MsgDefIdr" (BAH) or "MsgName" (AH) element.- Specified by:
messageName
in 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:AppHdr
Gets the service name from the "BizSvc" (BAH) or "SvcName" (AH) element.- Specified by:
serviceName
in 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:AppHdr
Gets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) element
-
creationDate
public java.time.OffsetDateTime creationDate()
Deprecated.Description copied from interface:AppHdr
Gets the message creation date from the "CreDate" (BAH) or "CrDate" (AH) element.- Specified by:
creationDate
in 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:
xml
in 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:
setCreationDate
in 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
-
-