Package org.cyclos.services.messaging
Interface MessageService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
MessageServiceLocal
- All Known Implementing Classes:
MessageServiceImpl,MessageServiceSecurity
public interface MessageService extends Service
Service used to manage messages between users
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountNewMessages()Return messages count since the last time seenintcountUnreadMessages()Return unread messages countMessageDatagetData(@NotNull Long id)Returns details data for the given messageMessageSearchDatagetSearchData()Returns data used to search messagesSendMessageDatagetSendData(Long replyId, UserLocatorVO toUser)Returns data for sending a message.SendInviteMessageDatagetSendInviteMessageData()Returns data for sending an invite messagevoidmarkAsRead(@NotNull Set<Long> ids, boolean isRead)Marks all the given message as either read or as unreadvoidmoveToTrash(@NotNull Set<Long> ids)Moves all the given messages to the trash binvoidremoveAll(@NotNull Set<Long> ids)Permanently removes all the given messagesvoidrestoreAll(@NotNull Set<Long> ids)Restores the given messages, that is, move them from the trash bin to the original message box (either inbox or sent items)Page<MessageVO>search(@NotNull MessageQuery query)Searches for messages according to the given criteriavoidsend(@NotNull SendMessageDTO object)Sends a messagevoidsendInviteMessage(@NotNull SendInviteMessageDTO inviteMessageDTO)Sends an invitation message to the destination addresses
-
-
-
Method Detail
-
countNewMessages
int countNewMessages() throws FrameworkExceptionReturn messages count since the last time seen- Throws:
FrameworkException
-
countUnreadMessages
int countUnreadMessages() throws FrameworkExceptionReturn unread messages count- Throws:
FrameworkException
-
getData
MessageData getData(@NotNull @NotNull Long id) throws FrameworkException
Returns details data for the given message- Throws:
FrameworkException
-
getSearchData
MessageSearchData getSearchData() throws FrameworkException
Returns data used to search messages- Throws:
FrameworkException
-
getSendData
SendMessageData getSendData(Long replyId, UserLocatorVO toUser) throws FrameworkException
Returns data for sending a message. If replyId is given, the new message will be a reply for that one. If toUser is given, the message will be to that specific user.- Throws:
FrameworkException
-
getSendInviteMessageData
SendInviteMessageData getSendInviteMessageData()
Returns data for sending an invite message
-
markAsRead
void markAsRead(@NotNull @NotNull Set<Long> ids, boolean isRead) throws FrameworkExceptionMarks all the given message as either read or as unread- Throws:
FrameworkException
-
moveToTrash
void moveToTrash(@NotNull @NotNull Set<Long> ids) throws FrameworkExceptionMoves all the given messages to the trash bin- Throws:
FrameworkException
-
removeAll
void removeAll(@NotNull @NotNull Set<Long> ids) throws FrameworkExceptionPermanently removes all the given messages- Throws:
FrameworkException
-
restoreAll
void restoreAll(@NotNull @NotNull Set<Long> ids) throws FrameworkExceptionRestores the given messages, that is, move them from the trash bin to the original message box (either inbox or sent items)- Throws:
FrameworkException
-
search
Page<MessageVO> search(@NotNull @NotNull MessageQuery query) throws FrameworkException
Searches for messages according to the given criteria- Throws:
FrameworkException
-
send
void send(@NotNull @NotNull SendMessageDTO object) throws FrameworkExceptionSends a message- Throws:
FrameworkException
-
sendInviteMessage
void sendInviteMessage(@NotNull @NotNull SendInviteMessageDTO inviteMessageDTO)Sends an invitation message to the destination addresses
-
-