public class CommandLineExecutorComponent extends DefaultComponent implements CommandLineExecutorService
CommandLineExecutorService
interface. Also handles the Extension Point logic.Modifier and Type | Field and Description |
---|---|
protected static Map<String,CommandLineDescriptor> |
commandDescriptors |
static String |
DEFAULT_EXECUTOR |
static String |
DEFAULT_TESTER |
protected static EnvironmentDescriptor |
env |
protected static Map<String,EnvironmentDescriptor> |
envDescriptors |
static String |
EP_CMD |
static String |
EP_CMDTESTER |
static String |
EP_ENV |
protected static Map<String,Executor> |
executors |
protected static Map<String,CommandTester> |
testers |
lastModified
Constructor and Description |
---|
CommandLineExecutorComponent() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
ExecResult |
execCommand(String commandName,
CmdParameters params) |
List<String> |
getAvailableCommands() |
CommandAvailability |
getCommandAvailability(String commandName) |
static CommandLineDescriptor |
getCommandDescriptor(String commandName) |
CmdParameters |
getDefaultCmdParameters() |
List<String> |
getRegistredCommands() |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension
public static final String EP_ENV
public static final String EP_CMD
public static final String EP_CMDTESTER
public static final String DEFAULT_TESTER
public static final String DEFAULT_EXECUTOR
protected static Map<String,CommandLineDescriptor> commandDescriptors
protected static EnvironmentDescriptor env
protected static Map<String,EnvironmentDescriptor> envDescriptors
protected static Map<String,CommandTester> testers
public CommandLineExecutorComponent()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public ExecResult execCommand(String commandName, CmdParameters params) throws CommandNotAvailable
execCommand
in interface CommandLineExecutorService
CommandNotAvailable
public CommandAvailability getCommandAvailability(String commandName)
getCommandAvailability
in interface CommandLineExecutorService
public List<String> getRegistredCommands()
getRegistredCommands
in interface CommandLineExecutorService
public List<String> getAvailableCommands()
getAvailableCommands
in interface CommandLineExecutorService
public static CommandLineDescriptor getCommandDescriptor(String commandName)
public CmdParameters getDefaultCmdParameters()
getDefaultCmdParameters
in interface CommandLineExecutorService
CmdParameters
pre-filled with commonly used parameters such as the tmp dir.Copyright © 2016 Nuxeo SA. All rights reserved.