MT 203
Multiple General Financial Institution Transfer
MT203 Format
Main Sequence main
Sequence A
Field 19
Letter options: null
Field 30
Letter options: null
Field 52
Letter options: A,D
Field 53
Letter options: A,B,D
Field 54
Letter options: A,B,D
Field 72
Letter options: null
Sequence B
Field 20
Letter options: null
Field 21
Letter options: null
Field 32
Letter options: B
Field 56
Letter options: A,D
Field 57
Letter options: A,B,D
Field 58
Letter options: A,D
Field 72
Letter options: null
This source code is specific to release SRU 2016
- Author:
- www.prowidesoftware.com
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes
Modifier and Type |
Class and Description |
static class |
MT203.SequenceA
Class for Sequence "A" of MT 203
|
static class |
MT203.SequenceB
Class for Sequence "B" of MT 203
|
-
Field Summary
Fields
Modifier and Type |
Field and Description |
static String |
NAME
Constant for MT name, this is part of the classname, after MT
|
static int |
SRU
Constant identifying the SRU to which this class belongs to.
|
-
Fields inherited from class com.prowidesoftware.swift.model.mt.AbstractMT
m
-
Constructor Summary
Constructors
Constructor and Description |
MT203()
Creates and initializes a new MT203 input message setting TEST BICS as sender and receiver.
All mandatory header attributes are completed with default values.
|
MT203(File file)
Creates a new MT203 by parsing a file with the message content in its swift FIN format.
If the file content is null or cannot be parsed as a message, the internal message object
will be initialized (blocks will be created) but empty.
If the file contains multiple messages, only the first one will be parsed.
|
MT203(InputStream stream)
Creates a new MT203 by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding.
If the message content is null or cannot be parsed, the internal message object
will be initialized (blocks will be created) but empty.
If the stream contains multiple messages, only the first one will be parsed.
|
MT203(int messageType,
String sender,
String receiver)
Deprecated.
|
MT203(MtSwiftMessage m)
Creates an MT203 initialized with the parameter MtSwiftMessage.
|
MT203(String fin)
Creates a new MT203 by parsing a String with the message content in its swift FIN format.
If the fin parameter is null or the message cannot be parsed, the internal message object
will be initialized (blocks will be created) but empty.
If the string contains multiple messages, only the first one will be parsed.
|
MT203(String sender,
String receiver)
Creates and initializes a new MT203 input message from sender to receiver.
All mandatory header attributes are completed with default values.
|
MT203(SwiftMessage m)
Creates an MT203 initialized with the parameter SwiftMessage
|
-
Method Summary
Methods
Modifier and Type |
Method and Description |
MT203 |
append(Field... fields)
Add all the fields to the end of the block4.
|
MT203 |
append(SwiftTagListBlock block)
Add all tags from block to the end of the block4.
|
MT203 |
append(Tag... tags)
Add all tags to the end of the block4.
|
Field19 |
getField19()
Iterates through block4 fields and return the first one whose name matches 19,
or null if none is found.
The first occurrence of field 19 at MT203 is expected to be the only one.
|
List<Field20> |
getField20()
Iterates through block4 fields and return all occurrences of fields whose names matches 20,
or Collections.emptyList() if none is found.
Multiple occurrences of field 20 at MT203 are expected at one sequence or across several sequences.
|
List<Field21> |
getField21()
Iterates through block4 fields and return all occurrences of fields whose names matches 21,
or Collections.emptyList() if none is found.
Multiple occurrences of field 21 at MT203 are expected at one sequence or across several sequences.
|
Field30 |
getField30()
Iterates through block4 fields and return the first one whose name matches 30,
or null if none is found.
The first occurrence of field 30 at MT203 is expected to be the only one.
|
List<Field32B> |
getField32B()
Iterates through block4 fields and return all occurrences of fields whose names matches 32B,
or Collections.emptyList() if none is found.
Multiple occurrences of field 32B at MT203 are expected at one sequence or across several sequences.
|
Field52A |
getField52A()
Iterates through block4 fields and return the first one whose name matches 52A,
or null if none is found.
The first occurrence of field 52A at MT203 is expected to be the only one.
|
Field52D |
getField52D()
Iterates through block4 fields and return the first one whose name matches 52D,
or null if none is found.
The first occurrence of field 52D at MT203 is expected to be the only one.
|
Field53A |
getField53A()
Iterates through block4 fields and return the first one whose name matches 53A,
or null if none is found.
The first occurrence of field 53A at MT203 is expected to be the only one.
|
Field53B |
getField53B()
Iterates through block4 fields and return the first one whose name matches 53B,
or null if none is found.
The first occurrence of field 53B at MT203 is expected to be the only one.
|
Field53D |
getField53D()
Iterates through block4 fields and return the first one whose name matches 53D,
or null if none is found.
The first occurrence of field 53D at MT203 is expected to be the only one.
|
Field54A |
getField54A()
Iterates through block4 fields and return the first one whose name matches 54A,
or null if none is found.
The first occurrence of field 54A at MT203 is expected to be the only one.
|
Field54B |
getField54B()
Iterates through block4 fields and return the first one whose name matches 54B,
or null if none is found.
The first occurrence of field 54B at MT203 is expected to be the only one.
|
Field54D |
getField54D()
Iterates through block4 fields and return the first one whose name matches 54D,
or null if none is found.
The first occurrence of field 54D at MT203 is expected to be the only one.
|
List<Field56A> |
getField56A()
Iterates through block4 fields and return all occurrences of fields whose names matches 56A,
or Collections.emptyList() if none is found.
Multiple occurrences of field 56A at MT203 are expected at one sequence or across several sequences.
|
List<Field56D> |
getField56D()
Iterates through block4 fields and return all occurrences of fields whose names matches 56D,
or Collections.emptyList() if none is found.
Multiple occurrences of field 56D at MT203 are expected at one sequence or across several sequences.
|
List<Field57A> |
getField57A()
Iterates through block4 fields and return all occurrences of fields whose names matches 57A,
or Collections.emptyList() if none is found.
Multiple occurrences of field 57A at MT203 are expected at one sequence or across several sequences.
|
List<Field57B> |
getField57B()
Iterates through block4 fields and return all occurrences of fields whose names matches 57B,
or Collections.emptyList() if none is found.
Multiple occurrences of field 57B at MT203 are expected at one sequence or across several sequences.
|
List<Field57D> |
getField57D()
Iterates through block4 fields and return all occurrences of fields whose names matches 57D,
or Collections.emptyList() if none is found.
Multiple occurrences of field 57D at MT203 are expected at one sequence or across several sequences.
|
List<Field58A> |
getField58A()
Iterates through block4 fields and return all occurrences of fields whose names matches 58A,
or Collections.emptyList() if none is found.
Multiple occurrences of field 58A at MT203 are expected at one sequence or across several sequences.
|
List<Field58D> |
getField58D()
Iterates through block4 fields and return all occurrences of fields whose names matches 58D,
or Collections.emptyList() if none is found.
Multiple occurrences of field 58D at MT203 are expected at one sequence or across several sequences.
|
List<Field72> |
getField72()
Iterates through block4 fields and return all occurrences of fields whose names matches 72,
or Collections.emptyList() if none is found.
Multiple occurrences of field 72 at MT203 are expected at one sequence or across several sequences.
|
String |
getMessageType()
Returns this MT number
|
MT203.SequenceA |
getSequenceA()
Get the single occurrence of SequenceA delimited by leading tag and end, with an optional tail.
|
MT203.SequenceA |
getSequenceA(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceA delimited by leading tag and end, with an optional tail.
|
List<MT203.SequenceB> |
getSequenceBList()
Get the list of SequenceB delimited by leading tag and end, with an optional tail.
|
static List<MT203.SequenceB> |
getSequenceBList(SwiftTagListBlock parentSequence)
Get the list of SequenceB delimited by leading tag and end, with an optional tail.
|
static MT203 |
parse(File file)
Creates a new MT203 by parsing a file with the message content in its swift FIN format.
If the file contains multiple messages, only the first one will be parsed.
|
static MT203 |
parse(InputStream stream)
Creates a new MT203 by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding.
If the stream contains multiple messages, only the first one will be parsed.
|
static MT203 |
parse(MtSwiftMessage m)
Creates an MT203 initialized with the parameter MtSwiftMessage.
|
static MT203 |
parse(String fin)
Creates a new MT203 by parsing a String with the message content in its swift FIN format.
If the fin parameter cannot be parsed, the returned MT203 will have its internal message object
initialized (blocks will be created) but empty.
If the string contains multiple messages, only the first one will be parsed.
|
-
Methods inherited from class com.prowidesoftware.swift.model.mt.AbstractMT
addField, containsSequence, containsSequenceList, create, create, FIN, getApplicationId, getLogicalTerminal, getMessagePriority, getMtId, getReceiver, getSender, getSequence, getSequence, getSequence, getSequenceList, getSequenceList, getSequenceNumber, getServiceId, getSessionNumber, getSwiftMessage, getSwiftMessageNotNullOrException, getVariant, isIncoming, isInput, isOutgoing, isOutput, isType, json, message, nameFromClass, read, setReceiver, setReceiver, setSender, setSender, setSwiftMessage, toString, write, write, xml
-
-
Constructor Detail
-
MT203
public MT203(String sender,
String receiver)
Creates and initializes a new MT203 input message from sender to receiver.
All mandatory header attributes are completed with default values.
In particular the sender and receiver addresses will be filled with proper default LT identifier
and branch codes if not provided,
- Parameters:
sender
- the sender address as a bic8, bic11 or full logical terminal consisting of 12 charactersreceiver
- the receiver address as a bic8, bic11 or full logical terminal consisting of 12 characters- Since:
- 7.7
-
MT203
@Deprecated
public MT203(int messageType,
String sender,
String receiver)
Deprecated.
DO NOT USE THIS METHOD
It is kept for compatibility but will be removed very soon, since the
messageType
parameter is actually ignored.
Use instead new MT203(sender, receiver)
- See Also:
MT203(String, String)
-
MT203
public MT203(String fin)
Creates a new MT203 by parsing a String with the message content in its swift FIN format.
If the fin parameter is null or the message cannot be parsed, the internal message object
will be initialized (blocks will be created) but empty.
If the string contains multiple messages, only the first one will be parsed.
- Parameters:
fin
- a string with the MT message in its FIN swift format- Since:
- 7.7
-
MT203
public MT203(InputStream stream)
throws IOException
Creates a new MT203 by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding.
If the message content is null or cannot be parsed, the internal message object
will be initialized (blocks will be created) but empty.
If the stream contains multiple messages, only the first one will be parsed.
- Parameters:
stream
- an input stream in UTF-8 encoding with the MT message in its FIN swift format.
- Throws:
IOException
- Since:
- 7.7
-
MT203
public MT203(File file)
throws IOException
Creates a new MT203 by parsing a file with the message content in its swift FIN format.
If the file content is null or cannot be parsed as a message, the internal message object
will be initialized (blocks will be created) but empty.
If the file contains multiple messages, only the first one will be parsed.
- Parameters:
file
- a file with the MT message in its FIN swift format.
- Throws:
IOException
- Since:
- 7.7
-
Method Detail
-
parse
public static MT203 parse(String fin)
Creates a new MT203 by parsing a String with the message content in its swift FIN format.
If the fin parameter cannot be parsed, the returned MT203 will have its internal message object
initialized (blocks will be created) but empty.
If the string contains multiple messages, only the first one will be parsed.
- Parameters:
fin
- a string with the MT message in its FIN swift format. fin may be null
in which case this method returns null
- Returns:
- a new instance of MT203 or null if fin is null
- Since:
- 7.7
-
parse
public static MT203 parse(InputStream stream)
throws IOException
Creates a new MT203 by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding.
If the stream contains multiple messages, only the first one will be parsed.
- Parameters:
stream
- an input stream in UTF-8 encoding with the MT message in its FIN swift format.
- Returns:
- a new instance of MT203 or null if stream is null or the message cannot be parsed
- Throws:
IOException
- Since:
- 7.7
-
parse
public static MT203 parse(File file)
throws IOException
Creates a new MT203 by parsing a file with the message content in its swift FIN format.
If the file contains multiple messages, only the first one will be parsed.
- Parameters:
file
- a file with the MT message in its FIN swift format.
- Returns:
- a new instance of MT203 or null if; file is null, does not exist, can't be read, is not a file or the message cannot be parsed
- Throws:
IOException
- Since:
- 7.7
-
getField19
public Field19 getField19()
Iterates through block4 fields and return the first one whose name matches 19,
or null
if none is found.
The first occurrence of field 19 at MT203 is expected to be the only one.
- Returns:
- a Field19 object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField30
public Field30 getField30()
Iterates through block4 fields and return the first one whose name matches 30,
or null
if none is found.
The first occurrence of field 30 at MT203 is expected to be the only one.
- Returns:
- a Field30 object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField52A
public Field52A getField52A()
Iterates through block4 fields and return the first one whose name matches 52A,
or null
if none is found.
The first occurrence of field 52A at MT203 is expected to be the only one.
- Returns:
- a Field52A object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField52D
public Field52D getField52D()
Iterates through block4 fields and return the first one whose name matches 52D,
or null
if none is found.
The first occurrence of field 52D at MT203 is expected to be the only one.
- Returns:
- a Field52D object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField53A
public Field53A getField53A()
Iterates through block4 fields and return the first one whose name matches 53A,
or null
if none is found.
The first occurrence of field 53A at MT203 is expected to be the only one.
- Returns:
- a Field53A object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField53B
public Field53B getField53B()
Iterates through block4 fields and return the first one whose name matches 53B,
or null
if none is found.
The first occurrence of field 53B at MT203 is expected to be the only one.
- Returns:
- a Field53B object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField53D
public Field53D getField53D()
Iterates through block4 fields and return the first one whose name matches 53D,
or null
if none is found.
The first occurrence of field 53D at MT203 is expected to be the only one.
- Returns:
- a Field53D object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField54A
public Field54A getField54A()
Iterates through block4 fields and return the first one whose name matches 54A,
or null
if none is found.
The first occurrence of field 54A at MT203 is expected to be the only one.
- Returns:
- a Field54A object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField54B
public Field54B getField54B()
Iterates through block4 fields and return the first one whose name matches 54B,
or null
if none is found.
The first occurrence of field 54B at MT203 is expected to be the only one.
- Returns:
- a Field54B object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField54D
public Field54D getField54D()
Iterates through block4 fields and return the first one whose name matches 54D,
or null
if none is found.
The first occurrence of field 54D at MT203 is expected to be the only one.
- Returns:
- a Field54D object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField20
public List<Field20> getField20()
Iterates through block4 fields and return all occurrences of fields whose names matches 20,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 20 at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field20 objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField21
public List<Field21> getField21()
Iterates through block4 fields and return all occurrences of fields whose names matches 21,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 21 at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field21 objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField32B
public List<Field32B> getField32B()
Iterates through block4 fields and return all occurrences of fields whose names matches 32B,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 32B at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field32B objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField56A
public List<Field56A> getField56A()
Iterates through block4 fields and return all occurrences of fields whose names matches 56A,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 56A at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field56A objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField56D
public List<Field56D> getField56D()
Iterates through block4 fields and return all occurrences of fields whose names matches 56D,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 56D at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field56D objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField57A
public List<Field57A> getField57A()
Iterates through block4 fields and return all occurrences of fields whose names matches 57A,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 57A at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field57A objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField57B
public List<Field57B> getField57B()
Iterates through block4 fields and return all occurrences of fields whose names matches 57B,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 57B at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field57B objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField57D
public List<Field57D> getField57D()
Iterates through block4 fields and return all occurrences of fields whose names matches 57D,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 57D at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field57D objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField58A
public List<Field58A> getField58A()
Iterates through block4 fields and return all occurrences of fields whose names matches 58A,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 58A at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field58A objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField58D
public List<Field58D> getField58D()
Iterates through block4 fields and return all occurrences of fields whose names matches 58D,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 58D at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field58D objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField72
public List<Field72> getField72()
Iterates through block4 fields and return all occurrences of fields whose names matches 72,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 72 at MT203 are expected at one sequence or across several sequences.
- Returns:
- a List of Field72 objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getSequenceA
@SequenceStyle(value=GENERATED_FIXED_WITH_OPTIONAL_TAIL)
public MT203.SequenceA getSequenceA(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceA delimited by leading tag and end, with an optional tail.
The presence of this methods indicates that this sequence can occur only once according to the Standard.
If block 4 is empty this method returns null
.
- Parameters:
parentSequence
- an optional parent sequence or null
to find SequenceA within the complete message- Since:
- 7.7
- See Also:
SwiftTagListBlock.getSubBlockDelimitedWithOptionalTail(String[], String[], String[])
-
getSequenceBList
@SequenceStyle(value=GENERATED_FIXED_WITH_OPTIONAL_TAIL)
public static List<MT203.SequenceB> getSequenceBList(SwiftTagListBlock parentSequence)
Get the list of SequenceB delimited by leading tag and end, with an optional tail.
The presence of this methods indicates that this sequence can occur more than once according to the Standard.
If message is empty or nor sequences are found an empty list is returned.
- Parameters:
parentSequence
- an optional parent sequence or null
to find SequenceB within the complete message- Since:
- 7.7
- See Also:
SwiftTagListBlock.getSubBlocksDelimitedWithOptionalTail(String[], String[], String[])