use of com.tvd12.ezyfoxserver.response.EzyPluginInfoParams in project ezyfox-server by youngmonkeys.
the class EzyPluginInfoController method handle.
@Override
public void handle(EzyServerContext ctx, EzyPluginInfoRequest request) {
EzyUser user = request.getUser();
EzySession session = request.getSession();
EzyPluginInfoParams params = request.getParams();
EzyZoneContext zoneCtx = ctx.getZoneContext(user.getZoneId());
EzyPluginContext pluginCtx = zoneCtx.getPluginContext(params.getPluginName());
if (pluginCtx != null) {
EzyPluginSetting setting = pluginCtx.getPlugin().getSetting();
EzyResponse response = newPluginInfoResponse(setting);
ctx.send(response, session, false);
}
}
use of com.tvd12.ezyfoxserver.response.EzyPluginInfoParams in project ezyfox-server by youngmonkeys.
the class EzyPluginInfoResponseTest method test.
@Test
public void test() {
EzySimplePluginSetting setting = new EzySimplePluginSetting();
setting.setName("test");
EzyPluginInfoParams params = new EzyPluginInfoParams();
params.setPlugin(setting);
assert params.getPlugin() == setting;
EzyPluginInfoResponse response = new EzyPluginInfoResponse(params);
assert response.getParams() == params;
response.serialize();
response.release();
}
Aggregations