當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。