-
public final class ChannelDataA class that only stores the channel data and not the channel state that changes a lot (for example messages, watchers, etc.).
-
-
Field Summary
Fields Modifier and Type Field Description private StringchannelIdprivate Stringtypeprivate Stringcidprivate Stringnameprivate Stringimageprivate UsercreatedByprivate Integercooldownprivate Booleanfrozenprivate DatecreatedAtprivate DateupdatedAtprivate DatedeletedAtprivate IntegermemberCountprivate Stringteamprivate Map<String, Object>extraDataprivate Set<String>ownCapabilities
-
Constructor Summary
Constructors Constructor Description ChannelData(String channelId, String type, String cid, String name, String image, User createdBy, Integer cooldown, Boolean frozen, Date createdAt, Date updatedAt, Date deletedAt, Integer memberCount, String team, Map<String, Object> extraData, Set<String> ownCapabilities)
-
Method Summary
-
-
Constructor Detail
-
ChannelData
ChannelData(String channelId, String type, String cid, String name, String image, User createdBy, Integer cooldown, Boolean frozen, Date createdAt, Date updatedAt, Date deletedAt, Integer memberCount, String team, Map<String, Object> extraData, Set<String> ownCapabilities)
- Parameters:
channelId- Channel's unique ID.type- Type of the channel.cid- The channel id in the format messaging:123.name- Channel's name.image- Channel's image.createdBy- Creator of the channel.cooldown- Cooldown period after sending each message in seconds.frozen- Whether channel is frozen or not.createdAt- Date/time of creation.updatedAt- Date/time of the last update.deletedAt- Date/time of deletion.memberCount- Number of members in the channel.team- Team the channel belongs to (multi-tenant only).extraData- A map of custom fields for the channel.ownCapabilities- Channel's capabilities available for the current user.
-
-
Method Detail
-
getChannelId
final String getChannelId()
-
setChannelId
final Unit setChannelId(String channelId)
- Parameters:
channelId- Channel's unique ID.
-
getCreatedBy
final User getCreatedBy()
-
setCreatedBy
final Unit setCreatedBy(User createdBy)
- Parameters:
createdBy- Creator of the channel.
-
getCooldown
final Integer getCooldown()
-
setCooldown
final Unit setCooldown(Integer cooldown)
- Parameters:
cooldown- Cooldown period after sending each message in seconds.
-
setFrozen
final Unit setFrozen(Boolean frozen)
- Parameters:
frozen- Whether channel is frozen or not.
-
getCreatedAt
final Date getCreatedAt()
-
setCreatedAt
final Unit setCreatedAt(Date createdAt)
- Parameters:
createdAt- Date/time of creation.
-
getUpdatedAt
final Date getUpdatedAt()
-
setUpdatedAt
final Unit setUpdatedAt(Date updatedAt)
- Parameters:
updatedAt- Date/time of the last update.
-
getDeletedAt
final Date getDeletedAt()
-
setDeletedAt
final Unit setDeletedAt(Date deletedAt)
- Parameters:
deletedAt- Date/time of deletion.
-
getMemberCount
final Integer getMemberCount()
-
setMemberCount
final Unit setMemberCount(Integer memberCount)
- Parameters:
memberCount- Number of members in the channel.
-
setTeam
final Unit setTeam(String team)
- Parameters:
team- Team the channel belongs to (multi-tenant only).
-
getExtraData
final Map<String, Object> getExtraData()
-
setExtraData
final Unit setExtraData(Map<String, Object> extraData)
- Parameters:
extraData- A map of custom fields for the channel.
-
getOwnCapabilities
final Set<String> getOwnCapabilities()
-
setOwnCapabilities
final Unit setOwnCapabilities(Set<String> ownCapabilities)
- Parameters:
ownCapabilities- Channel's capabilities available for the current user.
-
isUserAbleTo
final Boolean isUserAbleTo(String channelCapability)
Checks if the user has specific capabilities.
You can find a list of capabilities in io.getstream.chat.android.client.models.ChannelCapabilities.
- Parameters:
channelCapability- The specific ability we are checking against.
-
-
-
-