Class AppHdrFactory


  • public class AppHdrFactory
    extends java.lang.Object
    Factory methods to create different variant of application headers.
    Since:
    9.0.1
    • Constructor Detail

      • AppHdrFactory

        public AppHdrFactory()
    • Method Detail

      • createBusinessAppHdrV01

        public static BusinessAppHdrV01 createBusinessAppHdrV01​(java.lang.String sender,
                                                                java.lang.String receiver,
                                                                java.lang.String reference,
                                                                MxId id)
        Convenient method to create a new ISO header version 1, initialized from simple parameters.

        All parameters are optional but in order for the header to be valid the sender, receiver and reference must be set. Creation date will be set to current time.

        Parameters:
        sender - optional sender BIC for the Fr element or null to leave not set
        receiver - optional receiver BIC for the To element or null to leave not set
        reference - optional reference for the BizMsgIdr (business message identifier) or null to leave not set
        id - optional MX identification for the MsgDefIdr (message definition identifier) element or null to leave not set
        Returns:
        new header initialized from parameters.
      • createBusinessAppHdrV02

        public static BusinessAppHdrV02 createBusinessAppHdrV02​(java.lang.String sender,
                                                                java.lang.String receiver,
                                                                java.lang.String reference,
                                                                MxId id)
        Convenient method to create a new ISO header version 2, initialized from simple parameters.

        All parameters are optional but in order for the header to be valid the sender, receiver and reference must be set. Creation date will be set to current time.

        Parameters:
        sender - optional sender BIC for the Fr element or null to leave not set
        receiver - optional receiver BIC for the To element or null to leave not set
        reference - optional reference for the BizMsgIdr (business message identifier) or null to leave not set
        id - optional MX identification for the MsgDefIdr (message definition identifier) element or null to leave not set
        Returns:
        new header initialized from parameters.
      • createBusinessAppHdrV03

        public static BusinessAppHdrV03 createBusinessAppHdrV03​(java.lang.String sender,
                                                                java.lang.String receiver,
                                                                java.lang.String reference,
                                                                MxId id)
        Convenient method to create a new ISO header version 3, initialized from simple parameters.

        All parameters are optional but in order for the header to be valid the sender, receiver and reference must be set. Creation date will be set to current time.

        Parameters:
        sender - optional sender BIC for the Fr element or null to leave not set
        receiver - optional receiver BIC for the To element or null to leave not set
        reference - optional reference for the BizMsgIdr (business message identifier) or null to leave not set
        id - optional MX identification for the MsgDefIdr (message definition identifier) element or null to leave not set
        Returns:
        new header initialized from parameters.
        Since:
        9.3.4
      • createLegacyAppHdr

        public static LegacyAppHdr createLegacyAppHdr​(java.lang.String sender,
                                                      java.lang.String receiver,
                                                      java.lang.String reference,
                                                      MxId id)
        Convenient method to create a new legacy SWIFT header, initialized from simple parameters.

        All parameters are optional but in order for the header to be valid the sender, receiver and reference must be set. Creation date will be set to current time.

        Parameters:
        sender - optional sender BIC for the Fr element or null to leave not set
        receiver - optional receiver BIC for the To element or null to leave not set
        reference - optional reference for the BizMsgIdr (business message identifier) or null to leave not set
        id - optional MX identification for the MsgDefIdr (message definition identifier) element or null to leave not set
        Returns:
        new header initialized from parameters.
      • createAppHdr

        public static AppHdr createAppHdr​(AppHdrType type,
                                          java.lang.String sender,
                                          java.lang.String receiver,
                                          java.lang.String reference,
                                          MxId id)
        Convenient method to create a new header, initialized from simple parameters.
        Parameters:
        sender - optional sender BIC for the Fr element or null to leave not set
        receiver - optional receiver BIC for the To element or null to leave not set
        reference - optional reference for the BizMsgIdr (business message identifier) or null to leave not set
        id - optional MX identification for the MsgDefIdr (message definition identifier) element or null to leave not set
        Returns:
        new header initialized from parameters
        Since:
        9.1.6