站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

VcsCommandExecutor (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.commands
Interface VcsCommandExecutor

All Superinterfaces:
Runnable, TextInput
All Known Implementing Classes:
ExecuteCommand

public interface VcsCommandExecutor
extends Runnable, TextInput

The VcsCommand interface should be implemented by any class whose instances are intended to be executed as version control commands. Each command is executed in a separate thread.


Field Summary
static int FAILED
          The exit status when the command failed.
static int INTERRUPTED
          The exit status when the command was interrupted.
static int SUCCEEDED
          The exit status when the command terminated successfully.
 
Method Summary
 void addDataErrorOutputListener(CommandDataOutputListener l)
          Deprecated. Kept for compatibility reasons only. Use addRegexErrorListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead.
 void addDataOutputListener(CommandDataOutputListener l)
          Deprecated. Kept for compatibility reasons only. Use addRegexOutputListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead.
 void addErrorOutputListener(CommandOutputListener l)
          Deprecated. Kept for compatibility reasons only. Use addTextErrorListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead.
 void addFileReaderListener(FileReaderListener l)
          Add a file reader listener, that gets the updated attributes of the processed file(s).
 void addImmediateTextErrorListener(TextOutputListener l)
          Add a listener to the standard error output, that will be noified immediately as soon as the output text is available.
 void addImmediateTextOutputListener(TextOutputListener l)
          Add a listener to the standard output, that will be noified immediately as soon as the output text is available.
 void addOutputListener(CommandOutputListener l)
          Deprecated. Kept for compatibility reasons only. Use addTextOutputListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead.
 void addRegexErrorListener(RegexOutputListener l)
          Add the listener to the data error output of the command.
 void addRegexOutputListener(RegexOutputListener l)
          Add the listener to the data output of the command.
 void addTextErrorListener(TextOutputListener l)
          Add the listener to the error output of the command.
 void addTextOutputListener(TextOutputListener l)
          Add the listener to the standard output of the command.
 VcsCommand getCommand()
          The executed command.
 String getExec()
          Get the updated execution string.
 int getExitStatus()
          Get the exit status of the execution.
 Collection getFiles()
          Get the set of files being processed by the command.
 Hashtable getVariables()
          Get the variables used by this command execution.
 VcsCommandVisualizer getVisualizer()
          Get the graphical visualization of the command.
 String preprocessCommand(VcsCommand vc, Hashtable vars, String exec, StructuredExec sexec)
          This method can be used to do some preprocessing of the command which is to be run.
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface org.netbeans.modules.vcscore.commands.TextInput
sendInput
 

Field Detail

SUCCEEDED

public static final int SUCCEEDED
The exit status when the command terminated successfully.

See Also:
Constant Field Values

FAILED

public static final int FAILED
The exit status when the command failed.

See Also:
Constant Field Values

INTERRUPTED

public static final int INTERRUPTED
The exit status when the command was interrupted.

See Also:
Constant Field Values
Method Detail

getCommand

public VcsCommand getCommand()
The executed command.


preprocessCommand

public String preprocessCommand(VcsCommand vc,
                                Hashtable vars,
                                String exec,
                                StructuredExec sexec)
This method can be used to do some preprocessing of the command which is to be run. The method is called before the prompt for user input is made and therefore can be used to additionally specify the desired input.

Parameters:
vc - the command to be preprocessed.
vars - the variables
exec - the updated execution string. It may contain user input from variable input dialog
Returns:
the updated exec property

getVariables

public Hashtable getVariables()
Get the variables used by this command execution.


getExec

public String getExec()
Get the updated execution string. It may contain user input now.


getFiles

public Collection getFiles()
Get the set of files being processed by the command.

Returns:
the collection of files paths of type String relative to the file system root.

getExitStatus

public int getExitStatus()
Get the exit status of the execution.

Returns:
the exit value, it may be one of SUCCEEDED, FAILED, INTERRUPTED.

getVisualizer

public VcsCommandVisualizer getVisualizer()
Get the graphical visualization of the command.

Returns:
the visualizer or null when no visualization is desired.

addTextOutputListener

public void addTextOutputListener(TextOutputListener l)
Add the listener to the standard output of the command. The listeners should be released by the implementing class, when the command finishes.


addTextErrorListener

public void addTextErrorListener(TextOutputListener l)
Add the listener to the error output of the command. The listeners should be released by the implementing class, when the command finishes.


addRegexOutputListener

public void addRegexOutputListener(RegexOutputListener l)
Add the listener to the data output of the command. This output may contain a parsed information from its standard output or some other data provided by this command. The listeners should be released by the implementing class, when the command finishes.


addRegexErrorListener

public void addRegexErrorListener(RegexOutputListener l)
Add the listener to the data error output of the command. This output may contain a parsed information from its error output or some other data provided by this command. If there are some data given to this listener, the command is supposed to fail. The listeners should be released by the implementing class, when the command finishes.


addFileReaderListener

public void addFileReaderListener(FileReaderListener l)
Add a file reader listener, that gets the updated attributes of the processed file(s). The listeners should be released by the implementing class, when the command finishes.


addOutputListener

public void addOutputListener(CommandOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addTextOutputListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead.

Add the listener to the standard output of the command. The listeners should be released by the implementing class, when the command finishes.


addErrorOutputListener

public void addErrorOutputListener(CommandOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addTextErrorListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead.

Add the listener to the error output of the command. The listeners should be released by the implementing class, when the command finishes.


addDataOutputListener

public void addDataOutputListener(CommandDataOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addRegexOutputListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead.

Add the listener to the data output of the command. This output may contain a parsed information from its standard output or some other data provided by this command. The listeners should be released by the implementing class, when the command finishes.


addDataErrorOutputListener

public void addDataErrorOutputListener(CommandDataOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addRegexErrorListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead.

Add the listener to the data error output of the command. This output may contain a parsed information from its error output or some other data provided by this command. If there are some data given to this listener, the command is supposed to fail. The listeners should be released by the implementing class, when the command finishes.


addImmediateTextOutputListener

public void addImmediateTextOutputListener(TextOutputListener l)
Add a listener to the standard output, that will be noified immediately as soon as the output text is available. It does not wait for the new line and does not send output line-by-line.


addImmediateTextErrorListener

public void addImmediateTextErrorListener(TextOutputListener l)
Add a listener to the standard error output, that will be noified immediately as soon as the output text is available. It does not wait for the new line and does not send output line-by-line.


 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.