Examples of PluginAdapter


Examples of frontend.alphaspawn.PluginAdapter

   * @return true if the plugin has been loaded successfully, false otherwise.
   *         If it was already loaded, true is return.
   */
  protected boolean loadPlugin ( String pluginName ) {
    // Load & register the plugin
    PluginAdapter plugin = null;
   
    try {
      plugin = this.objPluginMgr.loadPlugin( pluginName );
    }
    catch ( Exception e ) {
View Full Code Here

Examples of frontend.alphaspawn.PluginAdapter

   * @return true if the plugin has been unloaded successfully, false otherwise.
   *         If it wasn't found, false is return.
   */
  protected boolean unloadPlugin ( String pluginName ) {
    // Iterate through the plugin list and find the right plugin
    PluginAdapter pluginToRemove = null;
    for ( int i = this.objPluginMgr.getPluginCount() - 1 ; i >= 0 && pluginToRemove == null ; i-- ) {
      PluginAdapter plugin = this.objPluginMgr.getPlugin( i );
     
      // Checks if we get a valid plugin
      if ( plugin != null ) {
        // The plugin is valid.
        // Checks if this is the one we are look for.
        if ( plugin.getName().equals( pluginName ) ) {
          // This is the plugin to unload
          pluginToRemove = plugin;
        }
      }
    }
View Full Code Here

Examples of frontend.alphaspawn.PluginAdapter

    }
   
    // Second, get the list of loaded plugins
    // Iterate through the list and mark these plugins has loaded
    for ( Iterator iter = this.objPluginMgr.getPlugins().iterator() ; iter.hasNext() ; ) {
      PluginAdapter plugin = (PluginAdapter)iter.next();
      String pluginName = plugin.getName();
     
      // Checks if the plugin is in the list
      if ( listPkg.containsKey( pluginName ) ) {
        // The plugin is in the list
        // Remove the old occurence and insert a new one and
View Full Code Here

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

      define( IPluginProvider.class, SystemPathXmlPluginProvider.class, Scope.GLOBAL );
      define( IPluginManager.class, DefaultPluginManager.class, Scope.GLOBAL );
      define( IServiceManager.class, DefaultServiceManager.class, Scope.GLOBAL );
      define( IPluginResourceLoader.class, PluginResourceLoader.class, Scope.GLOBAL );
    }
    addLifecycleListener( new PluginAdapter() );

  }
View Full Code Here

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

    microPlatform.define( IPluginProvider.class, SystemPathXmlPluginProvider.class );
    microPlatform.define( IServiceManager.class, DefaultServiceManager.class );

    session = new StandaloneSession();

    pluginAdapter = new PluginAdapter();

    microPlatform.addAdminAction( pluginAdapter );

    microPlatform.init();
  }
View Full Code Here

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

  public void testPluginAdapterViaPublisherAPI() throws Exception {
    startTest();

    IPentahoSession session = new StandaloneSession( "test user" ); //$NON-NLS-1$

    PluginAdapter mgr = new PluginAdapter();
    assertTrue( mgr instanceof IPentahoPublisher );
    IPentahoPublisher publisher = (IPentahoPublisher) mgr;

    assertEquals( Messages.getInstance().getString( "PluginAdapter.USER_PLUGIN_MANAGER" ), publisher.getName() ); //$NON-NLS-1$
    assertNotSame( "!PluginAdapter.USER_PLUGIN_MANAGER!", publisher.getName() ); //$NON-NLS-1$
View Full Code Here

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

  public void testPluginAdapterViaSystemListenerAPI() throws Exception {
    startTest();

    IPentahoSession session = new StandaloneSession( "test user" ); //$NON-NLS-1$

    PluginAdapter mgr = new PluginAdapter();
    assertTrue( mgr instanceof IPentahoSystemListener );

    IPentahoSystemListener listener = (IPentahoSystemListener) mgr;

    assertFalse( listener.startup( session ) );
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.