public abstract class AbstractMT extends Object
AbstractMX
Constructor and Description |
---|
AbstractMT()
Creates a particular MT initialized with a new SwiftMessage.
|
AbstractMT(int messageType)
Create an input message for the given type setting TEST BICS as sender and receiver.
All mandatory header attributes are completed with default values. |
AbstractMT(int messageType,
String sender,
String receiver)
Creates a new input message for the given type setting the given sender and receiver.
All mandatory header attributes are completed with default values. |
AbstractMT(MtSwiftMessage m) |
AbstractMT(SwiftMessage m) |
Modifier and Type | Method and Description |
---|---|
void |
addField(Field f)
Adds the given field to the body block.
|
AbstractMT |
append(Field... fields)
Add all the fields to the end of the block4
|
AbstractMT |
append(SwiftTagListBlock block)
Add all tags from block to the end of the block4
|
AbstractMT |
append(Tag... tags)
Add all tags to the end of the block4
|
static AbstractMT |
create(int messageType)
Create a blank message for the given category setting TEST bics as sender and receiver
|
static AbstractMT |
create(int messageType,
String sender,
String receiver)
Create a blank message for the given category setting the given sender and receiver BICs
|
String |
FIN()
Gets a String containing the FIN message (SWIFT MT message).
|
String |
getApplicationId() |
String |
getLogicalTerminal() |
String |
getMessagePriority() |
abstract String |
getMessageType()
Returns this MT number
|
String |
getReceiver()
Gets the logical terminal field of the application header block.
|
String |
getSender()
Gets the logical terminal field of the header block.
|
SwiftTagListBlock |
getSequence(String name) |
List<SwiftTagListBlock> |
getSequenceList(String name) |
String |
getSequenceNumber() |
String |
getServiceId() |
String |
getSessionNumber() |
SwiftMessage |
getSwiftMessage() |
boolean |
isInput() |
boolean |
isOutput() |
void |
setReceiver(BIC bic) |
void |
setReceiver(String receiver)
Sets the logical terminal field of the application header block.
The receiver addresses will be filled with proper default LT identifier and branch codes if not provided. |
void |
setSender(BIC bic)
Sets the message header LT address with the parameter BIC code and default LT identifier.
|
void |
setSender(String sender)
Sets the logical terminal field of the header block.
The sender addresses will be filled with proper default LT identifier and branch codes if not provided. |
void |
setSwiftMessage(SwiftMessage m) |
String |
toString() |
public AbstractMT()
public AbstractMT(int messageType)
messageType
- AbstractMT(int, String, String)
public AbstractMT(int messageType, String sender, String receiver)
messageType
- message type to createsender
- 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 characterspublic AbstractMT(MtSwiftMessage m)
m
- swift message to model as a particular MTpublic AbstractMT(SwiftMessage m)
m
- swift message to model as a particular MTpublic void addField(Field f)
f
- public AbstractMT append(Field... fields)
fields
- public AbstractMT append(SwiftTagListBlock block)
block
- public AbstractMT append(Tag... tags)
tags
- public static AbstractMT create(int messageType)
messageType
- create(int, String, String)
public static AbstractMT create(int messageType, String sender, String receiver)
messageType
- sender
- receiver
- public String FIN()
public String getApplicationId()
SwiftBlock1.getApplicationId()
public String getLogicalTerminal()
SwiftBlock1.getLogicalTerminal()
public String getMessagePriority()
SwiftBlock2.getMessagePriority()
public abstract String getMessageType()
public String getReceiver()
public String getSender()
public SwiftTagListBlock getSequence(String name)
name
- public List<SwiftTagListBlock> getSequenceList(String name)
name
- public String getSequenceNumber()
SwiftBlock1.getSequenceNumber()
public String getServiceId()
SwiftBlock1.getServiceId()
public String getSessionNumber()
SwiftBlock1.getSessionNumber()
public SwiftMessage getSwiftMessage()
public boolean isInput()
SwiftBlock2.isInput()
public boolean isOutput()
SwiftBlock2.isOutput()
public void setReceiver(BIC bic)
setReceiver(String)
public void setReceiver(String receiver)
receiver
- the sender address as a bic8, bic11 or full logical terminal consisting of 12 characterspublic void setSender(BIC bic)
SwiftBlock1.setLogicalTerminal(BIC)
public void setSender(String sender)
sender
- the sender address as a bic8, bic11 or full logical terminal consisting of 12 characterspublic void setSwiftMessage(SwiftMessage m)
m
- swift message to model as a particular MT