|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxinmy.weixin4j.mp.WeixinComponentProxy
public class WeixinComponentProxy
微信第三方应用接口实现
ComponentApi,
公众号第三方应用| Field Summary | |
|---|---|
static String |
VERSION
|
| Constructor Summary | |
|---|---|
WeixinComponentProxy()
微信第三方组件接口实现(使用weixin4j.properties配置的account#components账号信息, 使用FileCacheStorager文件方式缓存TOKEN) |
|
WeixinComponentProxy(CacheStorager<Token> cacheStorager)
微信第三方组件接口实现(使用weixin4j.properties配置的account#components账号信息) |
|
WeixinComponentProxy(WeixinMpAccount weixinMpAccount,
CacheStorager<Token> cacheStorager)
微信第三方组件接口实现 |
|
| Method Summary | |
|---|---|
void |
cacheComponentTicket(String componentId,
String componentTicket)
缓存组件ticket |
ComponentApi |
component()
获取组接口对象(只关注第一个组件 |
ComponentApi |
component(String componentId)
获取套件接口对象(多个组件 |
String |
getComponentAuthorizationURL(String componentId)
应用组件授权 需先缓存ticket redirectUri默认填写weixin4j.properties#component.oauth.redirect.uri state默认填写state |
String |
getComponentAuthorizationURL(String componentId,
String redirectUri,
String state)
应用组件授权 需先缓存ticket,在授权完成之后需要调用ComponentApi#exchangeAuthInfo方法 ,否则无法缓存token相关导致后续的组件接口调用失败 |
String |
getPreComponentTicket(String componentId)
获取组件的预授权码 需先缓存ticket |
WeixinMpAccount |
getWeixinMpAccount()
获取微信账号信息 |
WeixinProxy |
getWeixinProxy(String componentId,
String authAppId)
创建WeixinProxy对象 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VERSION
| Constructor Detail |
|---|
public WeixinComponentProxy()
public WeixinComponentProxy(CacheStorager<Token> cacheStorager)
cacheStorager - token管理
public WeixinComponentProxy(WeixinMpAccount weixinMpAccount,
CacheStorager<Token> cacheStorager)
weixinMpAccount - 账号信息cacheStorager - token管理| Method Detail |
|---|
public WeixinMpAccount getWeixinMpAccount()
public ComponentApi component()
ComponentApipublic ComponentApi component(String componentId)
componentId - 组件ID
ComponentApi
public String getPreComponentTicket(String componentId)
throws WeixinException
componentId - 组件ID
WeixinExceptioncacheComponentTicket(String, String),
ComponentApi,
ComponentApi.getTicketManager(),
ComponentApi.getPreCodeManager()
public void cacheComponentTicket(String componentId,
String componentTicket)
throws WeixinException
componentId - 组件IDcomponentTicket - 组件ticket内容
WeixinException
public String getComponentAuthorizationURL(String componentId)
throws WeixinException
componentId - 组件ID
WeixinException#getComponentAuthorizationURL(String, String,String)}
public String getComponentAuthorizationURL(String componentId,
String redirectUri,
String state)
throws WeixinException
componentId - 组件IDredirectUri - 授权后重定向urlstate - 回调后原样返回
WeixinExceptioncacheComponentTicket(String, String),
ComponentApi,
ComponentApi.getTicketManager(),
ComponentApi.getPreCodeManager(),
ComponentApi.exchangeAuthInfo(String),
应用组件授权
public WeixinProxy getWeixinProxy(String componentId,
String authAppId)
componentId - 组件IDauthAppId - 已授权的appid
WeixinProxy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||