Class ChatProxy
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.ChatProxy
-
@VelocityCallable("instance") public final class ChatProxy extends Object
-
-
Constructor Summary
Constructors Constructor Description ChatProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChatMessages
getMessages(String p_strRecipientId)
boolean
hasChatPermission()
Test if the current user has the permission to chat.boolean
hasChatPermission(String p_strUserId)
boolean
sendMessage(String p_strSenderId, String p_strRecipientId, String p_strBody, String p_strStyle)
Send a chat message to a specific user.boolean
sendMessage(String p_strSenderId, List<String> p_recipients, String p_strBody, String p_strStyle)
Send a chat message to a specific user.String
sendPersistentMessage(String p_strSenderId, List<String> p_recipients, String p_strSubject, String p_strBody, Date p_dtExpiration)
Send a persistent (NewsAgent
) message to a specific user.
-
-
-
Method Detail
-
hasChatPermission
public boolean hasChatPermission()
Test if the current user has the permission to chat.- Returns:
true
if the current user has the permission to chat, orfalse
otherwise.
-
hasChatPermission
public boolean hasChatPermission(String p_strUserId)
- Parameters:
p_strUserId
- The unique unique identifier.- Returns:
true
if the given user has the permission to chat, orfalse
otherwise.
-
sendMessage
public boolean sendMessage(String p_strSenderId, String p_strRecipientId, String p_strBody, String p_strStyle)
Send a chat message to a specific user.- Parameters:
p_strSenderId
- The sender's unique identifier.p_strRecipientId
- The recipient's unique identifier.p_strBody
- The message body.p_strStyle
- Additional rendering information for the message.- Returns:
true
if the message was enqueued for delivery,false
otherwise.
-
sendMessage
public boolean sendMessage(String p_strSenderId, List<String> p_recipients, String p_strBody, String p_strStyle)
Send a chat message to a specific user.- Parameters:
p_strSenderId
- The sender's unique identifier.p_recipients
- A list that contains the recipient's unique identifiers.p_strBody
- The message body.p_strStyle
- Additional rendering information for the message.- Returns:
true
if the message was enqueued for delivery,false
otherwise.
-
sendPersistentMessage
public String sendPersistentMessage(String p_strSenderId, List<String> p_recipients, String p_strSubject, String p_strBody, Date p_dtExpiration)
Send a persistent (NewsAgent
) message to a specific user.- Parameters:
p_strSenderId
- The sender's unique identifier.p_recipients
- A list that contains the recipient's unique identifiers.p_strSubject
- The subject of the message.p_strBody
- The message body.p_dtExpiration
- The message's expiration date.- Returns:
- The unique identifier of the sent message.
-
getMessages
public ChatMessages getMessages(String p_strRecipientId)
- Parameters:
p_strRecipientId
- The unique identifier of the user whose messages should be retrieved.- Returns:
- A collection of chat messages for this recipient.
-
-