SFRMAcknowledgementBuilder

public class SFRMAcknowledgementBuilder
Author:Patrick Yip To build the SFRM Acknowledgement content body

Fields

ID_ATTR

public static final String ID_ATTR

MESSAGES_TAG

public static final String MESSAGES_TAG

MESSAGE_NODE_XPATH_PARAM

public static final String MESSAGE_NODE_XPATH_PARAM

MESSAGE_SEGMENT_NODE_XPATH_PARAM

public static final String MESSAGE_SEGMENT_NODE_XPATH_PARAM

MESSAGE_SEGMENT_XPATH_PARAM

public static final String MESSAGE_SEGMENT_XPATH_PARAM

MESSAGE_TAG

public static final String MESSAGE_TAG

MESSAGE_XPATH

public static final String MESSAGE_XPATH

NUM_ATTR

public static final String NUM_ATTR

PARAM_TOKEN

public static final String PARAM_TOKEN

SEGMENTS_TAG

public static final String SEGMENTS_TAG

SEGMENT_TAG

public static final String SEGMENT_TAG

STATUS_ATTR

public static final String STATUS_ATTR

STATUS_TAG

public static final String STATUS_TAG

Constructors

SFRMAcknowledgementBuilder

public SFRMAcknowledgementBuilder()

Constructor for Acknowledgement Builder, create an empty acknowledgement content

Methods

getMessageSegmentXPath

public static String getMessageSegmentXPath(String messageId, int segmentNum)

getMessageXPath

public static String getMessageXPath(String messageId)

getSegmentsXPath

public static String getSegmentsXPath(String messageId)

setMessage

public Element setMessage(String messageId, String status)

Set the message information to the acknowledgment content, if the message is not present, it will create an entry, otherwise it will modify the entry

Parameters:
  • messageId – message id
  • status – message status
Returns:

the newly created or modified XML element

setSegment

public Element setSegment(String messageId, int segmentNum, String segmentStatus)

Set the message segment information for a given message id, if the message segment is present, it will create one, otherwise it will modify the existing entry

Parameters:
  • messageId – message id for message segment
  • segmentNum – segment number
  • segmentStatus – segment status
Throws:
Returns:

the newly created or modified XML element

toString

public String toString()