Examples of declareBean()


Examples of com.ibm.bsf.BSFManager.declareBean()

            BSFManager manager = new BSFManager ();

            for (Enumeration e = beans.keys() ; e.hasMoreElements() ;) {
                String key = (String) e.nextElement();
                Object value = beans.get(key);
                manager.declareBean(key, value, value.getClass());
            }

            // execute the script
            manager.exec(language, "<ANT>", 0, 0, script);
        } catch (BSFException be) {
View Full Code Here

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

/** Returns BSFManager for <var>language</var>. */
public BSFManager getBsfManager(String language) throws BSFException {
    BSFManager manager = (BSFManager)managers.get(language);
    if (manager == null) {
  manager = new BSFManager();
  manager.declareBean("report", report, Report.class);
  BSFManager.registerScriptingEngine(language,
             (String)languages.get(language), null);
  managers.put(language, manager);
    }
    return manager;
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("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()

    legacyDataRowWrapper.setParent(getDataRow());
    try
    {
      final BSFManager interpreter = new BSFManager();
      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("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()

    }

    try
    {
      final BSFManager interpreter = new BSFManager();
      interpreter.declareBean("definition", definition, MasterReport.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 MasterReport == false)
      {
        throw new ReportDataFactoryException("Not a MasterReport");
View Full Code Here

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

    try
    {
      final BSFManager interpreter = new BSFManager();
      interpreter.declareBean("definition", definition, MasterReport.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 MasterReport == false)
      {
        throw new ReportDataFactoryException("Not a MasterReport");
      }
View Full Code Here

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()

    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()

            BSFManager mgr = getManager();
            if (mgr == null) {
                log.error("Problem creating BSF manager");
                return;
            }
            mgr.declareBean("sampleEvent", event, SampleEvent.class);
            SampleResult result = event.getResult();
            mgr.declareBean("sampleResult", result, SampleResult.class);
            processFileOrScript(mgr);
            mgr.terminate();
        } catch (BSFException e) {
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.