public class MtSwiftMessage extends AbstractSwiftMessage
identifier, PROPERTY_NAME, receiver, sender
Constructor and Description |
---|
MtSwiftMessage() |
MtSwiftMessage(File file)
Creates a new message reading the message the content from a file.
|
MtSwiftMessage(InputStream stream)
Creates a new message reading the message the content from an input stream.
|
MtSwiftMessage(String fin)
Creates a new message reading the message the content from a string.
|
MtSwiftMessage(SwiftMessage model)
Deprecated.
use constructor from String, File or InputStream instead,
the internal model message is no longer user to avoid inconsistencies
between the raw format and the parsed data.
|
Modifier and Type | Method and Description |
---|---|
void |
copyTo(MtSwiftMessage msg)
copies attributes from this object to the given object
non inherited copied attributes:
mir
modelMessage
mur
pde
pdm
uuid
|
boolean |
equals(Object obj) |
String |
getMessageName()
Get the value of the property under the
AbstractSwiftMessage.PROPERTY_NAME key or the result of getMessageType() |
String |
getMessageType()
Get the message type.
|
Integer |
getMessageTypeInt()
Get the integer value of the
getMessageType()
or null if the identifier attribute is not set or not a number |
String |
getMir() |
SwiftMessage |
getModelMessage()
Deprecated.
the internal model message is no longer user to avoid inconsistencies
between the raw format and the parsed data.
|
String |
getMur() |
String |
getPde() |
String |
getPdm() |
String |
getUuid() |
int |
hashCode() |
boolean |
isType(int type)
Test if this message is a given specific type.
|
boolean |
isType(Integer... type)
Tell if this message is any of the given types.
|
static MtSwiftMessage |
parse(File file)
Creates a new message reading the message the content from a file.
|
static MtSwiftMessage |
parse(InputStream stream)
Creates a new message reading the message the content from an input stream.
|
static MtSwiftMessage |
parse(String fin)
Creates a new message reading the message the content from a string.
|
MtSwiftMessage |
readFile(File file)
Deprecated.
use the constructor {@link #MtSwiftMessage(File) instead
|
void |
setMir(String mir) |
void |
setModelMessage(SwiftMessage modelMessage)
Deprecated.
the internal model message is no longer user to avoid inconsistencies
between the raw format and the parsed data.
|
void |
setMur(String mur) |
void |
setPde(String pde) |
void |
setPdm(String pdm) |
void |
setUuid(String uuid) |
String |
toString() |
void |
updateFromFIN()
Updates the derived attributes from the current raw (FIN) message attribute.
|
void |
updateFromFIN(String fin)
Updates the the attributes with the raw message and its metadata from the given raw (FIN) message content.
|
protected void |
updateFromMessage()
This method updates the object attributes with metadata parsed from the message,
identifier, sender, receiver, direction and specific data for MT/MX.
If the raw content contains multiple messages, only the first one will be read for metadata an message identification. |
void |
updateFromModel()
Deprecated.
use update from string or constructor from String, File or InputStream instead,
the internal model message is no longer user to avoid inconsistencies
between the raw format and the parsed data.
|
void |
updateFromModel(SwiftMessage model)
Deprecated.
use update from string or constructor from String, File or InputStream instead,
the internal model message is no longer user to avoid inconsistencies
between the raw format and the parsed data.
|
addNote, addStatus, contains, contains, copyTo, findStatusInfo, getChecksum, getCreationDate, getDirection, getFilename, getId, getIdentifier, getLastData, getLastData, getLastModified, getMessage, getNotes, getPaddedId, getPreviousStatusInfo, getProperties, getProperty, getProperty, getPropertyBoolean, getPropertyBoolean, getReceiver, getSender, getStatus, getStatusInfo, getStatusTrail, isIncoming, isInput, isOutgoing, isOutput, isStatus, isStatus, isStatus, isStatus, message, sanityCheckProperties, setChecksum, setCreationDate, setDirection, setFilename, setId, setIdentifier, setLastModified, setMessage, setNotes, setProperties, setProperty, setProperty, setReceiver, setSender, setStatus, setStatus, setStatusTrail
public MtSwiftMessage()
public MtSwiftMessage(String fin)
AbstractSwiftMessage#AbstractSwiftMessage(String)}
public MtSwiftMessage(InputStream stream) throws IOException
IOException
#MtSwiftMessage(String)}
,
AbstractSwiftMessage#AbstractSwiftMessage(InputStream)}
public MtSwiftMessage(File file) throws IOException
IOException
#MtSwiftMessage(String)}
,
AbstractSwiftMessage#AbstractSwiftMessage(File)}
@Deprecated public MtSwiftMessage(SwiftMessage model)
public static MtSwiftMessage parse(String fin)
MtSwiftMessage(String)
public static MtSwiftMessage parse(InputStream stream) throws IOException
MtSwiftMessage(InputStream)
IOException
public static MtSwiftMessage parse(File file) throws IOException
MtSwiftMessage(File)
IOException
protected void updateFromMessage()
AbstractSwiftMessage
updateFromMessage
in class AbstractSwiftMessage
AbstractSwiftMessage.updateFromMessage()
public void updateFromFIN(String fin)
fin
- the new message contentupdateFromMessage()
public void updateFromFIN()
@Deprecated public void updateFromModel(SwiftMessage model)
@Deprecated public void updateFromModel()
@Deprecated public SwiftMessage getModelMessage()
@Deprecated public void setModelMessage(SwiftMessage modelMessage)
public String getMessageType()
AbstractSwiftMessage.getIdentifier()
public Integer getMessageTypeInt()
getMessageType()
or null if the identifier attribute is not set or not a numberpublic String getMessageName()
AbstractSwiftMessage.PROPERTY_NAME
key or the result of getMessageType()
getMessageName
in class AbstractSwiftMessage
public boolean isType(Integer... type)
type
- a variable list of integers for testing to match as the current message typetrue
if the current message type is any of the integers given as parameters, and false
in any other casepublic boolean isType(int type)
type
- the message type given as int, to testtrue
if this message type is the type
given, or false
in any other casepublic String getPde()
public void setPde(String pde)
public String getPdm()
public void setPdm(String pdm)
public String getMir()
public void setMir(String mir)
public String getMur()
public void setMur(String mur)
public String getUuid()
public void setUuid(String uuid)
public int hashCode()
hashCode
in class AbstractSwiftMessage
public boolean equals(Object obj)
equals
in class AbstractSwiftMessage
@Deprecated public MtSwiftMessage readFile(File file) throws IOException
readFile
in class AbstractSwiftMessage
IOException
public void copyTo(MtSwiftMessage msg)
msg
- AbstractSwiftMessage.copyTo(AbstractSwiftMessage)