public class ConversationPermissionServiceImpl extends Object implements ConversationPermissionService
Modifier and Type | Field and Description |
---|---|
protected EngageEngineConfiguration |
engageEngineConfiguration |
Constructor and Description |
---|
ConversationPermissionServiceImpl(EngageEngineConfiguration engageEngineConfiguration) |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
checkArchiveConversation(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when archiving an existing conversation.
|
Optional<String> |
checkArchiveConversation(String userId,
String conversationId)
Deprecated.
|
Optional<String> |
checkCreateConversation(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String parentConversationId,
ConversationBuilder conversationBuilder)
Evaluates the permissions for the given user when creating a new conversation with an optional parent
conversation (e.g.
|
Optional<String> |
checkCreateConversation(String userId,
String parentConversationId,
ConversationBuilder conversationBuilder)
Deprecated.
|
Optional<String> |
checkDropParticipantFromConversation(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId,
String droppedParticipantUserId)
Evaluates the permissions for the given user when dropping a participant from a conversation.
|
Optional<String> |
checkDropParticipantFromConversation(String userId,
String conversationId,
String droppedParticipantUserId)
Deprecated.
|
Optional<String> |
checkEditMessage(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId,
String messageId)
Evaluates the permissions for the given user when editing an existing message of a conversation.
|
Optional<String> |
checkEditMessage(String userId,
String conversationId,
String messageId)
Deprecated.
|
Optional<String> |
checkJoinParticipantToExistingConversation(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId,
String newParticipantUserId)
Evaluates the permissions for the given user when inviting a new participant to an existing conversation.
|
Optional<String> |
checkJoinParticipantToExistingConversation(String userId,
String conversationId,
String newParticipantUserId)
Deprecated.
|
protected Optional<String> |
checkPostDocument(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when posting a document to a conversation.
|
protected Optional<String> |
checkPostImage(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when posting an image to a conversation.
|
Optional<String> |
checkPostMedia(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId,
String mimeType)
Evaluates the permissions for the given user when posing a media to a conversation.
|
Optional<String> |
checkPostMedia(String userId,
String conversationId,
String mimeType)
Deprecated.
|
Optional<String> |
checkPostMessage(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when posting a message to a conversation.
|
Optional<String> |
checkPostMessage(String userId,
String conversationId)
Deprecated.
|
protected Optional<String> |
checkPostVideoMessage(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when posting a video message to a conversation.
|
protected Optional<String> |
checkPostVoiceMessage(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when posting a voice message to a conversation.
|
Optional<String> |
checkReopenConversation(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when re-opening an archived conversation.
|
Optional<String> |
checkReopenConversation(String userId,
String conversationId)
Deprecated.
|
Optional<String> |
checkUpdateConversationAvatar(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when posing a media to a conversation.
|
Optional<String> |
checkUpdateConversationAvatar(String userId,
String conversationId)
Deprecated.
|
Optional<String> |
checkUpdateConversationDescription(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when updating the conversation description.
|
Optional<String> |
checkUpdateConversationDescription(String userId,
String conversationId)
Deprecated.
|
Optional<String> |
checkUpdateConversationName(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId)
Evaluates the permissions for the given user when updating the conversation name.
|
Optional<String> |
checkUpdateConversationName(String userId,
String conversationId)
Deprecated.
|
boolean |
hasAccessToConversation(String userId,
Collection<String> userGroupKeys,
String userTenantId,
String conversationId) |
boolean |
hasAccessToConversation(String userId,
String conversationId)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPostAction, checkPostAction
protected final EngageEngineConfiguration engageEngineConfiguration
public ConversationPermissionServiceImpl(EngageEngineConfiguration engageEngineConfiguration)
@Deprecated public Optional<String> checkCreateConversation(String userId, String parentConversationId, ConversationBuilder conversationBuilder)
ConversationPermissionService
checkCreateConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsparentConversationId
- the optional parent conversation, if the new one is a child (sub-conversation),
might be null
conversationBuilder
- the builder having all the details of the new conversation to be started, needs at
least type and subtype to be setpublic Optional<String> checkCreateConversation(String userId, Collection<String> userGroupKeys, String userTenantId, String parentConversationId, ConversationBuilder conversationBuilder)
ConversationPermissionService
checkCreateConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsparentConversationId
- the optional parent conversation, if the new one is a child (sub-conversation),
might be null
conversationBuilder
- the builder having all the details of the new conversation to be started, needs at
least type and subtype to be set@Deprecated public Optional<String> checkUpdateConversationName(String userId, String conversationId)
ConversationPermissionService
checkUpdateConversationName
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation where the name is being changedpublic Optional<String> checkUpdateConversationName(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
ConversationPermissionService
checkUpdateConversationName
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation where the name is being changed@Deprecated public Optional<String> checkUpdateConversationDescription(String userId, String conversationId)
ConversationPermissionService
checkUpdateConversationDescription
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation where the description is being changedpublic Optional<String> checkUpdateConversationDescription(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
ConversationPermissionService
checkUpdateConversationDescription
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation where the description is being changed@Deprecated public Optional<String> checkArchiveConversation(String userId, String conversationId)
ConversationPermissionService
checkArchiveConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation to be archivedpublic Optional<String> checkArchiveConversation(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
ConversationPermissionService
checkArchiveConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation to be archived@Deprecated public Optional<String> checkReopenConversation(String userId, String conversationId)
ConversationPermissionService
checkReopenConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation to be re-openedpublic Optional<String> checkReopenConversation(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
ConversationPermissionService
checkReopenConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation to be re-opened@Deprecated public Optional<String> checkJoinParticipantToExistingConversation(String userId, String conversationId, String newParticipantUserId)
ConversationPermissionService
checkJoinParticipantToExistingConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation to join the new participant topublic Optional<String> checkJoinParticipantToExistingConversation(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId, String newParticipantUserId)
ConversationPermissionService
checkJoinParticipantToExistingConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation to join the new participant to@Deprecated public Optional<String> checkDropParticipantFromConversation(String userId, String conversationId, String droppedParticipantUserId)
ConversationPermissionService
checkDropParticipantFromConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation from which the participant should be droppeddroppedParticipantUserId
- the id of the participant user to be droppedpublic Optional<String> checkDropParticipantFromConversation(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId, String droppedParticipantUserId)
ConversationPermissionService
checkDropParticipantFromConversation
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation from which the participant should be droppeddroppedParticipantUserId
- the id of the participant user to be dropped@Deprecated public Optional<String> checkPostMessage(String userId, String conversationId)
ConversationPermissionService
checkPostMessage
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation to post the message topublic Optional<String> checkPostMessage(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
ConversationPermissionService
checkPostMessage
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation to post the message to@Deprecated public Optional<String> checkEditMessage(String userId, String conversationId, String messageId)
ConversationPermissionService
checkEditMessage
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation to edit a message frommessageId
- the id of the message to be editedpublic Optional<String> checkEditMessage(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId, String messageId)
ConversationPermissionService
checkEditMessage
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation to edit a message frommessageId
- the id of the message to be edited@Deprecated public Optional<String> checkPostMedia(String userId, String conversationId, String mimeType)
ConversationPermissionService
checkPostMedia
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation to post the media tomimeType
- the mime type of the media that is being postedOptional.empty()
if it is allowedpublic Optional<String> checkPostMedia(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId, String mimeType)
ConversationPermissionService
checkPostMedia
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation to post the media tomimeType
- the mime type of the media that is being postedOptional.empty()
if it is allowed@Deprecated public Optional<String> checkUpdateConversationAvatar(String userId, String conversationId)
ConversationPermissionService
checkUpdateConversationAvatar
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsconversationId
- the id of the conversation to post the media toOptional.empty()
if it is allowedpublic Optional<String> checkUpdateConversationAvatar(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
ConversationPermissionService
checkUpdateConversationAvatar
in interface ConversationPermissionService
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant id of the user to check the permissionsconversationId
- the id of the conversation to post the media toOptional.empty()
if it is allowedprotected Optional<String> checkPostVoiceMessage(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant of the user to check the permissionsconversationId
- the id of the conversation to post the voice message toprotected Optional<String> checkPostVideoMessage(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant of the user to check the permissionsconversationId
- the id of the conversation to post the video message toprotected Optional<String> checkPostImage(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant of the user to check the permissionsconversationId
- the id of the conversation to post the image toprotected Optional<String> checkPostDocument(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
userId
- the id of the user to check the permissionsuserGroupKeys
- the group keys of the user to check the permissionsuserTenantId
- the tenant of the user to check the permissionsconversationId
- the id of the conversation to post the document to@Deprecated public boolean hasAccessToConversation(String userId, String conversationId)
hasAccessToConversation
in interface ConversationPermissionService
public boolean hasAccessToConversation(String userId, Collection<String> userGroupKeys, String userTenantId, String conversationId)
hasAccessToConversation
in interface ConversationPermissionService
Copyright © 2019. All rights reserved.