public class ApiContext extends ServiceContext
| Constructor and Description |
|---|
ApiContext(BaseUrlConf globalBaseUrlConf,
BaseUrlConf moduleBaseUrlConf,
String system,
String module,
ContextLog log,
CacheTool redis,
MQTool mq,
StorageTool storage,
IdGeneratorTool idGenerator) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAbsoluteUrl(String relativeUrl)
获取绝对地址,相对于页面的地址
|
<T> T |
getAuthData(Class<T> tClass)
get authentication data, will user login, we can set data
|
Authentication |
getAuthentication() |
String |
getBaseUrl()
获取网站基地址
|
<T> T |
getClient(Class<T> tClass) |
String |
getClientAddress()
获取客户的ip地址
|
String |
getSessionId() |
AuthUser |
getUser()
获取登陆用户
|
void |
setAuthentication(Authentication authentication) |
getBean, getCache, getCloudClient, getCurrent, getIdTool, getInstance, getLog, getModuleName, getMQ, getProducer, getProvider, getProviderSettingsStorage, getStorage, getSystem, getTask, getTool, setModuleName, setSystem, tryGetToolpublic ApiContext(BaseUrlConf globalBaseUrlConf, BaseUrlConf moduleBaseUrlConf, String system, String module, ContextLog log, CacheTool redis, MQTool mq, StorageTool storage, IdGeneratorTool idGenerator)
public String getSessionId()
public String getClientAddress()
public <T> T getAuthData(Class<T> tClass)
T - tClass - public <T> T getClient(Class<T> tClass)
public Authentication getAuthentication()
public void setAuthentication(Authentication authentication)
public AuthUser getUser()
public String getBaseUrl()
Copyright © 2019. All rights reserved.