@Validated
public interface IReportRegister
Map for each report type (see IPropertiesComm.QUEUE_REPORT_EMAIL and IPropertiesComm.QUEUE_REPORT_SMS).
When a new message is reported, a collection should to be indicated.
When users ask for get report or check if a report exists, all collection are checked for the indicated id.
Warning about this, if AlbirarCommunicationsConfiguration.namingStrategy() is no unique over all collections, a
collision can be produced if two reports with same id is put on this register.| Modifier and Type | Method and Description |
|---|---|
Optional<MessageStatusBean> |
getAndDeleteReport(@NotBlank String messageId)
Get and delete the report associated with the indicated
messageId |
Optional<MessageStatusBean> |
getReport(@NotBlank String messageId)
Get the report about the message with id
messageId. |
boolean |
isReport(@NotBlank String messageId)
Check if report for
messageId exists. |
void |
putReport(@NotBlank String collectionId,
@NotBlank String messageId,
@NotNull @Valid MessageStatusBean report)
Put a new
report for the messageId onto collection with collectionId id. |
Optional<MessageStatusBean> |
removeReport(@NotBlank String collectionId,
@NotBlank String messageId)
Remove, if exists, the report associated with the
messageId from the collection with collectionId id. |
Optional<MessageStatusBean> getReport(@NotBlank @NotBlank String messageId)
messageId.messageId - The keyOptional.empty() if no report for that messageId exists.Optional<MessageStatusBean> getAndDeleteReport(@NotBlank @NotBlank String messageId)
messageIdmessageId - The message idOptional.empty() if no report exists associated with the indicated messageIdboolean isReport(@NotBlank
@NotBlank String messageId)
messageId exists.messageId - void putReport(@NotBlank
@NotBlank String collectionId,
@NotBlank
@NotBlank String messageId,
@NotNull @Valid
@NotNull @Valid MessageStatusBean report)
report for the messageId onto collection with collectionId id.collectionId - The collection idmessageId - The message idreport - The reportOptional<MessageStatusBean> removeReport(@NotBlank @NotBlank String collectionId, @NotBlank @NotBlank String messageId)
messageId from the collection with collectionId id.collectionId - The collection idmessageId - The message idOptional.empty() if report was not foundCopyright © 2021 Albirar. All rights reserved.