Code Search for Developers
 
 
  

PlatformFileContext.java from BIRT at Krugle


Show PlatformFileContext.java syntax highlighted

/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation. All rights reserved. This program and
 * the accompanying materials are made available under the terms of the Eclipse
 * Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html Contributors: Actuate Corporation -
 * initial API and implementation
 ******************************************************************************/

package org.eclipse.birt.core.framework;

/**
 * An platform context that is based on file operations. Since in web
 * environment WAR deployment, absolute file path is not available. In this
 * case, user should NOT use this class. In this case, user should use
 * PlatformServletContext or develop his own PlatformContext to make sure
 * reousce operation are used.
 */
public class PlatformFileContext implements IPlatformContext
{

	protected String root;

	protected String[] arguments;

	/**
	 * PlatformFileContext Constructor
	 * 
	 */
	public PlatformFileContext( )
	{
		root = System.getProperty( "BIRT_HOME" );
		if ( root == null )
		{
			root = ".";
		}
		arguments = null;
	}

	/**
	 * PlatformFileContext Constructor( String , IPlatformConfig )
	 * 
	 * @param root
	 * @param platformConfig
	 */
	public PlatformFileContext( PlatformConfig config )
	{
		assert config != null;
		root = config.getBIRTHome( );;
		if ( root == null )
		{
			root = System.getProperty( IPlatformConfig.BIRT_HOME );
		}
		if ( root == null )
		{
			root = ".";
		}
		arguments = config.getOSGiArguments( );
	}

	public String getPlatform( )
	{
		return root;
	}

	public String[] getLaunchArguments( )
	{
		return arguments;
	}
}




See more files for this project here

BIRT

BIRT is an open source, Eclipse-based reporting system that integrates with your application to produce compelling reports for both web and PDF.

Project homepage: http://www.eclipse.org/birt/phoenix/
Programming language(s): Java,XML
License: gpl2

  eclipse/
    EclipseBundle.java
    EclipseConfigurationElement.java
    EclipseExtension.java
    EclipseExtensionPoint.java
    EclipseExtensionRegistry.java
    EclipsePath.java
    EclipsePlatform.java
    EclispeExecutableExtension.java
    package.html
  osgi/
    OSGILauncher.java
  parser/
    AbstractParseState.java
    AnyElementState.java
    ParseState.java
    XMLParserException.java
    XMLParserHandler.java
    package.html
  server/
  FrameworkException.java
  IBundle.java
  IConfigurationElement.java
  IExecutableExtension.java
  IExtension.java
  IExtensionPoint.java
  IExtensionRegistry.java
  IPlatform.java
  IPlatformConfig.java
  IPlatformContext.java
  IPlatformPath.java
  Platform.java
  PlatformConfig.java
  PlatformFileContext.java
  PlatformServletContext.java
  package.html