Package org.pentaho.platform.api.engine

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


  @Override
  public final boolean reload() {
    IPentahoSession session = PentahoSessionHolder.getSession();
    boolean anyErrors = false;
    IPluginProvider pluginProvider = PentahoSystem.get( IPluginProvider.class, "IPluginProvider", session );
    List<IPlatformPlugin> providedPlugins = null;
    try {
      synchronized ( registeredPlugins ) {
        this.unloadPlugins();
      }
      // the plugin may fail to load during getPlugins without an exception thrown if the provider
      // is capable of discovering the plugin fine but there are structural problems with the plugin
      // itself. In this case a warning should be logged by the provider, but, again, no exception
      // is expected.
      providedPlugins = pluginProvider.getPlugins( session );

    } catch ( PlatformPluginRegistrationException e1 ) {
      String msg =
        Messages.getInstance().getErrorString( "PluginManager.ERROR_0012_PLUGIN_DISCOVERY_FAILED" ); //$NON-NLS-1$
      Logger.error( getClass().toString(), msg, e1 );
View Full Code Here


  @Override
  public void contextInitialized( ServletContextEvent servletContextEvent ) {
    IPluginManager pluginManager = PentahoSystem.get( IPluginManager.class );

    IPentahoSession session = PentahoSessionHolder.getSession();
    IPluginProvider pluginProvider = PentahoSystem.get( IPluginProvider.class, "IPluginProvider", session );
    try {
      List<IPlatformPlugin> providedPlugins = pluginProvider.getPlugins( session );
      for ( IPlatformPlugin plugin : providedPlugins ) {
        try {
          if ( !StringUtils.isEmpty( plugin.getLifecycleListenerClassname() ) ) {
            ClassLoader loader = pluginManager.getClassLoader( plugin.getId() );
            Object listener = loader.loadClass( plugin.getLifecycleListenerClassname() ).newInstance();
View Full Code Here

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

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

TOP

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

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.