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


Java ParameterContributor类代码示例

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


ParameterContributor类属于net.sf.jasperreports.engine包,在下文中一共展示了ParameterContributor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getContributors

import net.sf.jasperreports.engine.ParameterContributor; //导入依赖的package包/类
@Override
public List<ParameterContributor> getContributors(ParameterContributorContext context) throws JRException
{
	List<ParameterContributor> contributors = new ArrayList<ParameterContributor>();

	String dataAdapterUri = JRPropertiesUtil.getInstance(context.getJasperReportsContext()).getProperty(context.getDataset(), PROPERTY_DATA_ADAPTER_LOCATION); 
	if (dataAdapterUri != null)
	{
		DataAdapterResource dataAdapterResource = RepositoryUtil.getInstance(context.getJasperReportsContext()).getResourceFromLocation(dataAdapterUri, DataAdapterResource.class);
		ParameterContributor dataAdapterService = DataAdapterServiceUtil.getInstance(context).getService(dataAdapterResource.getDataAdapter());
		
		return Collections.singletonList(dataAdapterService);
	}

	return contributors;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:DataAdapterParameterContributorFactory.java

示例2: getParameterContributors

import net.sf.jasperreports.engine.ParameterContributor; //导入依赖的package包/类
/**
 *
 */
private List<ParameterContributor> getParameterContributors(ParameterContributorContext context) throws JRException
{
	List<ParameterContributor> allContributors = null;
	List<?> factories = getJasperReportsContext().getExtensions(ParameterContributorFactory.class);
	if (factories != null && factories.size() > 0)
	{
		allContributors = new ArrayList<ParameterContributor>();
		for (Iterator<?> it = factories.iterator(); it.hasNext();)
		{
			ParameterContributorFactory factory = (ParameterContributorFactory)it.next();
			List<ParameterContributor> contributors = factory.getContributors(context);
			if (contributors != null)
			{
				allContributors.addAll(contributors);
			}
		}
	}
	return allContributors;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:JRFillDataset.java

示例3: contributeParameters

import net.sf.jasperreports.engine.ParameterContributor; //导入依赖的package包/类
/**
 * 
 */
public void contributeParameters(Map<String,Object> parameterValues) throws JRException
{
	parameterContributors = getParameterContributors(new ParameterContributorContext(getJasperReportsContext(), this, parameterValues));
	if (parameterContributors != null)
	{
		for(ParameterContributor contributor : parameterContributors)
		{
			contributor.contributeParameters(parameterValues);
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:15,代码来源:JRFillDataset.java

示例4: disposeParameterContributors

import net.sf.jasperreports.engine.ParameterContributor; //导入依赖的package包/类
/**
 * 
 */
public void disposeParameterContributors()
{
	if (parameterContributors != null)
	{
		for(ParameterContributor contributor : parameterContributors)
		{
			contributor.dispose();
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:14,代码来源:JRFillDataset.java

示例5: getContributors

import net.sf.jasperreports.engine.ParameterContributor; //导入依赖的package包/类
@Override
public List<ParameterContributor> getContributors(ParameterContributorContext context) throws JRException
{
	return Collections.<ParameterContributor>singletonList(new HeaderToolbarParameterContributor(context));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:HeaderToolbarParameterContributorFactory.java

示例6: getContributors

import net.sf.jasperreports.engine.ParameterContributor; //导入依赖的package包/类
@Override
public List<ParameterContributor> getContributors(ParameterContributorContext context) throws JRException
{
	return Collections.<ParameterContributor>singletonList(new SortParameterContributor(context));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:SortParameterContributorFactory.java


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