public class MessageDelivery extends Representation implements MayHaveSender
| Modifier and Type | Field and Description |
|---|---|
protected List<Document> |
attachments |
protected Channel |
deliveryMethod |
protected ZonedDateTime |
deliveryTime |
protected String |
messageId |
protected Document |
primaryDocument |
protected long |
senderId |
protected MessageStatus |
status |
linksNO_SENDER| Constructor and Description |
|---|
MessageDelivery() |
MessageDelivery(String messageId,
Channel channel,
MessageStatus status,
ZonedDateTime deliveryTime) |
| Modifier and Type | Method and Description |
|---|---|
Stream<Document> |
getAllDocuments() |
List<Document> |
getAttachments() |
Channel |
getChannel() |
ZonedDateTime |
getDeliveryTime() |
Document |
getDocument(UUID uuid) |
Link |
getEncryptionKeyLink() |
protected List<Link> |
getLinks() |
String |
getMessageId() |
Document |
getPrimaryDocument() |
Link |
getSelfLink() |
Optional<SenderId> |
getSenderId()
Always returns the resolved sender-id of the message, i.e.
|
Optional<SenderOrganization> |
getSenderOrganization() |
Link |
getSendLink() |
MessageStatus |
getStatus() |
boolean |
isAlreadyDeliveredToDigipost() |
boolean |
isSameMessageAs(Message message) |
protected void |
setLinks(List<Link> links) |
boolean |
willBeDeliveredInDigipost() |
addLink, getLinkByRelationNameprotected String messageId
protected Channel deliveryMethod
protected long senderId
protected MessageStatus status
protected ZonedDateTime deliveryTime
protected Document primaryDocument
public MessageDelivery()
public MessageDelivery(String messageId, Channel channel, MessageStatus status, ZonedDateTime deliveryTime)
public String getMessageId()
public boolean isSameMessageAs(Message message)
public MessageStatus getStatus()
public Link getEncryptionKeyLink()
public Link getSendLink()
public boolean willBeDeliveredInDigipost()
public boolean isAlreadyDeliveredToDigipost()
public Link getSelfLink()
public Channel getChannel()
public ZonedDateTime getDeliveryTime()
public Document getPrimaryDocument()
public Stream<Document> getAllDocuments()
Document in this delivery.
The primary document will be the first element of the stream,
with the attachments following.public Optional<SenderId> getSenderId()
Message has specified
no sender-id nor sender-organization,
it will be set to the broker-id which was specified in the X-Digipost-UserId header of the initiating request.getSenderId in interface MayHaveSendernull.public Optional<SenderOrganization> getSenderOrganization()
getSenderOrganization in interface MayHaveSenderOptional.empty()getSenderId()Copyright © 2019 Digipost. All rights reserved.