public class ClientContext extends Object implements cn.mapway.ui.client.event.IEventHandler, XDM.IOnPostMessage
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
confirm(String text)
向用户确认操作.
|
void |
confirm(String title,
String html,
com.google.gwt.core.client.Callback<Void,Void> callback)
显示消息对话框
|
ClientConfigure |
getConfigure()
Gets configure.
|
static ClientContext |
getContext()
全局静态环境参数.
|
String |
getDashboardCode()
Gets dashboard code.
|
cn.mapway.ui.client.event.EventBus |
getEventBus()
获取事件总线.
|
String |
getImageUploadAction()
Gets image upload action.
|
com.ksyzt.gwt.client.event.MessageHandler |
getMessageHandler()
全局消息处理方法.
|
String |
getMqttTopicPrefix()
Gets mqtt topic prefix.
|
List<S_RESOURCEObj> |
getResources()
Gets resources.
|
S_USERObj |
getUser()
Gets the user.
|
void |
initMqtt()
Inits the mqtt.
|
boolean |
isAuthorized(Long resId)
用户是否对资源 resID拥有权限
|
boolean |
isAuthorized(String path,
String funcPoint)
用户是否对资源 resID拥有权限
|
void |
onEvent(String topic,
int type,
Object event) |
void |
onPostMessage(com.google.gwt.json.client.JSONObject data)
On post message.
|
void |
postMessage(String message)
向总线发送一个文本消息
|
void |
postTopic(String topic,
int type,
Object data)
向总线发送一个文本消息
|
void |
processFailure(Throwable caught)
Process failure.
|
void |
pub(String topic,
String data)
发送MQTT消息
|
void |
setConfigure(ClientConfigure configure)
Sets configure.
|
void |
setDashboardCode(String code)
Sets dashboard code.
|
void |
setImageUploadAction(String imageUploadAction)
Sets image upload action.
|
void |
setMainFrame(MainFrame frame)
Sets the main frame.
|
void |
setMqttTopicPrefix(String mqttTopicPrefix)
Sets mqtt topic prefix.
|
void |
setResources(List<S_RESOURCEObj> resources)
Sets resources.
|
void |
setUser(S_USERObj user)
Sets the user.
|
void |
sub(String topic)
订阅 MQTT TOPIC
|
void |
switchModule(String moduleCode,
cn.mapway.ui.client.mvc.ModuleParameter parameters)
ss
|
void |
unsub(String topic)
订阅 MQTT TOPIC
|
public void onPostMessage(com.google.gwt.json.client.JSONObject data)
XDM.IOnPostMessageonPostMessage 在接口中 XDM.IOnPostMessagedata - the datapublic cn.mapway.ui.client.event.EventBus getEventBus()
public static final ClientContext getContext()
public S_USERObj getUser()
public void setUser(S_USERObj user)
user - the new userpublic com.ksyzt.gwt.client.event.MessageHandler getMessageHandler()
public ClientConfigure getConfigure()
public void setConfigure(ClientConfigure configure)
configure - the configurepublic final boolean confirm(String text)
text - the textpublic void postMessage(String message)
message - the messagepublic void postTopic(String topic, int type, Object data)
topic - the topictype - the typedata - the datapublic void switchModule(String moduleCode, cn.mapway.ui.client.mvc.ModuleParameter parameters)
moduleCode - the module codeparameters - the parameterspublic void onEvent(String topic, int type, Object event)
onEvent 在接口中 cn.mapway.ui.client.event.IEventHandlerpublic String getImageUploadAction()
public void setImageUploadAction(String imageUploadAction)
imageUploadAction - the image upload actionpublic void confirm(String title, String html, com.google.gwt.core.client.Callback<Void,Void> callback)
title - the titlehtml - the htmlcallback - the callbackpublic void setMainFrame(MainFrame frame)
frame - the new main framepublic void initMqtt()
public String getMqttTopicPrefix()
public void setMqttTopicPrefix(String mqttTopicPrefix)
mqttTopicPrefix - the mqtt topic prefixpublic void processFailure(Throwable caught)
caught - the caughtpublic String getDashboardCode()
public void setDashboardCode(String code)
code - the codepublic List<S_RESOURCEObj> getResources()
public void setResources(List<S_RESOURCEObj> resources)
resources - the resourcespublic boolean isAuthorized(Long resId)
resId - the res idpublic boolean isAuthorized(String path, String funcPoint)
path - the pathfuncPoint - the func pointpublic void sub(String topic)
topic - 消息主题public void unsub(String topic)
topic - 消息主题Copyright © 2020. All rights reserved.