com.prowidesoftware.swift.model
Class MtSwiftMessage

java.lang.Object
  extended by com.prowidesoftware.swift.model.AbstractSwiftMessage
      extended by com.prowidesoftware.swift.model.MtSwiftMessage
All Implemented Interfaces:
java.io.Serializable

public class MtSwiftMessage
extends AbstractSwiftMessage

Object that contains both raw and model representations of an MT SWIFT message. ISO 15022.

Since:
7.0
Author:
www.prowidesoftware.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.prowidesoftware.swift.model.AbstractSwiftMessage
PROPERTY_NAME
 
Constructor Summary
MtSwiftMessage()
           
MtSwiftMessage(java.lang.String fin)
           
MtSwiftMessage(SwiftMessage model)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getMessageName()
          Get the value of the property under the AbstractSwiftMessage.PROPERTY_NAME key or the result of getMessageType()
 java.lang.String getMessageType()
          Get the message type set in the identifier attribute.
 java.lang.Integer getMessageTypeInt()
          Get the integer value of the getMessageType() or null if the identifier attribute is not set or not a number
 java.lang.String getMir()
           
 SwiftMessage getModelMessage()
          If the modelMessage attribute is set, its value is returned.
 java.lang.String getMur()
           
 java.lang.String getPde()
           
 java.lang.String getPdm()
           
 java.lang.String getUuid()
           
 int hashCode()
           
 boolean isType(int type)
          Test if this message is a given specific type.
 boolean isType(java.lang.Integer... type)
          Tell if this message is any of the given types.
 void setMir(java.lang.String mir)
           
 void setModelMessage(SwiftMessage modelMessage)
           
 void setMur(java.lang.String mur)
           
 void setPde(java.lang.String pde)
           
 void setPdm(java.lang.String pdm)
           
 void setUuid(java.lang.String uuid)
           
 java.lang.String toString()
           
 void updateFromFIN(java.lang.String fin)
          Sets the raw message and updates the derived attributes and the model message.
 void updateFromModel(SwiftMessage model)
          Sets the model message and updates the derived attributes and the raw message.
 
Methods inherited from class com.prowidesoftware.swift.model.AbstractSwiftMessage
addNote, addStatus, contains, contains, 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, sanityCheckProperties, setChecksum, setCreationDate, setDirection, setFilename, setId, setIdentifier, setLastModified, setMessage, setNotes, setProperties, setProperty, setProperty, setReceiver, setSender, setStatus, setStatus, setStatusTrail
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MtSwiftMessage

public MtSwiftMessage()

MtSwiftMessage

public MtSwiftMessage(java.lang.String fin)
See Also:
updateFromFIN(String)

MtSwiftMessage

public MtSwiftMessage(SwiftMessage model)
See Also:
updateFromModel(SwiftMessage)
Method Detail

updateFromFIN

public void updateFromFIN(java.lang.String fin)
Sets the raw message and updates the derived attributes and the model message.

Parameters:
fin - the message to update

updateFromModel

public void updateFromModel(SwiftMessage model)
Sets the model message and updates the derived attributes and the raw message.

Parameters:
model - the message to update

getModelMessage

public SwiftMessage getModelMessage()
If the modelMessage attribute is set, its value is returned. If the attribute is not set and the raw message is set, the raw message is parsed into a SwiftMessage object, set to the attribute and returned.

Returns:
the model message or null if the model and the raw messages are null.

setModelMessage

public void setModelMessage(SwiftMessage modelMessage)

getMessageType

public java.lang.String getMessageType()
Get the message type set in the identifier attribute.

See Also:
AbstractSwiftMessage.getIdentifier()

getMessageTypeInt

public java.lang.Integer getMessageTypeInt()
Get the integer value of the getMessageType() or null if the identifier attribute is not set or not a number


getMessageName

public java.lang.String getMessageName()
Get the value of the property under the AbstractSwiftMessage.PROPERTY_NAME key or the result of getMessageType()

Overrides:
getMessageName in class AbstractSwiftMessage
Returns:

isType

public boolean isType(java.lang.Integer... type)
Tell if this message is any of the given types.

Parameters:
type - a variable list of integers for testing to match as the current message type
Returns:
true if the current message type is any of the integers given as parameters, and false in any other case

isType

public boolean isType(int type)
Test if this message is a given specific type.

Parameters:
type - the message type given as int, to test
Returns:
true if this message type is the type given, or false in any other case

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPde

public java.lang.String getPde()

setPde

public void setPde(java.lang.String pde)

getPdm

public java.lang.String getPdm()

setPdm

public void setPdm(java.lang.String pdm)

getMir

public java.lang.String getMir()

setMir

public void setMir(java.lang.String mir)

getMur

public java.lang.String getMur()

setMur

public void setMur(java.lang.String mur)

getUuid

public java.lang.String getUuid()

setUuid

public void setUuid(java.lang.String uuid)

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractSwiftMessage

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractSwiftMessage