Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: HowTo retrieve the IPlatformPlugin when LifeCycle.Init() is called

  1. #1
    Join Date
    Mar 2009
    Posts
    137

    Default HowTo retrieve the IPlatformPlugin when LifeCycle.Init() is called

    Hi,

    the title of this thread is my question ... I would like to get the instance of the PlatformPlugIn when the LifecycleListener fires the init() method. I need that to get the id of my plugin...

    I mean I could use the resourceloader to get the plugin.xml of the plugin and look the id up there, but isn't there a way to get the PlugIn object for the specific plugin?

    Thanks a lot,
    if my question is not clear please let me know, so that I can retry

  2. #2
    pstoellberger Guest

    Default

    i dont think you can get the plugin within your plugin lifecycle listener init(), because its still in the init process, thats why i access everything in loaded()

    if you're looking for that: <plugin title="PAT Plugin"> ... the "PAT Plugin" in this case... which is the plugin id.. then you should have that in your config somewhere, instead of reading it from the plugin system, (thats how i do it anyway)

    so in my loaded() i call:
    final IPluginManager pluginManager = (IPluginManager) PentahoSystem.get(IPluginManager.class, PentahoSessionHolder.getSession());
    final PluginClassLoader pluginClassloader = (PluginClassLoader)pluginManager.getClassLoader(PAT_PLUGIN_NAME);

    while PAT_PLUGIN_NAME is "PAT Plugin"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.