|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.belerweb.social.bean.JsonBean
com.belerweb.social.weixin.bean.Message
public class Message
普通消息
| Constructor Summary | |
|---|---|
Message()
|
|
Message(MsgType msgType)
|
|
| Method Summary | |
|---|---|
Message |
addVariable(Variable variable)
|
List<Article> |
getArticles()
多条图文消息信息,默认第一个item为大图 |
String |
getContent()
文本消息内容 |
Date |
getCreateTime()
消息创建时间 |
String |
getDescription()
链接消息/音乐消息特有:消息描述 |
String |
getEventKey()
事件KEY值,QR扫描/自定义菜单时特有 |
EventType |
getEventType()
事件特有:事件类型 |
String |
getFromUser()
发送方帐号 |
String |
getHqMusicUrl()
高质量音乐链接,WIFI环境优先使用该链接播放音乐 |
String |
getLabel()
位置消息特有: 地理位置信息 |
Double |
getLat()
位置消息特有:地理位置纬度 |
Double |
getLon()
位置消息特有:地理位置经度 |
String |
getMediaId()
图片/语音/视频特有:消息媒体id,可以调用多媒体文件下载接口拉取数据。 |
Long |
getMsgId()
消息id |
MsgType |
getMsgType()
消息类型 |
String |
getMusicUrl()
音乐链接 |
String |
getPicUrl()
图片消息特有:图片链接 |
Double |
getPrecision()
上报地理位置事件特有: 地理位置精度 |
String |
getRecognition()
语音消息特有: 语音识别结果,UTF8编码,只有在开启语音识别后才有此结果 |
Integer |
getScale()
位置消息特有: 地图缩放大小 |
String |
getTemplateId()
模板消息id |
String |
getThumbMediaId()
视频消息/音乐消息特有:视频消息缩略图的媒体id,可以调用多媒体文件下载接口拉取数据。 |
String |
getTicket()
扫描二维码,用户已关注时的事件推送特有 二维码的ticket,可用来换取二维码图片 |
String |
getTitle()
链接消息/音乐消息特有:消息标题 |
String |
getTopColor()
模板消息头部颜色 |
String |
getToUser()
接受方帐号 |
String |
getUrl()
链接消息特有:消息链接 |
List<Variable> |
getVariables()
模板消息变量 |
VoiceType |
getVoiceType()
语音消息特有:语音格式 |
static Message |
parse(org.json.JSONObject jsonObject)
|
static Message |
parse(String xml)
|
void |
setArticles(List<Article> articles)
|
void |
setContent(String content)
|
void |
setCreateTime(Date createTime)
|
void |
setDescription(String description)
|
void |
setEventKey(String eventKey)
|
void |
setEventType(EventType eventType)
|
void |
setFromUser(String fromUser)
|
void |
setHqMusicUrl(String hqMusicUrl)
|
void |
setLabel(String label)
|
void |
setLat(Double lat)
|
void |
setLon(Double lon)
|
void |
setMediaId(String mediaId)
|
void |
setMsgId(Long msgId)
|
void |
setMsgType(MsgType msgType)
|
void |
setMusicUrl(String musicUrl)
|
void |
setPicUrl(String picUrl)
|
void |
setPrecision(Double precision)
|
void |
setRecognition(String recognition)
|
void |
setScale(Integer scale)
|
void |
setTemplateId(String templateId)
|
void |
setThumbMediaId(String thumbMediaId)
|
void |
setTicket(String ticket)
|
void |
setTitle(String title)
|
void |
setTopColor(String topColor)
|
void |
setToUser(String toUser)
|
void |
setUrl(String url)
|
void |
setVariables(List<Variable> variables)
|
void |
setVoiceType(VoiceType voiceType)
|
String |
toJSON()
将Message转换成JSON格式,用于发送客服消息 |
String |
toXML()
将Message转换成XML格式,用于发送被动响应消息 |
| Methods inherited from class com.belerweb.social.bean.JsonBean |
|---|
getJsonObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Message()
public Message(MsgType msgType)
| Method Detail |
|---|
public Long getMsgId()
public void setMsgId(Long msgId)
public String getFromUser()
public void setFromUser(String fromUser)
public String getToUser()
public void setToUser(String toUser)
public Date getCreateTime()
public void setCreateTime(Date createTime)
public MsgType getMsgType()
public void setMsgType(MsgType msgType)
public String getContent()
public void setContent(String content)
public String getMediaId()
public void setMediaId(String mediaId)
public String getPicUrl()
public void setPicUrl(String picUrl)
public VoiceType getVoiceType()
public void setVoiceType(VoiceType voiceType)
public String getRecognition()
public void setRecognition(String recognition)
public String getThumbMediaId()
public void setThumbMediaId(String thumbMediaId)
public Double getLon()
public void setLon(Double lon)
public Double getLat()
public void setLat(Double lat)
public Integer getScale()
public void setScale(Integer scale)
public String getLabel()
public void setLabel(String label)
public String getTitle()
public void setTitle(String title)
public String getDescription()
public void setDescription(String description)
public String getUrl()
public void setUrl(String url)
public String getMusicUrl()
public void setMusicUrl(String musicUrl)
public String getHqMusicUrl()
public void setHqMusicUrl(String hqMusicUrl)
public EventType getEventType()
public void setEventType(EventType eventType)
public String getEventKey()
public void setEventKey(String eventKey)
public String getTicket()
public void setTicket(String ticket)
public Double getPrecision()
public void setPrecision(Double precision)
public List<Article> getArticles()
public void setArticles(List<Article> articles)
public String getTemplateId()
public void setTemplateId(String templateId)
public String getTopColor()
public void setTopColor(String topColor)
public List<Variable> getVariables()
public void setVariables(List<Variable> variables)
public Message addVariable(Variable variable)
public String toXML()
public String toJSON()
public static Message parse(String xml)
public static Message parse(org.json.JSONObject jsonObject)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||