void addColumnStyles(
      final ImageElementContext context,
      final Section columns,
      final int columnPos,
      final int colSpan) {
    final Node[] columnDefs = columns.getNodeArray();
    int columnCounter = 0;
    for (Node columnDef : columnDefs) {
      final Element column = (Element) columnDef;

      if (!ObjectUtilities.equal(column.getNamespace(), OfficeNamespaces.TABLE_NS)
          || !ObjectUtilities.equal(column.getType(), OfficeToken.TABLE_COLUMN)) {
        continue;
      }
      if (columnCounter >= columnPos) {
        final String colStyle =
            (String) column.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);
        context.setColStyle(columnCounter - columnPos, colStyle);
      }

      columnCounter += 1;

      if (columnCounter >= (columnPos + colSpan)) {
        break;
      }
    }
  }
  /**
   * Starts parsing.
   *
   * @param attrs the attributes.
   * @throws SAXException if there is a parsing error.
   */
  protected void startParsing(final Attributes attrs) throws SAXException {
    super.startParsing(attrs);
    namespace = attrs.getValue(getUri(), "namespace"); // NON-NLS
    if (namespace == null) {
      throw new ParseException("Attribute 'namespace' is undefined", getLocator());
    }

    namespacePrefix = attrs.getValue(getUri(), "namespace-prefix"); // NON-NLS
    if (namespacePrefix == null) {
      namespacePrefix = ElementTypeRegistry.getInstance().getNamespacePrefix(namespace);
    }
    mandatory = "true".equals(attrs.getValue(getUri(), "mandatory")); // NON-NLS
    computed = "true".equals(attrs.getValue(getUri(), "computed")); // NON-NLS
    transientFlag = "true".equals(attrs.getValue(getUri(), "transient")); // NON-NLS
    bulk = "true".equals(attrs.getValue(getUri(), "prefer-bulk")); // NON-NLS
    designTimeValue = "true".equals(attrs.getValue(getUri(), "design-time-value")); // NON-NLS

    final String valueTypeText = attrs.getValue(getUri(), "value-type"); // NON-NLS
    if (valueTypeText == null) {
      throw new ParseException("Attribute 'value-type' is undefined", getLocator());
    }
    try {
      final ClassLoader classLoader = ObjectUtilities.getClassLoader(getClass());
      valueType = Class.forName(valueTypeText, false, classLoader);
    } catch (Exception e) {
      throw new ParseException("Attribute 'value-type' is not valid", e, getLocator());
    }

    valueRole = attrs.getValue(getUri(), "value-role"); // NON-NLS
    if (valueRole == null) {
      valueRole = "Value"; // NON-NLS
    }

    propertyEditor = attrs.getValue(getUri(), "propertyEditor"); // NON-NLS

    final String metaDataCoreClass = attrs.getValue(getUri(), "impl"); // NON-NLS
    if (metaDataCoreClass != null) {
      attributeCore =
          ObjectUtilities.loadAndInstantiate(
              metaDataCoreClass, AttributeReadHandler.class, AttributeCore.class);
      if (attributeCore == null) {
        throw new ParseException(
            "Attribute 'impl' references a invalid AttributeCore implementation.", getLocator());
      }
    } else {
      attributeCore = new DefaultAttributeCore();
    }
  }
 /**
  * Creates a new export task.
  *
  * @param dialog the progress dialog that will monitor the report progress.
  * @param report the report that should be exported.
  */
 public ExcelExportTask(
     final MasterReport report,
     final ReportProgressDialog dialog,
     final SwingGuiContext swingGuiContext)
     throws ReportProcessingException {
   if (report == null) {
     throw new NullPointerException(
         "ExcelExportTask(..): Null report parameter not permitted"); //$NON-NLS-1$
   }
   this.fileName =
       report
           .getConfiguration()
           .getConfigProperty(
               "org.pentaho.reporting.engine.classic.core.modules.gui.xls.FileName"); //$NON-NLS-1$
   if (fileName == null) {
     throw new ReportProcessingException(
         "ExcelExportTask(): Filename is not defined"); //$NON-NLS-1$
   }
   this.progressDialog = dialog;
   this.report = report;
   if (swingGuiContext != null) {
     this.statusListener = swingGuiContext.getStatusListener();
     this.messages =
         new Messages(
             swingGuiContext.getLocale(),
             ExcelExportPlugin.BASE_RESOURCE_CLASS,
             ObjectUtilities.getClassLoader(ExcelExportPlugin.class));
   }
 }
 /** DefaultConstructor. */
 public ExcelExportPlugin() {
   resources =
       new ResourceBundleSupport(
           Locale.getDefault(),
           ExcelExportPlugin.BASE_RESOURCE_CLASS,
           ObjectUtilities.getClassLoader(ExcelExportPlugin.class));
 }
  private void loadData(final KettleDataFactory dataFactory, final String selectedQueryName) {
    if (dataFactory == null) {
      return;
    }

    KettleQueryEntry selectedDataSet = null;

    final String[] queryNames = dataFactory.getQueryNames();
    for (int i = 0; i < queryNames.length; i++) {
      final String queryName = queryNames[i];
      final KettleTransFromFileProducer producer =
          (KettleTransFromFileProducer) dataFactory.getQuery(queryName);

      final KettleQueryEntry dataSet = new KettleQueryEntry(queryName);
      dataSet.setFile(producer.getTransformationFile());
      dataSet.setSelectedStep(producer.getStepName());
      dataSet.setArguments(producer.getDefinedArgumentNames());
      dataSet.setParameters(producer.getDefinedVariableNames());
      queryListModel.addElement(dataSet);
      if (ObjectUtilities.equal(selectedQueryName, queryName)) {
        selectedDataSet = dataSet;
      }
    }

    queryNameList.setSelectedValue(selectedDataSet, true);
  }
 public PropertyEditor getEditor() {
   if (propertyEditorClass == null) {
     return null;
   }
   return ObjectUtilities.loadAndInstantiate(
       propertyEditorClass, DefaultAttributeMetaData.class, PropertyEditor.class);
 }
 private static boolean contains(final String key, final String[] haystack) {
   for (int i = 0; i < haystack.length; i++) {
     if (ObjectUtilities.equal(haystack[i], key)) {
       return true;
     }
   }
   return false;
 }
Example #8
0
public class Messages {
  private static final Log logger = LogFactory.getLog(Messages.class);
  private static ResourceBundleSupport bundle =
      new ResourceBundleSupport(
          Locale.getDefault(),
          "org.pentaho.reporting.ui.datasources.scriptable.messages",
          ObjectUtilities.getClassLoader(Messages.class));

  private Messages() {}

  /**
   * Formats the message stored in the resource bundle (using a MessageFormat).
   *
   * @param key the resourcebundle key
   * @param param1 the parameter for the message
   * @return the formated string
   */
  public static String getString(final String key, final Object... param1) {
    try {
      return bundle.formatMessage(key, param1);
    } catch (MissingResourceException e) {
      logger.warn("Missing localization: " + key, e);
      return '!' + key + '!';
    }
  }

  public static Icon getIcon(final String key, final boolean large) {
    return bundle.getIcon(key, large);
  }

  public static Icon getIcon(final String key) {
    return bundle.getIcon(key);
  }

  public static Integer getMnemonic(final String key) {
    return bundle.getMnemonic(key);
  }

  public static Integer getOptionalMnemonic(final String key) {
    return bundle.getOptionalMnemonic(key);
  }

  public static KeyStroke getKeyStroke(final String key) {
    return bundle.getKeyStroke(key);
  }

  public static KeyStroke getOptionalKeyStroke(final String key) {
    return bundle.getOptionalKeyStroke(key);
  }

  public static KeyStroke getKeyStroke(final String key, final int mask) {
    return bundle.getKeyStroke(key, mask);
  }

  public static KeyStroke getOptionalKeyStroke(final String key, final int mask) {
    return bundle.getOptionalKeyStroke(key, mask);
  }
}
  /**
   * Loads the default module description from the file "module.properties". This file must be in
   * the same package as the implementing class.
   *
   * @throws ModuleInitializeException if an error occurs.
   */
  protected void loadModuleInfo() throws ModuleInitializeException {
    final InputStream in =
        ObjectUtilities.getResourceRelativeAsStream("module.properties", getClass());
    if (in == null) {
      throw new ModuleInitializeException("File 'module.properties' not found in module package.");
    }

    loadModuleInfo(in);
  }
 public boolean initialize(final SwingGuiContext context) {
   super.initialize(context);
   resources =
       new ResourceBundleSupport(
           context.getLocale(),
           SwingPreviewModule.BUNDLE_NAME,
           ObjectUtilities.getClassLoader(SwingPreviewModule.class));
   return true;
 }
 /**
  * Tries to load a class to indirectly check for the existence of a certain library.
  *
  * @param name the name of the library class.
  * @param context the context class to get a classloader from.
  * @return true, if the class could be loaded, false otherwise.
  */
 protected static boolean isClassLoadable(final String name, final Class context) {
   try {
     final ClassLoader loader = ObjectUtilities.getClassLoader(context);
     Class.forName(name, false, loader);
     return true;
   } catch (Exception e) {
     return false;
   }
 }
    /**
     * Compares the object for equality.
     *
     * @return true, if the given object is a LightDefinition where both color and limit match,
     *     false otherwise.
     */
    public boolean equals(final Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }

      final LightDefinition that = (LightDefinition) o;

      if (ObjectUtilities.equal(color, that.color) == false) {
        return false;
      }
      if (ObjectUtilities.equal(limit, that.limit) == false) {
        return false;
      }

      return true;
    }
 /**
  * Set the property value by parsing a given String. May raise java.lang.IllegalArgumentException
  * if either the String is badly formatted or if this kind of property can't be expressed as text.
  *
  * @param text The string to be parsed.
  */
 public void setAsText(final String text) throws IllegalArgumentException {
   final Iterator iterator = tagMap.entrySet().iterator();
   while (iterator.hasNext()) {
     final Map.Entry o = (Map.Entry) iterator.next();
     if (ObjectUtilities.equal(o.getValue(), text)) {
       setValue(o.getKey());
       return;
     }
   }
   setValue(null);
 }
  /**
   * Done parsing.
   *
   * @throws org.xml.sax.SAXException if there is a parsing error.
   */
  public void doneParsing() throws SAXException {
    super.doneParsing();
    final String result = getResult();
    final String propertyName =
        CompatibilityMapperUtil.mapExpressionProperty(
            originalExpressionClass, expressionClass, this.propertyName);
    if (beanUtility == null) {
      throw new ParseException("No current beanUtility", getLocator());
    }
    try {
      if (propertyType != null) {
        final ClassLoader cl = ObjectUtilities.getClassLoader(ExpressionPropertyReadHandler.class);
        final Class c = Class.forName(propertyType, false, cl);
        beanUtility.setPropertyAsString(propertyName, c, result);
      } else {
        beanUtility.setPropertyAsString(propertyName, result);
      }
    } catch (BeanException e) {
      if (strictParsing) {
        throw new ParseException(
            "Unable to assign property '"
                + propertyName
                + "' to expression '"
                + expressionName
                + '\'',
            e,
            getLocator());
      }

      logger.warn(
          "Legacy-Parser warning: Unable to assign property '"
              + propertyName
              + "' to expression '"
              + expressionName
              + '\'',
          new ParseException(
              "Unable to assign property '"
                  + propertyName
                  + "' to expression '"
                  + expressionName
                  + '\'',
              e,
              getLocator()));
    } catch (ClassNotFoundException e) {
      throw new ParseException(
          "Unable to assign property '"
              + propertyName
              + "' to expression '"
              + expressionName
              + '\'',
          e,
          getLocator());
    }
  }
 public boolean initialize(final SwingGuiContext context) {
   super.initialize(context);
   resources =
       new ResourceBundleSupport(
           context.getLocale(),
           SwingPreviewModule.BUNDLE_NAME,
           ObjectUtilities.getClassLoader(SwingPreviewModule.class));
   eventSource = context.getEventSource();
   eventSource.addPropertyChangeListener(updateListener);
   revalidate();
   return true;
 }
 /**
  * Tests, whether the given parameter should be written in this template. This will return false,
  * if the parameter is not set, or the parent contains the same value.
  *
  * @param parameterName the name of the parameter that should be tested
  * @return true, if the parameter should be written, false otherwise.
  */
 private boolean shouldWriteParameter(final String parameterName) {
   final Object parameterObject = template.getParameter(parameterName);
   if (parameterObject == null) {
     // Log.debug ("Should not write: Parameter is null.");
     return false;
   }
   final Object parentObject = parent.getParameter(parameterName);
   if (ObjectUtilities.equal(parameterObject, parentObject)) {
     // Log.debug ("Should not write: Parameter objects are equal.");
     return false;
   }
   return true;
 }
  private int findNodeInSection(
      final Section tableRow, final Element tableCell, final String secondType) {
    int retval = 0;
    final Node[] nodes = tableRow.getNodeArray();
    final String namespace = tableCell.getNamespace();
    final String type = tableCell.getType();
    for (final Node node : nodes) {
      if (!(node instanceof Element)) {
        continue;
      }
      final Element child = (Element) node;
      if (!ObjectUtilities.equal(child.getNamespace(), namespace)
          || (!ObjectUtilities.equal(child.getType(), type)
              && (secondType == null || !ObjectUtilities.equal(child.getType(), secondType)))) {
        continue;
      }

      if (node == tableCell) {
        return retval;
      }
      retval += 1;
    }
    return -1;
  }
 /**
  * Executes an weakly referenced external initializer. The initializer will be loaded using
  * reflection and will be executed once. If the initializing fails with any exception, the module
  * will become unavailable.
  *
  * @param classname the classname of the <code>ModuleInitializer</code> implementation
  * @param context the class-loader context from where to load the module's classes.
  * @throws ModuleInitializeException if an error occured or the initializer could not be found.
  */
 protected void performExternalInitialize(final String classname, final Class context)
     throws ModuleInitializeException {
   try {
     final ModuleInitializer mi =
         ObjectUtilities.loadAndInstantiate(classname, context, ModuleInitializer.class);
     if (mi == null) {
       throw new ModuleInitializeException("Failed to load specified initializer class.");
     }
     mi.performInit();
   } catch (ModuleInitializeException mie) {
     throw mie;
   } catch (Exception e) {
     throw new ModuleInitializeException("Failed to load specified initializer class.", e);
   }
 }
  void addRowStyles(
      final ImageElementContext context, final Section table, final int rowPos, final int rowSpan) {
    final Node[] rows = table.getNodeArray();
    int rowCounter = 0;
    for (Node row1 : rows) {
      final Element row = (Element) row1;

      if (!ObjectUtilities.equal(row.getNamespace(), OfficeNamespaces.TABLE_NS)
          || !ObjectUtilities.equal(row.getType(), OfficeToken.TABLE_ROW)) {
        continue;
      }
      if (rowCounter >= rowPos) {
        final String rowStyle =
            (String) row.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);
        context.setRowStyle(rowCounter - rowPos, rowStyle);
      }

      rowCounter += 1;

      if (rowCounter >= (rowPos + rowSpan)) {
        break;
      }
    }
  }
  protected boolean evaluateElement(final ReportElement e) {
    // only if needed ...
    configureDefaultBehaviour();

    if (ObjectUtilities.equal(e.getName(), getElement())) {
      final Color color = computeColor();
      if (defineBackground) {
        e.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, color);
      } else {
        e.getStyle().setStyleProperty(ElementStyleKeys.PAINT, color);
      }
      return true;
    }
    return false;
  }
  /**
   * Returns the current value for the data source.
   *
   * @param runtime the expression runtime that is used to evaluate formulas and expressions when
   *     computing the value of this filter.
   * @param element
   * @return the value.
   */
  public Object getValue(final ExpressionRuntime runtime, final ReportElement element) {
    if (runtime == null) {
      return null;
    }
    final String resourceId;
    if (resourceIdentifier != null) {
      resourceId = resourceIdentifier;
    } else {
      resourceId =
          runtime
              .getConfiguration()
              .getConfigProperty(ResourceBundleFactory.DEFAULT_RESOURCE_BUNDLE_CONFIG_KEY);
    }

    if (resourceId == null) {
      return null;
    }

    try {
      final ResourceBundleFactory resourceBundleFactory = runtime.getResourceBundleFactory();
      final ResourceBundle bundle = resourceBundleFactory.getResourceBundle(resourceId);

      // update the format string, if neccessary ...
      if (ObjectUtilities.equal(formatKey, appliedFormatKey) == false) {
        final String newFormatString = bundle.getString(formatKey);
        messageFormatSupport.setFormatString(newFormatString);
        appliedFormatKey = formatKey;
      }

      messageFormatSupport.setLocale(resourceBundleFactory.getLocale());
      return messageFormatSupport.performFormat(runtime.getDataRow());
    } catch (MissingResourceException mre) {
      if (logger.isDebugEnabled()) {
        logger.debug(
            "Failed to format the value for resource-id "
                + resourceId
                + ", was '"
                + mre.getMessage()
                + "'");
      }
      return null;
    } catch (Exception e) {
      if (logger.isDebugEnabled()) {
        logger.debug("Failed to format the value for resource-id " + resourceId, e);
      }
      return null;
    }
  }
  /**
   * Checks whether the group is equal. A group is considered equal to another group, if it defines
   * the same fields as the other group.
   *
   * @param obj the object to be checked
   * @return true, if the object is a group instance with the same fields, false otherwise.
   */
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }
    if (!(obj instanceof RelationalGroup)) {
      return false;
    }

    final RelationalGroup group = (RelationalGroup) obj;
    final String[] otherFields = group.getFieldsArray();
    final String[] myFields = getFieldsArray();
    if (ObjectUtilities.equalArray(otherFields, myFields) == false) {
      return false;
    }
    return true;
  }
 /**
  * Configures the module by loading the configuration properties and adding them to the package
  * configuration.
  *
  * @param subSystem the subsystem.
  */
 public void configure(final SubSystem subSystem) {
   final InputStream in =
       ObjectUtilities.getResourceRelativeAsStream("configuration.properties", getClass());
   if (in == null) {
     return;
   }
   try {
     subSystem.getPackageManager().getPackageConfiguration().load(in);
   } finally {
     try {
       in.close();
     } catch (IOException e) {
       // can be ignored ...
     }
   }
 }
 public void initialize(final DataFactoryContext dataFactoryContext)
     throws ReportDataFactoryException {
   super.initialize(dataFactoryContext);
   if (backend != null) {
     effectiveBackend = backend;
   } else {
     if (useLocalCall) {
       final String className =
           getConfiguration().getConfigProperty(CdaQueryBackend.class.getName());
       effectiveBackend =
           ObjectUtilities.loadAndInstantiate(
               className, CdaQueryBackend.class, CdaQueryBackend.class);
     }
     if (effectiveBackend == null) {
       effectiveBackend = new HttpQueryBackend();
     }
   }
 }
Example #25
0
  /** @noinspection ProhibitedExceptionCaught */
  public static synchronized void registerDefaults() {
    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    final Iterator it =
        config.findPropertyKeys("org.pentaho.reporting.engine.classic.core.stylekeys.");
    final ClassLoader classLoader = ObjectUtilities.getClassLoader(StyleKey.class);

    while (it.hasNext()) {
      final String key = (String) it.next();
      final String keyClass = config.getConfigProperty(key);
      try {
        final Class c = Class.forName(keyClass, false, classLoader);
        registerClass(c);
      } catch (ClassNotFoundException e) {
        // ignore that class
        logger.warn("Unable to register keys from " + keyClass);
      } catch (NullPointerException e) {
        // ignore invalid values as well.
        logger.warn("Unable to register keys from " + keyClass);
      }
    }
  }
 /**
  * Creates a new demo application.
  *
  * @param filename the output filename.
  * @throws ParseException if the report could not be parsed.
  */
 public StraightToEverything(final String filename) throws ParseException {
   final URL in =
       ObjectUtilities.getResource(
           "org/pentaho/reporting/engine/classic/demo/opensource/opensource.xml",
           StraightToEverything.class);
   final MasterReport report = parseReport(in);
   final TableModel data = new OpenSourceProjects();
   report.setDataFactory(new TableDataFactory("default", data));
   try {
     createPDF(report, filename + ".pdf");
     createCSV(report, filename + ".csv");
     createDirectoryHTML(report, filename + ".html");
     createPlainText(report, filename + ".txt");
     createRTF(report, filename + ".rtf");
     createStreamHTML(report, filename + "-single-file.html");
     createXLS(report, filename + ".xls");
     createZIPHTML(report, filename + ".zip");
   } catch (Exception e) {
     logger.error("Failed to write report", e);
   }
 }
  /**
   * Initializes the simple parser and registers this handler with the parser base module.
   *
   * @throws ModuleInitializeException if initializing the module failes.
   */
  public void performInit() throws ModuleInitializeException {
    final ParserEntityResolver res = ParserEntityResolver.getDefaultResolver();

    final URL urlReportDTD =
        ObjectUtilities.getResource(
            "org/pentaho/reporting/engine/classic/core/modules/parser/simple/resources/report-085.dtd",
            SimpleParserModuleInit.class);

    res.setDTDLocation(
        SimpleParserModuleInit.PUBLIC_ID_SIMPLE, SimpleParserModuleInit.SYSTEM_ID, urlReportDTD);
    res.setDTDLocation(
        SimpleParserModuleInit.PUBLIC_ID_SIMPLE_084,
        SimpleParserModuleInit.SYSTEM_ID,
        urlReportDTD);
    res.setDeprecatedDTDMessage(
        SimpleParserModuleInit.PUBLIC_ID_SIMPLE_084,
        "The given public identifier for the XML document is deprecated. "
            + "Please use the current document type declaration instead: \n"
            + "  <!DOCTYPE report PUBLIC \n"
            + "      \"-//JFreeReport//DTD report definition//EN//simple/version 0.8.5\"\n"
            + "      \"http://jfreereport.sourceforge.net/report-085.dtd\">");
  }
  /**
   * The starting point for the application.
   *
   * @param args ignored.
   */
  public static void main(final String[] args) {
    ClassicEngineBoot.getInstance().start();
    final ReportGenerator gen = ReportGenerator.getInstance();
    final URL reportURL =
        ObjectUtilities.getResourceRelative(REFERENCE_REPORT, StyleKeyReferenceGenerator.class);
    if (reportURL == null) {
      System.err.println("The report was not found in the classpath"); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      System.exit(1);
      return;
    }

    final MasterReport report;
    try {
      report = gen.parseReport(reportURL);
    } catch (Exception e) {
      System.err.println("The report could not be parsed."); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      e.printStackTrace(System.err);
      System.exit(1);
      return;
    }
    report.setDataFactory(new TableDataFactory("default", createData())); // $NON-NLS-1$
    try {
      HtmlReportUtil.createStreamHTML(
          report,
          System.getProperty("user.home") // $NON-NLS-1$
              + "/stylekey-reference.html"); //$NON-NLS-1$
      PdfReportUtil.createPDF(
          report,
          System.getProperty("user.home") // $NON-NLS-1$
              + "/stylekey-reference.pdf"); //$NON-NLS-1$
    } catch (Exception e) {
      System.err.println("The report processing failed."); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      e.printStackTrace(System.err);
      System.exit(1);
    }
  }
  public DefaultReportPreProcessorPropertyMetaData(
      final String name,
      final String bundleLocation,
      final boolean expert,
      final boolean preferred,
      final boolean hidden,
      final boolean deprecated,
      final boolean mandatory,
      final boolean computed,
      final String propertyRole,
      final SharedBeanInfo beanInfo,
      final String propertyEditorClass,
      final ReportPreProcessorPropertyCore reportPreProcessorCore,
      final MaturityLevel maturityLevel,
      final int compatibilityLevel) {
    super(
        name,
        bundleLocation,
        "property.",
        expert,
        preferred,
        hidden,
        deprecated,
        maturityLevel,
        compatibilityLevel);
    ArgumentNullException.validate("propertyRole", propertyRole);
    ArgumentNullException.validate("beanInfo", beanInfo);
    ArgumentNullException.validate("reportPreProcessorCore", reportPreProcessorCore);

    this.propertyDescriptor = new SharedPropertyDescriptorProxy(beanInfo, name);
    this.reportPreProcessorCore = reportPreProcessorCore;
    this.computed = computed;
    this.propertyEditorClass =
        ObjectUtilities.loadAndValidate(
            propertyEditorClass, DefaultExpressionPropertyMetaData.class, PropertyEditor.class);
    this.mandatory = mandatory;
    this.propertyRole = propertyRole;
  }
 public ExpressionPropertyReadHandler(
     final BeanUtility expression,
     final String originalExpressionClass,
     final String expressionClass,
     final String expressionName) {
   if (expression == null) {
     throw new NullPointerException();
   }
   this.originalExpressionClass = originalExpressionClass;
   this.expressionClass = expressionClass;
   this.expressionName = expressionName;
   this.beanUtility = expression;
   this.strictParsing =
       "true"
           .equals(
               ClassicEngineBoot.getInstance()
                   .getGlobalConfig()
                   .getConfigProperty(
                       "org.pentaho.reporting.engine.classic.core.modules.parser.base.StrictParseMode"));
   if (strictParsing == true) {
     // if we have really really ancient reports, then strict parsing is not an option ..
     strictParsing = ObjectUtilities.equal(originalExpressionClass, expressionClass);
   }
 }