lttng: Add a diagram showing the dependencies between plugins
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / stubs / org / eclipse / linuxtools / internal / lttng2 / stubs / dialogs / CreateSessionDialogStub.java
1 /**********************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 * Bernd Hufmann - Updated for support of LTTng Tools 2.1
12 **********************************************************************/
13 package org.eclipse.linuxtools.internal.lttng2.stubs.dialogs;
14
15 import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo;
16 import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SessionInfo;
17 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateSessionDialog;
18 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionGroup;
19
20 /**
21 * Create session dialog stub implementation.
22 */
23 @SuppressWarnings("javadoc")
24 public class CreateSessionDialogStub implements ICreateSessionDialog {
25
26 public String fName = "mysession";
27 public String fPath = null;
28 private boolean fIsStreamedTrace = false;
29 private String fNetworkUrl = null;
30 private String fControlUrl = null;
31 private String fDataUrl = null;
32 private boolean fIsSnapshot;
33
34 @Override
35 public void initialize(TraceSessionGroup group) {
36 }
37
38 @Override
39 public int open() {
40 return 0;
41 }
42
43 public void setSessionPath(String path) {
44 fPath = path;
45 }
46
47 public void setSessionName(String name) {
48 fName = name;
49 }
50
51 public void setStreamedTrace(boolean isStreamedTrace) {
52 fIsStreamedTrace = isStreamedTrace;
53 }
54
55 public void setNetworkUrl(String fNetworkUrl) {
56 this.fNetworkUrl = fNetworkUrl;
57 }
58
59 public void setControlUrl(String fControlUrl) {
60 this.fControlUrl = fControlUrl;
61 }
62
63 public void setDataUrl(String fDataUrl) {
64 this.fDataUrl = fDataUrl;
65 }
66
67 public void setSnapshot(boolean isSnapshot) {
68 fIsSnapshot = isSnapshot;
69 }
70
71 @Override
72 public ISessionInfo getParameters() {
73 ISessionInfo sessionInfo = new SessionInfo(fName);
74
75 if (fIsStreamedTrace) {
76 sessionInfo.setNetworkUrl(fNetworkUrl);
77 sessionInfo.setControlUrl(fControlUrl);
78 sessionInfo.setDataUrl(fDataUrl);
79 sessionInfo.setStreamedTrace(true);
80 } else if (fPath != null) {
81 sessionInfo.setSessionPath(fPath);
82 }
83
84 sessionInfo.setSnapshot(fIsSnapshot);
85
86 return sessionInfo;
87 }
88 }
This page took 0.032138 seconds and 5 git commands to generate.