control: Add support for saving session
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / service / LTTngControlService.java
index 30b2a80d85fde8ef0e26ba05008aee9c0b677ad1..e531a4a21dd4d373ec4497c575bde16f26d25ef8 100644 (file)
@@ -1036,6 +1036,25 @@ public class LTTngControlService implements ILttngControlService {
         executeCommand(command, monitor);
     }
 
+    @Override
+    public void saveSession(String session, String outputPath, boolean isForce, IProgressMonitor monitor) throws ExecutionException {
+        ICommandInput command = createCommand(LTTngControlServiceConstants.COMMAND_SAVE_SESSION);
+
+        if (outputPath != null) {
+            command.add(LTTngControlServiceConstants.OPTION_OUTPUT_PATH);
+            command.add(outputPath);
+        }
+
+        if (isForce) {
+            command.add(LTTngControlServiceConstants.OPTION_FORCE);
+        }
+
+        if (session != null) {
+            command.add(session);
+        }
+        executeCommand(command, monitor);
+    }
+
     @Override
     public void runCommands(IProgressMonitor monitor, List<String> commandLines) throws ExecutionException {
         for (String commandLine : commandLines) {
This page took 0.02498 seconds and 5 git commands to generate.