Package com.prowidesoftware.swift.model
Class MtId
- java.lang.Object
-
- com.prowidesoftware.swift.model.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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
category()
Returns the first number in the message type, representing the message category.boolean
equals(java.lang.Object o)
java.lang.String
getBusinessProcess()
java.lang.String
getMessageType()
java.lang.String
getVariant()
int
hashCode()
java.lang.String
id()
Get a string in the form of businessprocess.messagetype.variantjava.lang.String
namespaceURI()
Creates the corresponding ISO 15022 namespace URI for this MT, for example: urn:swift:xsd:fin.103.2021static MtId
parse(java.lang.String identifier)
Parses a string identifier into a structured MT identifierMtId
setBusinessProcess(java.lang.String businessProcess)
MtId
setMessageType(java.lang.String messageType)
MtId
setVariant(MTVariant variant)
MtId
setVariant(java.lang.String variant)
java.lang.String
toString()
-
-
-
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 numbervariant
- 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.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
-
-