public class SwiftBlock2Input extends SwiftBlock2 implements java.io.Serializable
messagePriority, messageType
blockType, id, input, output, unparsedTexts
Constructor and Description |
---|
SwiftBlock2Input()
Default constructor
|
SwiftBlock2Input(java.lang.String value)
Creates a block 2 output object setting attributes by parsing the
string argument containing the blocks value.
|
SwiftBlock2Input(java.lang.String messageType,
java.lang.String receiverAddress,
java.lang.String messagePriority,
java.lang.String deliveryMonitoring,
java.lang.String obsolescencePeriod)
Constructor for specific values
|
Modifier and Type | Method and Description |
---|---|
void |
clean()
Sets all attributes to null
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getBlockValue()
Returns the block value
|
java.lang.String |
getDeliveryMonitoring()
Gets the Delivery Monitoring field in block 2 input
|
java.lang.String |
getMessagePriority()
Gets the the message priority field in block 2 input
|
java.lang.String |
getMessageType()
Gets the Message Type (MT) as classified and numbered by SWIFT.
|
java.lang.String |
getObsolescencePeriod()
Gets the obsolescence period field in block 2 input
|
java.lang.String |
getReceiverAddress()
Gets the receiver's address field in block 2 input
|
java.lang.String |
getValue()
Gets the fixed length block 2 value, as a result of
concatenating its individual elements as follow:
Message Type + Receivers address + Message Priority + Delivery Monitoring + Obsolescence Period. |
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 |
setDeliveryMonitoring(java.lang.String deliveryMonitoring)
Sets the Delivery Monitoring field is as follows:
1 = Non-Delivery Warning 2 = Delivery Notification 3 = Both valid, Non-Delivery Warning and Delivery Notification This value is optional. If the priority is U, delivery monitoring must be: 1 or 3. If the priority is N, delivery monitoring must be: 2 or not included. |
void |
setMessagePriority(java.lang.String messagePriority)
Sets the message priority as follows:
S = System N = Normal U = Urgent |
void |
setMessageType(java.lang.String messageType)
Sets the Message Type (MT) as classified and numbered by SWIFT.
|
void |
setObsolescencePeriod(java.lang.String obsolescencePeriod)
Sets the Obsolescence Period.
It specifies when a non-delivery notification is generated as follows: Valid for U = 003 (15 minutes) Valid for N = 020 (100 minutes) This value is optional. |
void |
setReceiverAddress(java.lang.String receiverAddress)
Receiver's address with X in position 9.
It is fixed at 12 characters; it must have X in position 9 (padded with "X" if no branch is required). |
void |
setValue(java.lang.String value)
Sets the block's attributes by parsing the string argument
containing the blocks value.
|
java.lang.String |
toJson()
intended to be overwritten
|
getName, getNumber, isInput, isOutput, setBlockName, setBlockNumber, toString
getValuePart, size
getBlockType, getId, getUnparsedTexts, getUnparsedTextsSize, isTagBlock, setBlockType, setId, setInput, setOutput, setUnparsedTexts, unparsedTextAddText, unparsedTextAddText, unparsedTextGetAsMessage, unparsedTextGetText, unparsedTextIsMessage, unparsedTextVerify
public SwiftBlock2Input()
public SwiftBlock2Input(java.lang.String value)
value
- a string with length between 17 and 23 containing the blocks valuepublic SwiftBlock2Input(java.lang.String messageType, java.lang.String receiverAddress, java.lang.String messagePriority, java.lang.String deliveryMonitoring, java.lang.String obsolescencePeriod)
messageType
- the message typereceiverAddress
- the receiver addressmessagePriority
- the message priority (S=system, U=urgent, N=normal)deliveryMonitoring
- the delivery monitoring option (1 or 3 for U priority, 2 for N priority)obsolescencePeriod
- the obsolescence period, measured in 5 minutes units (3 for priority U, 20 for priority N).public void clean()
clean
in class SwiftBlock2
public boolean equals(java.lang.Object obj)
equals
in class SwiftBlock2
public java.lang.String getBlockValue()
getBlockValue
in class SwiftValueBlock
getValue()
public java.lang.String getDeliveryMonitoring()
public java.lang.String getMessagePriority()
getMessagePriority
in class SwiftBlock2
public java.lang.String getMessageType()
SwiftBlock2
getMessageType
in class SwiftBlock2
public java.lang.String getObsolescencePeriod()
public java.lang.String getReceiverAddress()
public java.lang.String getValue()
getValue
in class SwiftValueBlock
public int hashCode()
hashCode
in class SwiftBlock2
public boolean isEmpty()
null
.isEmpty
in class SwiftValueBlock
true
if all fields are null
and false in other casepublic void setBlockValue(java.lang.String value)
SwiftValueBlock
java.lang.UnsupportedOperationException
setBlockValue
in class SwiftValueBlock
value
- unusedsetValue(String)
public void setDeliveryMonitoring(java.lang.String deliveryMonitoring)
deliveryMonitoring
- String of 1 character containing the Delivery Monitoring fieldpublic void setMessagePriority(java.lang.String messagePriority)
setMessagePriority
in class SwiftBlock2
messagePriority
- String of 1 characterpublic void setMessageType(java.lang.String messageType)
setMessageType
in class SwiftBlock2
messageType
- String of 3 characterpublic void setObsolescencePeriod(java.lang.String obsolescencePeriod)
obsolescencePeriod
- String of 3 characters containing the Obsolescence Periodpublic void setReceiverAddress(java.lang.String receiverAddress)
receiverAddress
- 12 characters Stringpublic void setValue(java.lang.String value)
"I100BANKDEFFXXXX" (16) or "2:I100BANKDEFFXXXX" (18) // used for service/system messages "I100BANKDEFFXXXXU" (17) or "2:I100BANKDEFFXXXXU" (19) "I100BANKDEFFXXXXU3" (18) or "2:I100BANKDEFFXXXXU3" (20) "I100BANKDEFFXXXXU3003" (21) or "2:I100BANKDEFFXXXXU3003" (23)
setValue
in class SwiftValueBlock
value
- a string with length between 17 and 23 containing the blocks valuepublic java.lang.String toJson()
SwiftBlock2
toJson
in class SwiftBlock2