Java 类net.sf.jasperreports.engine.ParameterContributorContext 实例源码

项目:jasperreports    文件:DataAdapterParameterContributorFactory.java   
@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;
}
项目:jasperreports    文件:JRFillDataset.java   
/**
 *
 */
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;
}
项目:jasperreports    文件:BuiltinDataFileServiceFactory.java   
@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;
}
项目:jasperreports    文件:XmlDataAdapterService.java   
/**
 * 
 */
public XmlDataAdapterService(
    ParameterContributorContext paramContribContext,
    XmlDataAdapter xmlDataAdapter
    ) 
{
    super(paramContribContext, xmlDataAdapter);
}
项目:jasperreports    文件:DataSourceProviderDataAdapterService.java   
/**
 * 
 */
public DataSourceProviderDataAdapterService(
    ParameterContributorContext paramContribContext,
    DataSourceProviderDataAdapter dsDataAdapter
    ) 
{
    super(paramContribContext, dsDataAdapter);
}
项目:jasperreports    文件:JRFillDataset.java   
/**
 * 
 */
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);
        }
    }
}
项目:jasperreports    文件:PropertiesMetadataUtil.java   
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;
}
项目:jasperreports    文件:DataFileResolver.java   
public static DataFileResolver instance(ParameterContributorContext context)
{
    // not caching for now
    return new DataFileResolver(context);
}
项目:jasperreports    文件:DataFileResolver.java   
protected DataFileResolver(ParameterContributorContext context)
{
    this.context = context;
}
项目:jasperreports    文件:JndiDataAdapterService.java   
/**
 * 
 */
public JndiDataAdapterService(ParameterContributorContext paramContribContext, JndiDataAdapter jndiDataAdapter)
{
    super(paramContribContext, jndiDataAdapter);
}
项目:jasperreports    文件:ExcelDataAdapterService.java   
/**
 * 
 */
public ExcelDataAdapterService(ParameterContributorContext paramContribContext, ExcelDataAdapter excelDataAdapter)
{
    super(paramContribContext, excelDataAdapter);
}
项目:jasperreports    文件:QueryExecuterDataAdapterService.java   
/**
 * 
 */
public QueryExecuterDataAdapterService(ParameterContributorContext paramContribContext, QueryExecuterDataAdapter qeDataAdapter)
{
    super(paramContribContext, qeDataAdapter);
}
项目:jasperreports    文件:AbstractClasspathAwareDataAdapterService.java   
/**
 *
 */
public AbstractClasspathAwareDataAdapterService(ParameterContributorContext paramContribContext, ClasspathAwareDataAdapter dataAdapter) 
{
    super(paramContribContext, dataAdapter);
}
项目:jasperreports    文件:XmlaDataAdapterService.java   
/**
 * 
 */
public XmlaDataAdapterService(ParameterContributorContext paramContribContext, XmlaDataAdapter dataAdapter) 
{
    super(paramContribContext, dataAdapter);
}
项目:jasperreports    文件:XlsxDataAdapterService.java   
/**
 * 
 */
public XlsxDataAdapterService(ParameterContributorContext paramContribContext, XlsxDataAdapter xlsxDataAdapter)
{
    super(paramContribContext, xlsxDataAdapter);
}
项目:jasperreports    文件:DataFileUtils.java   
public static DataFileUtils instance(ParameterContributorContext paramContribContext)
{
    return new DataFileUtils(paramContribContext);
}
项目:jasperreports    文件:DataFileUtils.java   
protected DataFileUtils(ParameterContributorContext paramContribContext)
{
    super();
    this.paramContribContext = paramContribContext;
}
项目:jasperreports    文件:DataFileUtils.java   
/**
 * @deprecated Replaced by {@link #DataFileUtils(ParameterContributorContext)}.
 */
protected DataFileUtils(JasperReportsContext jasperReportsContext)
{
    this(new ParameterContributorContext(jasperReportsContext, null, null));
}
项目:jasperreports    文件:JdbcDataAdapterService.java   
/**
 * 
 */
public JdbcDataAdapterService(ParameterContributorContext paramContribContext, JdbcDataAdapter jdbcDataAdapter) 
{
    super(paramContribContext, jdbcDataAdapter);
}
项目:jasperreports    文件:AbstractXlsDataAdapterService.java   
/**
 * 
 */
public AbstractXlsDataAdapterService(ParameterContributorContext paramContribContext, XlsDataAdapter xlsDataAdapter)
{
    super(paramContribContext, xlsDataAdapter);
}
项目:jasperreports    文件:XlsDataAdapterService.java   
/**
 * 
 */
public XlsDataAdapterService(ParameterContributorContext paramContribContext, XlsDataAdapter xlsDataAdapter)
{
    super(paramContribContext, xlsDataAdapter);
}
项目:jasperreports    文件:JsonDataAdapterService.java   
/**
 * 
 */
public JsonDataAdapterService(ParameterContributorContext paramContribContext, JsonDataAdapter jsonDataAdapter)
{
    super(paramContribContext, jsonDataAdapter);
}
项目:jasperreports    文件:HttpDataService.java   
public HttpDataService(ParameterContributorContext context, HttpDataLocation dataLocation)
{
    this.context = context;
    this.dataLocation = dataLocation;
}
项目:jasperreports    文件:DefaultDataAdapterServiceFactory.java   
/**
 * @deprecated Replaced by {@link #getDataAdapterService(ParameterContributorContext, DataAdapter)}.
 */
@Override
public DataAdapterService getDataAdapterService(JasperReportsContext jasperReportsContext, DataAdapter dataAdapter)
{
    return getDataAdapterService(new ParameterContributorContext(jasperReportsContext, null, null), dataAdapter);
}
项目:jasperreports    文件:SpringHibernateDataAdapterService.java   
/**
 * 
 */
public SpringHibernateDataAdapterService(ParameterContributorContext paramContribContext, SpringHibernateDataAdapter jsonDataAdapter) 
{
    super(paramContribContext, jsonDataAdapter);
}
项目:jasperreports    文件:HibernateDataAdapterService.java   
/**
 * 
 */
public HibernateDataAdapterService(ParameterContributorContext paramContribContext, HibernateDataAdapter jsonDataAdapter) 
{
    super(paramContribContext, jsonDataAdapter);
}
项目:jasperreports    文件:DataAdapterServiceUtil.java   
/**
 *
 */
private DataAdapterServiceUtil(ParameterContributorContext paramContribContext)
{
    this.paramContribContext = paramContribContext;
}
项目:jasperreports    文件:DataAdapterServiceUtil.java   
/**
 *
 */
public static DataAdapterServiceUtil getInstance(ParameterContributorContext paramContribContext)
{
    return new DataAdapterServiceUtil(paramContribContext);
}
项目:jasperreports    文件:DataAdapterServiceUtil.java   
/**
 * @deprecated Replaced by {@link #getInstance(ParameterContributorContext)}.
 */
public static DataAdapterServiceUtil getInstance(JasperReportsContext jasperReportsContext)
{
    return getInstance(new ParameterContributorContext(jasperReportsContext, null, null));
}
项目:jasperreports    文件:EjbqlDataAdapterService.java   
/**
 * 
 */
public EjbqlDataAdapterService(ParameterContributorContext paramContribContext, EjbqlDataAdapter jsonDataAdapter) 
{
    super(paramContribContext, jsonDataAdapter);
}
项目:jasperreports    文件:DataSourceDataAdapterService.java   
/**
 * 
 */
public DataSourceDataAdapterService(ParameterContributorContext paramContribContext, DataSourceDataAdapter dsDataAdapter) 
{
    super(paramContribContext, dsDataAdapter);
}
项目:jasperreports    文件:BeanDataAdapterService.java   
/**
 * 
 */
public BeanDataAdapterService(ParameterContributorContext paramContribContext, BeanDataAdapter beanDataAdapter) 
{
    super(paramContribContext, beanDataAdapter);
}
项目:jasperreports    文件:RepositoryDataLocationService.java   
public RepositoryDataLocationService(ParameterContributorContext context, RepositoryDataLocation dataLocation)
{
    this.repository = RepositoryUtil.getInstance(context.getJasperReportsContext());
    this.dataLocation = dataLocation;
}
项目:jasperreports    文件:AbstractDataAdapterService.java   
/**
 *
 */
public AbstractDataAdapterService(ParameterContributorContext paramContribContext, DataAdapter dataAdapter)
{
    this.dataAdapter = dataAdapter;
    this.paramContribContext = paramContribContext;
}
项目:jasperreports    文件:AbstractDataAdapterService.java   
/**
 * @deprecated Replaced by {@link #AbstractDataAdapterService(ParameterContributorContext, DataAdapter)}.
 */
public AbstractDataAdapterService(JasperReportsContext jasperReportsContext, DataAdapter dataAdapter)
{
    this(new ParameterContributorContext(jasperReportsContext, null, null), dataAdapter);
}
项目:jasperreports    文件:AbstractDataAdapterService.java   
/**
 *
 */
public ParameterContributorContext getParameterContributorContext()
{
    return paramContribContext;
}
项目:jasperreports    文件:EmptyDataAdapterService.java   
/**
 * 
 */
public EmptyDataAdapterService(ParameterContributorContext paramContribContext, EmptyDataAdapter emptyDataAdapter)
{
    super(paramContribContext, emptyDataAdapter);
}
项目:jasperreports    文件:MondrianDataAdapterService.java   
/**
 * 
 */
public MondrianDataAdapterService(
        ParameterContributorContext paramContribContext,
        MondrianDataAdapter jdbcDataAdapter) {
    super(paramContribContext, jdbcDataAdapter);
}
项目:jasperreports    文件:CsvDataAdapterService.java   
/**
 * 
 */
public CsvDataAdapterService(ParameterContributorContext paramContribContext, CsvDataAdapter csvDataAdapter)
{
    super(paramContribContext, csvDataAdapter);
}
项目:jasperreports    文件:HeaderToolbarParameterContributor.java   
public HeaderToolbarParameterContributor (ParameterContributorContext context)
{
    this.context = context;
}