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

java.lang.Object
  extended by org.ops4j.util.property.PropertyStore
      extended by org.ops4j.pax.runner.platform.internal.ConfigurationImpl
All Implemented Interfaces:
Configuration

public class ConfigurationImpl
extends org.ops4j.util.property.PropertyStore
implements Configuration

Service Configuration implementation.

Since:
August 25, 2007
Author:
Alin Dreghiciu
See Also:
Configuration

Constructor Summary
ConfigurationImpl(org.ops4j.util.property.PropertyResolver propertyResolver)
          Creates a new service configuration.
 
Method Summary
 java.lang.String getBootDelegation()
          Returns a comma separated list of boot delegation packages according to OSGi core specs 3.2.3 (in 4.0.1).
 java.lang.Integer getBundleStartLevel()
          Returns the installed bundles start level option - optional; the platform start level.
 java.lang.String getClasspath()
          TODO add unit tests
 java.net.URL getDefinitionURL()
          Returns the definition url option - optional; url to the xml file containing the definition of the platform (system bundle, profiles).
 java.lang.String getExecutionEnvironment()
          Returns the java version option - optional; the targeted version for the platform.
 java.lang.String getFrameworkProfile()
          Returns the framework profile option - optional; name of the framework profile to use.
 java.lang.String getJavaHome()
          Returns the java home option - optional; If no version was specified then first the value of system property "JAVA_HOME" is used.
 java.lang.String getProfiles()
          Returns the profiles option - optional; a comma separated list of profiles to be used.
 java.lang.Integer getProfileStartLevel()
          Returns the platform bundles start level option - optional; the start level at which the platform bundles will be started.
 java.lang.String getProperty(java.lang.String name)
          Returns a raw configuration property by name.
 java.lang.Integer getStartLevel()
          Returns the platform start level option - optional; the platform start level.
 java.lang.String getSystemPackages()
          Returns the system packages option - optional; a comma separated list of packages that should be exported by the framework bundles, in addition to the standard packages list.
 java.lang.String[] getVMOptions()
          Returns the virtual machine options option - optional; virtual machine options to be used for the VM that will be used for the platform.
 java.lang.String getWorkingDirectory()
          Returns the working directory option - ptional; a file path where the platform specific artifacts will be stored.
 java.lang.Boolean isAutoWrap()
          Returns true if not osgi compliant jars should be automatically wrapped (transformed to osgi compliant).
 java.lang.Boolean isDebugClassLoading()
          Returns true if the platform should print debug messages about class loading.
 java.lang.Boolean isDownloadFeedback()
          Returns true if detailed information about downloading process should be displayed.
 java.lang.Boolean isOverwrite()
          Returns true if the already downloaded bundles from a previous run must be overwritten.
 java.lang.Boolean isOverwriteSystemBundles()
          Returns true if the already downloaded system bundles from a previous run must be overwritten.
 java.lang.Boolean isOverwriteUserBundles()
          Returns true if the already downloaded user bundles from a previous run must be overwritten.
 java.lang.Boolean keepOriginalUrls()
          Returns true if the provisioning urls should be the ones provided by scanners or the local cashed ones.
 java.lang.Boolean skipInvalidBundles()
          Returns true if the invalid bundles should be skipped from provisioning.
 java.lang.Boolean startConsole()
          Returns the start console option - true/false; whether the platform console should be started.
 java.lang.Boolean useAbsoluteFilePaths()
          Returns true if the file paths used in frameworks configuration files and properties should be absolute.
 java.lang.Boolean usePersistedState()
          Returns true if persisted platform state (platform specific) should be used on start up.
 java.lang.Boolean validateBundles()
          Returns true if the bundles should be validated, meaning that they have the required OSGi headers.
 
Methods inherited from class org.ops4j.util.property.PropertyStore
contains, get, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationImpl

public ConfigurationImpl(org.ops4j.util.property.PropertyResolver propertyResolver)
Creates a new service configuration.

Parameters:
propertyResolver - propertyResolver used to resolve properties; mandatory
Method Detail

getDefinitionURL

public java.net.URL getDefinitionURL()
                              throws java.net.MalformedURLException
Description copied from interface: Configuration
Returns the definition url option - optional; url to the xml file containing the definition of the platform (system bundle, profiles).

Specified by:
getDefinitionURL in interface Configuration
Returns:
value of definition url option
Throws:
java.net.MalformedURLException - if the definition url is malformed
See Also:
Configuration.getDefinitionURL()

getWorkingDirectory

public java.lang.String getWorkingDirectory()
Description copied from interface: Configuration
Returns the working directory option - ptional; a file path where the platform specific artifacts will be stored. Default value "runner".

Specified by:
getWorkingDirectory in interface Configuration
Returns:
value of working directory option
See Also:
Configuration.getWorkingDirectory()

getVMOptions

public java.lang.String[] getVMOptions()
Description copied from interface: Configuration
Returns the virtual machine options option - optional; virtual machine options to be used for the VM that will be used for the platform.

Specified by:
getVMOptions in interface Configuration
Returns:
value of virtual machine options option
See Also:
Configuration.getVMOptions()

getClasspath

public java.lang.String getClasspath()
TODO add unit tests

Specified by:
getClasspath in interface Configuration
Returns:
value of classpath option
See Also:
Configuration.getClasspath()

getSystemPackages

public java.lang.String getSystemPackages()
Description copied from interface: Configuration
Returns the system packages option - optional; a comma separated list of packages that should be exported by the framework bundles, in addition to the standard packages list.

Specified by:
getSystemPackages in interface Configuration
Returns:
value of system packages option
See Also:
Configuration.getSystemPackages()

getExecutionEnvironment

public java.lang.String getExecutionEnvironment()
Description copied from interface: Configuration
Returns the java version option - optional; the targeted version for the platform. Default is the same version as the runner is working on.

Specified by:
getExecutionEnvironment in interface Configuration
Returns:
value of java version option
See Also:
Configuration.getExecutionEnvironment()

getJavaHome

public java.lang.String getJavaHome()
Description copied from interface: Configuration
Returns the java home option - optional; If no version was specified then first the value of system property "JAVA_HOME" is used. If that is not set then teh value of system property "java.home" will be used (=same with the home in which runner is running).

Specified by:
getJavaHome in interface Configuration
Returns:
value of java home option
See Also:
Configuration.getJavaHome()

usePersistedState

public java.lang.Boolean usePersistedState()
Description copied from interface: Configuration
Returns true if persisted platform state (platform specific) should be used on start up. Default value is false.

Specified by:
usePersistedState in interface Configuration
Returns:
true if persisted platform state (platform specific) should be used on start up
See Also:
Configuration.usePersistedState()

startConsole

public java.lang.Boolean startConsole()
Description copied from interface: Configuration
Returns the start console option - true/false; whether the platform console should be started. Default value is "true".

Specified by:
startConsole in interface Configuration
Returns:
value of start console option
See Also:
Configuration.startConsole()

isOverwrite

public java.lang.Boolean isOverwrite()
Description copied from interface: Configuration
Returns true if the already downloaded bundles from a previous run must be overwritten. Default value is "false".

Specified by:
isOverwrite in interface Configuration
Returns:
value of overwrite option
See Also:
Configuration.isOverwrite()

getProfiles

public java.lang.String getProfiles()
Description copied from interface: Configuration
Returns the profiles option - optional; a comma separated list of profiles to be used. Default value is "minimal".

Specified by:
getProfiles in interface Configuration
Returns:
value of profiles option
See Also:
Configuration.getProfiles()

getFrameworkProfile

public java.lang.String getFrameworkProfile()
Description copied from interface: Configuration
Returns the framework profile option - optional; name of the framework profile to use.

Specified by:
getFrameworkProfile in interface Configuration
Returns:
value of framework profile
See Also:
Configuration.getFrameworkProfile()

getProfileStartLevel

public java.lang.Integer getProfileStartLevel()
Description copied from interface: Configuration
Returns the platform bundles start level option - optional; the start level at which the platform bundles will be started. Default value is 1.

Specified by:
getProfileStartLevel in interface Configuration
Returns:
value of platform bundles start level option.
See Also:
Configuration.getProfileStartLevel()

getStartLevel

public java.lang.Integer getStartLevel()
Description copied from interface: Configuration
Returns the platform start level option - optional; the platform start level. Default value is "6".

Specified by:
getStartLevel in interface Configuration
Returns:
value of platform start level option.
See Also:
Configuration.getStartLevel()

getBundleStartLevel

public java.lang.Integer getBundleStartLevel()
Description copied from interface: Configuration
Returns the installed bundles start level option - optional; the platform start level. Default value is "5".

Specified by:
getBundleStartLevel in interface Configuration
Returns:
value of installed bundles start level option.
See Also:
Configuration.getBundleStartLevel()

isOverwriteUserBundles

public java.lang.Boolean isOverwriteUserBundles()
Description copied from interface: Configuration
Returns true if the already downloaded user bundles from a previous run must be overwritten. Default value is "false".

Specified by:
isOverwriteUserBundles in interface Configuration
Returns:
value of overwrite user bundles option
See Also:
Configuration.isOverwriteUserBundles()

isOverwriteSystemBundles

public java.lang.Boolean isOverwriteSystemBundles()
Description copied from interface: Configuration
Returns true if the already downloaded system bundles from a previous run must be overwritten. Default value is "false".

Specified by:
isOverwriteSystemBundles in interface Configuration
Returns:
value of overwrite system bundles option
See Also:
Configuration.isOverwriteSystemBundles()

isDebugClassLoading

public java.lang.Boolean isDebugClassLoading()
Description copied from interface: Configuration
Returns true if the platform should print debug messages about class loading. Default value is "false".

Specified by:
isDebugClassLoading in interface Configuration
Returns:
value of debug class loading option
See Also:
Configuration.isDebugClassLoading()

isDownloadFeedback

public java.lang.Boolean isDownloadFeedback()
Description copied from interface: Configuration
Returns true if detailed information about downloading process should be displayed. Default value is true.

Specified by:
isDownloadFeedback in interface Configuration
Returns:
value of download feedback option
See Also:
Configuration.isDownloadFeedback()

getBootDelegation

public java.lang.String getBootDelegation()
Description copied from interface: Configuration
Returns a comma separated list of boot delegation packages according to OSGi core specs 3.2.3 (in 4.0.1). If not set it should return null. The returned value should not be an empty string and should not end with a comma (",").

Specified by:
getBootDelegation in interface Configuration
Returns:
value of boot delegation option
See Also:
Configuration.getBootDelegation()

isAutoWrap

public java.lang.Boolean isAutoWrap()
Description copied from interface: Configuration
Returns true if not osgi compliant jars should be automatically wrapped (transformed to osgi compliant). Default value is false.

Specified by:
isAutoWrap in interface Configuration
Returns:
value of auto wrap option
See Also:
Configuration.isAutoWrap()

keepOriginalUrls

public java.lang.Boolean keepOriginalUrls()
Returns true if the provisioning urls should be the ones provided by scanners or the local cashed ones. Default value is "false".

Specified by:
keepOriginalUrls in interface Configuration
Returns:
value of use original urls option

validateBundles

public java.lang.Boolean validateBundles()
Returns true if the bundles should be validated, meaning that they have the required OSGi headers. Default value is "true".

Specified by:
validateBundles in interface Configuration
Returns:
value of validate bundles option

skipInvalidBundles

public java.lang.Boolean skipInvalidBundles()
Returns true if the invalid bundles should be skipped from provisioning. Default value is "false".

Specified by:
skipInvalidBundles in interface Configuration
Returns:
value of skip invalid bundles option

useAbsoluteFilePaths

public java.lang.Boolean useAbsoluteFilePaths()
Returns true if the file paths used in frameworks configuration files and properties should be absolute. Default value is "false".

Specified by:
useAbsoluteFilePaths in interface Configuration
Returns:
value of use absolute paths options

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns a raw configuration property by name.

Specified by:
getProperty in interface Configuration
Parameters:
name - property name
Returns:
property value, null if not defined


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