tmf: Add unit tests for TmfEventField using arrays as values
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / dialogs / ImportFileInfo.java
1 /**********************************************************************
2 * Copyright (c) 2012, 2014 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 * Markus Schorn - Bug 448058: Use org.eclipse.remote in favor of RSE
12 **********************************************************************/
13 package org.eclipse.tracecompass.internal.lttng2.control.ui.views.dialogs;
14
15 import org.eclipse.core.filesystem.IFileStore;
16 import org.eclipse.core.resources.IFolder;
17
18 /**
19 * <p>
20 * Helper class for storing information about a remote file to import.
21 * </p>
22 *
23 * @author Bernd Hufmann
24 */
25 public class ImportFileInfo {
26
27 // ------------------------------------------------------------------------
28 // Attributes
29 // ------------------------------------------------------------------------
30 /**
31 * Remote file reference
32 */
33 private IFileStore fRemoteFile;
34 /**
35 * Local Trace Name
36 */
37 private String fLocalTraceName;
38 /**
39 * Global overwrite flag
40 */
41 private boolean fIsOverwrite;
42 /**
43 * Destination folder to import the trace to (full workspace path)
44 */
45 private IFolder fDestinationFolder;
46
47 // ------------------------------------------------------------------------
48 // Constructors
49 // ------------------------------------------------------------------------
50 /**
51 * Standard constructor
52 *
53 * @param file
54 * A remote file reference
55 * @param traceName
56 * A trace name
57 * @param destinationFolder
58 * The destination folder (full workspace path)
59 * @param isOverwrite
60 * global overwrite flag
61 */
62 public ImportFileInfo(IFileStore file, String traceName, IFolder destinationFolder, boolean isOverwrite) {
63 fRemoteFile = file;
64 fLocalTraceName = traceName;
65 fDestinationFolder = destinationFolder;
66 fIsOverwrite = isOverwrite;
67 }
68
69 // ------------------------------------------------------------------------
70 // Accessors
71 // ------------------------------------------------------------------------
72 /**
73 * @return name of traces after importing
74 */
75 public String getLocalTraceName() {
76 return fLocalTraceName;
77 }
78
79 /**
80 * Sets the local trace name
81 *
82 * @param importTraceName
83 * - local name of trace to set (name after importing)
84 */
85 public void setLocalTraceName(String importTraceName) {
86 this.fLocalTraceName = importTraceName;
87 }
88 /**
89 * @return true if local trace should be overwritten if a trace with the same name already exists.
90 */
91 public boolean isOverwrite() {
92 return fIsOverwrite;
93 }
94 /**
95 * Sets the overwrite flag.
96 * @param isOverwrite If the Overwrite checkbox is checked or not
97 */
98 public void setOverwrite(boolean isOverwrite) {
99 this.fIsOverwrite = isOverwrite;
100 }
101
102 /**
103 * @return the remote file implementation.
104 */
105 public IFileStore getImportFile() {
106 return fRemoteFile;
107 }
108
109 /**
110 * Sets the remote file implementation
111 *
112 * @param remoteFile
113 * The remote file implementation.
114 */
115 public void setRemoteFile(IFileStore remoteFile) {
116 fRemoteFile = remoteFile;
117 }
118
119 /**
120 * Returns the destination folder to import the trace to (full workspace path).
121 *
122 * @return destination folder
123 */
124 public IFolder getDestinationFolder() {
125 return fDestinationFolder;
126 }
127 }
128
This page took 0.033695 seconds and 5 git commands to generate.