|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.prowidesoftware.swift.model.SwiftBlock
com.prowidesoftware.swift.model.SwiftValueBlock
com.prowidesoftware.swift.model.SwiftBlock2
com.prowidesoftware.swift.model.SwiftBlock2Output
public class SwiftBlock2Output
Base class for SWIFT Application Header Block (block 2)
for OUTPUT (from SWIFT).
This block is used to construct messages that have been
output from the SWIFT network. From the application point
of view, it correspond to the RECEIVED messages.
It's value is fixed-length and continuous with no field delimiters.
This class contains its elements as individual attributes for
easier management of the block value.
This is an optional block.
Field Summary |
---|
Fields inherited from class com.prowidesoftware.swift.model.SwiftBlock2 |
---|
messagePriority, messageType |
Fields inherited from class com.prowidesoftware.swift.model.SwiftBlock |
---|
blockType, id, input, output, unparsedTexts |
Constructor Summary | |
---|---|
SwiftBlock2Output()
Default Constructor |
|
SwiftBlock2Output(java.lang.String value)
Creates a block 2 output object setting attributes by parsing the fixed string argument; for example "O1001200970103BANKBEBBAXXX22221234569701031201N" or "2:O1001200970103BANKBEBBAXXX22221234569701031201N" |
|
SwiftBlock2Output(java.lang.String messageType,
java.lang.String senderInputTime,
java.lang.String MIRDate,
java.lang.String MIRLogicalTerminal,
java.lang.String MIRSessionNumber,
java.lang.String MIRSequenceNumber,
java.lang.String receiverOutputDate,
java.lang.String receiverOutputTime,
java.lang.String messagePriority)
Constructor for specific values |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getBlockValue()
This method should be overwritten by subclasses, calling this method will throw a java.lang.UnsupportedOperationException |
java.lang.String |
getMIR()
Gets the full MIR (Message Input Reference) string of 28 characters containing the sender's date, LT address, session and sequence: for example YYMMDDBANKBEBBAXXX2222123456 |
java.lang.String |
getMIRDate()
Gets the date the sender sent the message to SWIFT, from the MIR field, in the format YYMMDD |
java.lang.String |
getMIRLogicalTerminal()
Gets the the full LT address of the sender of the message, from the MIR field, for example: BANKBEBBAXXX |
java.lang.String |
getMIRSequenceNumber()
Gets the date the sender sequence number, from the MIR field, in the format NNNNNN |
java.lang.String |
getMIRSessionNumber()
Gets the date the sender session number, from the MIR field, in the format NNNN |
java.lang.String |
getReceiverOutputDate()
Gets the Output date local to the receiver |
java.lang.String |
getReceiverOutputTime()
Gets the Output time local to the receiver, written in the following format: HHMM |
java.lang.String |
getSenderInputTime()
Returns the input time with respect to the sender |
java.lang.String |
getValue()
Gets the fixed length block 2 value, as a result of concatenating its individual elements as follow: Message Type + Sender Input Time + MIR + Receiver Output Date + Receiver Output Time + Message Priority. |
int |
hashCode()
|
boolean |
isEmpty()
Tell if this block is empty or not. |
void |
setBlockValue(java.lang.String value)
This method should be overwritten by subclasses, calling this method will throw a java.lang.UnsupportedOperationException |
void |
setMIR(java.lang.String mir)
Sets the full MIR (Message Input Reference) string of 28 characters containing the sender's date, LT address, session and sequence: for example YYMMDDBANKBEBBAXXX2222123456 |
void |
setMIRDate(java.lang.String MIRDate)
Sets the date the sender sent the message to SWIFT, from the MIR field |
void |
setMIRLogicalTerminal(java.lang.String MIRLogicalTerminal)
Sets the the full LT address of the sender of the message, from the MIR field, for example: BANKBEBBAXXX |
void |
setMIRSequenceNumber(java.lang.String MIRSequenceNumber)
Sets the sequence number field of the MIR |
void |
setMIRSessionNumber(java.lang.String MIRSessionNumber)
Sets the session number field of the MIR |
void |
setReceiverOutputDate(java.lang.String receiverOutputDate)
Sets the Output date local to the receiver, written in the following format: YYMMDD |
void |
setReceiverOutputTime(java.lang.String receiverOutputTime)
Sets the Output time local to the receiver, written in the following format: HHMM |
void |
setSenderInputTime(java.lang.String senderInputTime)
Sets the input time with respect to the sender |
void |
setValue(java.lang.String value)
Sets the block's attributes by parsing the string argument containing the blocks value. |
Methods inherited from class com.prowidesoftware.swift.model.SwiftBlock2 |
---|
clean, getMessagePriority, getMessageType, getName, getNumber, isInput, isOutput, setBlockName, setBlockNumber, setMessagePriority, setMessageType, toString |
Methods inherited from class com.prowidesoftware.swift.model.SwiftValueBlock |
---|
getValuePart, size |
Methods inherited from class com.prowidesoftware.swift.model.SwiftBlock |
---|
getBlockType, getId, getInput, getOutput, getUnparsedTexts, getUnparsedTextsSize, isTagBlock, setBlockType, setId, setInput, setOutput, setUnparsedTexts, unparsedTextAddText, unparsedTextAddText, unparsedTextGetAsMessage, unparsedTextGetText, unparsedTextIsMessage, unparsedTextVerify |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SwiftBlock2Output(java.lang.String messageType, java.lang.String senderInputTime, java.lang.String MIRDate, java.lang.String MIRLogicalTerminal, java.lang.String MIRSessionNumber, java.lang.String MIRSequenceNumber, java.lang.String receiverOutputDate, java.lang.String receiverOutputTime, java.lang.String messagePriority)
messageType
- the message typesenderInputTime
- the input timeMIRDate
- dateMIRLogicalTerminal
- logical terminalMIRSessionNumber
- session numberMIRSequenceNumber
- message sequence numberreceiverOutputDate
- receiver datereceiverOutputTime
- receiver timemessagePriority
- the message priority (S=system, U=urgent, N=normal)public SwiftBlock2Output(java.lang.String value)
value
- a fixed length string of 47 (starting with 'O') or 49 (starting with '2:O') characters containing the blocks valuepublic SwiftBlock2Output()
Method Detail |
---|
public void setSenderInputTime(java.lang.String senderInputTime)
senderInputTime
- 4 numbers HHMMpublic java.lang.String getSenderInputTime()
public void setMIRDate(java.lang.String MIRDate)
MIRDate
- 6 numbers with date in format YYMMDDpublic java.lang.String getMIRDate()
public void setMIRLogicalTerminal(java.lang.String MIRLogicalTerminal)
MIRLogicalTerminal
- public java.lang.String getMIRLogicalTerminal()
public void setMIRSessionNumber(java.lang.String MIRSessionNumber)
MIRSessionNumber
- 4 numberspublic java.lang.String getMIRSessionNumber()
public void setMIRSequenceNumber(java.lang.String MIRSequenceNumber)
MIRSequenceNumber
- 6 numberspublic java.lang.String getMIRSequenceNumber()
public java.lang.String getMIR()
null
if all MIR components are null
public void setMIR(java.lang.String mir)
mir
- complete MIR stringpublic void setReceiverOutputDate(java.lang.String receiverOutputDate)
receiverOutputDate
- 6 characters in format YYMMDDpublic java.lang.String getReceiverOutputDate()
public void setReceiverOutputTime(java.lang.String receiverOutputTime)
receiverOutputTime
- String with 4 numberspublic java.lang.String getReceiverOutputTime()
public boolean isEmpty()
null
.
isEmpty
in class SwiftValueBlock
true
if all fields are null
and false in other casepublic java.lang.String getValue()
getValue
in class SwiftValueBlock
public java.lang.String getBlockValue()
SwiftValueBlock
java.lang.UnsupportedOperationException
getBlockValue
in class SwiftValueBlock
getValue()
public void setValue(java.lang.String value)
"O1001200970103BANKBEBBAXXX22221234569701031201" (46) or "2:O1001200970103BANKBEBBAXXX22221234569701031201" (48) // used for service/system messages "O1001200970103BANKBEBBAXXX22221234569701031201N" (47) or "2:O1001200970103BANKBEBBAXXX22221234569701031201N" (49)
setValue
in class SwiftValueBlock
value
- a string with the value to splitpublic void setBlockValue(java.lang.String value)
SwiftValueBlock
java.lang.UnsupportedOperationException
setBlockValue
in class SwiftValueBlock
value
- unusedsetValue(String)
public int hashCode()
hashCode
in class SwiftBlock2
public boolean equals(java.lang.Object obj)
equals
in class SwiftBlock2
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |