Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.test.runner
Interface RuntimeHarness

All Known Implementing Classes:
CoreManagementTestCase, NuxeoServerRunner.ToRun, NXRuntimeTestCase, RepositoryOSGITestCase, SQLRepositoryTestCase, TXSQLRepositoryTestCase

public interface RuntimeHarness

TODO: Move this to org.nuxeo.runtime package

Author:
Bogdan Stefanescu

Method Summary
 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.
 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 isStarted()
           
 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.
 

Method Detail

getWorkingDir

File getWorkingDir()
Gets the framework working directory.


fireFrameworkStarted

void fireFrameworkStarted()
                          throws Exception
Fires the event FrameworkEvent.STARTED.

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 bundle
contrib - the contribution
Throws:
Exception

undeployContrib

@Deprecated
void undeployContrib(String contrib)
Deprecated. use undeployContrib(String, String) instead


undeploy

@Deprecated
void undeploy(String contrib)
Deprecated. use undeployContrib(String, String) instead


deployTestContrib

RuntimeContext deployTestContrib(String bundle,
                                 URL contrib)
                                 throws Exception
Throws:
Exception

deployTestContrib

RuntimeContext deployTestContrib(String bundle,
                                 String contrib)
                                 throws Exception
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 owner
contrib - 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 in
contrib - the path to contrib in the bundle.
Throws:
Exception

deployContrib

@Deprecated
void deployContrib(String contrib)
Deprecated. use the less ambiguous deployContrib(String, String)

Deploys a contribution file by looking for it in the class loader.

The first contribution file found by the class loader will be used. You have no guarantee in case of name collisions.

Parameters:
contrib - the relative path to the contribution file

deploy

@Deprecated
void deploy(String contrib)
Deprecated. use deployContrib() instead


start

void start()
           throws Exception
Throws:
Exception

stop

void stop()
          throws Exception
Throws:
Exception

isStarted

boolean isStarted()

deployFolder

void deployFolder(File folder,
                  ClassLoader loader)
                  throws Exception
Throws:
Exception

addWorkingDirectoryConfigurator

void addWorkingDirectoryConfigurator(WorkingDirectoryConfigurator config)

getProperties

Properties getProperties()
Framework properties for variable injections

Returns:
Since:
5.4.2

getContext

RuntimeContext getContext()
Runtime context for deployment

Returns:
Since:
5.4.2

getOSGiAdapter

OSGiAdapter getOSGiAdapter()
OSGI bridge

Returns:
Since:
5.4.2

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.