summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java')
-rw-r--r--plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java
new file mode 100644
index 0000000..23292d8
--- /dev/null
+++ b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java
@@ -0,0 +1,63 @@
1/*******************************************************************************
2 * Copyright (c) 2013 Intel Corporation.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Ioana Grigoropol(Intel) - initial API and implementation
10 *******************************************************************************/
11package org.yocto.remote.utils;
12
13
14public class YoctoCommand {
15 private String command;
16 private String initialDirectory;
17 private String arguments;
18 private ProcessStreamBuffer processBuffer;
19
20 public YoctoCommand(String command, String initialDirectory, String arguments){
21 this.setCommand(command);
22 this.setInitialDirectory(initialDirectory);
23 this.setArguments(arguments);
24 this.setProcessBuffer(new ProcessStreamBuffer(false));
25 }
26
27 public String getCommand() {
28 return command;
29 }
30
31 public void setCommand(String command) {
32 this.command = "bash -l -c \"" + command + "\"";
33 }
34
35 public String getInitialDirectory() {
36 return initialDirectory;
37 }
38
39 public void setInitialDirectory(String initialDirectory) {
40 this.initialDirectory = initialDirectory;
41 }
42
43 public String getArguments() {
44 return arguments;
45 }
46
47 public void setArguments(String arguments) {
48 this.arguments = arguments;
49 }
50
51 public ProcessStreamBuffer getProcessBuffer() {
52 return processBuffer;
53 }
54
55 public void setProcessBuffer(ProcessStreamBuffer processBuffer) {
56 this.processBuffer = processBuffer;
57 }
58
59 @Override
60 public String toString() {
61 return command + " " + arguments;
62 }
63}