1 package com.netease.nimlib.sdk.v2.topic.params;
3 import android.text.TextUtils;
10 private static final int MAX_TOPIC_NAME_LENGTH = 128;
19 private final String topicName;
23 private final String serverExtension;
34 this.topicName = topicName;
35 this.serverExtension = serverExtension;
62 return serverExtension;
72 return "topic is null";
75 return "topic conversationId is empty";
78 return "topicId must be greater than 0";
81 return "topic createTime must be greater than 0";
83 if (topicName == null && serverExtension == null) {
84 return "topicName and serverExtension cannot both be null";
86 if (topicName != null && topicName.length() > MAX_TOPIC_NAME_LENGTH) {
87 return "topicName length must be less than or equal to 128";
V2NIMUpdateTopicParams(V2NIMTopic topic, String topicName, String serverExtension)
构造更新 Topic 参数。
String isValidWithErrorMsg()
返回参数非法原因。
String getTopicName()
返回新的 Topic 名称。
String getConversationId()
返回 Topic 所属会话 ID。
long getTopicId()
返回 Topic ID。
V2NIMTopic getTopic()
返回待更新的 Topic。
String getServerExtension()
返回新的服务端扩展字段。
long getCreateTime()
返回 Topic 创建时间。