Interface RuntimeHarness
-
- All Known Implementing Classes:
NXRuntimeTestCase
,RuntimeHarnessImpl
public interface RuntimeHarness
TODO: Move this to org.nuxeo.runtime package- Author:
- Bogdan Stefanescu
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method 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)
Deprecated.since 10.2, unused and badly implementedRuntimeContext
deployPartial(String bundle, Set<TargetExtensions> targetExtensions)
Deploys a subset of a Bundle defined per the targetExtensions parameterRuntimeContext
deployTestContrib(String bundle, String contrib)
Deprecated.since 10.1, usedeployContrib(String, String)
RuntimeContext
deployTestContrib(String bundle, URL contrib)
Deprecated.since 10.1, usedeployContrib(String, String)
void
fireFrameworkStarted()
Resume the runtimeList<String>
getClassLoaderFiles()
Deprecated.since 10.2, unused and uselessRuntimeContext
getContext()
Runtime context for deploymentOSGiAdapter
getOSGiAdapter()
OSGI bridgeProperties
getProperties()
Deprecated.since 10.2, unused and uselessFile
getWorkingDir()
Gets the framework working directory.boolean
isRestart()
Deprecated.since 10.2, unused and uselessboolean
isStarted()
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 Detail
-
getWorkingDir
File getWorkingDir()
Gets the framework working directory.
-
fireFrameworkStarted
void fireFrameworkStarted() throws Exception
Resume the runtime- Throws:
Exception
-
deployBundle
void deployBundle(String bundle) throws Exception
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
void undeployContrib(String bundle, String contrib) throws Exception
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 RuntimeContext deployTestContrib(String bundle, URL contrib) throws Exception
Deprecated.since 10.1, usedeployContrib(String, String)
- Throws:
Exception
-
deployTestContrib
@Deprecated RuntimeContext deployTestContrib(String bundle, String contrib) throws Exception
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
void deployContrib(String bundle, String contrib) throws Exception
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
-
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 void deployFolder(File folder, ClassLoader loader) throws Exception
Deprecated.since 10.2, unused and badly implemented- Throws:
Exception
-
addWorkingDirectoryConfigurator
void addWorkingDirectoryConfigurator(WorkingDirectoryConfigurator config)
-
getProperties
@Deprecated Properties 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 boolean isRestart()
Deprecated.since 10.2, unused and useless- Since:
- 5.5
-
restart
@Deprecated void restart() throws Exception
Deprecated.since 10.2, unused and useless- Throws:
Exception
- Since:
- 5.5
-
getClassLoaderFiles
@Deprecated List<String> getClassLoaderFiles() throws URISyntaxException
Deprecated.since 10.2, unused and useless- Throws:
URISyntaxException
- Since:
- 5.7
-
-