use of org.apache.commons.chain.impl.ContextBase in project bamboobsc by billchen198318.
the class IndexAction method loadRecord.
@SuppressWarnings("unchecked")
private void loadRecord() throws ControllerException, ServiceException, Exception {
String visionOid = this.getFields().get("visionOid");
if (super.isNoSelectId(visionOid)) {
return;
}
Context context = new ContextBase();
context.put("visionOid", visionOid);
SimpleChain chain = new SimpleChain();
ChainResultObj resultObj = chain.getResultFromResource("strategyMapItemsForRecChain", context);
this.setPageMessage(resultObj.getMessage());
if (resultObj.getValue() instanceof StrategyMapItemsVO) {
this.divItems = ((StrategyMapItemsVO) resultObj.getValue()).getDiv();
this.cssItems = ((StrategyMapItemsVO) resultObj.getValue()).getCss();
this.conItems = ((StrategyMapItemsVO) resultObj.getValue()).getCon();
}
}
use of org.apache.commons.chain.impl.ContextBase in project bamboobsc by billchen198318.
the class ObjectivesDashboardAction method getContext.
@SuppressWarnings("unchecked")
private Context getContext() throws Exception {
List<Map<String, Object>> chartDatas = new LinkedList<Map<String, Object>>();
Enumeration<String> paramNames = this.getHttpServletRequest().getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = paramNames.nextElement();
String value = this.getHttpServletRequest().getParameter(paramName);
if (paramName.startsWith("BSC_PROG003D0005Q_meterGaugeChartDatas:")) {
Map<String, Object> dataMap = (Map<String, Object>) new ObjectMapper().readValue(value, LinkedHashMap.class);
chartDatas.add(dataMap);
}
}
Context context = new ContextBase();
context.put("chartDatas", chartDatas);
context.put("year", this.getHttpServletRequest().getParameter("BSC_PROG003D0005Q_year"));
context.put("barChartsData", this.getHttpServletRequest().getParameter("BSC_PROG003D0005Q_objectivesBarChartsData"));
return context;
}
use of org.apache.commons.chain.impl.ContextBase in project bamboobsc by billchen198318.
the class PerspectivesDashboardAction method getContext.
@SuppressWarnings("unchecked")
private Context getContext() throws Exception {
List<Map<String, Object>> chartDatas = new LinkedList<Map<String, Object>>();
String pieCanvasToData = "";
String barCanvasToData = "";
Enumeration<String> paramNames = this.getHttpServletRequest().getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = paramNames.nextElement();
String value = this.getHttpServletRequest().getParameter(paramName);
if (paramName.startsWith("BSC_PROG003D0004Q_meterGaugeChartDatas:")) {
Map<String, Object> dataMap = (Map<String, Object>) new ObjectMapper().readValue(value, LinkedHashMap.class);
chartDatas.add(dataMap);
}
if (paramName.equals("BSC_PROG003D0004Q_barChartDatas")) {
barCanvasToData = SimpleUtils.deHex(this.defaultString(value));
}
if (paramName.equals("BSC_PROG003D0004Q_pieChartDatas")) {
pieCanvasToData = SimpleUtils.deHex(this.defaultString(value));
}
}
Context context = new ContextBase();
context.put("barCanvasToData", barCanvasToData);
context.put("pieCanvasToData", pieCanvasToData);
context.put("chartDatas", chartDatas);
context.put("year", this.getHttpServletRequest().getParameter("BSC_PROG003D0004Q_year"));
return context;
}
use of org.apache.commons.chain.impl.ContextBase in project bamboobsc by billchen198318.
the class RegionMapRelationKpisAction method getChainContext.
@SuppressWarnings("unchecked")
private Context getChainContext(String visionOid, String year) throws Exception {
String dateStr1 = year + "0101";
String dateStr2 = year + "1230";
Context context = new ContextBase();
context.put("visionOid", visionOid);
context.put("startDate", dateStr1);
context.put("endDate", dateStr2);
context.put("startYearDate", year);
context.put("endYearDate", year);
context.put("frequency", BscMeasureDataFrequency.FREQUENCY_YEAR);
context.put("dataFor", BscConstants.MEASURE_DATA_FOR_ORGANIZATION);
context.put("orgId", this.getFields().get("orgId"));
context.put("empId", BscConstants.MEASURE_DATA_EMPLOYEE_FULL);
return context;
}
use of org.apache.commons.chain.impl.ContextBase in project bamboobsc by billchen198318.
the class RegionMapViewAction method getChainContext.
@SuppressWarnings("unchecked")
private Context getChainContext(String visionOid, String year) throws Exception {
String dateStr1 = year + "0101";
String dateStr2 = year + "1230";
Context context = new ContextBase();
context.put("visionOid", visionOid);
context.put("startDate", dateStr1);
context.put("endDate", dateStr2);
context.put("startYearDate", year);
context.put("endYearDate", year);
context.put("frequency", BscMeasureDataFrequency.FREQUENCY_YEAR);
context.put("dataFor", BscConstants.MEASURE_DATA_FOR_ORGANIZATION);
context.put("orgId", this.getFields().get("orgId"));
context.put("empId", BscConstants.MEASURE_DATA_EMPLOYEE_FULL);
return context;
}
Aggregations