Examples of PlatformPlugin


Examples of giggler.plugin.PlatformPlugin

        registry = new Registry();
       
        ManagementImpl management = new ManagementImpl();
        management.setRegistry(registry);
       
        PlatformPlugin platformPlugin = new PlatformPlugin();
        platformPlugin.setManagement(management);
       
        addPlugin(platformPlugin);
    }
View Full Code Here

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

    public static final String TEST_PLUGIN_2 = "test-plugin-2";

    @Override
    public List<IPlatformPlugin> getPlugins( IPentahoSession iPentahoSession )
      throws PlatformPluginRegistrationException {
      PlatformPlugin p1 = new PlatformPlugin();
      // need to set source description - this is what will be used to look up the PluginClassLoader
      p1.setId( TEST_PLUGIN );
      p1.setSourceDescription( TEST_PLUGIN );

      PlatformPlugin p2 = new PlatformPlugin();
      p2.setId( TEST_PLUGIN_2 );
      p2.setSourceDescription( TEST_PLUGIN_2 );

      return Arrays.asList( (IPlatformPlugin) p1, (IPlatformPlugin) p2 );
    }
View Full Code Here

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

    assertTrue( "title is not displayed", html.contains( "junit echo service" ) );
  }

  public static class TstPluginProvider implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin();
      p.setId( "testPlugin" );
      p.setSourceDescription( "" );

      ContentGeneratorInfo cg1 = new ContentGeneratorInfo();
      cg1.setDescription( "Mock web service execution generator" );
      cg1.setId( "ws-run" );
      cg1.setType( "ws-run" ); // type is used as the key to verify that there is a cg that can handle a ws request
      cg1.setTitle( "Mock web service execution generator" );
      cg1.setClassname( "org.pentaho.test.platform.plugin.pluginmgr.ContentGenerator1" );
      p.addContentGenerator( cg1 );

      ContentGeneratorInfo cg2 = new ContentGeneratorInfo();
      cg2.setDescription( "Mock WSDL generator" );
      cg2.setId( "ws-wsdl" );
      cg2.setType( "ws-wsdl" ); // type is used as the key to verify that there is a cg that can handle a wsdl request
      cg2.setTitle( "Mock WSDL generator" );
      cg2.setClassname( "org.pentaho.test.platform.plugin.pluginmgr.ContentGenerator1" );
      p.addContentGenerator( cg2 );

      PluginServiceDefinition ws = new PluginServiceDefinition();
      ws.setId( "echoService" );
      ws.setServiceClass( EchoServiceBean.class.getName() );
      ws.setTypes( new String[] { "xml" } );
      ws.setTitle( "junit echo service" );
      p.addWebservice( ws );

      return Arrays.asList( (IPlatformPlugin) p );
    }
View Full Code Here

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

        argThat( hasData( text.getBytes(), "application/octet-stream" ) ), anyString() );
  }*/

  public static class JUnitContentGeneratorPluginProvider implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin();
      p.setId( "JUnitContentGeneratorPluginProvider" );

      ContentGeneratorInfo cg = new ContentGeneratorInfo();
      cg.setDescription( "test plugin description" );
      cg.setId( "junit.myperspective" );
      cg.setType( "junit" );
      cg.setTitle( "JUnit CG" );
      cg.setUrl( "/bogus" );
      cg.setClassname( JUnitContentGenerator.class.getName() );
      p.addContentGenerator( cg );

      return Arrays.asList( (IPlatformPlugin) p );
    }
View Full Code Here

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

  @Test
  public void test17_getPluginIdForType() throws PlatformInitializationException, PluginBeanException {
    IPluginProvider provider = new IPluginProvider() {
      public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
        PlatformPlugin p = new PlatformPlugin( new DefaultListableBeanFactory() );
        p.setId( "testPlugin" );

        ContentGeneratorInfo cg1 = new ContentGeneratorInfo();
        cg1.setDescription( "test 9 plugin description" );
        cg1.setId( "oldworldCGid" );
        cg1.setType( "oldworldCGtype" );
        cg1.setTitle( "test" );
        cg1.setClassname( "org.pentaho.test.platform.plugin.pluginmgr.ContentGenerator1" );
        // cg1.setFileInfoGeneratorClassname("org.pentaho.test.platform.plugin.pluginmgr.FileInfoGenerator");
        p.addContentGenerator( cg1 );

        BeanDefinition beanDef =
          BeanDefinitionBuilder.rootBeanDefinition( "org.pentaho.test.platform.plugin.pluginmgr.ContentGenerator1" )
            .setScope( BeanDefinition.SCOPE_PROTOTYPE ).getBeanDefinition();
        p.getBeanFactory().registerBeanDefinition( "springDefinedCGid", beanDef );
        p.getBeanFactory().registerAlias( "springDefinedCGid", "springDefinedCGtype" );

        return Arrays.asList( (IPlatformPlugin) p );
      }
    };
View Full Code Here

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

    System.out.println( PluginMessageLogger.prettyPrint() );
  }

  public static class Tst3PluginProvider implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin();
      p.setId( "Plugin 3" );
      p.setLifecycleListenerClassname( "bogus.classname" );
      return Arrays.asList( (IPlatformPlugin) p );
    }
View Full Code Here

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

    }
  }

  public static class Tst2PluginProvider implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin();
      p.setId( "test2Plugin" );
      p.setLifecycleListenerClassname( CheckingLifecycleListener.class.getName() );
      return Arrays.asList( (IPlatformPlugin) p );
    }
View Full Code Here

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

    }
  }

  public static class Tst5PluginProvider implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin();
      // need to set source description - classloader needs it
      p.setId( "good-plugin1" );
      p.setSourceDescription( "good-plugin1" );
      p.addBean( new PluginBeanDefinition( "TestMockComponent",
        "org.pentaho.test.platform.engine.core.MockComponent" ) );
      p.addBean( new PluginBeanDefinition( "TestPojo", "java.lang.String" ) );
      p.addBean( new PluginBeanDefinition( "TestClassNotFoundComponent", "org.pentaho.test.NotThere" ) );
      return Arrays.asList( (IPlatformPlugin) p );
    }
View Full Code Here

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

    }
  }

  public static class Tst6PluginProvider implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin();
      p.setId( "test6Plugin" );
      p.addBean( new PluginBeanDefinition( "bean1", "java.lang.String" ) );
      p.addBean( new PluginBeanDefinition( "bean1", "java.lang.Object" ) );
      return Arrays.asList( (IPlatformPlugin) p );
    }
View Full Code Here

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

    }
  }

  public static class Tst8PluginProvider implements IPluginProvider {
    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin( new DefaultListableBeanFactory() );
      p.setId( "test8Plugin" );
      // need to set source description - classloader needs it
      p.setSourceDescription( "good-plugin1" );
      p.addBean( new PluginBeanDefinition( "PluginOnlyClass", "org.pentaho.nowhere.PluginOnlyClass" ) );
      // PluginOnlyClassSpringFile
      BeanDefinition beanDef =
        BeanDefinitionBuilder.rootBeanDefinition( "org.pentaho.nowhere.PluginOnlyClass" ).setScope(
          BeanDefinition.SCOPE_PROTOTYPE ).getBeanDefinition();
      p.getBeanFactory().registerBeanDefinition( "PluginOnlyClassSpringFile", beanDef );
      return Arrays.asList( (IPlatformPlugin) p );
    }
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.