public interface RuntimeHarness
Modifier and Type | Method and Description |
---|---|
void |
addWorkingDirectoryConfigurator(WorkingDirectoryConfigurator config) |
void |
deploy(String contrib)
Deprecated.
use
deployContrib() instead |
void |
deployBundle(String bundle)
Deploys a whole OSGI bundle.
|
void |
deployContrib(String contrib)
Deprecated.
use the less ambiguous
deployContrib(String, String) |
void |
deployContrib(String bundle,
String contrib)
Deploys a contribution from a given bundle.
|
void |
deployFolder(File folder,
ClassLoader loader) |
RuntimeContext |
deployTestContrib(String bundle,
String contrib)
Deploys an XML contribution from outside a bundle.
|
RuntimeContext |
deployTestContrib(String bundle,
URL contrib) |
void |
fireFrameworkStarted()
Fires the event
FrameworkEvent.STARTED . |
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 |
undeploy(String contrib)
Deprecated.
use
undeployContrib(String, String) instead |
void |
undeployContrib(String contrib)
Deprecated.
use
undeployContrib(String, String) instead |
void |
undeployContrib(String bundle,
String contrib)
Undeploys a contribution from a given bundle.
|
File getWorkingDir()
void fireFrameworkStarted() throws Exception
FrameworkEvent.STARTED
.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
@Deprecated void undeployContrib(String contrib)
undeployContrib(String, String)
instead@Deprecated void undeploy(String contrib)
undeployContrib(String, String)
insteadRuntimeContext 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
@Deprecated void deployContrib(String contrib)
deployContrib(String, String)
The first contribution file found by the class loader will be used. You have no guarantee in case of name collisions.
contrib
- the relative path to the contribution file@Deprecated void deploy(String contrib)
deployContrib()
insteadboolean isStarted()
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 © 2016 Nuxeo SA. All rights reserved.