org.ops4j.pax.runner.platform.internal
Class PlatformDefinitionImpl

java.lang.Object
  extended by org.ops4j.pax.runner.platform.internal.PlatformDefinitionImpl
All Implemented Interfaces:
PlatformDefinition

public class PlatformDefinitionImpl
extends java.lang.Object
implements PlatformDefinition

Implementation of platform definition that that reads definition form an xml.

Since:
August 25, 2007
Author:
Alin Dreghiciu

Constructor Summary
PlatformDefinitionImpl(java.io.InputStream inputStream, java.lang.Integer startLevel)
          Creates a new platform definition by reading an xml from an output stream.
 
Method Summary
 java.lang.String getPackages()
          Returns a list of comma separated list of packages required by the platform.
 java.util.List<BundleReference> getPlatformBundles(java.lang.String profiles)
          Returns a list of bundles to be installed as part of the platform.
 java.net.URL getSystemPackage()
          Returns the system package = a jar containing the main platform classes.
 java.lang.String getSystemPackageName()
          Returns the "nice" name for system package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformDefinitionImpl

public PlatformDefinitionImpl(java.io.InputStream inputStream,
                              java.lang.Integer startLevel)
                       throws java.io.IOException,
                              javax.xml.parsers.ParserConfigurationException,
                              org.xml.sax.SAXException
Creates a new platform definition by reading an xml from an output stream.

Parameters:
inputStream - an xml input stream
startLevel - the start level that platform bundles should be started
Throws:
java.io.IOException - re-thrown while parsing the input stream as xml
javax.xml.parsers.ParserConfigurationException - re-thrown while parsing the input stream as xml
org.xml.sax.SAXException - re-thrown while parsing the input stream as xml
Method Detail

getSystemPackage

public java.net.URL getSystemPackage()
Description copied from interface: PlatformDefinition
Returns the system package = a jar containing the main platform classes.

Specified by:
getSystemPackage in interface PlatformDefinition
Returns:
the system package url
See Also:
PlatformDefinition.getSystemPackage()

getSystemPackageName

public java.lang.String getSystemPackageName()
Description copied from interface: PlatformDefinition
Returns the "nice" name for system package.

Specified by:
getSystemPackageName in interface PlatformDefinition
Returns:
name of system package
See Also:
PlatformDefinition.getSystemPackageName()

getPackages

public java.lang.String getPackages()
Description copied from interface: PlatformDefinition
Returns a list of comma separated list of packages required by the platform. The list will be appended to the system packages.

Specified by:
getPackages in interface PlatformDefinition
Returns:
a comma separated list of packages
See Also:
PlatformDefinition.getPackages()

getPlatformBundles

public java.util.List<BundleReference> getPlatformBundles(java.lang.String profiles)
Description copied from interface: PlatformDefinition
Returns a list of bundles to be installed as part of the platform. If profile name is null or empty will return the default profile.

Specified by:
getPlatformBundles in interface PlatformDefinition
Parameters:
profiles - name of the profile in use
Returns:
a list of bundle urls
See Also:
PlatformDefinition.getPlatformBundles(String)


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.