org.sonatype.gshell.command
Interface CommandAction

All Superinterfaces:
Cloneable
All Known Implementing Classes:
AliasAction, AliasCommand, ChangeDirectoryCommand, CommandActionSupport, ComponentListCommand, CopyCommand, CreateDirectoryCommand, CurrentDirectoryCommand, DeleteDirectoryCommand, DeleteFileCommand, EchoCommand, ExitCommand, ExportPreferencesCommand, GetPreferenceCommand, GroupAction, HelpCommand, HistoryCommand, HostnameCommand, ImportPreferencesCommand, InfoCommand, ListDirectoryCommand, ListPreferencesCommand, LoggerLevelsCommand, LoggerListCommand, LoggerSetLevelCommand, PreferenceCommandSupport, PreferenceNodeCommandSupport, RecallHistoryCommand, RemovePreferencesCommand, SetCommand, SetPreferenceCommand, SourceCommand, UnaliasCommand, UnsetCommand, UnsetPreferenceCommand, WgetCommand

public interface CommandAction
extends Cloneable

Provides the user-action for a command.

Since:
2.0
Author:
Jason Dillon

Nested Class Summary
static class CommandAction.Result
          Enumeration for the basic return types of a command execution.
 
Method Summary
 CommandAction clone()
           
 Object execute(CommandContext context)
          Execute the command action.
 jline.console.completer.Completer[] getCompleters()
           
 MessageSource getMessages()
           
 String getName()
           
 String getSimpleName()
           
 

Method Detail

getName

String getName()

getSimpleName

String getSimpleName()

getMessages

MessageSource getMessages()

getCompleters

jline.console.completer.Completer[] getCompleters()

clone

CommandAction clone()

execute

Object execute(CommandContext context)
               throws Exception
Execute the command action.

Parameters:
context - The execution context of the command.
Returns:
The result of the command execution.
Throws:
Exception - Command execution failed.


Copyright © 2008-2011 Sonatype. All Rights Reserved.