use of org.roof.im.response.Response in project roof-im by madfroglx.
the class ReturnCodeResponseCreateNode method doNode.
public String doNode(Request request, ValueStack valueStack) {
NodeResult nodeResult = valueStack.getPreResult();
Response<Object> response = new Response<>();
response.setState(StringUtils.isBlank(state) ? nodeResult.getState() : state);
response.setMessage(nodeResult.getNext());
response.setResult(nodeResult.getData());
response.setRequestType(valueStack.getAsString(ImConstant.REQUEST_TYPE));
if (request != null) {
response.setSeq(request.getSeq());
}
valueStack.set(ImConstant.RESPONSE, response);
return RESPONSE_CREATE_SUCCESS;
}
Aggregations