use of app.hongs.action.NaviMap in project HongsCORE by ihongs.
the class MenuAction method getRedirect.
private String getRedirect(NaviMap site, Map<String, Map> menu) throws HongsException {
for (Map.Entry<String, Map> et : menu.entrySet()) {
String href = et.getKey();
if (href.startsWith("!")) {
continue;
}
if (href.startsWith("#") || href.startsWith(MENU_ACT_URI + "?")) {
Map item = et.getValue();
Map<String, Map> subs = (Map) item.get("menus");
if (subs != null && !subs.isEmpty()) {
href = getRedirect(site, subs);
if (null != href) {
return href;
}
}
} else {
if (site.chkMenu(href)) {
return href;
}
}
}
return null;
}
use of app.hongs.action.NaviMap in project HongsCORE by ihongs.
the class JointGate method getMenu.
private Map getMenu(String mod, String ent) throws HongsException {
String cuf = FormSet.hasConfFile(mod + "/" + ent) ? mod + "/" + ent : mod;
NaviMap navi = NaviMap.getInstance(cuf);
return navi.getMenu(mod + "/" + ent + "/");
}
use of app.hongs.action.NaviMap in project HongsCORE by ihongs.
the class AuthTag method doStartTag.
@Override
public int doStartTag() throws JspException {
try {
NaviMap nav = NaviMap.getInstance(this.cnf);
this.ebb = (this.act == null || nav.chkAuth(this.act)) && (this.rol == null || nav.chkRole(this.rol)) && (this.men == null || nav.chkRole(this.men));
} catch (HongsException ex) {
throw new JspException(ex);
}
if (this.not) {
this.ebb = !this.ebb;
}
if (this.ebb) {
return BodyTagSupport.EVAL_BODY_BUFFERED;
} else {
return BodyTagSupport.SKIP_BODY;
}
}
Aggregations