public interface RuntimeHarness
Modifier and Type | Method and Description |
---|---|
void |
addWorkingDirectoryConfigurator(WorkingDirectoryConfigurator config) |
void |
deployBundle(String bundle)
Deploys a whole OSGI bundle.
|
void |
deployContrib(String bundle,
String contrib)
Deploys a contribution from a given bundle.
|
void |
deployFolder(File folder,
ClassLoader loader) |
RuntimeContext |
deployPartial(String bundle,
Set<TargetExtensions> targetExtensions)
Deploys a subset of a Bundle defined per the targetExtensions parameter
|
RuntimeContext |
deployTestContrib(String bundle,
String contrib)
Deploys an XML contribution from outside a bundle.
|
RuntimeContext |
deployTestContrib(String bundle,
URL contrib) |
void |
fireFrameworkStarted()
Resume the runtime
|
List<String> |
getClassLoaderFiles() |
RuntimeContext |
getContext()
Runtime context for deployment
|
OSGiAdapter |
getOSGiAdapter()
OSGI bridge
|
Properties |
getProperties()
Framework properties for variable injections
|
File |
getWorkingDir()
Gets the framework working directory.
|
boolean |
isRestart() |
boolean |
isStarted() |
void |
restart() |
void |
start() |
void |
stop() |
void |
undeployContrib(String bundle,
String contrib)
Undeploys a contribution from a given bundle.
|
File getWorkingDir()
void fireFrameworkStarted() throws Exception
Exception
void deployBundle(String bundle) throws Exception
The lookup is first done on symbolic name, as set in MANIFEST.MF
and then falls back to the bundle
url (e.g., nuxeo-platform-search-api
) for backwards compatibility.
bundle
- the symbolic nameException
void undeployContrib(String bundle, String contrib) throws Exception
The path will be relative to the bundle root. Example:
undeployContrib("org.nuxeo.ecm.core", "OSGI-INF/CoreExtensions.xml")
bundle
- the bundlecontrib
- the contributionException
RuntimeContext deployTestContrib(String bundle, URL contrib) throws Exception
Exception
RuntimeContext deployTestContrib(String bundle, String contrib) throws Exception
This should be used by tests wiling to deploy test contribution as part of a real bundle.
The bundle owner is important since the contribution may depend on resources deployed in that bundle.
Note that the owner bundle MUST be an already deployed bundle.
bundle
- the bundle that becomes the contribution ownercontrib
- the contribution to deploy as part of the given bundleException
void deployContrib(String bundle, String contrib) throws Exception
The path will be relative to the bundle root. Example:
deployContrib("org.nuxeo.ecm.core", "OSGI-INF/CoreExtensions.xml")
For compatibility reasons the name of the bundle may be a jar name, but this use is discouraged and deprecated.
bundle
- the name of the bundle to peek the contrib incontrib
- the path to contrib in the bundle.Exception
boolean isStarted()
RuntimeContext deployPartial(String bundle, Set<TargetExtensions> targetExtensions) throws Exception
bundle
- the name of the componenttargetExtensions
- Set of allowed TargetExtensions in the final contributionException
void deployFolder(File folder, ClassLoader loader) throws Exception
Exception
void addWorkingDirectoryConfigurator(WorkingDirectoryConfigurator config)
Properties getProperties()
RuntimeContext getContext()
OSGiAdapter getOSGiAdapter()
boolean isRestart()
List<String> getClassLoaderFiles() throws URISyntaxException
URISyntaxException
Copyright © 2018 Nuxeo. All rights reserved.