Package org.corpus_tools.pepper.core
Class PepperOSGiRunner
- java.lang.Object
-
- org.corpus_tools.pepper.core.PepperOSGiRunner
-
- All Implemented Interfaces:
Runnable
public class PepperOSGiRunner extends Object implements Runnable
Only starts pepper-osgi-runner, if "org.corpus_tools.pepper.disableTest" is not set or is set to false.- Author:
- Florian Zipser
-
-
Field Summary
Fields Modifier and Type Field Description static StringARG_COMMAND_LINE_PARAMSparams passed to this applicationstatic StringARG_SELFTESTargument on command line call to determine, that pepper should make a self teststatic StringDIR_CONFextension of where to find plugins and resourcesstatic StringDIR_PLUGINSextension of where to find plugins and resourcesstatic StringENV_PEPPER_WORKFLOW_FILEname of environment variable, which is supposed to contain the workflow description filestatic StringPROP_TEST_DISABLED
-
Constructor Summary
Constructors Constructor Description PepperOSGiRunner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.osgi.service.component.ComponentContext componentContext)Method is called by OSGi framework, when bundle is activated.protected voiddeactivate(org.osgi.service.component.ComponentContext componentContext)Method is called by OSGi framework, when bundle is deactivated.PeppergetPepper()Returns Pepper registeredPepperobject.voidrun()voidsetPepper(Pepper pepperConverter)Sets thePepperobject to do the conversion task.voidunsetPepper(Pepper pepperConverter)Unsets thePepperobject to do the conversion task.
-
-
-
Field Detail
-
PROP_TEST_DISABLED
public static final String PROP_TEST_DISABLED
- See Also:
- Constant Field Values
-
ENV_PEPPER_WORKFLOW_FILE
public static final String ENV_PEPPER_WORKFLOW_FILE
name of environment variable, which is supposed to contain the workflow description file- See Also:
- Constant Field Values
-
DIR_PLUGINS
public static final String DIR_PLUGINS
extension of where to find plugins and resources- See Also:
- Constant Field Values
-
DIR_CONF
public static final String DIR_CONF
extension of where to find plugins and resources- See Also:
- Constant Field Values
-
ARG_COMMAND_LINE_PARAMS
public static final String ARG_COMMAND_LINE_PARAMS
params passed to this application- See Also:
- Constant Field Values
-
ARG_SELFTEST
public static final String ARG_SELFTEST
argument on command line call to determine, that pepper should make a self test- See Also:
- Constant Field Values
-
-
Method Detail
-
unsetPepper
public void unsetPepper(Pepper pepperConverter)
Unsets thePepperobject to do the conversion task. Which means, it sets This method can be called automatically by the OSGi declarative services framework or manually.- Parameters:
pepperConverter-
-
setPepper
public void setPepper(Pepper pepperConverter)
Sets thePepperobject to do the conversion task. This method can be called automatically by the OSGi declarative services framework or manually.- Parameters:
pepperConverter-
-
getPepper
public Pepper getPepper()
Returns Pepper registeredPepperobject. Registered either automatically by OSGi or manually, both by callingsetPepper(Pepper).- Returns:
Pepperobject.
-
run
public void run() throws PepperException- Specified by:
runin interfaceRunnable- Throws:
PepperException
-
activate
protected void activate(org.osgi.service.component.ComponentContext componentContext)
Method is called by OSGi framework, when bundle is activated.
This method is the entry point, for starting pepper inside an OSGi environment.- Parameters:
componentContext- reference to the OSGi environment
-
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
Method is called by OSGi framework, when bundle is deactivated. This could happen, if the user deactivates the bundle manually or, the entire OSGi environment stopped.
This method currently does nothing.- Parameters:
componentContext- reference to the OSGi environment
-
-