本文整理汇总了Java中net.sf.jasperreports.engine.ParameterContributorContext类的典型用法代码示例。如果您正苦于以下问题:Java ParameterContributorContext类的具体用法?Java ParameterContributorContext怎么用?Java ParameterContributorContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ParameterContributorContext类属于net.sf.jasperreports.engine包,在下文中一共展示了ParameterContributorContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getContributors
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的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;
}
示例2: getParameterContributors
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的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;
}
示例3: createService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
@Override
public DataFileService createService(ParameterContributorContext context, DataFile dataFile)
{
if (dataFile instanceof RepositoryDataLocation)
{
return new RepositoryDataLocationService(context, (RepositoryDataLocation) dataFile);
}
if (dataFile instanceof HttpDataLocation)
{
return new HttpDataService(context, (HttpDataLocation) dataFile);
}
return null;
}
示例4: XmlDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public XmlDataAdapterService(
ParameterContributorContext paramContribContext,
XmlDataAdapter xmlDataAdapter
)
{
super(paramContribContext, xmlDataAdapter);
}
示例5: DataSourceProviderDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public DataSourceProviderDataAdapterService(
ParameterContributorContext paramContribContext,
DataSourceProviderDataAdapter dsDataAdapter
)
{
super(paramContribContext, dsDataAdapter);
}
示例6: contributeParameters
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的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);
}
}
}
示例7: dataAdapterQualification
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
protected String dataAdapterQualification(JRDataset dataset, DataAdapter dataAdapter)
{
ParameterContributorContext contributorContext = new ParameterContributorContext(context,
dataset, Collections.<String, Object>emptyMap());
DataAdapterServiceUtil serviceUtil = DataAdapterServiceUtil.getInstance(contributorContext);
DataAdapterService service = serviceUtil.getService(dataAdapter);
return service instanceof Designated ? ((Designated) service).getDesignation() : null;
}
示例8: instance
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
public static DataFileResolver instance(ParameterContributorContext context)
{
// not caching for now
return new DataFileResolver(context);
}
示例9: DataFileResolver
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
protected DataFileResolver(ParameterContributorContext context)
{
this.context = context;
}
示例10: JndiDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public JndiDataAdapterService(ParameterContributorContext paramContribContext, JndiDataAdapter jndiDataAdapter)
{
super(paramContribContext, jndiDataAdapter);
}
示例11: ExcelDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public ExcelDataAdapterService(ParameterContributorContext paramContribContext, ExcelDataAdapter excelDataAdapter)
{
super(paramContribContext, excelDataAdapter);
}
示例12: QueryExecuterDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public QueryExecuterDataAdapterService(ParameterContributorContext paramContribContext, QueryExecuterDataAdapter qeDataAdapter)
{
super(paramContribContext, qeDataAdapter);
}
示例13: AbstractClasspathAwareDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public AbstractClasspathAwareDataAdapterService(ParameterContributorContext paramContribContext, ClasspathAwareDataAdapter dataAdapter)
{
super(paramContribContext, dataAdapter);
}
示例14: XmlaDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public XmlaDataAdapterService(ParameterContributorContext paramContribContext, XmlaDataAdapter dataAdapter)
{
super(paramContribContext, dataAdapter);
}
示例15: XlsxDataAdapterService
import net.sf.jasperreports.engine.ParameterContributorContext; //导入依赖的package包/类
/**
*
*/
public XlsxDataAdapterService(ParameterContributorContext paramContribContext, XlsxDataAdapter xlsxDataAdapter)
{
super(paramContribContext, xlsxDataAdapter);
}