Examples of PluginClassLoader


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

      final IPluginManager pluginManager = (IPluginManager) PentahoSystem.get(IPluginManager.class, PentahoSessionHolder.getSession());

      Long start = (new Date()).getTime();
      for (String plugin : pluginManager.getRegisteredPlugins()) {
        final PluginClassLoader pluginClassloader = (PluginClassLoader) pluginManager.getClassLoader(plugin);
        File pluginDir = pluginClassloader.getPluginDir();
        File saikuDir = new File(pluginDir, "saiku");
        if (saikuDir.exists()) {
          File saikuPluginDir = new File(saikuDir, "plugins");
          if (saikuPluginDir.exists()) {
            List<File> jsFiles = getJsFiles(saikuPluginDir);
View Full Code Here

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

public class PentahoFilterRepositoryResource extends FilterRepositoryResource {
 
  @Override
  public void setPath(String path) throws Exception {
    final IPluginManager pluginManager = (IPluginManager) PentahoSystem.get(IPluginManager.class, PentahoSessionHolder.getSession());
    final PluginClassLoader pluginClassloader = (PluginClassLoader)pluginManager.getClassLoader(PluginConfig.PLUGIN_NAME);
    File pluginDir = pluginClassloader.getPluginDir();
    String absolute = "file:" +pluginDir.getAbsolutePath();
    if (!absolute.endsWith("" + File.separatorChar)) {
       absolute += File.separatorChar;
    }
    absolute += path;
View Full Code Here

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

public class PentahoTagRepositoryResource extends BasicTagRepositoryResource {
 
  @Override
  public void setPath(String path) throws Exception {
    final IPluginManager pluginManager = (IPluginManager) PentahoSystem.get(IPluginManager.class, PentahoSessionHolder.getSession());
    final PluginClassLoader pluginClassloader = (PluginClassLoader)pluginManager.getClassLoader(PluginConfig.PLUGIN_NAME);
    File pluginDir = pluginClassloader.getPluginDir();
    String absolute = "file:" +pluginDir.getAbsolutePath();
    if (!absolute.endsWith("" + File.separatorChar)) {
       absolute += File.separatorChar;
    }
    absolute += path;
View Full Code Here

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

  private static EnunciateJerseyServletContainer servlet;

  public ServletAdapterContentGenerator() throws ServletException {
    final ClassLoader origLoader = Thread.currentThread().getContextClassLoader();
    final PluginClassLoader tempLoader = (PluginClassLoader) pm.getClassLoader(PLUGIN_ID);
    try {
      Thread.currentThread().setContextClassLoader(tempLoader);

      if (appContext == null) {
        appContext = getSpringBeanFactory();
View Full Code Here

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

    }
  }

  private void createSaikuExport() throws Exception {
      final ClassLoader origLoader = Thread.currentThread().getContextClassLoader();
      final PluginClassLoader tempLoader = (PluginClassLoader) pm.getClassLoader(PLUGIN_ID);
      final IParameterProvider requestParams = getRequestParameters();
      OutputStream out = null;
      if( outputHandler == null ) {
        throw new InvalidParameterException( "SimpleContentGenerator.ERROR_0001_NO_OUTPUT_HANDLER" )//$NON-NLS-1$
      }
View Full Code Here

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

    }
    HttpServletResponse response = (HttpServletResponse) this.parameterProviders.get("path").getParameter(
        "httpresponse");

    final ClassLoader origLoader = Thread.currentThread().getContextClassLoader();
    final PluginClassLoader tempLoader = (PluginClassLoader) pm.getClassLoader(PLUGIN_ID);
    try {
      Thread.currentThread().setContextClassLoader(tempLoader);
      servlet.service(request, response);
    } finally {
      Thread.currentThread().setContextClassLoader(origLoader);
View Full Code Here

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

  public Log getLogger() {
    return logger;
  }

  private ConfigurableApplicationContext getSpringBeanFactory() {
    final PluginClassLoader loader = (PluginClassLoader) pm.getClassLoader(PLUGIN_ID);
    File f = new File(loader.getPluginDir(), "plugin.spring.xml"); //$NON-NLS-1$
    if (f.exists()) {
      logger.debug("Found plugin spring file @ " + f.getAbsolutePath()); //$NON-NLS-1$
      ConfigurableApplicationContext context = new FileSystemXmlApplicationContext("file:" + f.getAbsolutePath()) { //$NON-NLS-1$
        @Override
        protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) {
View Full Code Here

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

  private PluginClassLoader pluginLoader;

  @Before
  public void init() {
    // now load a class
    pluginLoader = new PluginClassLoader( new File( "./test-res/PluginClassLoaderTest/" ),
      getClass().getClassLoader() );
  }
View Full Code Here

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

  @Before
  public void init() throws ClassNotFoundException {
    resLoader = new PluginResourceLoader();
    classLoader =
        new PluginClassLoader( new File( "./test-res/PluginResourceLoaderTest" ), getClass().getClassLoader() );
    pluginClass = classLoader.loadClass( "PluginResLoaderDummyClass" );
  }
View Full Code Here

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

  public void beforeTest() throws Exception {
    repositoryBase.setUp();
    repositoryBase.getMp().define( IPluginManager.class, DefaultPluginManager.class, Scope.GLOBAL );
    repositoryBase.getMp().defineInstance( IPluginResourceLoader.class, new PluginResourceLoader() {
      protected PluginClassLoader getOverrideClassloader() {
        return new PluginClassLoader( new File( "test-res/PluginResourceTest/system/test-plugin" ), this );
      }
    } );
    repositoryBase.getMp().define( IPluginProvider.class, TestPlugin.class, Scope.GLOBAL );
    PentahoSystem.get( IPluginManager.class ).reload();
    SecurityContextHolder.setStrategyName( SecurityContextHolder.MODE_GLOBAL );
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.