Interface RuntimeHarness
- All Known Implementing Classes:
NXRuntimeTestCase
,RuntimeHarnessImpl
- Author:
- Bogdan Stefanescu
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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) Deprecated.since 10.2, unused and badly implementeddeployPartial
(String bundle, Set<TargetExtensions> targetExtensions) Deploys a subset of a Bundle defined per the targetExtensions parameterdeployTestContrib
(String bundle, String contrib) Deprecated.since 10.1, usedeployContrib(String, String)
deployTestContrib
(String bundle, URL contrib) Deprecated.since 10.1, usedeployContrib(String, String)
void
Resume the runtimeDeprecated.since 10.2, unused and uselessRuntime context for deploymentOSGI bridgeDeprecated.since 10.2, unused and uselessGets the framework working directory.boolean
Deprecated.since 10.2, unused and uselessboolean
void
restart()
Deprecated.since 10.2, unused and uselessvoid
start()
void
stop()
void
undeployContrib
(String bundle, String contrib) Undeploys a contribution from a given bundle.
-
Method Details
-
getWorkingDir
File getWorkingDir()Gets the framework working directory. -
fireFrameworkStarted
Resume the runtime- Throws:
Exception
-
deployBundle
Deploys a whole OSGI bundle.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.- Parameters:
bundle
- the symbolic name- Throws:
Exception
-
undeployContrib
Undeploys a contribution from a given bundle.The path will be relative to the bundle root. Example:
undeployContrib("org.nuxeo.ecm.core", "OSGI-INF/CoreExtensions.xml")
- Parameters:
bundle
- the bundlecontrib
- the contribution- Throws:
Exception
-
deployTestContrib
Deprecated.since 10.1, usedeployContrib(String, String)
- Throws:
Exception
-
deployTestContrib
Deprecated.since 10.1, usedeployContrib(String, String)
Deploys an XML contribution from outside a bundle.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.
- Parameters:
bundle
- the bundle that becomes the contribution ownercontrib
- the contribution to deploy as part of the given bundle- Throws:
Exception
-
deployContrib
Deploys a contribution from a given bundle.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.
- Parameters:
bundle
- the name of the bundle to peek the contrib incontrib
- the path to contrib in the bundle.- Throws:
Exception
-
start
- Throws:
Exception
-
stop
- Throws:
Exception
-
isStarted
boolean isStarted() -
deployPartial
RuntimeContext deployPartial(String bundle, Set<TargetExtensions> targetExtensions) throws Exception Deploys a subset of a Bundle defined per the targetExtensions parameter- Parameters:
bundle
- the name of the componenttargetExtensions
- Set of allowed TargetExtensions in the final contribution- Throws:
Exception
- Since:
- 9.1
-
deployFolder
Deprecated.since 10.2, unused and badly implemented- Throws:
Exception
-
addWorkingDirectoryConfigurator
-
getProperties
Deprecated.since 10.2, unused and uselessFramework properties for variable injections- Since:
- 5.4.2
-
getContext
RuntimeContext getContext()Runtime context for deployment- Since:
- 5.4.2
-
getOSGiAdapter
OSGiAdapter getOSGiAdapter()OSGI bridge- Since:
- 5.4.2
-
isRestart
Deprecated.since 10.2, unused and useless- Since:
- 5.5
-
restart
Deprecated.since 10.2, unused and useless- Throws:
Exception
- Since:
- 5.5
-
getClassLoaderFiles
Deprecated.since 10.2, unused and useless- Throws:
URISyntaxException
- Since:
- 5.7
-