MT 800
T/C Sales and Settlement Advice [Single]
MT800 Format
Main Sequence main
Field 20
Letter options: null
Field 51
Letter options: A,C
Sequence A
Field 23
Letter options: null
Field 30
Letter options: null
Field 26
Letter options: A
Field 33
Letter options: B
Field 73
Letter options: null
Sequence B
Field 34
Letter options: B
Field 16
Letter options: A
Field 32
Letter options: A
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
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 |
MT800.SequenceA
Class for Sequence "A" of MT 800
|
static class |
MT800.SequenceB
Class for Sequence "B" of MT 800
|
-
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 |
MT800()
Creates and initializes a new MT800 input message setting TEST BICS as sender and receiver.
All mandatory header attributes are completed with default values.
|
MT800(File file)
Creates a new MT800 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.
|
MT800(InputStream stream)
Creates a new MT800 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.
|
MT800(int messageType,
String sender,
String receiver)
Deprecated.
|
MT800(MtSwiftMessage m)
Creates an MT800 initialized with the parameter MtSwiftMessage.
|
MT800(String fin)
Creates a new MT800 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.
|
MT800(String sender,
String receiver)
Creates and initializes a new MT800 input message from sender to receiver.
All mandatory header attributes are completed with default values.
|
MT800(SwiftMessage m)
Creates an MT800 initialized with the parameter SwiftMessage
|
-
Method Summary
Methods
Modifier and Type |
Method and Description |
MT800 |
append(Field... fields)
Add all the fields to the end of the block4.
|
MT800 |
append(SwiftTagListBlock block)
Add all tags from block to the end of the block4.
|
MT800 |
append(Tag... tags)
Add all tags to the end of the block4.
|
Field16A |
getField16A()
Iterates through block4 fields and return the first one whose name matches 16A,
or null if none is found.
The first occurrence of field 16A at MT800 is expected to be the only one.
|
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 MT800 is expected to be the only one.
|
List<Field23> |
getField23()
Iterates through block4 fields and return all occurrences of fields whose names matches 23,
or Collections.emptyList() if none is found.
Multiple occurrences of field 23 at MT800 are expected at one sequence or across several sequences.
|
List<Field26A> |
getField26A()
Iterates through block4 fields and return all occurrences of fields whose names matches 26A,
or Collections.emptyList() if none is found.
Multiple occurrences of field 26A at MT800 are expected at one sequence or across several sequences.
|
List<Field30> |
getField30()
Iterates through block4 fields and return all occurrences of fields whose names matches 30,
or Collections.emptyList() if none is found.
Multiple occurrences of field 30 at MT800 are expected at one sequence or across several sequences.
|
Field32A |
getField32A()
Iterates through block4 fields and return the first one whose name matches 32A,
or null if none is found.
The first occurrence of field 32A at MT800 is expected to be the only one.
|
List<Field33B> |
getField33B()
Iterates through block4 fields and return all occurrences of fields whose names matches 33B,
or Collections.emptyList() if none is found.
Multiple occurrences of field 33B at MT800 are expected at one sequence or across several sequences.
|
Field34B |
getField34B()
Iterates through block4 fields and return the first one whose name matches 34B,
or null if none is found.
The first occurrence of field 34B at MT800 is expected to be the only one.
|
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 MT800 is expected to be the only one.
|
Field51C |
getField51C()
Iterates through block4 fields and return the first one whose name matches 51C,
or null if none is found.
The first occurrence of field 51C at MT800 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 is expected to be the only one.
|
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 MT800 is expected to be the only one.
|
List<Field73> |
getField73()
Iterates through block4 fields and return all occurrences of fields whose names matches 73,
or Collections.emptyList() if none is found.
Multiple occurrences of field 73 at MT800 are expected at one sequence or across several sequences.
|
String |
getMessageType()
Returns this MT number
|
List<MT800.SequenceA> |
getSequenceAList()
Get the list of SequenceA delimited by leading tag and end, with an optional tail.
|
static List<MT800.SequenceA> |
getSequenceAList(SwiftTagListBlock parentSequence)
Get the list of SequenceA delimited by leading tag and end, with an optional tail.
|
MT800.SequenceB |
getSequenceB()
Get the single occurrence of SequenceB delimited by leading tag and end, with an optional tail.
|
MT800.SequenceB |
getSequenceB(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceB delimited by leading tag and end, with an optional tail.
|
static MT800 |
parse(File file)
Creates a new MT800 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 MT800 |
parse(InputStream stream)
Creates a new MT800 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 MT800 |
parse(MtSwiftMessage m)
Creates an MT800 initialized with the parameter MtSwiftMessage.
|
static MT800 |
parse(String fin)
Creates a new MT800 by parsing a String with the message content in its swift FIN format.
If the fin parameter cannot be parsed, the returned MT800 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
-
MT800
public MT800(String sender,
String receiver)
Creates and initializes a new MT800 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
-
MT800
@Deprecated
public MT800(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 MT800(sender, receiver)
- See Also:
MT800(String, String)
-
MT800
public MT800(String fin)
Creates a new MT800 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
-
MT800
public MT800(InputStream stream)
throws IOException
Creates a new MT800 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
-
MT800
public MT800(File file)
throws IOException
Creates a new MT800 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 MT800 parse(String fin)
Creates a new MT800 by parsing a String with the message content in its swift FIN format.
If the fin parameter cannot be parsed, the returned MT800 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 MT800 or null if fin is null
- Since:
- 7.7
-
parse
public static MT800 parse(InputStream stream)
throws IOException
Creates a new MT800 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 MT800 or null if stream is null or the message cannot be parsed
- Throws:
IOException
- Since:
- 7.7
-
parse
public static MT800 parse(File file)
throws IOException
Creates a new MT800 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 MT800 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 MT800 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)
-
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 MT800 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)
-
getField51C
public Field51C getField51C()
Iterates through block4 fields and return the first one whose name matches 51C,
or null
if none is found.
The first occurrence of field 51C at MT800 is expected to be the only one.
- Returns:
- a Field51C object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField34B
public Field34B getField34B()
Iterates through block4 fields and return the first one whose name matches 34B,
or null
if none is found.
The first occurrence of field 34B at MT800 is expected to be the only one.
- Returns:
- a Field34B object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField16A
public Field16A getField16A()
Iterates through block4 fields and return the first one whose name matches 16A,
or null
if none is found.
The first occurrence of field 16A at MT800 is expected to be the only one.
- Returns:
- a Field16A object or
null
if the field is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagByName(String)
-
getField32A
public Field32A getField32A()
Iterates through block4 fields and return the first one whose name matches 32A,
or null
if none is found.
The first occurrence of field 32A at MT800 is expected to be the only one.
- Returns:
- a Field32A 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 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 MT800 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)
-
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 MT800 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)
-
getField23
public List<Field23> getField23()
Iterates through block4 fields and return all occurrences of fields whose names matches 23,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 23 at MT800 are expected at one sequence or across several sequences.
- Returns:
- a List of Field23 objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField30
public List<Field30> getField30()
Iterates through block4 fields and return all occurrences of fields whose names matches 30,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 30 at MT800 are expected at one sequence or across several sequences.
- Returns:
- a List of Field30 objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField26A
public List<Field26A> getField26A()
Iterates through block4 fields and return all occurrences of fields whose names matches 26A,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 26A at MT800 are expected at one sequence or across several sequences.
- Returns:
- a List of Field26A objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField33B
public List<Field33B> getField33B()
Iterates through block4 fields and return all occurrences of fields whose names matches 33B,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 33B at MT800 are expected at one sequence or across several sequences.
- Returns:
- a List of Field33B objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getField73
public List<Field73> getField73()
Iterates through block4 fields and return all occurrences of fields whose names matches 73,
or Collections.emptyList()
if none is found.
Multiple occurrences of field 73 at MT800 are expected at one sequence or across several sequences.
- Returns:
- a List of Field73 objects or
Collections.emptyList()
if none is not found
- Throws:
IllegalStateException
- if SwiftMessage object is not initialized- See Also:
SwiftTagListBlock.getTagsByName(String)
-
getSequenceAList
@SequenceStyle(value=GENERATED_FIXED_WITH_OPTIONAL_TAIL)
public static List<MT800.SequenceA> getSequenceAList(SwiftTagListBlock parentSequence)
Get the list of SequenceA 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 SequenceA within the complete message- Since:
- 7.7
- See Also:
SwiftTagListBlock.getSubBlocksDelimitedWithOptionalTail(String[], String[], String[])
-
getSequenceB
@SequenceStyle(value=GENERATED_FIXED_WITH_OPTIONAL_TAIL)
public MT800.SequenceB getSequenceB(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceB 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 SequenceB within the complete message- Since:
- 7.7
- See Also:
SwiftTagListBlock.getSubBlockDelimitedWithOptionalTail(String[], String[], String[])