use of no.altinn.services.serviceengine.correspondence._2009._10.CorrespondenceStatusHistoryRequest in project efm-integrasjonspunkt by felleslosninger.
the class CorrespondenceAgencyMessageFactory method createReceiptRequest.
public CorrespondenceStatusHistoryRequest createReceiptRequest(Set<Conversation> conversations) {
no.altinn.services.serviceengine.correspondence._2009._10.ObjectFactory of = new no.altinn.services.serviceengine.correspondence._2009._10.ObjectFactory();
CorrespondenceStatusHistoryRequest historyRequest = of.createCorrespondenceStatusHistoryRequest();
com.microsoft.schemas._2003._10.serialization.arrays.ObjectFactory arrayOf = new com.microsoft.schemas._2003._10.serialization.arrays.ObjectFactory();
ArrayOfstring arrayOfstring = arrayOf.createArrayOfstring();
conversations.stream().map(Conversation::getMessageId).forEach(id -> arrayOfstring.getString().add(id));
JAXBElement<ArrayOfstring> strings = of.createCorrespondenceStatusHistoryRequestCorrespondenceSendersReferences(arrayOfstring);
historyRequest.setCorrespondenceSendersReferences(strings);
return historyRequest;
}
Aggregations