@Component public class ReportRegister extends Object implements IReportRegister
IReportRegister implementation.| Constructor and Description |
|---|
ReportRegister()
Simple unique constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<MessageStatusBean> |
getAndDeleteReport(String messageId)
Get and delete the report associated with the indicated
messageId |
Optional<MessageStatusBean> |
getReport(String messageId)
Get the report about the message with id
messageId. |
boolean |
isReport(String messageId)
Check if report for
messageId exists. |
void |
putReport(String collectionId,
String messageId,
MessageStatusBean report)
Put a new
report for the messageId onto collection with collectionId id. |
Optional<MessageStatusBean> |
removeReport(String collectionId,
String messageId)
Remove, if exists, the report associated with the
messageId from the collection with collectionId id. |
public Optional<MessageStatusBean> getReport(String messageId)
messageId.getReport in interface IReportRegistermessageId - The keyOptional.empty() if no report for that messageId exists.public Optional<MessageStatusBean> getAndDeleteReport(String messageId)
messageIdgetAndDeleteReport in interface IReportRegistermessageId - The message idOptional.empty() if no report exists associated with the indicated messageIdpublic boolean isReport(String messageId)
messageId exists.isReport in interface IReportRegisterpublic void putReport(String collectionId, String messageId, MessageStatusBean report)
report for the messageId onto collection with collectionId id.putReport in interface IReportRegistercollectionId - The collection idmessageId - The message idreport - The reportpublic Optional<MessageStatusBean> removeReport(String collectionId, String messageId)
messageId from the collection with collectionId id.removeReport in interface IReportRegistercollectionId - The collection idmessageId - The message idOptional.empty() if report was not foundCopyright © 2021 Albirar. All rights reserved.