Class MtId


  • public class MtId
    extends java.lang.Object
    Structured identification of MT message types, composed by the business process, actual type and variant.
    The business process is currently set to a fixed value "fin", however it is kept as class attribute because eventually could be used also for "apc".
    Since:
    7.8.4
    • Constructor Summary

      Constructors 
      Constructor Description
      MtId()  
      MtId​(java.lang.String identifier)
      Parses a string identifier into a structured MT identifier
      MtId​(java.lang.String messageType, MTVariant variant)  
      MtId​(java.lang.String messageType, java.lang.String variant)  
    • Constructor Detail

      • MtId

        public MtId()
        Since:
        , 8.0.3
      • MtId

        public MtId​(java.lang.String identifier)
        Parses a string identifier into a structured MT identifier
        Parameters:
        identifier - an identifier such as 103, fin.103, fin.103.STP, 202.COV
        Since:
        7.8.6
      • MtId

        public MtId​(java.lang.String messageType,
                    java.lang.String variant)
        Parameters:
        messageType - the message type number (optionally prefixed with "fin.")
        variant - An MT variant (STP, REMIT, COV), a MUG identifier or null if none applies
      • MtId

        public MtId​(java.lang.String messageType,
                    MTVariant variant)
        Parameters:
        messageType - the message type number
        variant - a message variant (STP, REMIT, COV) or null if none applies
    • Method Detail

      • parse

        public static MtId parse​(java.lang.String identifier)
        Parses a string identifier into a structured MT identifier
        Parameters:
        identifier - an identifier such as 103, fin.103, fin.103.STP, 202.COV
        Since:
        9.1.8
      • getBusinessProcess

        public java.lang.String getBusinessProcess()
      • setBusinessProcess

        public MtId setBusinessProcess​(java.lang.String businessProcess)
        Since:
        8.0.3 returns this
      • getMessageType

        public java.lang.String getMessageType()
      • setMessageType

        public MtId setMessageType​(java.lang.String messageType)
        Since:
        8.0.3 returns this
      • getVariant

        public java.lang.String getVariant()
      • setVariant

        public MtId setVariant​(java.lang.String variant)
        Since:
        8.0.3 returns this
      • setVariant

        public MtId setVariant​(MTVariant variant)
        Since:
        9.2.6
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • id

        public java.lang.String id()
        Get a string in the form of businessprocess.messagetype.variant
        Returns:
        a string with the MT message type identification
        Since:
        7.8.4
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • category

        public java.lang.String category()
        Returns the first number in the message type, representing the message category. For example for 103 returns 1
        Returns:
        the message category number or empty if the message type is invalid or not present
        Since:
        7.10.4
      • namespaceURI

        public java.lang.String namespaceURI()
        Creates the corresponding ISO 15022 namespace URI for this MT, for example: urn:swift:xsd:fin.103.2021
        Returns:
        a string representing the namespace URI for the MT
        Since:
        9.2.14