Package org.eclipse.birt.report.engine.api

Examples of org.eclipse.birt.report.engine.api.EngineConfig


        if (cc == null) {
            throw new ContainerException("No " + this.getContainerConfigName() + " configuration found in container config!");
        }

        // create engine config
        EngineConfig config = new EngineConfig();
        String ofbizHome = System.getProperty("ofbiz.home");
        config.setTempDir(ofbizHome + File.separatorChar + "runtime" + File.separatorChar + "tempfiles");
        config.setLogConfig(ofbizHome + File.separatorChar + "runtime" + File.separatorChar + "logs", Level.ALL);

        // startup platform
        try {
            Debug.logInfo("Startup BIRT platform", module);
            Platform.startup(config);
View Full Code Here


    this.siteId = siteId;
    this.reportId = reportId;
    this.servletContext = servletContext;
   
    Report report = ReportDAO.load(siteId, reportId);
    EngineConfig config = new EngineConfig();
    config.setEngineHome("");
    IPlatformContext context = new PlatformServletContext(servletContext);
    config.setPlatformContext(context);

    Platform.startup(config);
    IReportEngineFactory factory = (IReportEngineFactory) Platform
      .createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
    engine = factory.createReportEngine(config);
View Full Code Here

    reportDesignHandle = session.openDesign(inputReportFile);
    elementFactory = reportDesignHandle.getElementFactory();
  }

  private static void initEngine() {
    EngineConfig conf = new EngineConfig();

    // Create new Report engine based off of the configuration
    engine = new ReportEngine(conf);

    // With our new engine, lets try to open the report design
View Full Code Here

  }

  static void executeReport() throws EngineException {

    IReportEngine engine = null;
    EngineConfig config = null;
    try {
      config = new EngineConfig();
      config.setLogConfig(null, Level.FINE);

      Platform.startup(config);
      IReportEngineFactory factory = (IReportEngineFactory) Platform
          .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
      engine = factory.createReportEngine(config);
View Full Code Here

   
    HTMLRenderOption emitterConfig = new HTMLRenderOption();
    emitterConfig.setActionHandler(new HTMLActionHandler());   
    emitterConfig.setImageHandler(imageHandler);

    EngineConfig config = new EngineConfig();
    config.setEngineHome("");
    config.setPlatformContext(context);               
    config.setLogConfig(null, Level.ALL);     
    config.getEmitterConfigs().put("html", emitterConfig);

    try
    {
      Platform.startup(config);
    }
View Full Code Here

        ContainerConfig.Container cc = ContainerConfig.getContainer(this.getContainerConfigName(), configFile);
        if (cc == null) {
            throw new ContainerException("No " + this.getContainerConfigName() + " configuration found in container config!");
        }

        config = new EngineConfig();

        // set osgi config
        Map<String, String> osgiConfig = FastMap.newInstance();
        osgiConfig.put("osgi.configuration.area", new File(System.getProperty("ofbiz.home"), "runtime" + File.separator + "tempfiles").getPath());
        config.setOSGiConfig(osgiConfig);
View Full Code Here

        String platform = bc.getProperty("platform").value;
        String logdir = bc.getProperty("logdir").value;
       
        Debug.logInfo("Birt Container start with platform = " + platform, module);
   
        EngineConfig config = new EngineConfig();
    config.setLogConfig(logdir, Level.FINE);
    config.setEngineHome(platform);
       
    try {
      Platform.startup(config);
      IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
      engine = factory.createReportEngine(config)
View Full Code Here

     * @return the birt engine
     */
    public static synchronized IReportEngine getBirtEngine(HttpServletRequest request, ServletContext sc) {
  logger.debug("IN");
  if (birtEngine == null) {
      EngineConfig config = new EngineConfig();
      if (configProps != null && !configProps.isEmpty()) {
    String logLevel = configProps.getProperty("logLevel");
    Level level = Level.OFF;
    if ("SEVERE".equalsIgnoreCase(logLevel)) {
        level = Level.SEVERE;
    } else if ("WARNING".equalsIgnoreCase(logLevel)) {
        level = Level.WARNING;
    } else if ("INFO".equalsIgnoreCase(logLevel)) {
        level = Level.INFO;
    } else if ("CONFIG".equalsIgnoreCase(logLevel)) {
        level = Level.CONFIG;
    } else if ("FINE".equalsIgnoreCase(logLevel)) {
        level = Level.FINE;
    } else if ("FINER".equalsIgnoreCase(logLevel)) {
        level = Level.FINER;
    } else if ("FINEST".equalsIgnoreCase(logLevel)) {
        level = Level.FINEST;
    } else if ("ALL".equalsIgnoreCase(logLevel)) {
      level = Level.ALL;
    } else if ("OFF".equalsIgnoreCase(logLevel)) {
        level = Level.OFF;
    }

    String logDir = configProps.getProperty("logDirectory");
    logDir = Utils.resolveSystemProperties(logDir);
    logger.debug("Birt LOG Dir:"+logDir);
    logger.debug("Log config: logDirectory = [" + logDir + "]; level = [" + level + "]");
    config.setLogConfig(logDir, level);
      }

      /*DefaultResourceLocator drl=new DefaultResourceLocator();
      drl.findResource(birtEngine.openReportDesign(arg0), "messages_it_IT.properties", DefaultResourceLocator.MESSAGE_FILE);
      */
      config.setEngineHome("");
      IPlatformContext context = new PlatformServletContext(sc);
      config.setPlatformContext(context);
      config.setTempDir(System.getProperty("java.io.tmpdir") + "/birt/");

     
     // ParameterAccessor.initParameters(sc);
      //config.setResourcePath(ParameterAccessor.getResourceFolder(request));
      // Prepare ScriptLib location
      String scriptLibDir = ParameterAccessor.scriptLibDir;
      ArrayList jarFileList = new ArrayList();
      if (scriptLibDir != null) {
    File dir = new File(scriptLibDir);
    getAllJarFiles(dir, jarFileList);
      }
      String scriptlibClassPath = ""; //$NON-NLS-1$
      for (int i = 0; i < jarFileList.size(); i++)
    scriptlibClassPath += EngineConstants.PROPERTYSEPARATOR + ((File) jarFileList.get(i)).getAbsolutePath();
      if (scriptlibClassPath.startsWith(EngineConstants.PROPERTYSEPARATOR))
    scriptlibClassPath = scriptlibClassPath.substring(EngineConstants.PROPERTYSEPARATOR.length());
      config.setProperty(EngineConstants.WEBAPP_CLASSPATH_KEY, scriptlibClassPath);

      try {
    Platform.startup(config);
    logger.debug("Birt Platform started");
      } catch (BirtException e) {
View Full Code Here

{
   public static IReportEngine newInstance(IntegrationConfig iConfig)
   {
      try
      {
         EngineConfig config = new EngineConfig( );
         config.setBIRTHome(iConfig.getBirtHome());

         Platform.startup( config );
         IReportEngineFactory factory = (IReportEngineFactory) Platform
               .createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
View Full Code Here

{
   public static IReportEngine newInstance(IntegrationConfig iConfig)
   {
      try
      {
         EngineConfig config = new EngineConfig( );
         Platform.startup( config );
         IReportEngineFactory factory = (IReportEngineFactory) Platform
               .createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );

         IReportEngine engine = factory.createReportEngine( config );
View Full Code Here

TOP

Related Classes of org.eclipse.birt.report.engine.api.EngineConfig

Copyright © 2018 www.massapicom. 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.