Examples of IApplicationContext


Examples of org.eclipse.equinox.app.IApplicationContext

      return null;
    }
    if (ref == null || ref.length == 0)
      return null;
    // assumes the application context is available as a service
    IApplicationContext result = (IApplicationContext) context.getService(ref[0]);
    if (result != null) {
      context.ungetService(ref[0]);
      return result;
    }
    return null;
View Full Code Here

Examples of org.eclipse.equinox.app.IApplicationContext

    synchronized (this) {
      if (splashEnded)
        return; // do not do this more than once
      splashEnded = true;
    }
    IApplicationContext applicationContext = getApplicationContext();
    if (applicationContext != null)
      applicationContext.applicationRunning();
  }
View Full Code Here

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

      if ( contentHandlerPattern == null ) {
        final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
        contentHandlerPattern = globalConfig.getConfigProperty( "org.pentaho.web.ContentHandler" ); //$NON-NLS-1$
      }

      final IApplicationContext ctx = PentahoSystem.getApplicationContext();

      final URLRewriter rewriter;
      final ContentLocation dataLocation;
      final NameGenerator dataNameGenerator;
      if ( ctx != null ) {
        File dataDirectory = new File( ctx.getFileOutputPath( "system/tmp/" ) ); //$NON-NLS-1$
        if ( dataDirectory.exists() && ( dataDirectory.isDirectory() == false ) ) {
          dataDirectory = dataDirectory.getParentFile();
          if ( dataDirectory.isDirectory() == false ) {
            throw new ReportProcessingException( Messages.getInstance().getErrorString(
                "JFreeReportDirectoryComponent.ERROR_0001_INVALID_DIR", dataDirectory.getPath() ) ); //$NON-NLS-1$
View Full Code Here

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

        final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
        htmlContentHandlerUrlPattern = PentahoRequestContextHolder.getRequestContext().getContextPath();
        htmlContentHandlerUrlPattern += globalConfig.getConfigProperty( "org.pentaho.web.ContentHandler" ); //$NON-NLS-1$
      }

      final IApplicationContext ctx = PentahoSystem.getApplicationContext();

      final URLRewriter rewriter;
      final ContentLocation dataLocation;
      final NameGenerator dataNameGenerator;
      if ( ctx != null ) {
        File dataDirectory = new File( ctx.getFileOutputPath( "system/tmp/" ) ); //$NON-NLS-1$
        if ( dataDirectory.exists() && ( dataDirectory.isDirectory() == false ) ) {
          dataDirectory = dataDirectory.getParentFile();
          if ( dataDirectory.isDirectory() == false ) {
            throw new ReportProcessingException( Messages.getInstance().getErrorString(
                "JFreeReportDirectoryComponent.ERROR_0001_INVALID_DIR", dataDirectory.getPath() ) ); //$NON-NLS-1$
View Full Code Here

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

            } else if ( outputName.equals( ChartComponent.CONTEXT_PATH_OUTPUT ) ) {
              IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
              outputValue = requestContext.getContextPath();
            } else if ( outputName.equals( ChartComponent.FULLY_QUALIFIED_SERVER_URL_OUTPUT ) ) {

              IApplicationContext applicationContext = PentahoSystem.getApplicationContext();
              if ( applicationContext != null ) {
                outputValue = applicationContext.getFullyQualifiedServerURL();
              } else {
                IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
                outputValue = requestContext.getContextPath();
              }
            } else if ( outputName.equals( ChartComponent.HTML_IMG_TAG ) ) {
View Full Code Here

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

      // assume this is a demo installation
      // TODO: Create a servlet that's loaded on startup to set this value
      fullyQualifiedServerUrl = "http://localhost:8080/pentaho/"; //$NON-NLS-1$
    }

    IApplicationContext applicationContext =
      new WebApplicationContext( SolutionContextListener.solutionPath, fullyQualifiedServerUrl, context
        .getRealPath( "" ), context ); //$NON-NLS-1$

    /*
     * Copy out all the initParameter values from the servlet context and put them in the application context.
View Full Code Here

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

  //
  private HibernateUtil() {
  }

  protected static boolean initialize() {
    IApplicationContext applicationContext = PentahoSystem.getApplicationContext();
    // Add to entry/exit points list
    HibernateUtil hUtil = new HibernateUtil();
    applicationContext.addEntryPointHandler( hUtil );
    applicationContext.addExitPointHandler( hUtil );

    // Look for some hibernate-specific properties...

    String hibernateConfigurationFile = lookupSetting( applicationContext, "hibernateConfigPath", //$NON-NLS-1$
        "settings/config-file", //$NON-NLS-1$
        "hibernate/hibernateConfigPath" ); //$NON-NLS-1$

    String hibernateManagedString = lookupSetting( applicationContext, "hibernateManaged", //$NON-NLS-1$
        "settings/managed", //$NON-NLS-1$
        "hibernate/hibernateManaged" ); //$NON-NLS-1$

    if ( hibernateManagedString != null ) {
      hibernateManaged = Boolean.parseBoolean( hibernateManagedString );
    }

    try {
      HibernateUtil.configuration = new Configuration();
      HibernateUtil.configuration.setEntityResolver( new PentahoEntityResolver() );
      HibernateUtil.configuration.setListener( "load", new HibernateLoadEventListener() ); //$NON-NLS-1$

      if ( hibernateConfigurationFile != null ) {
        String configPath = applicationContext.getSolutionPath( hibernateConfigurationFile );
        File cfgFile = new File( configPath );
        if ( cfgFile.exists() ) {
          HibernateUtil.configuration.configure( cfgFile );
        } else {
          HibernateUtil.log.error( Messages.getInstance().getErrorString(
View Full Code Here

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

  public void shutdown() {
  }

  public boolean startup( IPentahoSession session ) {
    IApplicationContext applicationContext = PentahoSystem.getApplicationContext();
    applicationContext.addEntryPointHandler( this );
    applicationContext.addExitPointHandler( this );
    return true;
  }
View Full Code Here

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

  private ReportUtils() {
  }

  public static synchronized File getTempDirectory( final IPentahoSession session ) {
    IApplicationContext ctx = PentahoSystem.getApplicationContext();
    if ( ctx != null ) {
      final String fileOutputPath = ctx.getFileOutputPath( "system/tmp/" ); //$NON-NLS-1$
      final File tempDir = new File( fileOutputPath );
      final String id = session.getId();

      final File userTempDir;
      if ( id == null ) {
View Full Code Here

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

  }

  protected OutputStream getOutputStream( String solnPath, String testName, String extension ) {
    OutputStream outputStream = null;
    try {
      IApplicationContext appContext = PentahoSystem.getApplicationContext();
      String outputPath = solnPath + "/test/tmp"; //$NON-NLS-1$
      String tmpDir = appContext.getFileOutputPath( outputPath );
      //String tmpDir = PentahoSystem.getApplicationContext().getFileOutputPath(SOLUTION_PATH +"test/tmp"); //$NON-NLS-1$
      File file = new File( tmpDir );
      file.mkdirs();
      String path =
          PentahoSystem.getApplicationContext().getFileOutputPath( solnPath + "/test/tmp/" + testName + extension ); //$NON-NLS-1$
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.