Examples of PlatformPlugin


Examples of org.pentaho.platform.plugin.services.pluginmgr.PlatformPlugin

  public static class TestPlugin implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      List<IPlatformPlugin> plugins = new ArrayList<IPlatformPlugin>();

      PlatformPlugin p = new PlatformPlugin( new DefaultListableBeanFactory() );
      p.setId( "test-plugin" );

      p.addStaticResourcePath( "notused", "public" );

      BeanDefinition def =
          BeanDefinitionBuilder.rootBeanDefinition( JUnitContentGenerator.class.getName() ).getBeanDefinition();
      p.getBeanFactory().registerBeanDefinition( "xjunit.viewer", def );

      def =
          BeanDefinitionBuilder.rootBeanDefinition( JUnitServiceContentGenerator.class.getName() ).getBeanDefinition();
      p.getBeanFactory().registerBeanDefinition( "testservice", def );

      def = BeanDefinitionBuilder.rootBeanDefinition( ReportContentGenerator.class.getName() ).getBeanDefinition();
      p.getBeanFactory().registerBeanDefinition( "xjunit.report", def );

      ContentInfo contentInfo = new ContentInfo();
      contentInfo.setDescription( "JUnit file type" );
      contentInfo.setExtension( "xjunit" );
      contentInfo.setMimeType( "application/zip" );
      contentInfo.setTitle( "JUNIT" );
      p.addContentInfo( contentInfo );

      plugins.add( p );

      return plugins;
    }
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.