NIMSDK-AOS  10.9.80
V2NIMChatroomTagsUpdateParams.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.v2.chatroom.params;
2 
3 import java.io.Serializable;
4 import java.util.List;
5 
6 /**
7  * 更新聊天室标签信息
8  */
9 public class V2NIMChatroomTagsUpdateParams implements Serializable {
10  /**
11  * 标签,可以设置多个,json_array格式
12  */
13  private List<String> tags;
14  /**
15  * 消息的目标标签表达式, 标签表达式
16  */
17  private String notifyTargetTags;
18  /**
19  * 是否需要通知
20  * 默认为true
21  */
22  private Boolean notificationEnabled;
23  /**
24  * 本次操作生成的通知中的扩展字段
25  */
26  private String notificationExtension;
27 
29  }
30 
31  /**
32  * 获取标签,可以设置多个,json_array格式
33  * @return 标签,可以设置多个,json_array格式
34  */
35  public List<String> getTags() {
36  return tags;
37  }
38 
39  /**
40  * 获取消息的目标标签表达式, 标签表达式
41  * @return 消息的目标标签表达式, 标签表达式
42  */
43  public String getNotifyTargetTags() {
44  return notifyTargetTags;
45  }
46 
47  /**
48  * 是否需要通知
49  * @return 是否需要通知
50  */
51  public boolean isNotificationEnabled() {
52  if (notificationEnabled == null) {
53  return true;
54  }
55  return notificationEnabled;
56  }
57 
58  /**
59  * 获取本次操作生成的通知中的扩展字段
60  * @return 本次操作生成的通知中的扩展字段
61  */
62  public String getNotificationExtension() {
63  return notificationExtension;
64  }
65 
66  /**
67  * 设置标签,可以设置多个,json_array格式
68  * @param tags 标签,可以设置多个,json_array格式
69  */
70  public void setTags(List<String> tags) {
71  this.tags = tags;
72  }
73 
74  /**
75  * 设置消息的目标标签表达式, 标签表达式
76  * @param notifyTargetTags 消息的目标标签表达式, 标签表达式
77  */
78  public void setNotifyTargetTags(String notifyTargetTags) {
79  this.notifyTargetTags = notifyTargetTags;
80  }
81 
82  /**
83  * 设置是否需要通知
84  * @param notificationEnabled 是否需要通知
85  */
86  public void setNotificationEnabled(boolean notificationEnabled) {
87  this.notificationEnabled = notificationEnabled;
88  }
89 
90  /**
91  * 设置本次操作生成的通知中的扩展字段
92  * @param notificationExtension 本次操作生成的通知中的扩展字段
93  */
94  public void setNotificationExtension(String notificationExtension) {
95  this.notificationExtension = notificationExtension;
96  }
97 
98  public boolean isValid(){
99  if (tags == null && notifyTargetTags == null) {
100  return false;
101  }
102  return true;
103  }
104 }
void setNotificationEnabled(boolean notificationEnabled)
设置是否需要通知
String getNotifyTargetTags()
获取消息的目标标签表达式, 标签表达式
List< String > getTags()
获取标签,可以设置多个,json_array格式
void setNotificationExtension(String notificationExtension)
设置本次操作生成的通知中的扩展字段
void setNotifyTargetTags(String notifyTargetTags)
设置消息的目标标签表达式, 标签表达式
void setTags(List< String > tags)
设置标签,可以设置多个,json_array格式
String getNotificationExtension()
获取本次操作生成的通知中的扩展字段