summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java
blob: 23292d8bd4fc49a224215e7e9a943e151b06cf96 (plain)
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
57
58
59
60
61
62
63
/*******************************************************************************
 * Copyright (c) 2013 Intel Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * Ioana Grigoropol(Intel) - initial API and implementation
 *******************************************************************************/
package org.yocto.remote.utils;


public class YoctoCommand {
	private String command;
	private String initialDirectory;
	private String arguments;
	private ProcessStreamBuffer processBuffer;

	public YoctoCommand(String command, String initialDirectory, String arguments){
		this.setCommand(command);
		this.setInitialDirectory(initialDirectory);
		this.setArguments(arguments);
		this.setProcessBuffer(new ProcessStreamBuffer(false));
	}

	public String getCommand() {
		return command;
	}

	public void setCommand(String command) {
		this.command = "bash -l -c \"" + command + "\"";
	}

	public String getInitialDirectory() {
		return initialDirectory;
	}

	public void setInitialDirectory(String initialDirectory) {
		this.initialDirectory = initialDirectory;
	}

	public String getArguments() {
		return arguments;
	}

	public void setArguments(String arguments) {
		this.arguments = arguments;
	}

	public ProcessStreamBuffer getProcessBuffer() {
		return processBuffer;
	}

	public void setProcessBuffer(ProcessStreamBuffer processBuffer) {
		this.processBuffer = processBuffer;
	}

	@Override
	public String toString() {
		return command + " " + arguments;
	}
}