public interface CoreMemberRepository<TKey,TDataStore> extends Repository<TKey,CoreMember<TKey>,TDataStore>
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
ban(TKey id,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
banEndUtc, banReason
and sets banned to true for the document
whose id matches the provided TKey |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
banIpAddress(java.lang.String ipAddress,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
banEndUtc, banReason
and sets banned to true for documents
whose property ipAddress matches the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
banUser(java.lang.String userName,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
banEndUtc, banReason
and sets banned to true for documents
whose property userName matches the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
banUser(java.util.UUID userUUID,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
banEndUtc, banReason
and sets banned to true for documents
whose property userUUID matches the provided UUID |
boolean |
checkBanned(CoreMember<?> coreMember)
Verifies whether the provided
CoreMember is in fact
banned. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
checkBanned(TKey id)
Verifies whether the
CoreMember matching the provided
TKey is in fact banned. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
checkBannedForUser(java.lang.String userName)
Verifies whether the
CoreMember matching the provided
String userName is in fact banned. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
checkBannedForUser(java.util.UUID userUUID)
Verifies whether the
CoreMember matching the provided
UUID userUUID is in fact banned. |
boolean |
checkMuted(CoreMember<?> coreMember)
Verifies whether the provided
CoreMember is in fact
muted. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
checkMuted(TKey id)
Verifies whether the
CoreMember matching the provided
TKey is in fact muted. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
checkMutedForUser(java.lang.String userUUID)
Verifies whether the
CoreMember matching the provided
String userName is in fact muted. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
checkMutedForUser(java.util.UUID userUUID)
Verifies whether the
CoreMember matching the provided
UUID userUUID is in fact muted. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
deleteNickName(TKey id)
Deletes the property
nickName for the
document whose id matches the provided TKey |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
deleteNickNameForUser(java.lang.String userName)
Deletes the property
nickName for documents whose
property userName matches the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
deleteNickNameForUser(java.util.UUID userUUID)
Deletes the property
nickName for documents whose
property userUUID matches the provided UUID |
java.util.concurrent.CompletableFuture<java.util.List<CoreMember<TKey>>> |
getForIpAddress(java.lang.String ipAddress) |
java.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> |
getOneForUser(java.lang.String userName) |
java.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> |
getOneForUser(java.util.UUID userUUID) |
java.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> |
getOneOrGenerateForUser(java.util.UUID userUUID,
java.lang.String userName,
java.lang.String ipAddress)
Ensures that a matching
CoreMember exists in the database. |
java.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> |
getOneOrGenerateForUser(java.util.UUID userUUID,
java.lang.String userName,
java.lang.String ipAddress,
boolean[] flags)
Ensures that a matching
CoreMember exists in the database. |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
mute(TKey id,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
muteEndUtc, muteReason
and sets muted to true for the document
whose id matches the provided TKey |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
muteIpAddress(java.lang.String ipAddress,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
muteEndUtc, muteReason
and sets muted to true for documents
whose property ipAddress matches the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
muteUser(java.lang.String userName,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
muteEndUtc, muteReason
and sets muted to true for documents
whose property userName matches the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
muteUser(java.util.UUID userUUID,
java.time.Instant endUtc,
java.lang.String reason)
Updates the properties
muteEndUtc, muteReason
and sets muted to true for documents
whose property userUUID matches the provided UUID |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
setNickName(TKey id,
java.lang.String nickName)
Updates the property
nickName for the
document whose id matches the provided TKey |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
setNickNameForUser(java.lang.String userName,
java.lang.String nickName)
Updates the property
nickName for documents whose
property userName matches the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
setNickNameForUser(java.util.UUID userUUID,
java.lang.String nickName)
Updates the property
nickName for documents whose
property userUUID matches the provided UUID |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unBan(TKey id)
Sets the property
banned to false for
the document whose id matches the provided TKey |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unBanIpAddress(java.lang.String ipAddress)
Sets the property
banned to false for
documents whose property ipAddress matches
the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unBanUser(java.lang.String userName)
Sets the property
banned to false for
documents whose property userName matches
the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unBanUser(java.util.UUID userUUID)
Sets the property
banned to false for
documents whose property userUUID matches
the provided UUID |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unMute(TKey id)
Sets the property
muted to false for
the document whose id matches the provided TKey |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unMuteIpAddress(java.lang.String ipAddress)
Sets the property
muted to false for
documents whose property ipAddress matches
the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unMuteUser(java.lang.String userName)
Sets the property
muted to false for
documents whose property userName matches
the provided String |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
unMuteUser(java.util.UUID userUUID)
Sets the property
muted to false for
documents whose property userUUID matches
the provided UUID |
getCreatedUtcdeleteOne, deleteOne, generateEmpty, getAll, getAllIds, getOne, getOne, getTClass, insert, insertOne, parseAndDeleteOne, parseAndGetOnegetDataStoreContext, getTKeyClass, parse, parseUnsafejava.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> getOneOrGenerateForUser(java.util.UUID userUUID, java.lang.String userName, java.lang.String ipAddress, boolean[] flags)
CoreMember exists in the database.
If the userName has changed since the last time this method was called, it will be updated in the database
The boolean values in flags will be set according to the following rules:
0 : Whether a new member was created in the database
1 : Whether userName was updated in the database
2 : Whether ipAddress was updated in the database
flags must be an array of length 8.
There are currently 5 elements reserved for future use
userUUID - UUID userUUID of user.userName - String Name of user.ipAddress - String IP Address of user.flags - A boolean array of length 8.Optional containing the inserted CoreMember if successful, otherwise Optional.empty()java.lang.IllegalArgumentException - If flags is not of length 8java.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> getOneOrGenerateForUser(java.util.UUID userUUID, java.lang.String userName, java.lang.String ipAddress)
CoreMember exists in the database.
If the userName has changed since the last time this method was called, it will be updated in the database
userUUID - UUID userUUID of useruserName - String Name of useripAddress - String IP Address of userOptional containing the inserted CoreMember if successful, otherwise Optional.empty()java.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> getOneForUser(java.util.UUID userUUID)
userUUID - UUID userUUID of userOptional containing a matching CoreMember if successful, otherwise Optional.empty()java.util.concurrent.CompletableFuture<java.util.Optional<CoreMember<TKey>>> getOneForUser(java.lang.String userName)
userName - String Name of userOptional containing a matching CoreMember if successful, otherwise Optional.empty()java.util.concurrent.CompletableFuture<java.util.List<CoreMember<TKey>>> getForIpAddress(java.lang.String ipAddress)
ipAddress - String IP Address of userList of matching CoreMember if successful, otherwise Optional.empty()java.util.concurrent.CompletableFuture<java.lang.Boolean> ban(TKey id, java.time.Instant endUtc, java.lang.String reason)
banEndUtc, banReason
and sets banned to true for the document
whose id matches the provided TKeyid - TKey id of document to updateendUtc - Instant end of the banreason - String reason for the banCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> banUser(java.util.UUID userUUID,
java.time.Instant endUtc,
java.lang.String reason)
banEndUtc, banReason
and sets banned to true for documents
whose property userUUID matches the provided UUIDuserUUID - UUID userUUID of documents to updateendUtc - Instant end of the banreason - String reason for the banCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> banUser(java.lang.String userName,
java.time.Instant endUtc,
java.lang.String reason)
banEndUtc, banReason
and sets banned to true for documents
whose property userName matches the provided StringuserName - String userName of documents to updateendUtc - Instant end of the banreason - String reason for the banCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> banIpAddress(java.lang.String ipAddress,
java.time.Instant endUtc,
java.lang.String reason)
banEndUtc, banReason
and sets banned to true for documents
whose property ipAddress matches the provided StringipAddress - String ipAddress of documents to updateendUtc - Instant end of the banreason - String reason for the banCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unBan(TKey id)
banned to false for
the document whose id matches the provided TKeyid - TKey id of document to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unBanUser(java.util.UUID userUUID)
banned to false for
documents whose property userUUID matches
the provided UUIDuserUUID - UUID userUUID of documents to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unBanUser(java.lang.String userName)
banned to false for
documents whose property userName matches
the provided StringuserName - String userName of documents to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unBanIpAddress(java.lang.String ipAddress)
banned to false for
documents whose property ipAddress matches
the provided StringipAddress - String ipAddress of documents to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falseboolean checkBanned(CoreMember<?> coreMember)
CoreMember is in fact
banned.
A user is only banned if CoreMember.isBanned() is
true and CoreMember.getBanEndUtc() is in the future.
This method checks both CoreMember.isBanned() and
CoreMember.getBanEndUtc() and sets the member's
ban status accordingly.
coreMember - CoreMember to verify ban fortrue if user is verified to be banned, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> checkBanned(TKey id)
CoreMember matching the provided
TKey is in fact banned.
A user is only banned if CoreMember.isBanned() is
true and CoreMember.getBanEndUtc() is in the future.
This method checks both CoreMember.isBanned() and
CoreMember.getBanEndUtc() and sets the member's
ban status accordingly.
id - TKey id of member to verify ban forCompletableFuture wrapped Boolean.
true if user is verified to be banned, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> checkBannedForUser(java.util.UUID userUUID)
CoreMember matching the provided
UUID userUUID is in fact banned.
A user is only banned if CoreMember.isBanned() is
true and CoreMember.getBanEndUtc() is in the future.
This method checks both CoreMember.isBanned() and
CoreMember.getBanEndUtc() and sets the member's
ban status accordingly.
userUUID - UUID userUUID of member to verify ban forCompletableFuture wrapped Boolean.
true if user is verified to be banned, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> checkBannedForUser(java.lang.String userName)
CoreMember matching the provided
String userName is in fact banned.
A user is only banned if CoreMember.isBanned() is
true and CoreMember.getBanEndUtc() is in the future.
This method checks both CoreMember.isBanned() and
CoreMember.getBanEndUtc() and sets the member's
ban status accordingly.
userName - String userUUID of member to verify ban forCompletableFuture wrapped Boolean.
true if user is verified to be banned, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> mute(TKey id, java.time.Instant endUtc, java.lang.String reason)
muteEndUtc, muteReason
and sets muted to true for the document
whose id matches the provided TKeyid - TKey id of document to updateendUtc - Instant end of the mutereason - String reason for the muteCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> muteUser(java.util.UUID userUUID,
java.time.Instant endUtc,
java.lang.String reason)
muteEndUtc, muteReason
and sets muted to true for documents
whose property userUUID matches the provided UUIDuserUUID - UUID userUUID of documents to updateendUtc - Instant end of the mutereason - String reason for the muteCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> muteUser(java.lang.String userName,
java.time.Instant endUtc,
java.lang.String reason)
muteEndUtc, muteReason
and sets muted to true for documents
whose property userName matches the provided StringuserName - String userName of documents to updateendUtc - Instant end of the mutereason - String reason for the muteCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> muteIpAddress(java.lang.String ipAddress,
java.time.Instant endUtc,
java.lang.String reason)
muteEndUtc, muteReason
and sets muted to true for documents
whose property ipAddress matches the provided StringipAddress - String ipAddress of documents to updateendUtc - Instant end of the mutereason - String reason for the muteCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unMute(TKey id)
muted to false for
the document whose id matches the provided TKeyid - TKey id of document to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unMuteUser(java.util.UUID userUUID)
muted to false for
documents whose property userUUID matches
the provided UUIDuserUUID - UUID userUUID of documents to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unMuteUser(java.lang.String userName)
muted to false for
documents whose property userName matches
the provided StringuserName - String userName of documents to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> unMuteIpAddress(java.lang.String ipAddress)
muted to false for
documents whose property ipAddress matches
the provided StringipAddress - String ipAddress of documents to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falseboolean checkMuted(CoreMember<?> coreMember)
CoreMember is in fact
muted.
A user is only muted if CoreMember.isMuted() is
true and CoreMember.getMuteEndUtc() is in the future.
This method checks both CoreMember.isMuted() and
CoreMember.getMuteEndUtc() and sets the member's
mute status accordingly.
coreMember - CoreMember to verify mute fortrue if user is verified to be muted, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> checkMuted(TKey id)
CoreMember matching the provided
TKey is in fact muted.
A user is only muted if CoreMember.isMuted() is
true and CoreMember.getMuteEndUtc() is in the future.
This method checks both CoreMember.isMuted() and
CoreMember.getMuteEndUtc() and sets the member's
mute status accordingly.
id - TKey id of member to verify mute forCompletableFuture wrapped Boolean.
true if user is verified to be muted, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> checkMutedForUser(java.util.UUID userUUID)
CoreMember matching the provided
UUID userUUID is in fact muted.
A user is only muted if CoreMember.isMuted() is
true and CoreMember.getMuteEndUtc() is in the future.
This method checks both CoreMember.isMuted() and
CoreMember.getMuteEndUtc() and sets the member's
mute status accordingly.
userUUID - UUID userUUID of member to verify mute forCompletableFuture wrapped Boolean.
true if user is verified to be muted, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> checkMutedForUser(java.lang.String userUUID)
CoreMember matching the provided
String userName is in fact muted.
A user is only muted if CoreMember.isMuted() is
true and CoreMember.getMuteEndUtc() is in the future.
This method checks both CoreMember.isMuted() and
CoreMember.getMuteEndUtc() and sets the member's
mute status accordingly.
userUUID - UUID userUUID of member to verify mute forCompletableFuture wrapped Boolean.
true if user is verified to be muted, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> setNickName(TKey id, java.lang.String nickName)
nickName for the
document whose id matches the provided TKeyid - TKey id of document to updatenickName - String new nickNameCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> setNickNameForUser(java.util.UUID userUUID,
java.lang.String nickName)
nickName for documents whose
property userUUID matches the provided UUIDuserUUID - UUID userUUID of documents to updatenickName - String new nickNameCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> setNickNameForUser(java.lang.String userName,
java.lang.String nickName)
nickName for documents whose
property userName matches the provided StringuserName - String userName of documents to updatenickName - String new nickNameCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> deleteNickName(TKey id)
nickName for the
document whose id matches the provided TKeyid - TKey id of document to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> deleteNickNameForUser(java.util.UUID userUUID)
nickName for documents whose
property userUUID matches the provided UUIDuserUUID - UUID userName of documents to updateCompletableFuture wrapped Boolean.
true if successful, otherwise falsejava.util.concurrent.CompletableFuture<java.lang.Boolean> deleteNickNameForUser(java.lang.String userName)
nickName for documents whose
property userName matches the provided StringuserName - String userName of documents to updateCompletableFuture wrapped boolean
true if successful, otherwise false