Search in sources :

Example 11 with Action

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);
}
Also used : Map(java.util.Map) HashMap(java.util.HashMap) Action(app.hongs.action.anno.Action)

Example 12 with Action

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);
}
Also used : Map(java.util.Map) HashMap(java.util.HashMap) Action(app.hongs.action.anno.Action)

Example 13 with Action

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);
}
Also used : NaviMap(app.hongs.action.NaviMap) Map(java.util.Map) Action(app.hongs.action.anno.Action) CommitSuccess(app.hongs.action.anno.CommitSuccess) Preset(app.hongs.action.anno.Preset)

Example 14 with Action

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);
}
Also used : NaviMap(app.hongs.action.NaviMap) Map(java.util.Map) Action(app.hongs.action.anno.Action) CommitSuccess(app.hongs.action.anno.CommitSuccess) Preset(app.hongs.action.anno.Preset) Select(app.hongs.action.anno.Select) Verify(app.hongs.action.anno.Verify)

Example 15 with Action

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);
            }
        }
    }
}
Also used : Action(app.hongs.action.anno.Action) Cmdlet(app.hongs.cmdlet.anno.Cmdlet)

Aggregations

Action (app.hongs.action.anno.Action)63 Map (java.util.Map)52 HashMap (java.util.HashMap)38 NaviMap (app.hongs.action.NaviMap)16 CommitSuccess (app.hongs.action.anno.CommitSuccess)14 CoreLocale (app.hongs.CoreLocale)12 Preset (app.hongs.action.anno.Preset)12 IAction (app.hongs.dh.IAction)10 RoleMap (app.hongs.serv.auth.RoleMap)10 Verify (app.hongs.action.anno.Verify)9 FetchCase (app.hongs.db.util.FetchCase)8 CoreConfig (app.hongs.CoreConfig)7 Select (app.hongs.action.anno.Select)7 Set (java.util.Set)6 File (java.io.File)5 List (java.util.List)5 HongsException (app.hongs.HongsException)4 ActionRunner (app.hongs.action.ActionRunner)4 LuceneAction (app.hongs.dh.lucene.LuceneAction)3 SearchAction (app.hongs.dh.search.SearchAction)3