当前位置: 首页>>代码示例>>Java>>正文


Java ContextBase类代码示例

本文整理汇总了Java中org.apache.commons.chain.impl.ContextBase的典型用法代码示例。如果您正苦于以下问题:Java ContextBase类的具体用法?Java ContextBase怎么用?Java ContextBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ContextBase类属于org.apache.commons.chain.impl包,在下文中一共展示了ContextBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的org.apache.commons.chain.impl.ContextBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。