Examples of declareBean()


Examples of org.apache.bsf.BSFManager.declareBean()

    try
    {
      final BSFManager interpreter = new BSFManager();
      interpreter.declareBean("definition", definition, SubReport.class); //$NON-NLS-1$
      interpreter.declareBean("flowController", flowController, DefaultFlowController.class); //$NON-NLS-1$
      final Object o = interpreter.eval(getLanguage(), "expression", 1, 1, script);
      if (o instanceof SubReport == false)
      {
        throw new ReportDataFactoryException("Not a MasterReport");
      }
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

            for (Iterator i = beans.keySet().iterator(); i.hasNext();) {
                String key = (String) i.next();
                Object value = beans.get(key);
                if (value != null) {
                    manager.declareBean(key, value, value.getClass());
                } else {
                    // BSF uses a hashtable to store values
                    // so cannot declareBean with a null value
                    // So need to remove any bean of this name as
                    // that bean should not be visible
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

    runtimeWrapper.update(null, getRuntime());
    legacyDataRowWrapper.setParent(getDataRow());
    try
    {
      final BSFManager interpreter = new BSFManager();
      interpreter.declareBean("chartExpression", this, getClass()); //$NON-NLS-1$
      interpreter.declareBean("chart", originalChart, JFreeChart.class); //$NON-NLS-1$
      interpreter.declareBean("runtime", runtimeWrapper, ExpressionRuntime.class); //$NON-NLS-1$
      interpreter.declareBean("dataRow", legacyDataRowWrapper, DataRow.class); //$NON-NLS-1$
      final Object o = interpreter.eval
          (postProcessingLanguage, "expression", 1, 1, postProcessingScript); //$NON-NLS-1$
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

    legacyDataRowWrapper.setParent(getDataRow());
    try
    {
      final BSFManager interpreter = new BSFManager();
      interpreter.declareBean("chartExpression", this, getClass()); //$NON-NLS-1$
      interpreter.declareBean("chart", originalChart, JFreeChart.class); //$NON-NLS-1$
      interpreter.declareBean("runtime", runtimeWrapper, ExpressionRuntime.class); //$NON-NLS-1$
      interpreter.declareBean("dataRow", legacyDataRowWrapper, DataRow.class); //$NON-NLS-1$
      final Object o = interpreter.eval
          (postProcessingLanguage, "expression", 1, 1, postProcessingScript); //$NON-NLS-1$
      if (o instanceof JFreeChart)
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

    try
    {
      final BSFManager interpreter = new BSFManager();
      interpreter.declareBean("chartExpression", this, getClass()); //$NON-NLS-1$
      interpreter.declareBean("chart", originalChart, JFreeChart.class); //$NON-NLS-1$
      interpreter.declareBean("runtime", runtimeWrapper, ExpressionRuntime.class); //$NON-NLS-1$
      interpreter.declareBean("dataRow", legacyDataRowWrapper, DataRow.class); //$NON-NLS-1$
      final Object o = interpreter.eval
          (postProcessingLanguage, "expression", 1, 1, postProcessingScript); //$NON-NLS-1$
      if (o instanceof JFreeChart)
      {
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

    {
      final BSFManager interpreter = new BSFManager();
      interpreter.declareBean("chartExpression", this, getClass()); //$NON-NLS-1$
      interpreter.declareBean("chart", originalChart, JFreeChart.class); //$NON-NLS-1$
      interpreter.declareBean("runtime", runtimeWrapper, ExpressionRuntime.class); //$NON-NLS-1$
      interpreter.declareBean("dataRow", legacyDataRowWrapper, DataRow.class); //$NON-NLS-1$
      final Object o = interpreter.eval
          (postProcessingLanguage, "expression", 1, 1, postProcessingScript); //$NON-NLS-1$
      if (o instanceof JFreeChart)
      {
        return (JFreeChart) o;
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

  public Message process(Message message) throws ActionProcessingException
  {
    BSFManager bsf = new BSFManager();
    try
    {
      bsf.declareBean( "message", message, message.getClass() );
      bsf.declareBean( "config", config, config.getClass() );
      bsf.declareBean( "payloadProxy", payloadProxy, payloadProxy.getClass() );
      bsf.declareBean( "logger", logger, logger.getClass() );
      // NOTE: cannot use eval here since it does not work for all engines (jython in particular)
      bsf.exec( language, source, 0, 0, getScript(message) );
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

  {
    BSFManager bsf = new BSFManager();
    try
    {
      bsf.declareBean( "message", message, message.getClass() );
      bsf.declareBean( "config", config, config.getClass() );
      bsf.declareBean( "payloadProxy", payloadProxy, payloadProxy.getClass() );
      bsf.declareBean( "logger", logger, logger.getClass() );
      // NOTE: cannot use eval here since it does not work for all engines (jython in particular)
      bsf.exec( language, source, 0, 0, getScript(message) );
    }
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

    BSFManager bsf = new BSFManager();
    try
    {
      bsf.declareBean( "message", message, message.getClass() );
      bsf.declareBean( "config", config, config.getClass() );
      bsf.declareBean( "payloadProxy", payloadProxy, payloadProxy.getClass() );
      bsf.declareBean( "logger", logger, logger.getClass() );
      // NOTE: cannot use eval here since it does not work for all engines (jython in particular)
      bsf.exec( language, source, 0, 0, getScript(message) );
    }
    catch (BSFException bsfe)
View Full Code Here

Examples of org.apache.bsf.BSFManager.declareBean()

    try
    {
      bsf.declareBean( "message", message, message.getClass() );
      bsf.declareBean( "config", config, config.getClass() );
      bsf.declareBean( "payloadProxy", payloadProxy, payloadProxy.getClass() );
      bsf.declareBean( "logger", logger, logger.getClass() );
      // NOTE: cannot use eval here since it does not work for all engines (jython in particular)
      bsf.exec( language, source, 0, 0, getScript(message) );
    }
    catch (BSFException bsfe)
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.