public class GenericMessage extends WfXMLMessage
Modifier and Type | Field and Description |
---|---|
protected static String |
MSG_BODY_GEN |
body, CONTEXTDATA_DOCUMENTCREATOR, documentCreator, documentCreatorId, header, message, MSG_BODY, MSG_BODY_CTXDATA, MSG_BODY_CTXDATA_DMSFOLDER, MSG_BODY_CTXDATA_NOTES, MSG_BODY_CTXDATA_PROCESSFORMS, MSG_BODY_CTXDATA_PROCESSFORMS_NAME, MSG_BODY_EXC, MSG_BODY_EXC_DESC, MSG_BODY_EXC_MAINCODE, MSG_BODY_EXC_SUBCODE, MSG_BODY_EXC_SUBJECT, MSG_BODY_EXC_TYPE, MSG_BODY_RSLTDATA, MSG_BODY_RSLTDATASET, MSG_BODY_SET_NAME, MSG_BODY_SET_PARAM, MSG_BODY_SET_VALUE, MSG_HEAD, MSG_HEAD_KEY, MSG_HEAD_REQ, MSG_HEAD_RESP, MSG_HEAD_RESPREQUIRED, MSG_HEAD_RESPREQUIRED_NO, MSG_HEAD_RESPREQUIRED_ONERROR, MSG_HEAD_RESPREQUIRED_YES, MSG_ROOT, MSG_TRANSPORT, MSG_TRANSPORT_CORDATA, MSG_TRANSPORT_CORDATA_OID, MSG_TRANSPORT_CORDATA_ORIGIN, MSG_TRANSPORT_CORDATA_TIMESTAMP, MSG_VERSION, namespace, PI_STATE_CLOSED_ABNORMAL_COMPLETED, PI_STATE_CLOSED_ABNORMAL_COMPLETED_STR, PI_STATE_CLOSED_COMPLETED, PI_STATE_CLOSED_COMPLETED_STR, PI_STATE_NONE, PI_STATE_OPEN_NOTRUNNING, PI_STATE_OPEN_NOTRUNNING_STR, PI_STATE_OPEN_RUNNING, PI_STATE_OPEN_RUNNING_STR, REQUEST, RESPONSE, RESPONSE_NOT_REQUIRED, RESPONSE_REQUIRED, RESPONSE_REQUIRED_ONERROR, root, transport, usingPlainKey
Modifier | Constructor and Description |
---|---|
protected |
GenericMessage(Document doc)
Use this constructor to create a GenericMessage out of an existing
JDOM document.
|
|
GenericMessage(short messageType)
This constructor initializes a new empty GenericMessage message.
|
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String parameterName,
String value)
This method adds a value for a parameter to this message.
|
String |
getParameter(String parameterName)
Use this method to retrieve a simple text parameter, which has been set with
setParameter(String, String) before. |
List<String> |
listParameterValueStrings(String parameterName)
Returns a
List containing all values of the parameter named
parameterName . |
void |
prepare(Partner partner)
Preparing the message for being sent.
|
void |
setMessageType(short type)
Set the message type of this WfXML message (in the message header).
|
void |
setParameter(String parameterName,
String parameterValue)
Use this method for setting a parameter.
|
addParameterValueElem, assureBodyExists, assureHeaderExists, assureTransportExists, createMessage, createMessage, getDocumentCreator, getException, getMessageIdentifier, getMessageOrigin, getMessageType, getParameterValueElem, getParameterValueElems, getPlainKey, getResponseRequired, getStateString, getTimestamp, getTransportElementValue, setDocumentCreator, setException, setMessageIdentifier, setMessageOrigin, setPlainKey, setResponseRequired, setTimestamp, setTransportElement, toPrettyString, toString, write
protected static final String MSG_BODY_GEN
public GenericMessage(short messageType)
messageType
- Set the message type to either WfXMLMessage.REQUEST
or
WfXMLMessage.RESPONSE
.public void setMessageType(short type)
WfXMLMessage
setMessageType
in class WfXMLMessage
type
- Use the constants WfXMLMessage.REQUEST
or WfXMLMessage.RESPONSE
as value for this parameter, depending on if you want to create
a request or a response message.public void addParameter(String parameterName, String value)
parameterName
set.parameterName
- The name of the parameter for which you want to add
a value.value
- The value you want to add to this parameter.public List<String> listParameterValueStrings(String parameterName)
List
containing all values of the parameter named
parameterName
.parameterName
- The name of the parameter for which you want to receive
values.public void setParameter(String parameterName, String parameterValue)
addParameter
method instead.parameterName
- Name of the parameter that you want to set.parameterValue
- The value for the parameter.public String getParameter(String parameterName)
setParameter(String, String)
before. Take
care: if you use this method to access a parameter which contains multiple
values, you will only retrieve one of these values with this method! If you
want to get all the values of such a multiple-value parameter, use the
listParameterValueStrings
method instead.parameterName
- The name of the parameter you are searching for.String
containing the value of the
parameter, or null
if the parameter was not found in the
message.public void prepare(Partner partner)
Sender
before the message is sent. So you never need to call it
manually.prepare
in class WfXMLMessage
partner
- The partner server to which the message will be sent.@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.