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, name| 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) |
getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderpublic 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)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic ExecResult execCommand(String commandName, CmdParameters params) throws CommandNotAvailable
execCommand in interface CommandLineExecutorServiceCommandNotAvailablepublic CommandAvailability getCommandAvailability(String commandName)
getCommandAvailability in interface CommandLineExecutorServicepublic List<String> getRegistredCommands()
getRegistredCommands in interface CommandLineExecutorServicepublic List<String> getAvailableCommands()
getAvailableCommands in interface CommandLineExecutorServicepublic static CommandLineDescriptor getCommandDescriptor(String commandName)
public CmdParameters getDefaultCmdParameters()
getDefaultCmdParameters in interface CommandLineExecutorServiceCmdParameters pre-filled with commonly used parameters such as the tmp dir.Copyright © 2019 Nuxeo. All rights reserved.