Package org.pentaho.platform.engine.core.system

Examples of org.pentaho.platform.engine.core.system.PathBasedSystemSettings


   * System.out.println(formattedRs.toString()); assertTrue(formattedRs.indexOf("<th>COL3</th>")>=0); //$NON-NLS-1$ }
   */

  public void testPathBasedSystemSettings() {

    PathBasedSystemSettings settings = new PathBasedSystemSettings();
    String cfgPathKey = settings.getSystemSetting( PathBasedSystemSettings.SYSTEM_CFG_PATH_KEY, "" ); //$NON-NLS-1$
    List list = settings.getSystemSettings( PathBasedSystemSettings.SYSTEM_CFG_PATH_KEY );
    for ( int i = 0; i < list.size(); i++ ) {
      System.out.println( "System Settings" + ( i + 1 ) + list.get( i ) ); //$NON-NLS-1$
    }
    System.setProperty( PathBasedSystemSettings.SYSTEM_CFG_PATH_KEY, "" ); //$NON-NLS-1$
    settings.getSystemSetting( "c:/code", PathBasedSystemSettings.SYSTEM_CFG_PATH_KEY, null ); //$NON-NLS-1$
    System.setProperty( PathBasedSystemSettings.SYSTEM_CFG_PATH_KEY, cfgPathKey );
    assertTrue( true );
  }
View Full Code Here


      return ALT_SOLUTION_PATH;
    }
  }

  public boolean init() {
    PentahoSystem.setSystemSettingsService( new PathBasedSystemSettings() );
    File file = new File( SOLUTION_PATH + PENTAHO_XML_PATH );
    StandaloneApplicationContext applicationContext = null;
    if ( file.exists() ) {
      applicationContext = new StandaloneApplicationContext( SystemSettingsTest.SOLUTION_PATH, "" ); //$NON-NLS-1$
    } else {
View Full Code Here

  @Test
  public void testSystemSettingsConfiguration() throws Exception {

    PentahoSystem.clearObjectFactory();
    PentahoSystem.setApplicationContext( new StandaloneApplicationContext( "test-res/SystemConfig", "" ) );
    SystemSettingsConfiguration settings = new SystemSettingsConfiguration( "system", new PathBasedSystemSettings() );
    Properties props = settings.getProperties();
    assertNotNull( props );
    assertEquals( "Hypersonic", props.get( "sampledata-datasource.type" ) );
  }
View Full Code Here

    if ( initOk ) {
      return;
    }

    PentahoSystem.setSystemSettingsService( new PathBasedSystemSettings() );

    if ( PentahoSystem.getApplicationContext() == null ) {
      StandaloneApplicationContext applicationContext = new StandaloneApplicationContext( getSolutionPath(), "" ); //$NON-NLS-1$
      // set the base url assuming there is a running server on port 8080
      applicationContext.setFullyQualifiedServerURL( getFullyQualifiedServerURL() );
View Full Code Here

    microPlatform.define( IPluginResourceLoader.class, PluginResourceLoader.class );
    microPlatform.define( IPluginProvider.class, SystemPathXmlPluginProvider.class );
    microPlatform
        .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();
View Full Code Here

    if ( initOk ) {
      return;
    }

    PentahoSystem.setSystemSettingsService( new PathBasedSystemSettings() );
    if ( PentahoSystem.getApplicationContext() == null ) {
      StandaloneApplicationContext applicationContext = new StandaloneApplicationContext( getSolutionPath(), "" ); //$NON-NLS-1$
      String inContainer = System.getProperty( "incontainer", "false" ); //$NON-NLS-1$ //$NON-NLS-2$
      if ( inContainer.equalsIgnoreCase( "false" ) ) { //$NON-NLS-1$
        // Setup simple-jndi for datasources
View Full Code Here

  public BaseTestCase( String solutionPath ) {
    init( solutionPath );
  }

  protected void init( String solnPath ) {
    PentahoSystem.setSystemSettingsService( new PathBasedSystemSettings() );
    applicationContext = new StandaloneApplicationContext( solnPath, "" ); //$NON-NLS-1$
    applicationContext.setFullyQualifiedServerURL( getFullyQualifiedServerURL() );
    String inContainer = System.getProperty( "incontainer", "false" ); //$NON-NLS-1$ //$NON-NLS-2$
    if ( inContainer.equalsIgnoreCase( "false" ) ) { //$NON-NLS-1$
      // Setup simple-jndi for datasources
View Full Code Here

    PentahoSystem.setApplicationContext( createApplicationContext() );
  }

  @Override
  public boolean start() throws PlatformInitializationException {
    PentahoSystem.setSystemSettingsService( new PathBasedSystemSettings() );
    // initialize log4j to write to the console
    BasicConfigurator.configure();
    boolean ret = super.start();
    // set log levels
    // FIXME: find a better way to set log levels programmatically than this.. this can cause NPEs
View Full Code Here

TOP

Related Classes of org.pentaho.platform.engine.core.system.PathBasedSystemSettings

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.