lttng: Rename lttng2 feature/plugins to lttng2.control
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.control.ui / src / org / eclipse / linuxtools / internal / lttng2 / control / ui / views / dialogs / ImportFileInfo.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 **********************************************************************/
12 package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
13
14 import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
15
16 /**
17 * <p>
18 * Helper class for storing information about a remote file to import.
19 * </p>
20 *
21 * @author Bernd Hufmann
22 */
23 public class ImportFileInfo {
24
25 // ------------------------------------------------------------------------
26 // Attributes
27 // ------------------------------------------------------------------------
28 /**
29 * Remote file reference
30 */
31 private IRemoteFile fRemoteFile;
32 /**
33 * Local Trace Name
34 */
35 private String fLocalTraceName;
36 /**
37 * Global overwrite flag
38 */
39 private boolean fIsOverwrite;
40
41 private boolean fIsKernel;
42
43 // ------------------------------------------------------------------------
44 // Constructors
45 // ------------------------------------------------------------------------
46 /**
47 * Standard constructor
48 *
49 * @param file
50 * A remote file reference
51 * @param traceName
52 * A trace name
53 * @param isOverwrite
54 * global overwrite flag
55 * @param isKernel
56 * <code>true</code> if it is a kernel trace else
57 * <code>false</code>
58 */
59 public ImportFileInfo(IRemoteFile file, String traceName, boolean isOverwrite, boolean isKernel) {
60 fRemoteFile = file;
61 fLocalTraceName = traceName;
62 fIsOverwrite = isOverwrite;
63 fIsKernel = isKernel;
64 }
65
66 // ------------------------------------------------------------------------
67 // Accessors
68 // ------------------------------------------------------------------------
69 /**
70 * @return name of traces after importing
71 */
72 public String getLocalTraceName() {
73 return fLocalTraceName;
74 }
75
76 /**
77 * Sets the local trace name
78 *
79 * @param importTraceName
80 * - local name of trace to set (name after importing)
81 */
82 public void setLocalTraceName(String importTraceName) {
83 this.fLocalTraceName = importTraceName;
84 }
85 /**
86 * @return true if local trace should be overwritten if a trace with the same name already exists.
87 */
88 public boolean isOverwrite() {
89 return fIsOverwrite;
90 }
91 /**
92 * Sets the overwrite flag.
93 * @param isOverwrite If the Overwrite checkbox is checked or not
94 */
95 public void setOverwrite(boolean isOverwrite) {
96 this.fIsOverwrite = isOverwrite;
97 }
98
99 /**
100 * @return the remote file implementation.
101 */
102 public IRemoteFile getImportFile() {
103 return fRemoteFile;
104 }
105
106 /**
107 * Sets the remote file implementation
108 *
109 * @param remoteFile
110 * The remote file implementation.
111 */
112 public void setRemoteFile(IRemoteFile remoteFile) {
113 fRemoteFile = remoteFile;
114 }
115
116 /**
117 * Returns whether it is a kernel trace or not
118 *
119 * @return <code>true</code> if it is a kernel trace else <code>false</code>
120 */
121 public boolean isKernel() {
122 return fIsKernel;
123 }
124
125 /**
126 * Sets whether it is a kernel trace or not
127 *
128 * @param isKernel
129 * <code>true</code> for kernel trace else <code>false</code>
130 */
131 public void setKernel(boolean isKernel) {
132 fIsKernel = isKernel;
133 }
134 }
135
This page took 0.03392 seconds and 6 git commands to generate.