NIMSDK-AOS  10.9.80
V2NIMSendChatroomMessageParams.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.v2.chatroom.params;
2 
7 import java.io.Serializable;
8 import java.util.List;
9 
10 /**
11  * 发送聊天室消息相关配置
12  */
13 public class V2NIMSendChatroomMessageParams implements Serializable {
14 
15  /**
16  * 消息相关配置
17  */
18  private V2NIMChatroomMessageConfig messageConfig;
19  /**
20  * 路由抄送相关配置
21  */
22  private V2NIMMessageRouteConfig routeConfig;
23  /**
24  * 反垃圾相关配置
25  */
26  private V2NIMMessageAntispamConfig antispamConfig;
27  /**
28  * 是否启用本地反垃圾,默认false
29  */
30  private Boolean clientAntispamEnabled;
31  /**
32  * 反垃圾命中后替换的文本
33  */
34  private String clientAntispamReplace;
35  /**
36  * 聊天室定向消息接收者账号ID列表,如果receiverIds不为空,表示为聊天室定向消息, 设置该字段后, 会忽略消息配置中的history_enabled配置, 消息不存历史
37  */
38  private List<String> receiverIds;
39  /**
40  * 消息的目标标签表达式
41  */
42  private String notifyTargetTags;
43  /**
44  * 位置信息
45  */
46  private V2NIMLocationInfo locationInfo;
47 
49  }
50 
51  /**
52  * 获取消息相关配置
53  * @return 消息相关配置
54  */
56  return messageConfig;
57  }
58  /**
59  * 设置消息相关配置
60  * @param messageConfig 消息相关配置
61  */
62  public void setMessageConfig(V2NIMChatroomMessageConfig messageConfig) {
63  this.messageConfig = messageConfig;
64  }
65 
66  /**
67  * 获取路由抄送相关配置
68  * @return 路由抄送相关配置
69  */
71  return routeConfig;
72  }
73 
74  /**
75  * 设置路由抄送相关配置
76  * @param routeConfig 路由抄送相关配置
77  */
78  public void setRouteConfig(V2NIMMessageRouteConfig routeConfig) {
79  this.routeConfig = routeConfig;
80  }
81 
82  /**
83  * 获取反垃圾相关配置
84  * @return 反垃圾相关配置
85  */
87  return antispamConfig;
88  }
89 
90  /**
91  * 设置反垃圾相关配置
92  * @param antispamConfig 反垃圾相关配置
93  */
94  public void setAntispamConfig(V2NIMMessageAntispamConfig antispamConfig) {
95  this.antispamConfig = antispamConfig;
96  }
97 
98  /**
99  * 获取是否启用本地反垃圾,默认false
100  * @return 是否启用本地反垃圾,默认false
101  */
102  public boolean isClientAntispamEnabled() {
103  if (clientAntispamEnabled == null) {
104  return false;
105  }
106  return clientAntispamEnabled;
107  }
108 
109  /**
110  * 设置是否启用本地反垃圾,默认false
111  * @param clientAntispamEnabled 是否启用本地反垃圾,默认false
112  */
113  public void setClientAntispamEnabled(Boolean clientAntispamEnabled) {
114  this.clientAntispamEnabled = clientAntispamEnabled;
115  }
116 
117  /**
118  * 获取反垃圾命中后替换的文本
119  * @return 反垃圾命中后替换的文本
120  */
121  public String getClientAntispamReplace() {
122  if(clientAntispamReplace == null) {
123  return "";
124  }
125  return clientAntispamReplace;
126  }
127 
128  /**
129  * 设置反垃圾命中后替换的文本
130  * @param clientAntispamReplace 反垃圾命中后替换的文本
131  */
132  public void setClientAntispamReplace(String clientAntispamReplace) {
133  this.clientAntispamReplace = clientAntispamReplace;
134  }
135 
136  /**
137  * 获取聊天室定向消息接收者账号ID列表,如果receiverIds不为空,表示为聊天室定向消息, 设置该字段后, 会忽略消息配置中的history_enabled配置, 消息不存历史
138  * @return 聊天室定向消息接收者账号ID列表
139  */
140  public List<String> getReceiverIds() {
141  return receiverIds;
142  }
143 
144  /**
145  * 设置聊天室定向消息接收者账号ID列表,如果receiverIds不为空,表示为聊天室定向消息, 设置该字段后, 会忽略消息配置中的history_enabled配置, 消息不存历史
146  * @param receiverIds 聊天室定向消息接收者账号ID列表
147  */
148  public void setReceiverIds(List<String> receiverIds) {
149  this.receiverIds = receiverIds;
150  }
151 
152  /**
153  * 获取消息的目标标签表达式
154  * @return 消息的目标标签表达式
155  */
156  public String getNotifyTargetTags() {
157  return notifyTargetTags;
158  }
159 
160  /**
161  * 设置消息的目标标签表达式
162  * @param notifyTargetTags 消息的目标标签表达式
163  */
164  public void setNotifyTargetTags(String notifyTargetTags) {
165  this.notifyTargetTags = notifyTargetTags;
166  }
167 
168  /**
169  * 获取位置信息
170  * @return 位置信息
171  */
173  return locationInfo;
174  }
175 
176  /**
177  * 设置位置信息
178  * @param locationInfo 位置信息
179  */
180  public void setLocationInfo(V2NIMLocationInfo locationInfo) {
181  this.locationInfo = locationInfo;
182  }
183 }
List< String > getReceiverIds()
获取聊天室定向消息接收者账号ID列表,如果receiverIds不为空,表示为聊天室定向消息, 设置该字段后, 会忽...
void setRouteConfig(V2NIMMessageRouteConfig routeConfig)
设置路由抄送相关配置
void setMessageConfig(V2NIMChatroomMessageConfig messageConfig)
设置消息相关配置
void setReceiverIds(List< String > receiverIds)
设置聊天室定向消息接收者账号ID列表,如果receiverIds不为空,表示为聊天室定向消息, 设置该字段后, 会忽...
void setAntispamConfig(V2NIMMessageAntispamConfig antispamConfig)
设置反垃圾相关配置
void setNotifyTargetTags(String notifyTargetTags)
设置消息的目标标签表达式
V2NIMMessageAntispamConfig getAntispamConfig()
获取反垃圾相关配置
void setClientAntispamReplace(String clientAntispamReplace)
设置反垃圾命中后替换的文本
void setClientAntispamEnabled(Boolean clientAntispamEnabled)
设置是否启用本地反垃圾,默认false
boolean isClientAntispamEnabled()
获取是否启用本地反垃圾,默认false