本文整理汇总了Java中org.apache.commons.chain.impl.ContextBase类的典型用法代码示例。如果您正苦于以下问题:Java ContextBase类的具体用法?Java ContextBase怎么用?Java ContextBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContextBase类属于org.apache.commons.chain.impl包,在下文中一共展示了ContextBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@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;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:20,代码来源:ObjectivesDashboardAction.java
示例2: getContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@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_PROG003D0006Q_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("dateRangeLabel", this.getHttpServletRequest().getParameter("BSC_PROG003D0006Q_dateRangeLabel") );
context.put("barChartsData", this.getHttpServletRequest().getParameter("BSC_PROG003D0006Q_kpisBarChartsData") );
return context;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:20,代码来源:KpisDashboardAction.java
示例3: loadRecord
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@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);
String backgroundOid = (String) context.get("backgroundOid");
this.backgroundImgBase64 = StrategyMapUtils.getBackgroundImageBase64FromUpload(backgroundOid);
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();
}
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:20,代码来源:IndexAction.java
示例4: renderBody
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void renderBody() throws ControllerException, ServiceException, Exception {
this.getCheckFieldHandler().single(
"visionOid",
( super.isNoSelectId(this.getFields().get("visionOid")) ),
this.getText("MESSAGE.BSC_PROG002D0006Q_visionOid") ).throwMessage();
SimpleChain simpleChanin = new SimpleChain();
Context context = new ContextBase();
context.put("visionOid", this.getFields().get("visionOid") );
if (YesNo.YES.equals(this.getFields().get("autoAllocation")) ) {
context.put("autoAllocation", this.getFields().get("autoAllocation") );
}
context.put("weightName", this.getText("TPL.BSC_PROG002D0006Q_weightName"));
ChainResultObj resultObj = simpleChanin.getResultFromResource("weightItemsChain", context);
this.body = String.valueOf( resultObj.getValue() );
this.message = resultObj.getMessage();
this.success = IS_YES;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:19,代码来源:WeightContentQueryAction.java
示例5: getChainContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Context getChainContext() throws Exception {
Context context = new ContextBase();
context.put("visionOid", this.getFields().get("visionOid"));
context.put("frequency", this.getFields().get("frequency"));
context.put("startYearDate", this.getFields().get("year"));
context.put("endYearDate", this.getFields().get("year"));
context.put("dateType", this.getFields().get("dateType"));
context.put("dataFor", BscConstants.MEASURE_DATA_FOR_EMPLOYEE);
EmployeeVO employee = new EmployeeVO();
employee.setOid( this.getFields().get("employeeOid") );
DefaultResult<EmployeeVO> result = this.employeeService.findObjectByOid(employee);
if (result.getValue()==null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
employee = result.getValue();
context.put("empId", employee.getEmpId() );
context.put("account", employee.getAccount() );
context.put("orgId", BscConstants.MEASURE_DATA_ORGANIZATION_FULL );
context.put("uploadSignatureOid", this.getFields().get("uploadSignatureOid") );
return context;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:23,代码来源:PersonalReportContentQueryAction.java
示例6: getChainContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Context getChainContext() throws Exception {
Context context = new ContextBase();
context.put("visionOid", this.getFields().get("visionOid"));
context.put("frequency", this.getFields().get("frequency"));
context.put("startYearDate", this.getFields().get("year"));
context.put("endYearDate", this.getFields().get("year"));
context.put("dateType", this.getFields().get("dateType"));
context.put("dataFor", BscConstants.MEASURE_DATA_FOR_ORGANIZATION);
OrganizationVO organization = new OrganizationVO();
organization.setOid( this.getFields().get("organizationOid") );
DefaultResult<OrganizationVO> result = this.organizationService.findObjectByOid(organization);
if ( result.getValue() == null ) {
throw new ServiceException(result.getSystemMessage().getValue());
}
organization = result.getValue();
context.put("empId", BscConstants.MEASURE_DATA_EMPLOYEE_FULL );
context.put("orgId", organization.getOrgId() );
context.put("uploadSignatureOid", this.getFields().get("uploadSignatureOid") );
return context;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:22,代码来源:DepartmentReportContentQueryAction.java
示例7: getChainContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@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;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:17,代码来源:RegionMapRelationKpisAction.java
示例8: getChainContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Context getChainContext() throws Exception {
Context context = new ContextBase();
context.put("visionOid", this.getFields().get("visionOid"));
context.put("organizationOid", this.getFields().get("organizationOid"));
context.put("strengthsName", this.getText("TPL.BSC_PROG002D0008Q_s"));
context.put("weaknessesName", this.getText("TPL.BSC_PROG002D0008Q_w"));
context.put("opportunitiesName", this.getText("TPL.BSC_PROG002D0008Q_o"));
context.put("threatsName", this.getText("TPL.BSC_PROG002D0008Q_t"));
return context;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:12,代码来源:SwotContentQueryAction.java
示例9: testSame
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
public void testSame() throws Exception {
WrappingLookupCommand command = new WrappingLookupCommand();
Context testContext = new ContextBase();
Context wrapped = command.getContext(testContext);
assertNotNull(wrapped);
assertSame(testContext, wrapped);
}
开发者ID:SonarSource,项目名称:sonar-scanner-maven,代码行数:10,代码来源:TestWrappingLookupCommand.java
示例10: getContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@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;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:29,代码来源:PerspectivesDashboardAction.java
示例11: generateKpiPeriodTrendsExcel
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
public static String generateKpiPeriodTrendsExcel(List<PeriodTrendsData<KpiVO>> periodDatas,
String currentPeriodDateRange, String previousPeriodDateRange) throws Exception {
Context context = new ContextBase();
context.put("periodDatas", periodDatas);
context.put("currentPeriodDateRange", currentPeriodDateRange);
context.put("previousPeriodDateRange", previousPeriodDateRange);
SimpleChain chain = new SimpleChain();
ChainResultObj resultObj = chain.getResultFromResource("kpiPeriodTrendsExcelCommandExcelContentChain", context);
if ( !(resultObj.getValue() instanceof String) ) {
throw new java.lang.IllegalStateException( "kpiPeriodTrendsExcelCommandExcelContentChain error!" );
}
return (String)resultObj.getValue();
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:14,代码来源:PeriodTrendsCalUtils.java
示例12: loadTreeItems
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void loadTreeItems() throws ServiceException, Exception {
Context context = new ContextBase();
context.put("http", this.getHttpServletRequest().getScheme()+"://");
SimpleChain chain = new SimpleChain();
ChainResultObj result = chain.getResultFromResource("kpiTreeItemsChain", context);
this.message = super.defaultString( result.getMessage() );
if (result.getValue() != null && result.getValue() instanceof List) {
this.items = (List<Map<String, Object>>)result.getValue();
}
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:12,代码来源:KpiTreeJsonAction.java
示例13: getContent
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void getContent() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
Context pdcaContext = new ContextBase();
pdcaContext.put("pdcaOid", this.getFields().get("pdcaOid"));
SimpleChain chain = new SimpleChain();
ChainResultObj pdcaReportObj = chain.getResultFromResource("pdcaReportHtmlContentChain", pdcaContext);
List<ChainResultObj> bscReportResults = null;
if ("true".equals(this.getFields().get("showBscReport"))) {
bscReportResults = this.getBscReportContent( "kpiReportHtmlContentChain" );
}
if ( pdcaReportObj.getValue() instanceof String ) {
this.body = String.valueOf(pdcaReportObj.getValue());
this.pdca = (PdcaVO) pdcaContext.get("pdca");
}
this.message = super.defaultString(pdcaReportObj.getMessage()).trim();
for (int i=0; bscReportResults!=null && i<bscReportResults.size(); i++) {
ChainResultObj bscReportObj = bscReportResults.get(i);
if ( bscReportObj.getValue() instanceof String ) {
this.body += String.valueOf(bscReportObj.getValue());
}
if (!this.message.equals(bscReportObj.getMessage())) {
if (!"".equals(this.message)) {
this.message += super.getHtmlBr();
}
this.message += bscReportObj.getMessage();
}
}
if (!StringUtils.isBlank(this.body)) {
this.success = IS_YES;
}
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:35,代码来源:PdcaReportContentQueryAction.java
示例14: getBscReportChainContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Context getBscReportChainContext(String pdcaOid, String visionOid, PdcaMeasureFreqVO measureFreq) throws Exception {
Context context = new ContextBase();
context.put("visionOid", visionOid);
context.put("startDate", SimpleUtils.getStrYMD(measureFreq.getStartDate(), "/"));
context.put("endDate", SimpleUtils.getStrYMD(measureFreq.getEndDate(), "/"));
context.put("startYearDate", SimpleUtils.getStrYMD(measureFreq.getStartDate(), "/"));
context.put("endYearDate", SimpleUtils.getStrYMD(measureFreq.getEndDate(), "/"));
context.put("frequency", measureFreq.getFreq());
context.put("dataFor", measureFreq.getDataType());
context.put("orgId", measureFreq.getOrgId());
context.put("empId", measureFreq.getEmpId());
context.put("account", "");
context.put("ngVer", YesNo.NO);
List<String> kpiIds = new ArrayList<String>();
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("pdcaOid", pdcaOid);
List<BbPdcaKpis> pdcaKpisList = this.pdcaKpisService.findListByParams(paramMap);
for (BbPdcaKpis pdcaKpi : pdcaKpisList) {
kpiIds.add( pdcaKpi.getKpiId() );
}
context.put("kpiIds", kpiIds); // 只顯示,要顯示的KPI
return context;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:28,代码来源:PdcaReportContentQueryAction.java
示例15: getResultFromClass
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
public ChainResultObj getResultFromClass(Class<Command>[] clazz) throws Exception {
Context context = new ContextBase();
return this.getResultFromClass(clazz, context);
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:5,代码来源:SimpleChain.java
示例16: getResultFromResource
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
public ChainResultObj getResultFromResource(String commandName) throws Exception {
Context context = new ContextBase();
return this.getResultFromResource(commandName, context);
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:5,代码来源:SimpleChain.java
示例17: getResultForExcel
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
public static String getResultForExcel(
String tsaOid,
String visionOid, String startDate, String endDate,
String startYearDate, String endYearDate, String frequency, String dataFor,
String measureDataOrganizationOid, String measureDataEmployeeOid,
String visionDateRangeChartPngData,
String perspectiveDateRangeChartPngData,
String objectiveDateRangeChartPngData,
String dateRangeChartPngData) throws ServiceException, Exception {
VisionVO vision = getResult(
tsaOid, visionOid, startDate, endDate, startYearDate, endYearDate, frequency, dataFor, measureDataOrganizationOid, measureDataEmployeeOid);
TsaVO tsa = getParam(tsaOid);
List<BbTsaMaCoefficients> coefficients = getCoefficients(tsa);
Context context = new ContextBase();
context.put("tsaVisionResult", vision);
context.put("tsa", tsa);
context.put("coefficients", coefficients);
// for show only.
context.put("visionName", vision.getTitle());
if (BscMeasureDataFrequency.FREQUENCY_YEAR.equals(frequency) || BscMeasureDataFrequency.FREQUENCY_HALF_OF_YEAR.equals(frequency)
|| BscMeasureDataFrequency.FREQUENCY_QUARTER.equals(frequency)) {
context.put("date1", startYearDate);
context.put("date2", endYearDate);
} else {
context.put("date1", startDate);
context.put("date2", endDate);
}
context.put("frequencyName", BscMeasureDataFrequency.getFrequencyMap(false).get(frequency));
context.put("dataFor", dataFor);
context.put("organizationName", "");
context.put("employeeName", "");
if (!Constants.HTML_SELECT_NO_SELECT_ID.equals(measureDataOrganizationOid) && !StringUtils.isBlank(measureDataOrganizationOid)) {
context.put("organizationName", BscBaseLogicServiceCommonSupport.findOrganizationData(organizationService, measureDataOrganizationOid).getName() );
}
if (!Constants.HTML_SELECT_NO_SELECT_ID.equals(measureDataEmployeeOid) && !StringUtils.isBlank(measureDataEmployeeOid)) {
context.put("employeeName", BscBaseLogicServiceCommonSupport.findEmployeeData(employeeService, measureDataEmployeeOid).getFullName() );
}
context.put("visionDateRangeChartPngData", visionDateRangeChartPngData);
context.put("perspectiveDateRangeChartPngData", perspectiveDateRangeChartPngData);
context.put("objectiveDateRangeChartPngData", objectiveDateRangeChartPngData);
context.put("dateRangeChartPngData", dateRangeChartPngData);
SimpleChain chain = new SimpleChain();
ChainResultObj resultObj = chain.getResultFromResource("timeSeriesAnalysisExcelCommandContentChain", context);
if ( !(resultObj.getValue() instanceof String) ) {
throw new java.lang.IllegalStateException( "timeSeriesAnalysisExcelCommandContentChain error!" );
}
return (String)resultObj.getValue();
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:52,代码来源:TimeSeriesAnalysisUtils.java
示例18: getVisionCard
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
public static List<VisionVO> getVisionCard(String frequency, String startDate,
String endDate) throws ServiceException, Exception {
List<VisionVO> visionScores = new ArrayList<VisionVO>();
Map<String, String> visions = visionService.findForMap(false);
if (null == visions || visions.size() < 1) {
return visionScores;
}
Context context = new ContextBase();
context.put("startDate", startDate);
context.put("endDate", endDate);
context.put("startYearDate", startDate.substring(0, 4));
context.put("endYearDate", endDate.substring(0, 4));
context.put("frequency", frequency);
context.put("dataFor", BscConstants.MEASURE_DATA_FOR_ALL);
context.put("orgId", BscConstants.MEASURE_DATA_ORGANIZATION_FULL);
context.put("empId", BscConstants.MEASURE_DATA_EMPLOYEE_FULL);
for (Map.Entry<String, String> entry : visions.entrySet()) {
String visionOid = entry.getKey();
context.put("visionOid", visionOid);
SimpleChain chain = new SimpleChain();
ChainResultObj resultObj = chain.getResultFromResource("performanceScoreChain", context);
BscStructTreeObj treeObj = (BscStructTreeObj)resultObj.getValue();
for (int i=0; treeObj.getVisions()!=null && i<treeObj.getVisions().size(); i++) {
VisionVO vision = treeObj.getVisions().get(i);
vision.setContent( " ".getBytes() );
DefaultResult<VisionVO> vResult = visionService.findObjectByOid(vision);
if (vResult.getValue()!=null) { // 計算分數chain 取出的vision資料沒有放 content 欄位, 但這邊要用到, 所以取出content欄位
vision.setContent( new String(vResult.getValue().getContent(), Constants.BASE_ENCODING).getBytes() );
}
for (PerspectiveVO perspective : vision.getPerspectives()) {
for (ObjectiveVO objective : perspective.getObjectives()) {
for (KpiVO kpi : objective.getKpis()) { // 產生報表不需要以下欄位
kpi.getAggregationMethod().setDescription( " " );
kpi.getAggregationMethod().setExpression1( " " );
kpi.getAggregationMethod().setExpression2( " " );
kpi.getFormula().setExpression( " " );
}
}
}
visionScores.add( vision );
}
}
return visionScores;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:45,代码来源:BscMobileCardUtils.java
示例19: getChainContext
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Context getChainContext() throws Exception {
Context context = new ContextBase();
context.put("visionOid", this.visionOid);
return context;
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:7,代码来源:StrategyMapManagementAction.java
示例20: ActionContextBase
import org.apache.commons.chain.impl.ContextBase; //导入依赖的package包/类
/**
* Instantiate ActionContextBase, wrapping a default ContextBase
* instance.
*/
public ActionContextBase() {
this(new ContextBase());
}
开发者ID:SonarSource,项目名称:sonar-scanner-maven,代码行数:8,代码来源:ActionContextBase.java
注:本文中的org.apache.commons.chain.impl.ContextBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论