本文整理汇总了Java中net.sf.jasperreports.engine.JRParameter.isSystemDefined方法的典型用法代码示例。如果您正苦于以下问题:Java JRParameter.isSystemDefined方法的具体用法?Java JRParameter.isSystemDefined怎么用?Java JRParameter.isSystemDefined使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.engine.JRParameter
的用法示例。
在下文中一共展示了JRParameter.isSystemDefined方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPromptingParameters
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
protected Map<QName, Object> getPromptingParameters(){
JRParameter[] params = dataset.getParameters();
Map<QName, Object> expressionParameters = new HashMap<QName, Object>();
for (JRParameter param : params){
if (param.isSystemDefined()){
continue;
}
if (!param.isForPrompting()){
continue;
}
//LOGGER.trace(((JRBaseParameter)param).getName());
Object v = getParameterValue(param.getName());
try{
expressionParameters.put(new QName(param.getName()), new PrismPropertyValue(v));
} catch (Exception e){
//just skip properties that are not important for midpoint
}
LOGGER.trace("p.val: {}", v);
}
return expressionParameters;
}
示例2: JRBaseParameter
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
/**
*
*/
protected JRBaseParameter(JRParameter parameter, JRBaseObjectFactory factory)
{
factory.put(parameter, this);
name = parameter.getName();
description = parameter.getDescription();
valueClassName = parameter.getValueClassName();
nestedTypeName = parameter.getNestedTypeName();
isSystemDefined = parameter.isSystemDefined();
isForPrompting = parameter.isForPrompting();
evaluationTime = parameter.getEvaluationTime();
defaultValueExpression = factory.getExpression(parameter.getDefaultValueExpression());
propertiesMap = parameter.getPropertiesMap().cloneProperties();
}
示例3: getParameters
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
protected Map<QName, Object> getParameters(){
JRParameter[] params = dataset.getParameters();
Map<QName, Object> expressionParameters = new HashMap<QName, Object>();
for (JRParameter param : params){
if (param.isSystemDefined()){
continue;
}
//LOGGER.trace(((JRBaseParameter)param).getName());
Object v = getParameterValue(param.getName());
try{
expressionParameters.put(new QName(param.getName()), new PrismPropertyValue(v));
} catch (Exception e){
//just skip properties that are not important for midpoint
}
LOGGER.trace("p.val: {}", v);
}
return expressionParameters;
}
示例4: verifyParameters
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
/**
*
*/
private void verifyParameters(JRDesignDataset dataset)
{
JRParameter[] parameters = dataset.getParameters();
if (parameters != null && parameters.length > 0)
{
for(int index = 0; index < parameters.length; index++)
{
JRParameter parameter = parameters[index];
Object errorSource = parameter;
if (parameter.isSystemDefined())
{
errorSource = jasperDesign;
}
if (parameter.getName() == null || parameter.getName().trim().length() == 0)
{
addBrokenRule("Parameter name missing.", errorSource);
}
if (parameter.getValueClassName() == null)
{
addBrokenRule("Class not set for parameter : " + parameter.getName(), errorSource);
}
}
}
}
示例5: removeBuiltinParameters
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
private void removeBuiltinParameters(Object[] builtinParameters)
{
for (int i = 0; i < builtinParameters.length; i += 2)
{
String parameterName = (String) builtinParameters[i];
JRParameter parameter = parametersMap.get(parameterName);
if (parameter != null && parameter.isSystemDefined())
{
removeParameter(parameter);
}
}
}
示例6: evaluateParameterDefaultValues
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
/**
* Evaluates the default values for the parameters of a report.
*
* @param report the report
* @param initialParameters initial parameter value map
* @return a map containing parameter values indexed by parameter names
* @throws JRException
*/
public static Map<String,Object> evaluateParameterDefaultValues(JasperReportsContext jasperReportsContext, JasperReport report, Map<String,Object> initialParameters) throws JRException
{
Map<String,Object> valuesMap = initialParameters == null ? new HashMap<String,Object>() : new HashMap<String,Object>(initialParameters);
valuesMap.put(JRParameter.JASPER_REPORT, report);
ObjectFactory factory = new ObjectFactory();
JRDataset reportDataset = report.getMainDataset();
JRFillDataset fillDataset = factory.getDataset(reportDataset);
fillDataset.setJasperReportsContext(LocalJasperReportsContext.getLocalContext(jasperReportsContext, initialParameters));
fillDataset.createCalculator(report);
fillDataset.initCalculator();
JRResourcesFillUtil.ResourcesFillContext resourcesContext =
JRResourcesFillUtil.setResourcesFillContext(valuesMap);
try
{
fillDataset.setParameterValues(valuesMap);
Map<String,Object> parameterValues = new HashMap<String,Object>();
JRParameter[] parameters = reportDataset.getParameters();
for (int i = 0; i < parameters.length; i++)
{
JRParameter param = parameters[i];
if (!param.isSystemDefined())
{
String name = param.getName();
Object value = fillDataset.getParameterValue(name);
parameterValues.put(name, value);
}
}
return parameterValues;
}
finally
{
fillDataset.disposeParameterContributors();
JRResourcesFillUtil.revertResourcesFillContext(resourcesContext);
}
}