|
|||||||||
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.SwiftBlock2Input
public class SwiftBlock2Input
Base class for SWIFT Application Header Block (block 2)
for INPUT (to SWIFT).
This block is used to construct messages that are going
to be input to the SWIFT network. From the application point
of view, it correspond to the SENT 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 | |
---|---|
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 |
Method Summary | |
---|---|
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. |
Methods inherited from class com.prowidesoftware.swift.model.SwiftBlock2 |
---|
getName, getNumber, isInput, isOutput, setBlockName, setBlockNumber, 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 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 SwiftBlock2Input(java.lang.String value)
value
- a string with length between 17 and 23 containing the blocks valuepublic SwiftBlock2Input()
Method Detail |
---|
public void setMessageType(java.lang.String messageType)
setMessageType
in class SwiftBlock2
messageType
- String of 3 characterpublic java.lang.String getMessageType()
SwiftBlock2
getMessageType
in class SwiftBlock2
public void setReceiverAddress(java.lang.String receiverAddress)
receiverAddress
- 12 characters Stringpublic java.lang.String getReceiverAddress()
public void setMessagePriority(java.lang.String messagePriority)
setMessagePriority
in class SwiftBlock2
messagePriority
- String of 1 characterpublic java.lang.String getMessagePriority()
getMessagePriority
in class SwiftBlock2
public void setDeliveryMonitoring(java.lang.String deliveryMonitoring)
deliveryMonitoring
- String of 1 character containing the Delivery Monitoring fieldpublic java.lang.String getDeliveryMonitoring()
public void setObsolescencePeriod(java.lang.String obsolescencePeriod)
obsolescencePeriod
- String of 3 characters containing the Obsolescence Periodpublic java.lang.String getObsolescencePeriod()
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()
getBlockValue
in class SwiftValueBlock
getValue()
public 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 void setBlockValue(java.lang.String value)
SwiftValueBlock
java.lang.UnsupportedOperationException
setBlockValue
in class SwiftValueBlock
value
- unusedsetValue(String)
public void clean()
clean
in class SwiftBlock2
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 |