use of com.netsteadfast.greenstep.base.model.ControllerMethodAuthority in project bamboobsc by billchen198318.
the class BaseSupportAction method getActionMethodProgramId.
// ----------------------------------------------------------------------------
public String getActionMethodProgramId() {
((BaseSimpleActionInfo) this.baseActionInfoProvide).handlerActionAnnotations();
Annotation[] annotations = ((BaseSimpleActionInfo) this.baseActionInfoProvide).getActionMethodAnnotations();
if (annotations == null || annotations.length < 1) {
return "";
}
String progId = "";
for (Annotation annotation : annotations) {
if (annotation instanceof ControllerMethodAuthority) {
progId = this.defaultString(((ControllerMethodAuthority) annotation).programId());
}
}
if (StringUtils.isBlank(progId)) {
// 沒有ControllerMethodAuthority , 就找 url 的 prog_id 參數 , 主要是 COMMON FORM 會用到
progId = this.defaultString(ActionContext.getContext().getValueStack().findString("prog_id"));
}
return progId;
}
use of com.netsteadfast.greenstep.base.model.ControllerMethodAuthority in project bamboobsc by billchen198318.
the class IndexAction method execute.
@ControllerMethodAuthority(programId = "CORE_INDEX")
public String execute() throws Exception {
try {
MenuResultObj menuData = MenuSupportUtils.getMenuData(super.getBasePath(), super.getHttpServletRequest().getSession().getId(), UserAccountHttpSessionSupport.getLang(ServletActionContext.getContext()));
comboButtonMenuData = menuData.getHtmlData();
dialogData = menuData.getDialogHtmlData();
treeJsonData = MenuSupportUtils.getMenuTreeJsonDataStr(super.getBasePath(), UserAccountHttpSessionSupport.getLang(ServletActionContext.getContext()));
} catch (Exception e) {
e.printStackTrace();
} finally {
if (!ApplicationSiteUtils.checkLoginUrlWithAllSysHostConfig(getHttpServletRequest())) {
showConfigHost = YesNo.YES;
}
}
return SUCCESS;
}
use of com.netsteadfast.greenstep.base.model.ControllerMethodAuthority in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method doExcel.
/**
* qcharts.analyticsExcelAction.action
*
* @return
* @throws Exception
*/
@JSON(serialize = false)
@ControllerMethodAuthority(programId = "QCHARTS_PROG002D0002Q")
public String doExcel() throws Exception {
File catalogFile = null;
try {
if (!this.allowJob()) {
this.message = this.getNoAllowMessage();
return SUCCESS;
}
this.exportExcel(catalogFile);
} catch (AuthorityException | ControllerException | ServiceException e) {
this.message = e.getMessage().toString();
} catch (Exception e) {
this.message = this.logException(e);
this.success = IS_EXCEPTION;
}
catalogFile = null;
return SUCCESS;
}
use of com.netsteadfast.greenstep.base.model.ControllerMethodAuthority in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method doHtml.
/**
* qcharts.analyticsHtmlAction.action
*
* @return
* @throws Exception
*/
@JSON(serialize = false)
@ControllerMethodAuthority(programId = "QCHARTS_PROG002D0002Q")
public String doHtml() throws Exception {
File catalogFile = null;
try {
if (!this.allowJob()) {
this.message = this.getNoAllowMessage();
return SUCCESS;
}
this.rendererHtml(catalogFile);
} catch (AuthorityException | ControllerException | ServiceException e) {
this.message = e.getMessage().toString();
} catch (Exception e) {
this.message = this.logException(e);
this.success = IS_EXCEPTION;
}
catalogFile = null;
return SUCCESS;
}
use of com.netsteadfast.greenstep.base.model.ControllerMethodAuthority in project bamboobsc by billchen198318.
the class QueryParamInspectInterceptor method log.
private void log(ActionInvocation actionInvocation, Annotation[] annotations) throws ServiceException, Exception {
String progId = "";
for (Annotation anno : annotations) {
if (anno instanceof ControllerMethodAuthority) {
progId = ((ControllerMethodAuthority) anno).programId();
}
}
if (StringUtils.isBlank(progId)) {
return;
}
SysQueryParamInspectUtils.log(Constants.getSystem(), progId, actionInvocation.getProxy().getMethod(), ServletActionContext.getRequest());
}
Aggregations