Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 4280c103103d66f9ac88fc0103a5b8d33707ea78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package org.eclipse.team.internal.ccvs.core.commands;

/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */

import java.io.PrintStream;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.resources.api.IManagedFolder;

/**
 * Represents a command of the cvs-client.
 * 
 * It gets the information provided on the command-line
 * and has to communicate to the server.
 * 
 * Normaly the response of the server is handeld by GeneralResponseHandler.
 * 
 * If custom-response-handling is needed the class should register a custom 
 * handler at the commandExecuter.
 */

interface ICommand {

	/**
	 * Runs the command.
	 * 
	 * @param global Options is allowed to have null-elements for convinience (all the others are not)
	 * @see CommandExecuter#execute(String command, IConnection, String[], String[], ICvsResource, OutputStream)
	 */
	void execute(String[] globalOptions, 
					String[] localOptions, 
					String[] arguments, 
					IManagedFolder mRoot,
					IProgressMonitor monitor, 
					PrintStream messageOut)
					throws CVSException;

	/**
	 * Returns the responses type. This is the name of
	 * the CVS command in String-Form (lowcase, like the
	 * command in the cvs-client)
	 */
	public String getName();

	/**
	 * Returns the name of the request that is send in order to
	 * start this command.
	 * This can be different from the name.
	 * e.g. the cvs-command "commit" sends "ci" to the server.
	 */
	public String getRequestName();	
}

Back to the top