use of no.difi.meldingsutveksling.noarkexchange.schema.StatusMessageType in project efm-integrasjonspunkt by felleslosninger.
the class PutMessageResponseFactory method createErrorResponse.
public static PutMessageResponseType createErrorResponse(String errorMsg) {
PutMessageResponseType response = new PutMessageResponseType();
AppReceiptType receipt = new AppReceiptType();
receipt.setType("ERROR");
StatusMessageType statusMessageType = new StatusMessageType();
statusMessageType.setText(errorMsg);
statusMessageType.setCode("Unknown");
receipt.getMessage().add(statusMessageType);
response.setResult(receipt);
return response;
}
use of no.difi.meldingsutveksling.noarkexchange.schema.StatusMessageType in project efm-integrasjonspunkt by felleslosninger.
the class AppReceiptFactory method from.
public AppReceiptType from(ArkivmeldingKvitteringMessage receipt) {
AppReceiptType appReceipt = new AppReceiptType();
appReceipt.setType(receipt.getReceiptType());
if (receipt.getMessages() != null) {
receipt.getMessages().forEach(sm -> {
StatusMessageType statusMessageType = new StatusMessageType();
statusMessageType.setText(sm.getText());
statusMessageType.setCode(sm.getCode());
appReceipt.getMessage().add(statusMessageType);
});
}
return appReceipt;
}
use of no.difi.meldingsutveksling.noarkexchange.schema.StatusMessageType in project efm-integrasjonspunkt by felleslosninger.
the class AppReceiptFactory method from.
public AppReceiptType from(String type, String code, String text) {
AppReceiptType appReceipt = new AppReceiptType();
appReceipt.setType(type);
StatusMessageType statusMessage = new StatusMessageType();
statusMessage.setCode(code);
statusMessage.setText(text);
appReceipt.getMessage().add(statusMessage);
return appReceipt;
}
use of no.difi.meldingsutveksling.noarkexchange.schema.StatusMessageType in project efm-integrasjonspunkt by felleslosninger.
the class PutMessageResponseMarkers method markerFrom.
public static LogstashMarker markerFrom(PutMessageResponseType response) {
LogstashMarker marker = responseTypeMarker(response.getResult().getType());
for (StatusMessageType s : response.getResult().getMessage()) {
marker.and(responseMessageTextMarker(s.getText()));
marker.and(responseMessageCodeMarker(s.getCode()));
}
return marker;
}
use of no.difi.meldingsutveksling.noarkexchange.schema.StatusMessageType in project efm-integrasjonspunkt by felleslosninger.
the class PutMessageResponseFactory method createErrorResponse.
public static PutMessageResponseType createErrorResponse(StatusMessage statusMessage) {
PutMessageResponseType response = new PutMessageResponseType();
AppReceiptType receipt = new AppReceiptType();
receipt.setType("ERROR");
StatusMessageType statusMessageType = new StatusMessageType();
statusMessageType.setText(statusMessage.getEndUserMessage());
statusMessageType.setCode(statusMessage.getId());
receipt.getMessage().add(statusMessageType);
response.setResult(receipt);
return response;
}
Aggregations