Class SwiftBlock3

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<Tag>

    public class SwiftBlock3
    extends SwiftTagListBlock
    implements java.io.Serializable
    Base class for SWIFT User Header Block (block 3).

    This block is optional, and contains special processing instructions.

    Since:
    4.0
    See Also:
    Serialized Form
    • Constructor Detail

      • SwiftBlock3

        public SwiftBlock3()
        Default constructor
      • SwiftBlock3

        public SwiftBlock3​(java.util.List<Tag> tags)
        Constructor with tag initialization
        Parameters:
        tags - the list of tags to initialize
        Since:
        5.0
    • Method Detail

      • fromJson

        public static SwiftBlock3 fromJson​(java.lang.String json)
        This method deserializes the JSON data into an block 3 object.
        Since:
        7.9.8
        See Also:
        SwiftTagListBlock.toJson()
      • setBlockNumber

        protected void setBlockNumber​(java.lang.Integer blockNumber)
        Sets the block number. Will cause an exception unless setting block number to 3.
        Overrides:
        setBlockNumber in class SwiftTagListBlock
        Parameters:
        blockNumber - the block number to set
        Throws:
        java.lang.IllegalArgumentException - if parameter blockName is not the integer 3
        Since:
        5.0
      • setBlockName

        protected void setBlockName​(java.lang.String blockName)
        Sets the block name. Will cause an exception unless setting block number to "3".
        Overrides:
        setBlockName in class SwiftTagListBlock
        Parameters:
        blockName - the block name to set
        Throws:
        java.lang.IllegalArgumentException - if parameter blockName is not the string "3"
        Since:
        5.0
      • getNumber

        public java.lang.Integer getNumber()
        Returns the block number (the value 3 as an integer)
        Overrides:
        getNumber in class SwiftTagListBlock
        Returns:
        Integer containing the block's number
      • getName

        public java.lang.String getName()
        Returns the block name (the value 3 as a string)
        Overrides:
        getName in class SwiftTagListBlock
        Returns:
        block name st
        Since:
        5.0
      • isSTP

        public java.lang.Boolean isSTP()
        Indicates if the message is a Straight Through Processing (STP)
        Returns:
        true if the message is STP
      • generateMUR

        public void generateMUR​(boolean overwriteIfExist)
        This method will generate a MUR field (tag 108) with a timestamp using current time formatted as yyMMddHHmmssSSSS
        Parameters:
        overwriteIfExist - when true and field 108 already exist, its value will be overwriten with the generated timestamp
        Since:
        7.8.8
      • builder

        public SwiftBlock3Builder builder()
        Returns:
        a decorated block3 with helper methods to set only expected fields and in proper order
        Since:
        7.10.0