Class CommandLineExecutorComponent
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent
- All Implemented Interfaces:
CommandLineExecutorService,Adaptable,Component,Extensible,TimestampedService
public class CommandLineExecutorComponent
extends DefaultComponent
implements CommandLineExecutorService
POJO implementation of the
CommandLineExecutorService interface. Also handles the Extension Point logic.- Author:
- tiry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,CommandLineDescriptor> static final Stringstatic final Stringprotected EnvironmentDescriptorprotected Map<String,EnvironmentDescriptor> static final Stringstatic final Stringstatic final Stringprotected Map<String,CommandTester> protected booleanFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.voiddeactivate(ComponentContext context) Deactivates the component.execCommand(String commandName, CmdParameters params) getCommandAvailability(String commandName) static CommandLineDescriptorgetCommandDescriptor(String commandName) Deprecated.getCommandLineDescriptor(String commandName) voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) voidstart(ComponentContext context) Start the component.voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
EP_ENV
- See Also:
-
EP_CMD
- See Also:
-
EP_CMDTESTER
- See Also:
-
DEFAULT_TESTER
- See Also:
-
DEFAULT_EXECUTOR
- See Also:
-
commandDescriptors
-
env
-
envDescriptors
-
testers
-
executors
-
useTimeout
protected boolean useTimeout
-
-
Constructor Details
-
CommandLineExecutorComponent
public CommandLineExecutorComponent()
-
-
Method Details
-
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
deactivate
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContributionin classDefaultComponent
-
execCommand
- Specified by:
execCommandin interfaceCommandLineExecutorService- Throws:
CommandNotAvailable
-
getCommandAvailability
- Specified by:
getCommandAvailabilityin interfaceCommandLineExecutorService
-
getRegistredCommands
- Specified by:
getRegistredCommandsin interfaceCommandLineExecutorService
-
getAvailableCommands
- Specified by:
getAvailableCommandsin interfaceCommandLineExecutorService
-
getCommandLineDescriptor
- Specified by:
getCommandLineDescriptorin interfaceCommandLineExecutorService
-
getCommandDescriptor
Deprecated.since 11.4, use instance methodgetCommandLineDescriptor(java.lang.String)instead -
getDefaultCmdParameters
- Specified by:
getDefaultCmdParametersin interfaceCommandLineExecutorService- Returns:
- a new
CmdParameterspre-filled with commonly used parameters such as the tmp dir.
-
getCommandLineDescriptor(java.lang.String)instead