Package org.pentaho.platform.api.engine

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


            File searchRootFile = new File(searchRootDir);
            if (searchRootFile.exists()) {
                List<File> solutionFiles = getJsFiles(searchRootFile);
                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()) {
View Full Code Here


@Path("/saiku/api/{username}/filters")
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;
    }
View Full Code Here

        List<File> solutionFiles = getJsFiles(searchRootFile);
        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()) {
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;
    }
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;
    }
View Full Code Here

  }

  @Override
  public void createContent( OutputStream outputStream ) throws Exception {
    IPluginResourceLoader pluginResourceLoader = PentahoSystem.get( IPluginResourceLoader.class );
    IPluginManager pluginManager = PentahoSystem.get( IPluginManager.class );
    ClassLoader classLoader = pluginManager.getClassLoader( pluginId );
    String filePath = !relativeFilePath.startsWith( "/" ) ? "/" + relativeFilePath : relativeFilePath;
    InputStream inputStream = pluginResourceLoader.getResourceAsStream( classLoader, filePath );
    int val;
    while ( ( val = inputStream.read() ) != -1 ) {
      outputStream.write( val );
View Full Code Here

        .define( IPluginManager.class, DefaultPluginManager.class, IPentahoDefinableObjectFactory.Scope.GLOBAL );

    PentahoSystem.setSystemSettingsService( new PathBasedSystemSettings() );
    PentahoSessionHolder.setSession( session );

    IPluginManager pluginManager = PentahoSystem.get( IPluginManager.class );
    microPlatform.define( IPluginProvider.class, TestPluginProvider.class );
    microPlatform.start();

    pluginManager.reload( session );
  }
View Full Code Here

  public void testBadConfig1() {
    startTest();

    IPentahoSession session = new StandaloneSession( "test user" ); //$NON-NLS-1$
    IPluginManager pluginManager = PentahoSystem.get( IPluginManager.class, session );
    assertNull( pluginManager );

    finishTest();
  }
View Full Code Here

    }

    for ( int i = 0; i < RETRY_COUNT; i++ ) {
      try {
        if ( !StringUtils.isEmpty( actionId ) ) {
          IPluginManager pluginManager = PentahoSystem.get( IPluginManager.class );
          clazz = pluginManager.loadClass( actionId );
          return clazz;
        } else if ( !StringUtils.isEmpty( actionClass ) ) {
          clazz = Class.forName( actionClass );
          return clazz;
        }
View Full Code Here

  public Response getSystemResource( @PathParam( "path" ) String path, @Context HttpServletResponse response )
    throws IOException {

    String pluginId = CdfEngine.getEnvironment().getPluginId();

    IPluginManager pluginManager = PentahoSystem.get( IPluginManager.class );

    if ( !StringUtils.isEmpty( path ) && pluginManager.isPublic( pluginId, path ) ) {

      Response readFileResponse = new PluginResource( response ).readFile( pluginId, path );

      if ( readFileResponse.getStatus() != Status.NOT_FOUND.getStatusCode() ) {
        return readFileResponse;
View Full Code Here

TOP

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

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.