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