View Javadoc
1   package com.foxinmy.weixin4j.message;
2   
3   import javax.xml.bind.annotation.XmlElement;
4   
5   import com.foxinmy.weixin4j.request.WeixinMessage;
6   import com.foxinmy.weixin4j.type.MessageType;
7   
8   /**
9    * 链接消息
10   * 
11   * @className LinkMessage
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2014年4月6日
14   * @since JDK 1.6
15   * @see <a href=
16   *      "https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140453&token=&lang=zh_CN">
17   *      订阅号、服务号的链接消息</a>
18   * @see <a href=
19   *      "http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E6%99%AE%E9%80%9A%E6%B6%88%E6%81%AF#link.E6.B6.88.E6.81.AF">
20   *      企业号的链接消息</a>
21   */
22  public class LinkMessage extends WeixinMessage {
23  
24  	private static final long serialVersionUID = 754952745115497030L;
25  
26  	public LinkMessage() {
27  		super(MessageType.link.name());
28  	}
29  
30  	/**
31  	 * 消息标题
32  	 */
33  	@XmlElement(name = "Title")
34  	private String title;
35  	/**
36  	 * 消息描述
37  	 */
38  	@XmlElement(name = "Description")
39  	private String description;
40  	/**
41  	 * 消息链接
42  	 */
43  	@XmlElement(name = "Url")
44  	private String url;
45  
46  	public String getTitle() {
47  		return title;
48  	}
49  
50  	public String getDescription() {
51  		return description;
52  	}
53  
54  	public String getUrl() {
55  		return url;
56  	}
57  
58  	@Override
59  	public String toString() {
60  		return "LinkMessage [title=" + title + ", description=" + description + ", url=" + url + ", " + super.toString()
61  				+ "]";
62  	}
63  }