Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.commandline.executor.service
Class CommandLineExecutorComponent

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent
All Implemented Interfaces:
CommandLineExecutorService, Adaptable, Component, Extensible

public class CommandLineExecutorComponent
extends DefaultComponent
implements CommandLineExecutorService

POJO implementation of the CommandLineExecutorService interface. Also handles the Extension Point logic.

Author:
tiry

Field Summary
static String DEFAULT_EXECUTOR
           
static String DEFAULT_TESTER
           
static String EP_CMD
           
static String EP_CMDTESTER
           
static String EP_ENV
           
 
Constructor Summary
CommandLineExecutorComponent()
           
 
Method Summary
 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)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
applicationStarted, getAdapter, registerExtension, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EP_ENV

public static final String EP_ENV
See Also:
Constant Field Values

EP_CMD

public static final String EP_CMD
See Also:
Constant Field Values

EP_CMDTESTER

public static final String EP_CMDTESTER
See Also:
Constant Field Values

DEFAULT_TESTER

public static final String DEFAULT_TESTER
See Also:
Constant Field Values

DEFAULT_EXECUTOR

public static final String DEFAULT_EXECUTOR
See Also:
Constant Field Values
Constructor Detail

CommandLineExecutorComponent

public CommandLineExecutorComponent()
Method Detail

activate

public void activate(ComponentContext context)
              throws Exception
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

deactivate

public void deactivate(ComponentContext context)
                throws Exception
Description copied from interface: Component
Deactivates the component.

This method is called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Overrides:
deactivate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

registerContribution

public void registerContribution(Object contribution,
                                 String extensionPoint,
                                 ComponentInstance contributor)
                          throws Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
Exception

unregisterContribution

public void unregisterContribution(Object contribution,
                                   String extensionPoint,
                                   ComponentInstance contributor)
                            throws Exception
Overrides:
unregisterContribution in class DefaultComponent
Throws:
Exception

execCommand

public ExecResult execCommand(String commandName,
                              CmdParameters params)
                       throws CommandNotAvailable
Specified by:
execCommand in interface CommandLineExecutorService
Throws:
CommandNotAvailable

getCommandAvailability

public CommandAvailability getCommandAvailability(String commandName)
Specified by:
getCommandAvailability in interface CommandLineExecutorService

getRegistredCommands

public List<String> getRegistredCommands()
Specified by:
getRegistredCommands in interface CommandLineExecutorService

getAvailableCommands

public List<String> getAvailableCommands()
Specified by:
getAvailableCommands in interface CommandLineExecutorService

getCommandDescriptor

public static CommandLineDescriptor getCommandDescriptor(String commandName)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.