use of app.hongs.action.anno.Action in project HongsCORE by ihongs.
the class UnitAction method getList.
@Action("list")
public void getList(ActionHelper helper) throws HongsException {
Map data = model.getList(helper.getRequestData());
helper.reply(data);
}
use of app.hongs.action.anno.Action in project HongsCORE by ihongs.
the class UnitAction method getInfo.
@Action("info")
public void getInfo(ActionHelper helper) throws HongsException {
Map data = model.getInfo(helper.getRequestData());
helper.reply(data);
}
use of app.hongs.action.anno.Action in project HongsCORE by ihongs.
the class JointGate method delete.
@Override
@Action("delete")
@Preset(conf = "", form = "", deft = { ":delete" })
@CommitSuccess
public void delete(ActionHelper helper) throws HongsException {
IEntity sr = getEntity(helper);
Map rd = helper.getRequestData();
rd = getReqMap(helper, sr, "delete", rd);
int sn = sr.delete(rd);
String ss = getRspMsg(helper, sr, "delete", sn);
helper.reply(ss, sn);
}
use of app.hongs.action.anno.Action in project HongsCORE by ihongs.
the class JointGate method create.
@Override
@Action("create")
@Preset(conf = "", form = "", deft = { ":create" })
@Select(conf = "", form = "", mode = 2)
@Verify(conf = "", form = "")
@CommitSuccess
public void create(ActionHelper helper) throws HongsException {
IEntity sr = getEntity(helper);
Map rd = helper.getRequestData();
rd = getReqMap(helper, sr, "create", rd);
Map sd = sr.create(rd);
sd = getRspMap(helper, sr, "create", sd);
String ss = getRspMsg(helper, sr, "create", 1);
helper.reply(ss, sd);
}
use of app.hongs.action.anno.Action in project HongsCORE by ihongs.
the class CoreRoster method addServ.
private static void addServ(Map<String, Mathod> acts, Map<String, Method> cmds, String... pkgs) {
for (String pkgn : pkgs) {
pkgn = pkgn.trim();
if (pkgn.length() == 0) {
continue;
}
Set<String> clss = getClss(pkgn);
for (String clsn : clss) {
Class clso = getClso(clsn);
// 从注解提取动作名
Action acto = (Action) clso.getAnnotation(Action.class);
if (acto != null) {
addActs(acts, acto, clsn, clso);
continue;
}
Cmdlet cmdo = (Cmdlet) clso.getAnnotation(Cmdlet.class);
if (cmdo != null) {
addCmds(cmds, cmdo, clsn, clso);
}
}
}
}
Aggregations