com.belerweb.social.weixin.bean
Enum MenuType

java.lang.Object
  extended by java.lang.Enum<MenuType>
      extended by com.belerweb.social.weixin.bean.MenuType
All Implemented Interfaces:
Serializable, Comparable<MenuType>

public enum MenuType
extends Enum<MenuType>

自定义菜单类型


Enum Constant Summary
CLICK
          用户点击click类型按钮后,微信服务器会通过消息接口推送消息类型为event的结构给开发者(参考消息接口指南),并且带上按钮中开发者填写的key值, 开发者可以通过自定义的key值与用户进行交互;
VIEW
          用户点击view类型按钮后,微信客户端将会打开开发者在按钮中填写的url值 (即网页链接),达到打开网页的目的,建议与网页授权获取用户基本信息接口结合,获得用户的登入个人信息。
 
Method Summary
static MenuType parse(Object val)
           
 String toString()
           
 String value()
           
static MenuType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MenuType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CLICK

public static final MenuType CLICK
用户点击click类型按钮后,微信服务器会通过消息接口推送消息类型为event的结构给开发者(参考消息接口指南),并且带上按钮中开发者填写的key值, 开发者可以通过自定义的key值与用户进行交互;


VIEW

public static final MenuType VIEW
用户点击view类型按钮后,微信客户端将会打开开发者在按钮中填写的url值 (即网页链接),达到打开网页的目的,建议与网页授权获取用户基本信息接口结合,获得用户的登入个人信息。

Method Detail

values

public static MenuType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MenuType c : MenuType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MenuType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

value

public String value()

toString

public String toString()
Overrides:
toString in class Enum<MenuType>

parse

public static MenuType parse(Object val)


Copyright © 2014. All Rights Reserved.