• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ClassicEngineBoot类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.reporting.engine.classic.core.ClassicEngineBoot的典型用法代码示例。如果您正苦于以下问题:Java ClassicEngineBoot类的具体用法?Java ClassicEngineBoot怎么用?Java ClassicEngineBoot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ClassicEngineBoot类属于org.pentaho.reporting.engine.classic.core包,在下文中一共展示了ClassicEngineBoot类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: performPentahoReportingBoot

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public static void performPentahoReportingBoot(LogChannelInterface log, Class<?> referenceClass) {
// Boot the Pentaho reporting engine!
     //
     if(ClassicEngineBoot.getInstance().isBootDone() == false){

       ObjectUtilities.setClassLoader(referenceClass.getClassLoader());
       ObjectUtilities.setClassLoaderSource(ObjectUtilities.CLASS_CONTEXT);
       
       LibLoaderBoot.getInstance().start();
       LibFontBoot.getInstance().start();
       ClassicEngineBoot.getInstance().start();
       
       Exception exception = ClassicEngineBoot.getInstance().getBootFailureReason();
       if (exception!=null) {
         log.logError("Error booting the Pentaho reporting engine", exception);
       }
       
     }
 }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:PentahoReportingOutput.java


示例2: testPrptSrc

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Test
public void testPrptSrc() throws Exception{

  if(ClassicEngineBoot.getInstance().isBootDone() == false){
    ClassicEngineBoot engineBoot = ClassicEngineBoot.getInstance();
    engineBoot.start();
  }
  
  SwtXulLoader loader = new SwtXulLoader();
  loader.register("PRPT", PrptViewerTag.class.getCanonicalName());
  XulDomContainer container = loader.loadXul("org/pentaho/agilebi/test/res/prpt.xul");
  
  PrptViewerTag prpt = (PrptViewerTag) container.getDocumentRoot().getElementById("prptViewer");
  
  prpt.setSrc("test-res/test.prpt");
  
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:18,代码来源:TestPrptComponent.java


示例3: testPrptSetMasterReport

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Test
public void testPrptSetMasterReport() throws Exception{

  if(ClassicEngineBoot.getInstance().isBootDone() == false){
    ClassicEngineBoot engineBoot = ClassicEngineBoot.getInstance();
    engineBoot.start();
  }
  
  SwtXulLoader loader = new SwtXulLoader();
  loader.register("PRPT", PrptViewerTag.class.getCanonicalName());
  XulDomContainer container = loader.loadXul("org/pentaho/agilebi/test/res/prpt.xul");
  
  PrptViewerTag prpt = (PrptViewerTag) container.getDocumentRoot().getElementById("prptViewer");
  
  ResourceManager theResourceManager = new ResourceManager();
  theResourceManager.registerDefaults();
  File theReportFile = new File("test-res/test.prpt");
  Resource theResource = theResourceManager.createDirectly(theReportFile, MasterReport.class);
  MasterReport masterReport = (MasterReport) theResource.getResource();
  
  prpt.setMasterReport(masterReport);
  
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:24,代码来源:TestPrptComponent.java


示例4: performPentahoReportingBoot

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public static void performPentahoReportingBoot( LogChannelInterface log, Class<?> referenceClass ) {
  // Boot the Pentaho reporting engine!
  //
  if ( ClassicEngineBoot.getInstance().isBootDone() == false ) {

    ObjectUtilities.setClassLoader( referenceClass.getClassLoader() );
    ObjectUtilities.setClassLoaderSource( ObjectUtilities.CLASS_CONTEXT );

    LibLoaderBoot.getInstance().start();
    LibFontBoot.getInstance().start();
    ClassicEngineBoot.getInstance().start();

    Exception exception = ClassicEngineBoot.getInstance().getBootFailureReason();
    if ( exception != null ) {
      log.logError( "Error booting the Pentaho reporting engine", exception );
    }

  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:PentahoReportingOutput.java


示例5: init

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Override
public void init(
  ServletConfig config) 
  throws ServletException 
{

  super.init(config);
  ClassicEngineBoot.getInstance().start();

}
 
开发者ID:fcorti,项目名称:pentaho-8-reporting-for-java-developers,代码行数:11,代码来源:PentahoServlet2.java


示例6: setUpBeforeClass

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
  ClassicEngineBoot.getInstance().start();
  KettleEnvironment.init( false );
  reportFile = new File( "src/it/resources/org/pentaho/di/trans/steps/pentahoreporting/pdi-7502.prpt" );
  assertTrue( reportFile.exists() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:PDI7502IT.java


示例7: initReportEnv

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Before
public void initReportEnv() {
  if ( !ClassicEngineBoot.getInstance().isBootDone() ) {
    ObjectUtilities.setClassLoader( getClass().getClassLoader() );
    ObjectUtilities.setClassLoaderSource( ObjectUtilities.CLASS_CONTEXT );

    LibLoaderBoot.getInstance().start();
    LibFontBoot.getInstance().start();
    ClassicEngineBoot.getInstance().start();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:12,代码来源:KettleReportBuilderTest.java


示例8: setUp

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();
  ClassicEngineBoot.getInstance().start();

  final ExpressionRuntime runtime = new GenericExpressionRuntime
      (new StaticDataRow(), new DefaultTableModel(), 0, new DefaultProcessingContext());
  reportFormulaContext = new ReportFormulaContext(new TestFormulaContext(TestFormulaContext.testCaseDataset), runtime);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:10,代码来源:PentahoEditableDrillDownFunctionTest.java


示例9: initialize

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public void initialize(final SubSystem subSystem) throws ModuleInitializeException
{
  System.out.println ("Module " + getName() + " initialised.");
  System.out.println ("Our sample configuration property is: " +
      subSystem.getGlobalConfig().getConfigProperty("org.pentaho.reporting.sdk.module.SampleConfigurationProperty"));
  // note: The global configuration is also available via the "ClassicEngineBoot" class
  System.out.println ("Our sample configuration property is: " +
      ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty
          ("org.pentaho.reporting.sdk.module.SampleConfigurationProperty"));
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:11,代码来源:SampleModule.java


示例10: main

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public static void main(String[] args)
{
  ClassicEngineBoot.getInstance().start();

  SampleDataSourcePlugin p = new SampleDataSourcePlugin();
  p.performEdit(new DefaultDesignTimeContext(new MasterReport()), null, null, null);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:8,代码来源:SampleDataSourcePlugin.java


示例11: open

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public boolean open(Node transNode, String fname, boolean importfile) {
  try {
    
    if(ClassicEngineBoot.getInstance().isBootDone() == false){

      ObjectUtilities.setClassLoader(getClass().getClassLoader());
      ObjectUtilities.setClassLoaderSource(ObjectUtilities.CLASS_CONTEXT);
      
      LibLoaderBoot.getInstance().start();
      LibFontBoot.getInstance().start();
      ClassicEngineBoot.getInstance().start();
    }      
    
    ResourceManager theResourceManager = new ResourceManager();
    theResourceManager.registerDefaults();
    File theReportFile = new File(fname);
    Resource theResource = theResourceManager.createDirectly(theReportFile, MasterReport.class);
    MasterReport masterReport = (MasterReport) theResource.getResource();
    
    
    XulTabAndPanel tabAndPanel = AgileBiVisualizationPerspective.getInstance().createTab();
    AgileBiVisualizationPerspective.getInstance().setNameForTab(tabAndPanel.tab, getPathAndFilename(fname)[1].replace(".prpt", "")); //$NON-NLS-1$ //$NON-NLS-2$

    SpoonPerspectiveManager.getInstance().activatePerspective(AgileBiVisualizationPerspective.class);
    SwtXulLoader theXulLoader = new SwtXulLoader();
    theXulLoader.registerClassLoader(getClass().getClassLoader());
    theXulLoader.register("PRPT", "org.pentaho.agilebi.spoon.visualizations.xul.PrptViewerTag"); //$NON-NLS-1$ //$NON-NLS-2$
    XulDomContainer theXulContainer = theXulLoader.loadXul("org/pentaho/agilebi/spoon/visualizations/prpt/prptVisualization.xul", new PDIMessages(IVisualization.class)); //$NON-NLS-1$
    
    PRPTMeta meta = new PRPTMeta();
    meta.setTab(tabAndPanel.tab);
    AgileBiVisualizationPerspective.getInstance().setMetaForTab(tabAndPanel.tab, meta);
    
    PRPTVisualizationController controller = new PRPTVisualizationController(meta, masterReport);
    controller.setFileName(fname);
    controller.setDirty(false);
    PmdDataFactory theDataFactory = (PmdDataFactory) masterReport.getDataFactory();
    String theXmiFile = theDataFactory.getXmiFile();
    
    ModelerWorkspace model = new ModelerWorkspace(new SpoonModelerWorkspaceHelper(), SpoonModelerWorkspaceHelper.initGeoContext());
    XmiParser parser = new XmiParser();
    FileInputStream inputStream = new FileInputStream(new File(theXmiFile));
    Domain domain = parser.parseXmi(inputStream);
    inputStream.close();

    LogicalModel logical = domain.getLogicalModels().get(0);
    Object property = logical.getProperty("source_type"); //$NON-NLS-1$
    if( property != null ) {
      IModelerSource theSource = ModelerSourceFactory.generateSource(property.toString());
      theSource.initialize(domain);   
      model.setModelSource(theSource);
    }

    model.setDomain(domain);
    model.setModelName(domain.getId());
    model.setFileName(theXmiFile); 
    model.setTemporary(false);
    controller.setModel(model);
    theXulContainer.addEventHandler(controller);
    
    Composite theMainBox = (Composite) theXulContainer.getDocumentRoot().getElementById("mainContainer").getManagedObject(); //$NON-NLS-1$
    SwtXulRunner theRunner = new SwtXulRunner();
    theRunner.addContainer(theXulContainer);
    theRunner.initialize();
    theMainBox.setParent((Composite) tabAndPanel.panel.getManagedObject());

    ((Composite) tabAndPanel.panel.getManagedObject()).layout(true);

    AgileBiVisualizationPerspective.getInstance().setSelectedMeta(meta);
    return true;
  } catch(Exception e){
    e.printStackTrace();
  }
  return false;
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:76,代码来源:PRPTVisualization.java


示例12: createVisualizationFromMasterReport

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public void createVisualizationFromMasterReport(MasterReport rpt, boolean tempModel){
  try{
    
    if(ClassicEngineBoot.getInstance().isBootDone() == false){
      LibLoaderBoot.getInstance().start();
      LibFontBoot.getInstance().start();
      ClassicEngineBoot.getInstance().start();
    }
    
    XulTabAndPanel tabAndPanel = AgileBiVisualizationPerspective.getInstance().createTab();      
    AgileBiVisualizationPerspective.getInstance().setNameForTab(tabAndPanel.tab, "Untitled Report"); //$NON-NLS-1$
   
    SpoonPerspectiveManager.getInstance().activatePerspective(AgileBiVisualizationPerspective.class);
    SwtXulLoader theXulLoader = new SwtXulLoader();
    theXulLoader.registerClassLoader(getClass().getClassLoader());
    theXulLoader.register("PRPT", "org.pentaho.agilebi.spoon.visualizations.xul.PrptViewerTag"); //$NON-NLS-1$ //$NON-NLS-2$
    XulDomContainer theXulContainer = theXulLoader.loadXul("org/pentaho/agilebi/spoon/visualizations/prpt/prptVisualization.xul", new PDIMessages(IVisualization.class)); //$NON-NLS-1$
    Composite theMainBox = (Composite) theXulContainer.getDocumentRoot().getElementById("mainContainer").getManagedObject(); //$NON-NLS-1$
    
    PRPTMeta meta = new PRPTMeta();
    AgileBiVisualizationPerspective.getInstance().setMetaForTab(tabAndPanel.tab, meta);
    meta.setTab(tabAndPanel.tab);
    
    PRPTVisualizationController controller = new PRPTVisualizationController(meta, rpt);  
    
    PmdDataFactory theDataFactory = (PmdDataFactory) rpt.getDataFactory();
    String theXmiFile = theDataFactory.getXmiFile();
    
    XmiParser parser = new XmiParser();
    FileInputStream inputStream = new FileInputStream(new File(theXmiFile));
    Domain domain = parser.parseXmi(inputStream);
    inputStream.close();      
    
    ModelerWorkspace model = new ModelerWorkspace(new SpoonModelerWorkspaceHelper(), SpoonModelerWorkspaceHelper.initGeoContext());
    LogicalModel logical = domain.getLogicalModels().get(0);
    Object property = logical.getProperty("source_type"); //$NON-NLS-1$
    if( property != null ) {
      IModelerSource theSource = ModelerSourceFactory.generateSource(property.toString());
      theSource.initialize(domain);   
      model.setModelSource(theSource);
    }
    
    model.setDomain(domain);
    model.setModelName(domain.getLogicalModels().get(0).getName(LocalizedString.DEFAULT_LOCALE));
    model.setFileName(theXmiFile); 
    model.setTemporary(tempModel);
    controller.setModel(model);
    theXulContainer.addEventHandler(controller);
    
    SwtXulRunner theRunner = new SwtXulRunner();
    theRunner.addContainer(theXulContainer);
    theRunner.initialize();
    theMainBox.setParent((Composite) tabAndPanel.panel.getManagedObject());
    
    ((Composite) tabAndPanel.panel.getManagedObject()).layout(true);
    AgileBiVisualizationPerspective.getInstance().setSelectedMeta(meta);
    Spoon.getInstance().enableMenus();
    
  } catch(Exception e){
    logger.error("Error creating visualization", e);
  }
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:63,代码来源:PRPTVisualization.java


示例13: setUp

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public void setUp() throws Exception
{
  ClassicEngineBoot.getInstance().start();
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:5,代码来源:SampleTextElementTest.java


示例14: setUp

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
  ClassicEngineBoot.getInstance().start();
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:6,代码来源:PreProcessorTestBase.java


示例15: main

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
public static void main(String[] args)
{
  try
  {
    // Initialize the reporting engine. The reporting engine wont work without it.
    // You have to do that only once before you first use any functionality or class
    // of the reporting engine. If you don't, errors will happen.
    ClassicEngineBoot.getInstance().start();

    // Locate the report file
    final URL url = UseReportingGui.class.getResource("sdk-sample-report.prpt");
    // and use a resource-manager to load it. Pentaho Reporting loads all
    // its resources via the resource-manager. This manager will cache resources
    // for you and will invalidate the cache when the resources changed on disk.
    final ResourceManager mgr = new ResourceManager();

    // The master-report object is the actual report definition.
    final MasterReport report = (MasterReport) mgr.createDirectly(url, MasterReport.class).getResource();

    // Bring up the preview-dialog. We have to do this on the AWT-event-dispatcher thread
    // or all sorts of strange errors can happen.
    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
      {
        final PreviewDialog d = new PreviewDialog(report);
        d.pack();
        d.setModal(true);

        LibSwingUtil.centerFrameOnScreen(d);

        d.setVisible(true);
        System.exit(0);
      }
    });
  }
  catch (ResourceException e)
  {
    System.err.println("Failed to load the report");
    e.printStackTrace(System.err);
  }

}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:44,代码来源:UseReportingGui.java


示例16: testEngineStart

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Test
public void testEngineStart()
{
  ClassicEngineBoot.getInstance().start();
  Assert.assertTrue(ClassicEngineBoot.getInstance().getPackageManager().isModuleAvailable(SampleModule.class.getName()));
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:7,代码来源:StartTest.java


示例17: setUp

import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  ClassicEngineBoot.getInstance().start();
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:5,代码来源:ExpressionTestBase.java



注:本文中的org.pentaho.reporting.engine.classic.core.ClassicEngineBoot类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WSDLExtension类代码示例发布时间:2022-05-23
下一篇:
Java CommandPermissionsException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap