-
public class GroupChannelParams
Represents a group channel params.
-
-
Field Summary
Fields Modifier and Type Field Description Integer
messageSurvivalSeconds
-
Constructor Summary
Constructors Constructor Description GroupChannelParams()
GroupChannelParams constructor.
-
Method Summary
Modifier and Type Method Description GroupChannelParams
setMessageSurvivalSeconds(int messageSurvivalSeconds)
Sets the message survival seconds. GroupChannelParams
addUser(User user)
Add user. GroupChannelParams
addUsers(List<User> users)
Add users. GroupChannelParams
addUserId(String userId)
Add user id. GroupChannelParams
addUserIds(List<String> userIds)
Add user ids. GroupChannelParams
setSuper(boolean isSuper)
Sets super mode channel. GroupChannelParams
setPublic(boolean isPublic)
Sets public mode channel. GroupChannelParams
setEphemeral(boolean isEphemeral)
Sets ephemeral mode channel. GroupChannelParams
setDistinct(boolean isDistinct)
Sets distinct mode. GroupChannelParams
setDiscoverable(boolean isDiscoverable)
Sets discoverable channel for public group channel. GroupChannelParams
setChannelUrl(String channelUrl)
Sets channel url. GroupChannelParams
setName(String name)
Sets channel name. GroupChannelParams
setCoverUrl(String coverImageUrl)
Sets cover url. GroupChannelParams
setCoverImage(File coverImageFile)
Sets cover image file. GroupChannelParams
setData(String data)
Sets data. GroupChannelParams
setCustomType(String customType)
Sets custom type. GroupChannelParams
setOperators(List<User> operators)
Add operators. GroupChannelParams
setOperatorUserIds(List<String> operatorUserIds)
Add operator user ids. GroupChannelParams
setAccessCode(String accessCode)
Sets access code for public group channel. GroupChannelParams
setStrict(boolean strict)
Sets strict mode.When true, the channel creation will be failed if any of the users do not exist.When false, the channel creation will be succeeded even if all the users do not exist. GroupChannelParams
setBroadcast(boolean broadcast)
Sets broadcast mode channel. static GroupChannelParams
clone(GroupChannelParams params)
Clones and returns a new instance of given GroupChannelParams. String
toString()
-
-
Method Detail
-
setMessageSurvivalSeconds
GroupChannelParams setMessageSurvivalSeconds(int messageSurvivalSeconds)
Sets the message survival seconds.
- Parameters:
messageSurvivalSeconds
- Time before the message should disappears, in seconds.
-
addUser
GroupChannelParams addUser(User user)
Add user.
- Parameters:
user
- user
-
addUsers
GroupChannelParams addUsers(List<User> users)
Add users.
- Parameters:
users
- users
-
addUserId
GroupChannelParams addUserId(String userId)
Add user id.
- Parameters:
userId
- userId
-
addUserIds
GroupChannelParams addUserIds(List<String> userIds)
Add user ids.
- Parameters:
userIds
- userIds
-
setSuper
GroupChannelParams setSuper(boolean isSuper)
Sets super mode channel. Distinct mode must be false, if super mode is true.
- Parameters:
isSuper
- true if super mode channel.
-
setPublic
GroupChannelParams setPublic(boolean isPublic)
Sets public mode channel. Distinct mode must be false, if public mode is true.
- Parameters:
isPublic
- true if public mode channel.
-
setEphemeral
GroupChannelParams setEphemeral(boolean isEphemeral)
Sets ephemeral mode channel.
- Parameters:
isEphemeral
- true if ephemeral mode channel.
-
setDistinct
GroupChannelParams setDistinct(boolean isDistinct)
Sets distinct mode. Distinct mode must be false, if super mode is true.
- Parameters:
isDistinct
- true if distinct mode channel.
-
setDiscoverable
GroupChannelParams setDiscoverable(boolean isDiscoverable)
Sets discoverable channel for public group channel. It is valid only when setPublic is set to true.If it is set to false, this channel will not appear in the result of PublicGroupChannelListQuery.
- Parameters:
isDiscoverable
- true if channel is discoverable in the result of PublicGroupChannelListQuery.
-
setChannelUrl
GroupChannelParams setChannelUrl(String channelUrl)
Sets channel url.
- Parameters:
channelUrl
- channel url
-
setName
GroupChannelParams setName(String name)
Sets channel name.
- Parameters:
name
- channel name
-
setCoverUrl
GroupChannelParams setCoverUrl(String coverImageUrl)
Sets cover url.
- Parameters:
coverImageUrl
- cover image url
-
setCoverImage
GroupChannelParams setCoverImage(File coverImageFile)
Sets cover image file.
- Parameters:
coverImageFile
- cover image file.
-
setData
GroupChannelParams setData(String data)
Sets data.
- Parameters:
data
- data
-
setCustomType
GroupChannelParams setCustomType(String customType)
Sets custom type.
- Parameters:
customType
- custom type
-
setOperators
GroupChannelParams setOperators(List<User> operators)
Add operators.
- Parameters:
operators
- operators
-
setOperatorUserIds
GroupChannelParams setOperatorUserIds(List<String> operatorUserIds)
Add operator user ids.
- Parameters:
operatorUserIds
- operatorUserIds
-
setAccessCode
GroupChannelParams setAccessCode(String accessCode)
Sets access code for public group channel. The access code setting is only valid for public
GroupChannel
s.Once the access code is set, users have to accept an invitation or join the publicGroupChannel
with the access code to be a member of the channel.Refer to join and acceptInvitation.To delete the existing access code, pass an empty string as to this and call updateChannel.- Parameters:
accessCode
- Access code to be set.
-
setStrict
GroupChannelParams setStrict(boolean strict)
Sets strict mode.When true, the channel creation will be failed if any of the users do not exist.When false, the channel creation will be succeeded even if all the users do not exist.The default value is
false
.- Parameters:
strict
- strict
-
setBroadcast
GroupChannelParams setBroadcast(boolean broadcast)
Sets broadcast mode channel. If broadcast mode is true, then super mode will be true.
- Parameters:
broadcast
- true if broadcast mode channel.
-
clone
static GroupChannelParams clone(GroupChannelParams params)
Clones and returns a new instance of given GroupChannelParams.
- Parameters:
params
- GroupChannelParams to clone
-
-
-
-