Class MessageDelivery
java.lang.Object
no.digipost.api.client.representations.Representation
no.digipost.api.client.representations.MessageDelivery
- All Implemented Interfaces:
MayHaveSender
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Channel
protected ZonedDateTime
protected String
protected Document
protected long
protected MessageStatus
Fields inherited from class no.digipost.api.client.representations.Representation
links
Fields inherited from interface no.digipost.api.client.representations.MayHaveSender
NO_SENDER
-
Constructor Summary
ConstructorsConstructorDescriptionMessageDelivery
(String messageId, Channel channel, MessageStatus status, ZonedDateTime deliveryTime) -
Method Summary
Modifier and TypeMethodDescriptiongetDocument
(UUID uuid) getLinks()
Always returns the resolved sender-id of the message, i.e.boolean
boolean
isSameMessageAs
(Message message) protected void
boolean
Methods inherited from class no.digipost.api.client.representations.Representation
addLink, getLinkByRelationName
-
Field Details
-
messageId
-
deliveryMethod
-
senderId
protected long senderId -
status
-
deliveryTime
-
-
attachments
-
-
Constructor Details
-
MessageDelivery
public MessageDelivery() -
MessageDelivery
public MessageDelivery(String messageId, Channel channel, MessageStatus status, ZonedDateTime deliveryTime)
-
-
Method Details
-
getLinks
-
setLinks
-
getMessageId
-
getAttachments
-
isSameMessageAs
-
getStatus
-
getEncryptionKeyLink
-
getSendLink
-
willBeDeliveredInDigipost
public boolean willBeDeliveredInDigipost() -
isAlreadyDeliveredToDigipost
public boolean isAlreadyDeliveredToDigipost() -
getSelfLink
-
getChannel
-
getDeliveryTime
-
getPrimaryDocument
-
getAllDocuments
- Returns:
- an ordered Stream containing every
Document
in this delivery. The primary document will be the first element of the stream, with the attachments following.
-
getDocument
-
getSenderId
Always returns the resolved sender-id of the message, i.e. what the receiver of the message sees as the sender of the message. If the originatingMessage
has specified nosender-id
norsender-organization
, it will be set to the broker-id which was specified in the X-Digipost-UserId header of the initiating request.- Specified by:
getSenderId
in interfaceMayHaveSender
- Returns:
- always the sender-id, never
null
.
-
getSenderOrganization
- Specified by:
getSenderOrganization
in interfaceMayHaveSender
- Returns:
- always
Optional.empty()
- See Also:
-