public class MT381 extends AbstractMT implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
MT381.SequenceA
Class for Sequence "A" of MT 381
|
static class |
MT381.SequenceA1
Class for Sequence "A1" of MT 381
|
static class |
MT381.SequenceB
Class for Sequence "B" of MT 381
|
static class |
MT381.SequenceB1
Class for Sequence "B1" of MT 381
|
static class |
MT381.SequenceB2
Class for Sequence "B2" of MT 381
|
static class |
MT381.SequenceC
Class for Sequence "C" of MT 381
|
Modifier and Type | Field and Description |
---|---|
static String |
AGRE
Constant for qualifier with value AGRE
|
static String |
BUYE
Constant for qualifier with value BUYE
|
static String |
ESTT
Constant for qualifier with value ESTT
|
static String |
EXCH
Constant for qualifier with value EXCH
|
static String |
FXORDER
Constant for qualifier with value FXORDER
|
static String |
FXTR
Constant for qualifier with value FXTR
|
static String |
GENL
Constant for qualifier with value GENL
|
static String |
INVE
Constant for qualifier with value INVE
|
static String |
LINK
Constant for qualifier with value LINK
|
static String |
NAME
Constant for MT name, this is part of the classname, after
MT |
static String |
ORDR
Constant for qualifier with value ORDR
|
static String |
ORDRPRTY
Constant for qualifier with value ORDRPRTY
|
static String |
PREV
Constant for qualifier with value PREV
|
static String |
REAS
Constant for qualifier with value REAS
|
static String |
RELA
Constant for qualifier with value RELA
|
static String |
SAFE
Constant for qualifier with value SAFE
|
static String |
SELL
Constant for qualifier with value SELL
|
static String |
SEME
Constant for qualifier with value SEME
|
static String |
TRAD
Constant for qualifier with value TRAD
|
static String |
TRDE
Constant for qualifier with value TRDE
|
static String |
UNDE
Constant for qualifier with value UNDE
|
static String |
VALU
Constant for qualifier with value VALU
|
m
Constructor and Description |
---|
MT381()
Creates and initializes a new MT381 input message setting TEST BICS as sender and receiver.
All mandatory header attributes are completed with default values. |
MT381(File file)
Creates a new MT381 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. |
MT381(InputStream stream)
Creates a new MT381 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. |
MT381(int messageType,
String sender,
String receiver)
Deprecated.
|
MT381(MtSwiftMessage m)
Creates an MT381 initialized with the parameter MtSwiftMessage.
|
MT381(String fin)
Creates a new MT381 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. |
MT381(String sender,
String receiver)
Creates and initializes a new MT381 input message from sender to receiver.
All mandatory header attributes are completed with default values. |
MT381(SwiftMessage m)
Creates an MT381 initialized with the parameter SwiftMessage
|
Modifier and Type | Method and Description |
---|---|
MT381 |
append(Field... fields)
Add all the fields to the end of the block4.
|
MT381 |
append(SwiftTagListBlock block)
Add all tags from block to the end of the block4.
|
MT381 |
append(Tag... tags)
Add all tags to the end of the block4.
|
List<Field13A> |
getField13A()
Iterates through block4 fields and return all occurrences of fields whose names matches 13A,
or
Collections.emptyList() if none is found.Multiple occurrences of field 13A at MT381 are expected at one sequence or across several sequences. |
List<Field13B> |
getField13B()
Iterates through block4 fields and return all occurrences of fields whose names matches 13B,
or
Collections.emptyList() if none is found.Multiple occurrences of field 13B at MT381 are expected at one sequence or across several sequences. |
List<Field16R> |
getField16R()
Iterates through block4 fields and return all occurrences of fields whose names matches 16R,
or
Collections.emptyList() if none is found.Multiple occurrences of field 16R at MT381 are expected at one sequence or across several sequences. |
List<Field16S> |
getField16S()
Iterates through block4 fields and return all occurrences of fields whose names matches 16S,
or
Collections.emptyList() if none is found.Multiple occurrences of field 16S at MT381 are expected at one sequence or across several sequences. |
List<Field19B> |
getField19B()
Iterates through block4 fields and return all occurrences of fields whose names matches 19B,
or
Collections.emptyList() if none is found.Multiple occurrences of field 19B at MT381 are expected at one sequence or across several sequences. |
List<Field20C> |
getField20C()
Iterates through block4 fields and return all occurrences of fields whose names matches 20C,
or
Collections.emptyList() if none is found.Multiple occurrences of field 20C at MT381 are expected at one sequence or across several sequences. |
Field22F |
getField22F()
Iterates through block4 fields and return the first one whose name matches 22F,
or
null if none is found.The first occurrence of field 22F at MT381 is expected to be the only one. |
Field22H |
getField22H()
Iterates through block4 fields and return the first one whose name matches 22H,
or
null if none is found.The first occurrence of field 22H at MT381 is expected to be the only one. |
Field23G |
getField23G()
Iterates through block4 fields and return the first one whose name matches 23G,
or
null if none is found.The first occurrence of field 23G at MT381 is expected to be the only one. |
Field24B |
getField24B()
Iterates through block4 fields and return the first one whose name matches 24B,
or
null if none is found.The first occurrence of field 24B at MT381 is expected to be the only one. |
Field35B |
getField35B()
Iterates through block4 fields and return the first one whose name matches 35B,
or
null if none is found.The first occurrence of field 35B at MT381 is expected to be the only one. |
Field36B |
getField36B()
Iterates through block4 fields and return the first one whose name matches 36B,
or
null if none is found.The first occurrence of field 36B at MT381 is expected to be the only one. |
Field70D |
getField70D()
Iterates through block4 fields and return the first one whose name matches 70D,
or
null if none is found.The first occurrence of field 70D at MT381 is expected to be the only one. |
Field70E |
getField70E()
Iterates through block4 fields and return the first one whose name matches 70E,
or
null if none is found.The first occurrence of field 70E at MT381 is expected to be the only one. |
Field92B |
getField92B()
Iterates through block4 fields and return the first one whose name matches 92B,
or
null if none is found.The first occurrence of field 92B at MT381 is expected to be the only one. |
Field95P |
getField95P()
Iterates through block4 fields and return the first one whose name matches 95P,
or
null if none is found.The first occurrence of field 95P at MT381 is expected to be the only one. |
Field95Q |
getField95Q()
Iterates through block4 fields and return the first one whose name matches 95Q,
or
null if none is found.The first occurrence of field 95Q at MT381 is expected to be the only one. |
Field95R |
getField95R()
Iterates through block4 fields and return the first one whose name matches 95R,
or
null if none is found.The first occurrence of field 95R at MT381 is expected to be the only one. |
Field97A |
getField97A()
Iterates through block4 fields and return the first one whose name matches 97A,
or
null if none is found.The first occurrence of field 97A at MT381 is expected to be the only one. |
List<Field98A> |
getField98A()
Iterates through block4 fields and return all occurrences of fields whose names matches 98A,
or
Collections.emptyList() if none is found.Multiple occurrences of field 98A at MT381 are expected at one sequence or across several sequences. |
List<Field98C> |
getField98C()
Iterates through block4 fields and return all occurrences of fields whose names matches 98C,
or
Collections.emptyList() if none is found.Multiple occurrences of field 98C at MT381 are expected at one sequence or across several sequences. |
String |
getMessageType()
Returns this MT number
|
MT381.SequenceA |
getSequenceA()
Get the single occurrence of SequenceA delimited by 16R/16S the value of SequenceA#START_END_16RS.
|
MT381.SequenceA |
getSequenceA(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceA delimited by 16R/16S the value of SequenceA#START_END_16RS.
|
List<MT381.SequenceA1> |
getSequenceA1List()
Get the list of SequenceA1 delimited by 16R/16S with value specified in SequenceA1#START_END_16RS
The presence of this methods indicates that this sequence can occur more than once according to the Standard.
|
List<MT381.SequenceA1> |
getSequenceA1List(SwiftTagListBlock parentSequence)
Get the list of SequenceA1 delimited by 16R/16S with value specified in SequenceA1#START_END_16RS
The presence of this methods indicates that this sequence can occur more than once according to the Standard.
|
MT381.SequenceB |
getSequenceB()
Get the single occurrence of SequenceB delimited by 16R/16S the value of SequenceB#START_END_16RS.
|
MT381.SequenceB |
getSequenceB(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceB delimited by 16R/16S the value of SequenceB#START_END_16RS.
|
MT381.SequenceB1 |
getSequenceB1()
Get the single occurrence of SequenceB1 delimited by 16R/16S the value of SequenceB1#START_END_16RS.
|
MT381.SequenceB1 |
getSequenceB1(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceB1 delimited by 16R/16S the value of SequenceB1#START_END_16RS.
|
MT381.SequenceB2 |
getSequenceB2()
Get the single occurrence of SequenceB2 delimited by 16R/16S the value of SequenceB2#START_END_16RS.
|
MT381.SequenceB2 |
getSequenceB2(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceB2 delimited by 16R/16S the value of SequenceB2#START_END_16RS.
|
MT381.SequenceC |
getSequenceC()
Get the single occurrence of SequenceC delimited by 16R/16S the value of SequenceC#START_END_16RS.
|
MT381.SequenceC |
getSequenceC(SwiftTagListBlock parentSequence)
Get the single occurrence of SequenceC delimited by 16R/16S the value of SequenceC#START_END_16RS.
|
static MT381 |
parse(File file)
Creates a new MT381 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 MT381 |
parse(InputStream stream)
Creates a new MT381 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 MT381 |
parse(MtSwiftMessage m)
Creates an MT381 initialized with the parameter MtSwiftMessage.
|
static MT381 |
parse(String fin)
Creates a new MT381 by parsing a String with the message content in its swift FIN format.
If the fin parameter cannot be parsed, the returned MT381 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. |
addField, create, create, FIN, getApplicationId, getLogicalTerminal, getMessagePriority, getReceiver, getSender, getSequence, getSequence, getSequenceList, getSequenceNumber, getServiceId, getSessionNumber, getSwiftMessage, getSwiftMessageNotNullOrException, isInput, isOutput, isType, json, message, read, setReceiver, setReceiver, setSender, setSender, setSwiftMessage, toString, write, write, xml
public static final String NAME
MT
public static final String AGRE
public static final String BUYE
public static final String ESTT
public static final String EXCH
public static final String FXORDER
public static final String FXTR
public static final String GENL
public static final String INVE
public static final String LINK
public static final String ORDR
public static final String ORDRPRTY
public static final String PREV
public static final String REAS
public static final String RELA
public static final String SAFE
public static final String SELL
public static final String SEME
public static final String TRAD
public static final String TRDE
public static final String UNDE
public static final String VALU
public MT381(SwiftMessage m)
m
- swift message with the MT381 contentpublic MT381(MtSwiftMessage m)
m
- swift message with the MT381 content, the parameter can not be null
MT381(String)
public MT381()
public MT381(String sender, String receiver)
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@Deprecated public MT381(int messageType, String sender, String receiver)
messageType
parameter is actually ignored.
Use instead new MT381(sender, receiver)
MT381(String, String)
public MT381(String fin)
fin
- a string with the MT message in its FIN swift formatpublic MT381(InputStream stream) throws IOException
stream
- an input stream in UTF-8 encoding with the MT message in its FIN swift format.IOException
public MT381(File file) throws IOException
file
- a file with the MT message in its FIN swift format.IOException
public static MT381 parse(MtSwiftMessage m)
m
- swift message with the MT381 contentnull
if the parameter is null
MT381(String)
public static MT381 parse(String fin)
fin
- a string with the MT message in its FIN swift format. fin may be null
in which case this method returns nullpublic static MT381 parse(InputStream stream) throws IOException
stream
- an input stream in UTF-8 encoding with the MT message in its FIN swift format.IOException
public static MT381 parse(File file) throws IOException
file
- a file with the MT message in its FIN swift format.IOException
public String getMessageType()
getMessageType
in class AbstractMT
public MT381 append(SwiftTagListBlock block)
append
in class AbstractMT
block
- to appendpublic MT381 append(Tag... tags)
append
in class AbstractMT
tags
- to appendpublic MT381 append(Field... fields)
append
in class AbstractMT
fields
- to appendpublic Field23G getField23G()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field22H getField22H()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field92B getField92B()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field95P getField95P()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field95Q getField95Q()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field95R getField95R()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field97A getField97A()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field24B getField24B()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field70D getField70D()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field35B getField35B()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field36B getField36B()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field22F getField22F()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public Field70E getField70E()
null
if none is found.null
if the field is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagByName(String)
public List<Field16R> getField16R()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
public List<Field13A> getField13A()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
public List<Field13B> getField13B()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
public List<Field20C> getField20C()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
public List<Field16S> getField16S()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
public List<Field98A> getField98A()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
public List<Field98C> getField98C()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
public List<Field19B> getField19B()
Collections.emptyList()
if none is found.Collections.emptyList()
if none is not foundIllegalStateException
- if SwiftMessage object is not initializedSwiftTagListBlock.getTagsByName(String)
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceA getSequenceA()
null
. If the sequence is not found an empty instance
of SequenceA
is returnedMT381.SequenceA.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceA getSequenceA(SwiftTagListBlock parentSequence)
null
. If the sequence is not found an empty instance
of SequenceA
is returnedparentSequence
- an optional parent sequence or null
to find SequenceA within the complete messageMT381.SequenceA.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public List<MT381.SequenceA1> getSequenceA1List()
MT381.SequenceA1.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public List<MT381.SequenceA1> getSequenceA1List(SwiftTagListBlock parentSequence)
parentSequence
- an optional parent sequence or null
to find SequenceA1 within the complete messageMT381.SequenceA1.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceB getSequenceB()
null
. If the sequence is not found an empty instance
of SequenceB
is returnedMT381.SequenceB.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceB getSequenceB(SwiftTagListBlock parentSequence)
null
. If the sequence is not found an empty instance
of SequenceB
is returnedparentSequence
- an optional parent sequence or null
to find SequenceB within the complete messageMT381.SequenceB.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceB1 getSequenceB1()
null
. If the sequence is not found an empty instance
of SequenceB1
is returnedMT381.SequenceB1.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceB1 getSequenceB1(SwiftTagListBlock parentSequence)
null
. If the sequence is not found an empty instance
of SequenceB1
is returnedparentSequence
- an optional parent sequence or null
to find SequenceB1 within the complete messageMT381.SequenceB1.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceB2 getSequenceB2()
null
. If the sequence is not found an empty instance
of SequenceB2
is returnedMT381.SequenceB2.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceB2 getSequenceB2(SwiftTagListBlock parentSequence)
null
. If the sequence is not found an empty instance
of SequenceB2
is returnedparentSequence
- an optional parent sequence or null
to find SequenceB2 within the complete messageMT381.SequenceB2.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceC getSequenceC()
null
. If the sequence is not found an empty instance
of SequenceC
is returnedMT381.SequenceC.START_END_16RS
@SequenceStyle(value=GENERATED_16RS) public MT381.SequenceC getSequenceC(SwiftTagListBlock parentSequence)
null
. If the sequence is not found an empty instance
of SequenceC
is returnedparentSequence
- an optional parent sequence or null
to find SequenceC within the complete messageMT381.SequenceC.START_END_16RS