Nuxeo Enterprise Platform 5.4

org.nuxeo.runtime.test.runner
Interface RuntimeHarness

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

public interface RuntimeHarness

TODO: Move this to org.nuxeo.runtime package

Author:
Bogdan Stefanescu

Method Summary
 void addWorkingDirectoryConfigurator(WorkingDirectoryConfigurator config)
           
 void deploy(java.lang.String contrib)
          Deprecated. use deployContrib() instead
 void deployBundle(java.lang.String bundle)
          Deploys a whole OSGI bundle.
 void deployContrib(java.lang.String contrib)
          Deprecated. use the less ambiguous deployContrib(String, String)
 void deployContrib(java.lang.String bundle, java.lang.String contrib)
          Deploys a contribution from a given bundle.
 void deployFolder(java.io.File folder, java.lang.ClassLoader loader)
           
 RuntimeContext deployTestContrib(java.lang.String bundle, java.lang.String contrib)
          Deploys an XML contribution from outside a bundle.
 RuntimeContext deployTestContrib(java.lang.String bundle, java.net.URL contrib)
           
 void fireFrameworkStarted()
          Fires the event FrameworkEvent.STARTED.
 java.io.File getWorkingDir()
          Gets the framework working directory.
 boolean isStarted()
           
 void start()
           
 void stop()
           
 void undeploy(java.lang.String contrib)
          Deprecated. use undeployContrib(String, String) instead
 void undeployContrib(java.lang.String contrib)
          Deprecated. use undeployContrib(String, String) instead
 void undeployContrib(java.lang.String bundle, java.lang.String contrib)
          Undeploys a contribution from a given bundle.
 

Method Detail

getWorkingDir

java.io.File getWorkingDir()
Gets the framework working directory.


fireFrameworkStarted

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

Throws:
java.lang.Exception

deployBundle

void deployBundle(java.lang.String bundle)
                  throws java.lang.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:
java.lang.Exception

undeployContrib

void undeployContrib(java.lang.String bundle,
                     java.lang.String contrib)
                     throws java.lang.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:
java.lang.Exception

undeployContrib

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


undeploy

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


deployTestContrib

RuntimeContext deployTestContrib(java.lang.String bundle,
                                 java.net.URL contrib)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

deployTestContrib

RuntimeContext deployTestContrib(java.lang.String bundle,
                                 java.lang.String contrib)
                                 throws java.lang.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:
java.lang.Exception

deployContrib

void deployContrib(java.lang.String bundle,
                   java.lang.String contrib)
                   throws java.lang.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:
java.lang.Exception

deployContrib

@Deprecated
void deployContrib(java.lang.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(java.lang.String contrib)
Deprecated. use deployContrib() instead


start

void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

isStarted

boolean isStarted()

deployFolder

void deployFolder(java.io.File folder,
                  java.lang.ClassLoader loader)
                  throws java.lang.Exception
Throws:
java.lang.Exception

addWorkingDirectoryConfigurator

void addWorkingDirectoryConfigurator(WorkingDirectoryConfigurator config)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.