MT 207
Request For Financial Institution Transfer
MT207 Format
Main Sequence main
Sequence A
Field 20
Letter options: null
Field 21
Letter options: R
Field 28
Letter options: D
Field 30
Letter options: null
Field 51
Letter options: A
Field 52
Letter options: G
Field 52
Letter options: A,C
Field 72
Letter options: null
Sequence B
Field 21
Letter options: null
Field 23
Letter options: E
Field 32
Letter options: B
Field 56
Letter options: A,D
Field 57
Letter options: A,C,D
Field 58
Letter options: A,D
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 |
MT207.SequenceA
Class for Sequence "A" of MT 207
|
static class |
MT207.SequenceB
Class for Sequence "B" of MT 207
|
-
Field Summary
Fields
Modifier and Type |
Field and Description |
static String |
CMSW
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsC.CMSW
|
static String |
CMTO
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsC.CMTO
|
static String |
CMZB
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsC.CMZB
|
static String |
CORT
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsC.CORT
|
static String |
NAME
Constant for MT name, this is part of the classname, after MT
|
static String |
NETS
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsN.NETS
|
static String |
OTHR
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsO.OTHR
|
static String |
PHON
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsP.PHON
|
static String |
RTGS
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsR.RTGS
|
static int |
SRU
Constant identifying the SRU to which this class belongs to.
|
static String |
URGP
Deprecated.
use instead com.prowidesoftware.swift.SchemeConstantsU.URGP
|
-
Fields inherited from class com.prowidesoftware.swift.model.mt.AbstractMT
m
-
Constructor Summary
Constructors
Constructor and Description |
MT207()
Creates and initializes a new MT207 input message setting TEST BICS as sender and receiver.
All mandatory header attributes are completed with default values.
|
MT207(File file)
Creates a new MT207 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.
|
MT207(InputStream stream)
Creates a new MT207 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.
|
MT207(int messageType,
String sender,
String receiver)
Deprecated.
|
MT207(MtSwiftMessage m)
Creates an MT207 initialized with the parameter MtSwiftMessage.
|
MT207(String fin)
Creates a new MT207 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.
|
MT207(String sender,
String receiver)
Creates and initializes a new MT207 input message from sender to receiver.
All mandatory header attributes are completed with default values.
|
MT207(SwiftMessage m)
Creates an MT207 initialized with the parameter SwiftMessage
|
-
Method Summary
Methods
Modifier and Type |
Method and Description |
MT207 |
append(Field... fields)
Add all the fields to the end of the block4.
|
MT207 |
append(SwiftTagListBlock block)
Add all tags from block to the end of the block4.
|
MT207 |
append(Tag... tags)
Add all tags to the end of the block4.
|
Field20 |
getField20()
Iterates through block4 fields and return the first one whose name matches 20,
or null if none is found.
The first occurrence of field 20 at MT207 is expected to be the only one.
|
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 MT207 are expected at one sequence or across several sequences.
|
Field21R |
getField21R()
Iterates through block4 fields and return the first one whose name matches 21R,
or null if none is found.
The first occurrence of field 21R at MT207 is expected to be the only one.
|
List<Field23E> |
getField23E()
Iterates through block4 fields and return all occurrences of fields whose names matches 23E,
or Collections.emptyList() if none is found.
Multiple occurrences of field 23E at MT207 are expected at one sequence or across several sequences.
|
Field28D |
getField28D()
Iterates through block4 fields and return the first one whose name matches 28D,
or null if none is found.
The first occurrence of field 28D at MT207 is expected to be the only one.
|
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 MT207 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 MT207 are expected at one sequence or across several sequences.
|
Field51A |
getField51A()
Iterates through block4 fields and return the first one whose name matches 51A,
or null if none is found.
The first occurrence of field 51A at MT207 is expected to be the only one.
|
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 MT207 is expected to be the only one.
|
Field52C |
getField52C()
Iterates through block4 fields and return the first one whose name matches 52C,
or null if none is found.
The first occurrence of field 52C at MT207 is expected to be the only one.
|
Field52G |
getField52G()
Iterates through block4 fields and return the first one whose name matches 52G,
or null if none is found.
The first occurrence of field 52G at MT207 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 MT207 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 MT207 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 MT207 are expected at one sequence or across several sequences.
|
List<Field57C> |
getField57C()
Iterates through block4 fields and return all occurrences of fields whose names matches 57C,
or Collections.emptyList() if none is found.
Multiple occurrences of field 57C at MT207 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 MT207 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 MT207 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 MT207 are expected at one sequence or across several sequences.
|
Field72 |
getField72()
Iterates through block4 fields and return the first one whose name matches 72,
or null if none is found.
The first occurrence of field 72 at MT207 is expected to be the only one.
|
String |
getMessageType()
Returns this MT number
|
MT207.SequenceA |
getSequenceA()
Get the single occurrence of SequenceA delimited by leading tag and end, with an optional tail.
|
MT207.SequenceA |
getSequenceA(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceA delimited by leading tag and end, with an optional tail.
|
List<MT207.SequenceB> |
getSequenceBList()
Get the list of SequenceB delimited by leading tag and end, with an optional tail.
|
static List<MT207.SequenceB> |
getSequenceBList(SwiftTagListBlock parentSequence)
Get the list of SequenceB delimited by leading tag and end, with an optional tail.
|
static MT207 |
parse(File file)
Creates a new MT207 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 MT207 |
parse(InputStream stream)
Creates a new MT207 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 MT207 |
parse(MtSwiftMessage m)
Creates an MT207 initialized with the parameter MtSwiftMessage.
|
static MT207 |
parse(String fin)
Creates a new MT207 by parsing a String with the message content in its swift FIN format.
If the fin parameter cannot be parsed, the returned MT207 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
-
MT207
public MT207(String sender,
String receiver)
Creates and initializes a new MT207 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
-
MT207
@Deprecated
public MT207(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 MT207(sender, receiver)
- See Also:
MT207(String, String)
-
MT207
public MT207(String fin)
Creates a new MT207 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
-
MT207
public MT207(InputStream stream)
throws IOException
Creates a new MT207 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
-
MT207
public MT207(File file)
throws IOException
Creates a new MT207 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 MT207 parse(String fin)
Creates a new MT207 by parsing a String with the message content in its swift FIN format.
If the fin parameter cannot be parsed, the returned MT207 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 MT207 or null if fin is null
- Since:
- 7.7
-
parse
public static MT207 parse(InputStream stream)
throws IOException
Creates a new MT207 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 MT207 or null if stream is null or the message cannot be parsed
- Throws:
IOException
- Since:
- 7.7
-
parse
public static MT207 parse(File file)
throws IOException
Creates a new MT207 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 MT207 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
-
getField20
public Field20 getField20()
Iterates through block4 fields and return the first one whose name matches 20,
or null
if none is found.
The first occurrence of field 20 at MT207 is expected to be the only one.
- Returns:
- a Field20 object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField21R
public Field21R getField21R()
Iterates through block4 fields and return the first one whose name matches 21R,
or null
if none is found.
The first occurrence of field 21R at MT207 is expected to be the only one.
- Returns:
- a Field21R object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField28D
public Field28D getField28D()
Iterates through block4 fields and return the first one whose name matches 28D,
or null
if none is found.
The first occurrence of field 28D at MT207 is expected to be the only one.
- Returns:
- a Field28D 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 MT207 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)
-
getField51A
public Field51A getField51A()
Iterates through block4 fields and return the first one whose name matches 51A,
or null
if none is found.
The first occurrence of field 51A at MT207 is expected to be the only one.
- Returns:
- a Field51A object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField52G
public Field52G getField52G()
Iterates through block4 fields and return the first one whose name matches 52G,
or null
if none is found.
The first occurrence of field 52G at MT207 is expected to be the only one.
- Returns:
- a Field52G 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 MT207 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)
-
getField52C
public Field52C getField52C()
Iterates through block4 fields and return the first one whose name matches 52C,
or null
if none is found.
The first occurrence of field 52C at MT207 is expected to be the only one.
- Returns:
- a Field52C object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField72
public Field72 getField72()
Iterates through block4 fields and return the first one whose name matches 72,
or null
if none is found.
The first occurrence of field 72 at MT207 is expected to be the only one.
- Returns:
- a Field72 object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(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 MT207 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)
-
getField23E
public List<Field23E> getField23E()
Iterates through block4 fields and return all occurrences of fields whose names matches 23E,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 23E at MT207 are expected at one sequence or across several sequences.
- Returns:
- a List of Field23E 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 MT207 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 MT207 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 MT207 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 MT207 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)
-
getField57C
public List<Field57C> getField57C()
Iterates through block4 fields and return all occurrences of fields whose names matches 57C,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 57C at MT207 are expected at one sequence or across several sequences.
- Returns:
- a List of Field57C 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 MT207 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 MT207 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 MT207 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)
-
getSequenceA
@SequenceStyle(value=GENERATED_FIXED_WITH_OPTIONAL_TAIL)
public MT207.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<MT207.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[])