Package org.pentaho.platform.engine.core.solution

Examples of org.pentaho.platform.engine.core.solution.ContentGeneratorInfo


@SuppressWarnings( { "all" } )
public class ContentGeneratorInfoTest extends TestCase {

  public void testContentGeneratorInfo() {

    ContentGeneratorInfo cgi = new ContentGeneratorInfo();

    cgi.setClassname( "test classname" );
    cgi.setDescription( "test description" );
    cgi.setId( "test id" );
    cgi.setTitle( "test title" );
    cgi.setType( "test type" );
    cgi.setUrl( "test url" );

    assertEquals( "wrong field", "test classname", cgi.getClassname() );
    assertEquals( "wrong field", "test description", cgi.getDescription() );
    assertEquals( "wrong field", "test id", cgi.getId() );
    assertEquals( "wrong field", "test title", cgi.getTitle() );
    assertEquals( "wrong field", "test type", cgi.getType() );
    assertEquals( "wrong field", "test url", cgi.getUrl() );

  }
View Full Code Here


  private static IContentGeneratorInfo createContentGenerator( PlatformPlugin plugin, String id, String title,
      String description, String type, String url, String className, IPentahoSession session, String location )
    throws ClassNotFoundException, InstantiationException, IllegalAccessException {

    ContentGeneratorInfo info = new ContentGeneratorInfo();
    info.setId( id );
    info.setTitle( title );
    info.setDescription( description );
    info.setUrl( ( url != null ) ? url : "" ); //$NON-NLS-1$
    info.setType( type );
    info.setClassname( className );

    return info;
  }
View Full Code Here

    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() );
View Full Code Here

  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

    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" )
View Full Code Here

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

      ContentGeneratorInfo cg1 = new ContentGeneratorInfo();
      cg1.setDescription( "test 9 plugin description" );
      cg1.setId( "test9id" );
      cg1.setType( "test9type" );
      cg1.setTitle( "Test Generator 9" );
      cg1.setUrl( "/test9url" );
      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" )
View Full Code Here

      // //////////////////
      // For 10b only
      //
      p.getMetaProviderMap().put( "test10type1-ext", Tst10bMetaProvider.class.getName() );

      ContentGeneratorInfo cg1 = new ContentGeneratorInfo();
      cg1.setDescription( "test 10b plugin description" );
      cg1.setId( "test10type1-ext" ); // setting to same string as extension to verify that names do not collide causing
      // classcastexception
      cg1.setType( "test10type1-ext" );
      cg1.setTitle( "Test Generator 10b" );
      cg1.setUrl( "/test10burl" );
      cg1.setClassname( "org.pentaho.test.platform.plugin.pluginmgr.ContentGenerator1" );
      p.addContentGenerator( cg1 );
      //
      // //////////////////

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

    public List<IPlatformPlugin> getPlugins( IPentahoSession session ) throws PlatformPluginRegistrationException {
      PlatformPlugin p = new PlatformPlugin();

      p.setId( "test13Plugin" );

      ContentGeneratorInfo cg1 = new ContentGeneratorInfo();
      cg1.setDescription( "test 9 plugin description" );
      cg1.setId( "test13cgId" );
      cg1.setType( "test13type" );
      cg1.setTitle( "Test Generator 13" );
      cg1.setUrl( "/test13url" );
      cg1.setClassname( "org.pentaho.test.platform.plugin.pluginmgr.ContentGenerator1" );
      p.addContentGenerator( cg1 );

      p.addStaticResourcePath( "/test/13/static/url", "/tmp" );

      PlatformPlugin pExt = new PlatformPlugin();
View Full Code Here

TOP

Related Classes of org.pentaho.platform.engine.core.solution.ContentGeneratorInfo

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.