Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.IPlatformPlugin


    }
    return false;
  }

  public boolean isPublic( String pluginId, String path ) {
    IPlatformPlugin plugin = registeredPlugins.get( pluginId );
    if ( plugin == null ) {
      return false;
    }
    Map<String, String> resourceMap = plugin.getStaticResourceMap();
    if ( path.startsWith( "/" ) ) { //$NON-NLS-1$
      path = path.substring( 1 );
    }
    for ( String pluginRelativeDir : resourceMap.values() ) {
      if ( path.startsWith( pluginRelativeDir ) ) {
View Full Code Here


  public void testLoadBeanDefinition() throws PlatformPluginRegistrationException {
    microPlatform.init();

    List<IPlatformPlugin> plugins = provider.getPlugins( new StandaloneSession() );

    IPlatformPlugin plugin =
        (IPlatformPlugin) CollectionUtils.find( plugins, new PluginNameMatcherPredicate( "Plugin 1" ) );
    assertNotNull( "Plugin 1 should have been found", plugin );

    Collection<PluginBeanDefinition> beans = plugin.getBeans();

    assertEquals( "FooComponent was not loaded", 1, CollectionUtils.countMatches( beans, new Predicate() {
      public boolean evaluate( Object object ) {
        PluginBeanDefinition bean = (PluginBeanDefinition) object;
        return bean.getBeanId().equals( "FooComponent" )
View Full Code Here

  @Test
  public void testLoadLifeCycleListener() throws PlatformPluginRegistrationException {
    microPlatform.init();
    List<IPlatformPlugin> plugins = provider.getPlugins( new StandaloneSession() );

    IPlatformPlugin plugin =
        (IPlatformPlugin) CollectionUtils.find( plugins, new PluginNameMatcherPredicate( "Plugin 1" ) );
    assertNotNull( "Plugin 1 should have been found", plugin );

    assertEquals( "org.pentaho.test.platform.plugin.pluginmgr.FooInitializer", plugin.getLifecycleListenerClassname() );
  }
View Full Code Here

    microPlatform.init();
    List<IPlatformPlugin> plugins = provider.getPlugins( new StandaloneSession() );

    System.out.println( PluginMessageLogger.getAll() );

    IPlatformPlugin plugin =
        (IPlatformPlugin) CollectionUtils.find( plugins, new PluginNameMatcherPredicate( "Plugin 1" ) );
    assertNotNull( "Plugin 1 should have been found", plugin );

    Collection<PluginServiceDefinition> webservices = plugin.getServices();

    Object wsobj = CollectionUtils.find( webservices, new Predicate() {
      public boolean evaluate( Object object ) {
        PluginServiceDefinition ws = (PluginServiceDefinition) object;
        boolean ret = ws.getTitle().equals( "%TestWS1.TITLE%" );
View Full Code Here

  @Test
  public void testLoadContentGenerators() throws PlatformPluginRegistrationException {
    microPlatform.init();
    List<IPlatformPlugin> plugins = provider.getPlugins( new StandaloneSession() );

    IPlatformPlugin plugin =
        (IPlatformPlugin) CollectionUtils.find( plugins, new PluginNameMatcherPredicate( "content-generator-plugin" ) );
    assertNotNull( "content-generator-plugin should have been found", plugin );

    List<IContentInfo> contentTypes = plugin.getContentInfos();

    Object contentType = CollectionUtils.find( contentTypes, new Predicate() {
      public boolean evaluate( Object object ) {
        IContentInfo type = (IContentInfo) object;
        return type.getTitle().equals( "Good Test Type" );
View Full Code Here

  @Test
  public void testLoadPerspectives() throws PlatformPluginRegistrationException {
    microPlatform.init();
    List<IPlatformPlugin> plugins = provider.getPlugins( new StandaloneSession() );

    IPlatformPlugin plugin =
        (IPlatformPlugin) CollectionUtils.find( plugins, new PluginNameMatcherPredicate( "Plugin 1" ) );
    assertNotNull( "Plugin 1 should have been found", plugin );

    assertEquals( 2, plugin.getPluginPerspectives().size() );
    IPluginPerspective perspective = plugin.getPluginPerspectives().get( 0 );
    assertEquals( perspective.getId(), "perspective1" );
    assertEquals( perspective.getTitle(), "Test Perspective 1" );
    assertEquals( perspective.getLayoutPriority(), 500 );
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.IPlatformPlugin

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.