Package org.pentaho.platform.plugin.services.pluginmgr

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


                files.addAll(solutionFiles);
            }
            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

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

      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

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

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

  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

    }
  }

  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

    }
    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

  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

TOP

Related Classes of org.pentaho.platform.plugin.services.pluginmgr.PluginClassLoader

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.