public class CommandLineExecutorComponent extends DefaultComponent implements CommandLineExecutorService
CommandLineExecutorService
interface. Also
handles the Extension Point logic.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EXECUTOR |
static String |
DEFAULT_TESTER |
static String |
EP_CMD |
static String |
EP_CMDTESTER |
static String |
EP_ENV |
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) |
List<String> |
getRegistredCommands() |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, getAdapter, registerExtension, 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
public void activate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
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)
Copyright © 2011 Nuxeo SA. All Rights Reserved.