Class RepositoryFacade
-
- All Implemented Interfaces:
-
io.getstream.chat.android.client.persistance.repository.ChannelConfigRepository,io.getstream.chat.android.client.persistance.repository.ChannelRepository,io.getstream.chat.android.client.persistance.repository.MessageRepository,io.getstream.chat.android.client.persistance.repository.QueryChannelsRepository,io.getstream.chat.android.client.persistance.repository.ReactionRepository,io.getstream.chat.android.client.persistance.repository.SyncStateRepository,io.getstream.chat.android.client.persistance.repository.ThreadsRepository,io.getstream.chat.android.client.persistance.repository.UserRepository
public final class RepositoryFacade implements UserRepository, ChannelRepository, ReactionRepository, MessageRepository, ChannelConfigRepository, QueryChannelsRepository, ThreadsRepository, SyncStateRepository
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRepositoryFacade.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static RepositoryFacade.CompanionCompanion
-
Method Summary
Modifier and Type Method Description List<Channel>selectChannels(List<String> channelCIDs)Select channels by full channel IDs Channel.cid final List<Channel>selectChannels(List<String> channelIds, AnyChannelPaginationRequest pagination)final ChannelenrichChannel(Channel $self, Map<String, List<Message>> messageMap, Config defaultConfig)UnitinsertChannel(Channel channel)Inserts a Channel UnitinsertChannels(Collection<Channel> channels)Inserts many Channels. UnitinsertMessage(Message message)Inserts a messages. UnitinsertMessages(List<Message> messages)Inserts many messages. UnitdeleteChannelMessagesBefore(String cid, Date hideMessagesBefore)Deletes channel messages before hideMessagesBefore and removes channel from the cache. UnitdeleteChannelMessage(Message message)Deletes a Message from a Channel.messages. final UnitmarkMessageAsDeleted(Message message)UnitinsertReaction(Reaction reaction)Inserts a reaction. UnitupdateMembersForChannel(String cid, List<Member> members)Updates the members of a Channel final UnitstoreStateForChannels(Collection<Channel> channels)UnitdeleteChannel(String cid)Deletes a Channel by the cid. UnitsetHiddenForChannel(String cid, Boolean hidden, Date hideMessagesBefore)Sets the Channel.hidden for a channel. UnitsetHiddenForChannel(String cid, Boolean hidden)Sets the Channel.hidden for a channel. UnitinsertThreads(List<Thread> threads)Inserts the given list of Thread. final UnitstoreStateForChannel(Channel channel)Unitclear()Clear users of this repository. -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.UserRepository
insertCurrentUser, insertUser, insertUsers, observeLatestUsers, selectUser, selectUsers -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.ChannelRepository
evictChannel, selectAllCids, selectChannel, selectChannelCidsBySyncNeeded, selectChannelsSyncNeeded, selectMembersForChannel, setChannelDeletedAt, updateChannelMessage, updateLastMessageForChannel -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.ReactionRepository
deleteReaction, selectReactionById, selectReactionIdsBySyncStatus, selectReactionsByIds, selectReactionsBySyncStatus, selectUserReactionToMessage, selectUserReactionsToMessage, updateReactionsForMessageByDeletedDate -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.MessageRepository
deleteChannelMessages, deleteDraftMessage, deletePoll, evictMessage, evictMessages, insertDraftMessage, selectDraftMessageByParentId, selectDraftMessages, selectDraftMessagesByCid, selectMessage, selectMessageBySyncState, selectMessageIdsBySyncState, selectMessages, selectMessagesForChannel, selectMessagesForThread, selectMessagesWithPoll -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.ChannelConfigRepository
cacheChannelConfigs, insertChannelConfig, insertChannelConfigs, selectChannelConfig -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.QueryChannelsRepository
insertQueryChannels, selectBy -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.ThreadsRepository
deleteChannelThreads, insertThreadOrder, selectThread, selectThreadOrder, selectThreads, upsertMessageInThread, upsertMessagesInThread -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.SyncStateRepository
insertSyncState, selectSyncState -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
selectChannels
List<Channel> selectChannels(List<String> channelCIDs)
Select channels by full channel IDs Channel.cid
- Parameters:
channelCIDs- A list of Channel.cid as query specification.- Returns:
A list of channels found in repository.
-
selectChannels
final List<Channel> selectChannels(List<String> channelIds, AnyChannelPaginationRequest pagination)
-
enrichChannel
@VisibleForTesting() final Channel enrichChannel(Channel $self, Map<String, List<Message>> messageMap, Config defaultConfig)
-
insertChannel
Unit insertChannel(Channel channel)
Inserts a Channel
- Parameters:
channel- Channel to insert.
-
insertChannels
Unit insertChannels(Collection<Channel> channels)
Inserts many Channels.
- Parameters:
channels- collection of Channel
-
insertMessage
Unit insertMessage(Message message)
Inserts a messages.
- Parameters:
message- Message
-
insertMessages
Unit insertMessages(List<Message> messages)
Inserts many messages.
- Parameters:
messages- list of Message
-
deleteChannelMessagesBefore
Unit deleteChannelMessagesBefore(String cid, Date hideMessagesBefore)
Deletes channel messages before hideMessagesBefore and removes channel from the cache.
- Parameters:
cid- of message - String.hideMessagesBefore- Boolean.
-
deleteChannelMessage
Unit deleteChannelMessage(Message message)
Deletes a Message from a Channel.messages.
- Parameters:
message- Message to delete.
-
markMessageAsDeleted
final Unit markMessageAsDeleted(Message message)
-
insertReaction
Unit insertReaction(Reaction reaction)
Inserts a reaction.
- Parameters:
reaction- Reaction
-
updateMembersForChannel
Unit updateMembersForChannel(String cid, List<Member> members)
Updates the members of a Channel
- Parameters:
cid- String.members- list of Member
-
storeStateForChannels
final Unit storeStateForChannels(Collection<Channel> channels)
-
deleteChannel
Unit deleteChannel(String cid)
Deletes a Channel by the cid.
- Parameters:
cid- String
-
setHiddenForChannel
Unit setHiddenForChannel(String cid, Boolean hidden, Date hideMessagesBefore)
Sets the Channel.hidden for a channel.
- Parameters:
cid- String.hidden- Date.hideMessagesBefore- Date.
-
setHiddenForChannel
Unit setHiddenForChannel(String cid, Boolean hidden)
Sets the Channel.hidden for a channel.
- Parameters:
cid- String.hidden- Date.
-
insertThreads
Unit insertThreads(List<Thread> threads)
Inserts the given list of Thread.
-
storeStateForChannel
final Unit storeStateForChannel(Channel channel)
-
-
-
-