当前位置: 首页>>代码示例>>Java>>正文


Java EngineConfig.setEngineHome方法代码示例

本文整理汇总了Java中org.eclipse.birt.report.engine.api.EngineConfig.setEngineHome方法的典型用法代码示例。如果您正苦于以下问题:Java EngineConfig.setEngineHome方法的具体用法?Java EngineConfig.setEngineHome怎么用?Java EngineConfig.setEngineHome使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.birt.report.engine.api.EngineConfig的用法示例。


在下文中一共展示了EngineConfig.setEngineHome方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startBirtEngine

import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public static synchronized void startBirtEngine(IPlatformContext context)
{				
	log.info("Starting BIRT Engine and OSGI Platform using: " + context.getClass().getName());		
			
	HTMLServerImageHandler imageHandler = new HTMLServerImageHandler();
	
	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);
	}
	catch (BirtException e)
	{
		log.error("BirtException", e);
	}

	IReportEngineFactory factory = (IReportEngineFactory) Platform
			.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
	
	birtEngine = factory.createReportEngine(config);
	
	log.info("BIRT Engine Started");
		
	birtEngine.changeLogLevel(Level.SEVERE);	
}
 
开发者ID:mtpettyp,项目名称:openreports,代码行数:36,代码来源:BirtProvider.java

示例2: getInstance

import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
/**
 * Get engine instance.
 * 
 * @return engine instance
 */
synchronized public static ReportEngine getInstance( )
{
    if ( engine == null )
	{
		System.setProperty( "RUN_UNDER_ECLIPSE", "false" ); //$NON-NLS-1$ //$NON-NLS-2$
           EngineConfig config = new EngineConfig( );
           String t = Platform.getLocation( ).toFile( ).getAbsolutePath( );
           config.setEngineHome( t ); //$NON-NLS-1$
           engine = new ReportEngine( config );
	}
    
    return engine;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:EngineAccessor.java

示例3: init

import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi){
		// Boot the BIRT reporting engine.
		try {
			String birtHomeStr = System.getProperty("user.dir") + System.getProperty("file.separator") + "plugins/BIRTOutput/";
			EngineConfig config = new EngineConfig();
			
			birtStream = getClass().getClassLoader().getResourceAsStream("plugins/BIRTOutput/birt.properties");
			birtProps.load(birtStream); 
			
			String logDir = birtProps.getProperty("logging.dir");
			String logLevel = birtProps.getProperty("logging.level");
			
			System.out.println("logging dir: " + logDir);
			System.out.println("logging dir: " + logLevel);
			
//			config.setLogConfig("/tmp", Level.ALL);
			config.setLogConfig(logDir, Level.parse(logLevel));
			Platform.startup(config);
			config.setEngineHome("");
			
			IPlatformContext context = new PlatformFileContext();
			config.setPlatformContext( context );			
			
			IReportEngineFactory factory = (IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
			engine = factory.createReportEngine(config);
			
		    return super.init(smi, sdi);
		}catch(IOException ioe){
			ioe.printStackTrace();
			return false;
		}catch (BirtException be) {
			be.printStackTrace();
			return false;
		}
	}
 
开发者ID:knowbi,项目名称:knowbi-pentaho-pdi-birt-output,代码行数:36,代码来源:BIRTOutput.java


注:本文中的org.eclipse.birt.report.engine.api.EngineConfig.setEngineHome方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。