Code Search for Developers
 
 
  

PlatformConfig.java from BIRT at Krugle


Show PlatformConfig.java syntax highlighted

/*******************************************************************************
 * Copyright (c) 2004, 2005 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;

import java.util.HashMap;

/**
 * Defines an implementation of IPlatformConfig to access OSGi framework.
 * implements the interface IPlatformConfig
 */
public class PlatformConfig implements IPlatformConfig
{

	/**
	 * the properties that needed when platfrom is running it's an instance of
	 * HashMap
	 */
	protected HashMap properties = new HashMap( );

	public Object getProperty( String name )
	{
		return properties.get( name );
	}

	public void setProperty( String name, Object value )
	{
		properties.put( name, value );
	}

	public String getBIRTHome( )
	{
		Object birtHome = properties.get( BIRT_HOME );
		if ( birtHome instanceof String )
		{
			return (String) birtHome;
		}
		return null;
	}

	public void setBIRTHome( String birtHome )
	{
		properties.put( BIRT_HOME, birtHome );
	}

	public String[] getOSGiArguments( )
	{
		Object arguments = properties.get( OSGI_ARGUMENTS );
		if ( arguments instanceof String[] )
		{
			return (String[]) arguments;
		}
		return null;
	}

	public void setOSGiArguments( String[] arguments )
	{
		properties.put( OSGI_ARGUMENTS, arguments );
	}

	public IPlatformContext getPlatformContext( )
	{
		Object context = properties.get( PLATFORM_CONTEXT );
		if ( context instanceof IPlatformContext )
		{
			return (IPlatformContext) context;
		}
		return null;
	}

	public void setPlatformContext( IPlatformContext context )
	{
		properties.put( PLATFORM_CONTEXT, context );
	}
}




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