org.ops4j.pax.exam
Class CoreOptions
java.lang.Object
org.ops4j.pax.exam.CoreOptions
public class CoreOptions
- extends Object
Factory methods for core options.
- Since:
- 0.3.0, December 08, 2008
- Author:
- Alin Dreghiciu (adreghiciu@gmail.com), Toni Menzel (toni@okidokiteam.com
|
Method Summary |
static Option |
allEquinoxVersions()
Creates a composite option of all EquinoxFrameworkOption versions (up to the date of Pax Exam release). |
static Option |
allFelixVersions()
Creates a composite option of all FelixFrameworkOption versions (up to the date of Pax Exam release). |
static Option |
allFrameworks()
Creates a composite option of latest versions of Felix, Equinox and Knopflerfish. |
static Option |
allFrameworksVersions()
Creates a composite option of all versions of Felix, Equinox and Knopflerfish. |
static Option |
allKnopflerfishVersions()
Creates a composite option of all KnopflerfishFrameworkOption versions (up to the date of Pax Exam
release). |
static Option |
bootClasspathLibraries(BootClasspathLibraryOption... libraries)
Creates a composite option of BootClasspathLibraryOptions. |
static Option |
bootClasspathLibraries(String... urls)
Creates a composite option of BootClasspathLibraryOptions. |
static BootClasspathLibraryOption |
bootClasspathLibrary(String libraryUrl)
Creates a BootClasspathLibraryOption. |
static BootClasspathLibraryOption |
bootClasspathLibrary(UrlReference libraryUrl)
Creates a BootClasspathLibraryOption. |
static BootDelegationOption |
bootDelegationPackage(String pkg)
Creates a BootDelegationOption. |
static Option |
bootDelegationPackages(BootDelegationOption... packages)
Creates a composite option of BootDelegationOptions. |
static Option |
bootDelegationPackages(String... packages)
Creates a composite option of BootDelegationOptions. |
static UrlProvisionOption |
bundle(String url)
Creates a UrlProvisionOption. |
static BundleStartLevelOption |
bundleStartLevel(int startLevel)
Creates an BundleStartLevelOption. |
static Option |
composite(Option... options)
Convenience method (more to be used for a nice fluent api) for creating a composite option. |
static CustomFrameworkOption |
customFramework(String baseFrameworkName,
String definitionURL,
String name)
|
static DebugClassLoadingOption |
debugClassLoading()
Creates a DebugClassLoadingOption. |
static TestContainerStartTimeoutOption |
doNotWaitForFrameworkStartup()
Creates a TestContainerStartTimeoutOption that will not wait for framework startup. |
static EquinoxFrameworkOption |
equinox()
Creates a EquinoxFrameworkOption. |
static FelixFrameworkOption |
felix()
Creates a FelixFrameworkOption. |
static Option |
frameworks(FrameworkOption... frameworks)
Creates a composite option of FrameworkOptions. |
static FrameworkStartLevelOption |
frameworkStartLevel(int startLevel)
Creates an FrameworkStartLevelOption. |
static KnopflerfishFrameworkOption |
knopflerfish()
Creates a KnopflerfishFrameworkOption. |
static MavenArtifactUrlReference |
maven()
Creates a MavenArtifactUrlReference. |
static MavenArtifactUrlReference |
maven(String groupId,
String artifactId)
Convenience method (shorter) for referencing an maven artifact based on groupId/artifactId. |
static MavenArtifactUrlReference |
maven(String groupId,
String artifactId,
String version)
Convenience method (shorter) for referencing a maven artifact based on groupId/artifactId/version. |
static MavenArtifactProvisionOption |
mavenBundle()
Creates a MavenArtifactProvisionOption. |
static MavenArtifactProvisionOption |
mavenBundle(MavenArtifactUrlReference artifact)
Convenience factory method for adding a maven bundle based on a meven artifact. |
static MavenArtifactProvisionOption |
mavenBundle(String groupId,
String artifactId)
Convenience method (shorter) for adding a maven bundle based on groupId/artifactId. |
static MavenArtifactProvisionOption |
mavenBundle(String groupId,
String artifactId,
String version)
Convenience method (shorter) for adding a maven bundle based on groupId/artifactId/version. |
static MavenPluginGeneratedConfigOption |
mavenConfiguration()
Creates a MavenPluginGeneratedConfigOption. |
static MavenPluginGeneratedConfigOption |
mavenConfiguration(String url)
Creates a MavenPluginGeneratedConfigOption. |
static MavenPluginGeneratedConfigOption |
mavenConfiguration(URL url)
Creates a MavenPluginGeneratedConfigOption. |
static Option[] |
options(Option... options)
Convenience method (more to be used for a nice fluent api) for creating an array of options. |
static Option |
provision(InputStream... streams)
Creates a composite option of ProvisionOptions. |
static Option |
provision(ProvisionOption... urls)
Creates a composite option of ProvisionOptions. |
static Option |
provision(String... urls)
Creates a composite option of ProvisionOptions. |
static SystemPackageOption |
systemPackage(String pkg)
Creates a SystemPackageOption. |
static Option |
systemPackages(String... packages)
Creates a composite option of SystemPackageOptions. |
static Option |
systemPackages(SystemPackageOption... packages)
Creates a composite option of SystemPackageOptions. |
static Option |
systemProperties(SystemPropertyOption... systemProperties)
Creates a composite option of SystemPropertyOptions. |
static SystemPropertyOption |
systemProperty(String key)
Creates a SystemPropertyOption. |
static RawUrlReference |
url(String url)
Creates a RawUrlReference. |
static TestContainerStartTimeoutOption |
waitForFrameworkStartup()
Creates a TestContainerStartTimeoutOption that will wait for framework startup without timing out. |
static TestContainerStartTimeoutOption |
waitForFrameworkStartupFor(long timeoutInMillis)
Creates a TestContainerStartTimeoutOption for a number of millis. |
static OptionalCompositeOption |
when(boolean condition)
Creates a OptionalCompositeOption. |
static OptionalCompositeOption |
when(OptionalCompositeOption.Condition condition)
Creates a OptionalCompositeOption. |
static WrappedUrlProvisionOption |
wrappedBundle(String jarToWrapUrl)
Creates a WrappedUrlProvisionOption. |
static WrappedUrlProvisionOption |
wrappedBundle(UrlReference jarToWrapUrl)
Creates a WrappedUrlProvisionOption. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
options
public static Option[] options(Option... options)
- Convenience method (more to be used for a nice fluent api) for creating an array of options.
It also expands the composite options.
- Parameters:
options - options
- Returns:
- provided options, expanded
- See Also:
OptionUtils.expand(Option...)
composite
public static Option composite(Option... options)
- Convenience method (more to be used for a nice fluent api) for creating a composite option.
- Parameters:
options - options
- Returns:
- provided options
frameworks
public static Option frameworks(FrameworkOption... frameworks)
- Creates a composite option of
FrameworkOptions.
- Parameters:
frameworks - framework options
- Returns:
- composite option of framework options
felix
public static FelixFrameworkOption felix()
- Creates a
FelixFrameworkOption.
- Returns:
- felix framework option
allFelixVersions
public static Option allFelixVersions()
- Creates a composite option of all
FelixFrameworkOption versions (up to the date of Pax Exam release).
- Returns:
- all felix framework versions composite option
equinox
public static EquinoxFrameworkOption equinox()
- Creates a
EquinoxFrameworkOption.
- Returns:
- equinox framework option
allEquinoxVersions
public static Option allEquinoxVersions()
- Creates a composite option of all
EquinoxFrameworkOption versions (up to the date of Pax Exam release).
- Returns:
- all equinox framework versions composite option
knopflerfish
public static KnopflerfishFrameworkOption knopflerfish()
- Creates a
KnopflerfishFrameworkOption.
- Returns:
- knopflerfish framework option
allKnopflerfishVersions
public static Option allKnopflerfishVersions()
- Creates a composite option of all
KnopflerfishFrameworkOption versions (up to the date of Pax Exam
release).
- Returns:
- all knopflerfish framework versions composite option
allFrameworks
public static Option allFrameworks()
- Creates a composite option of latest versions of Felix, Equinox and Knopflerfish.
- Returns:
- latest versions of all frameworks composite option
allFrameworksVersions
public static Option allFrameworksVersions()
- Creates a composite option of all versions of Felix, Equinox and Knopflerfish.
- Returns:
- all framework versions composite option
customFramework
public static CustomFrameworkOption customFramework(String baseFrameworkName,
String definitionURL,
String name)
- Parameters:
baseFrameworkName - one of the frameworks supported by pax runner. Must match the framework you link to via #definitionURLdefinitionURL - url to a custom pax runner platform xml descriptorname - a custom name you give this combo (will show up in pax runner startup and error msg)
- Returns:
- instance of CustomFrameworkOption
provision
public static Option provision(String... urls)
- Creates a composite option of
ProvisionOptions.
- Parameters:
urls - provision urls (cannot be null or containing null entries)
- Returns:
- composite option of provision options
- Throws:
IllegalArgumentException - - If urls array is null or contains null entries
provision
public static Option provision(InputStream... streams)
- Creates a composite option of
ProvisionOptions.
This is handy when bundles are built on the fly via TinyBundles.
- Parameters:
streams - provision sources
- Returns:
- composite option of provision options
- Throws:
IllegalArgumentException - - If a problem occured while flushing streams
provision
public static Option provision(ProvisionOption... urls)
- Creates a composite option of
ProvisionOptions.
- Parameters:
urls - provision options
- Returns:
- composite option of provision options
url
public static RawUrlReference url(String url)
- Creates a
RawUrlReference.
- Parameters:
url - url as a string
- Returns:
- url reference
bundle
public static UrlProvisionOption bundle(String url)
- Creates a
UrlProvisionOption.
- Parameters:
url - bundle url
- Returns:
- url provisioning option
maven
public static MavenArtifactUrlReference maven()
- Creates a
MavenArtifactUrlReference.
- Returns:
- maven artifact url
maven
public static MavenArtifactUrlReference maven(String groupId,
String artifactId)
- Convenience method (shorter) for referencing an maven artifact based on groupId/artifactId.
- Parameters:
groupId - artifact group idartifactId - artifact id
- Returns:
- maven artifact url
maven
public static MavenArtifactUrlReference maven(String groupId,
String artifactId,
String version)
- Convenience method (shorter) for referencing a maven artifact based on groupId/artifactId/version.
- Parameters:
groupId - artifact group idartifactId - artifact idversion - artifact version
- Returns:
- maven artifact url
mavenBundle
public static MavenArtifactProvisionOption mavenBundle()
- Creates a
MavenArtifactProvisionOption.
- Returns:
- maven specific provisioning option
mavenBundle
public static MavenArtifactProvisionOption mavenBundle(String groupId,
String artifactId)
- Convenience method (shorter) for adding a maven bundle based on groupId/artifactId.
- Parameters:
groupId - artifact group idartifactId - artifact id
- Returns:
- maven specific provisioning option
mavenBundle
public static MavenArtifactProvisionOption mavenBundle(String groupId,
String artifactId,
String version)
- Convenience method (shorter) for adding a maven bundle based on groupId/artifactId/version.
- Parameters:
groupId - artifact group idartifactId - artifact idversion - artifact version
- Returns:
- maven specific provisioning option
mavenBundle
public static MavenArtifactProvisionOption mavenBundle(MavenArtifactUrlReference artifact)
- Convenience factory method for adding a maven bundle based on a meven artifact.
- Parameters:
artifact - maven artifact
- Returns:
- maven specific provisioning option
wrappedBundle
public static WrappedUrlProvisionOption wrappedBundle(String jarToWrapUrl)
- Creates a
WrappedUrlProvisionOption.
- Parameters:
jarToWrapUrl - url of jar to be wrapped
- Returns:
- wrap specific provisioning option
wrappedBundle
public static WrappedUrlProvisionOption wrappedBundle(UrlReference jarToWrapUrl)
- Creates a
WrappedUrlProvisionOption.
- Parameters:
jarToWrapUrl - url of jar to be wrapped
- Returns:
- wrap specific provisioning option
bootDelegationPackages
public static Option bootDelegationPackages(String... packages)
- Creates a composite option of
BootDelegationOptions.
- Parameters:
packages - boot delegation packages (cannot be null or containing null entries)
- Returns:
- composite option of boot delegation package options
- Throws:
IllegalArgumentException - - If urls array is null or contains null entries
bootDelegationPackages
public static Option bootDelegationPackages(BootDelegationOption... packages)
- Creates a composite option of
BootDelegationOptions.
- Parameters:
packages - boot delegation package options
- Returns:
- composite option of boot delegation package options
bootDelegationPackage
public static BootDelegationOption bootDelegationPackage(String pkg)
- Creates a
BootDelegationOption.
- Parameters:
pkg - boot delegation package
- Returns:
- boot delegation package option
bootClasspathLibraries
public static Option bootClasspathLibraries(String... urls)
- Creates a composite option of
BootClasspathLibraryOptions.
- Parameters:
urls - boot classpath library urls (cannot be null or containing null entries)
- Returns:
- composite option of boot classpath options
- Throws:
IllegalArgumentException - - If urls array is null or contains null entries
bootClasspathLibraries
public static Option bootClasspathLibraries(BootClasspathLibraryOption... libraries)
- Creates a composite option of
BootClasspathLibraryOptions.
- Parameters:
libraries - boot classpath library options
- Returns:
- composite option of boot classpath library options
bootClasspathLibrary
public static BootClasspathLibraryOption bootClasspathLibrary(String libraryUrl)
- Creates a
BootClasspathLibraryOption.
- Parameters:
libraryUrl - boot classpath library url
- Returns:
- boot classpath option
bootClasspathLibrary
public static BootClasspathLibraryOption bootClasspathLibrary(UrlReference libraryUrl)
- Creates a
BootClasspathLibraryOption.
- Parameters:
libraryUrl - boot classpath library url
- Returns:
- boot classpath option
systemPackages
public static Option systemPackages(String... packages)
- Creates a composite option of
SystemPackageOptions.
- Parameters:
packages - system packages (cannot be null or containing null entries)
- Returns:
- composite option of system package options
- Throws:
IllegalArgumentException - - If urls array is null or contains null entries
systemPackages
public static Option systemPackages(SystemPackageOption... packages)
- Creates a composite option of
SystemPackageOptions.
- Parameters:
packages - system package options
- Returns:
- composite option of system package options
systemPackage
public static SystemPackageOption systemPackage(String pkg)
- Creates a
SystemPackageOption.
- Parameters:
pkg - system package
- Returns:
- system package option
systemProperties
public static Option systemProperties(SystemPropertyOption... systemProperties)
- Creates a composite option of
SystemPropertyOptions.
- Parameters:
systemProperties - system property options
- Returns:
- composite option of system property options
systemProperty
public static SystemPropertyOption systemProperty(String key)
- Creates a
SystemPropertyOption.
- Parameters:
key - system property key
- Returns:
- system property option
debugClassLoading
public static DebugClassLoadingOption debugClassLoading()
- Creates a
DebugClassLoadingOption.
- Returns:
- system property option
mavenConfiguration
public static MavenPluginGeneratedConfigOption mavenConfiguration()
- Creates a
MavenPluginGeneratedConfigOption.
- Returns:
- Args option with file written from paxexam plugin
mavenConfiguration
public static MavenPluginGeneratedConfigOption mavenConfiguration(String url)
- Creates a
MavenPluginGeneratedConfigOption.
- Parameters:
url - of configuration to be used
- Returns:
- Args option with file written from paxexam plugin
mavenConfiguration
public static MavenPluginGeneratedConfigOption mavenConfiguration(URL url)
- Creates a
MavenPluginGeneratedConfigOption.
- Parameters:
url - of configuration to be used
- Returns:
- Args option with file written from paxexam plugin
when
public static OptionalCompositeOption when(boolean condition)
- Creates a
OptionalCompositeOption.
- Parameters:
condition - boolean condition to evaluate
- Returns:
- optional composite option
when
public static OptionalCompositeOption when(OptionalCompositeOption.Condition condition)
- Creates a
OptionalCompositeOption.
- Parameters:
condition - condition to evaluate
- Returns:
- optional composite option
frameworkStartLevel
public static FrameworkStartLevelOption frameworkStartLevel(int startLevel)
- Creates an
FrameworkStartLevelOption.
- Parameters:
startLevel - framework start level (must be bigger then zero)
- Returns:
- framework start level option
bundleStartLevel
public static BundleStartLevelOption bundleStartLevel(int startLevel)
- Creates an
BundleStartLevelOption.
- Parameters:
startLevel - initial bundle start level (must be bigger then zero)
- Returns:
- bundle start level option
waitForFrameworkStartupFor
public static TestContainerStartTimeoutOption waitForFrameworkStartupFor(long timeoutInMillis)
- Creates a
TestContainerStartTimeoutOption for a number of millis.
- Parameters:
timeoutInMillis - timeout in millis
- Returns:
- timeout option
doNotWaitForFrameworkStartup
public static TestContainerStartTimeoutOption doNotWaitForFrameworkStartup()
- Creates a
TestContainerStartTimeoutOption that will not wait for framework startup.
- Returns:
- timeout option
waitForFrameworkStartup
public static TestContainerStartTimeoutOption waitForFrameworkStartup()
- Creates a
TestContainerStartTimeoutOption that will wait for framework startup without timing out.
- Returns:
- timeout option
Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.