1 /**********************************************************************
2 * Copyright (c) 2012, 2014 Ericsson
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
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.control
.ui
.views
.dialogs
;
14 import org
.eclipse
.core
.resources
.IFolder
;
15 import org
.eclipse
.rse
.subsystems
.files
.core
.subsystems
.IRemoteFile
;
19 * Helper class for storing information about a remote file to import.
22 * @author Bernd Hufmann
24 public class ImportFileInfo
{
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
30 * Remote file reference
32 private IRemoteFile fRemoteFile
;
36 private String fLocalTraceName
;
38 * Global overwrite flag
40 private boolean fIsOverwrite
;
42 * Destination folder to import the trace to (full workspace path)
44 private IFolder fDestinationFolder
;
46 // ------------------------------------------------------------------------
48 // ------------------------------------------------------------------------
50 * Standard constructor
53 * A remote file reference
56 * @param destinationFolder
57 * The destination folder (full workspace path)
59 * global overwrite flag
61 public ImportFileInfo(IRemoteFile file
, String traceName
, IFolder destinationFolder
, boolean isOverwrite
) {
63 fLocalTraceName
= traceName
;
64 fDestinationFolder
= destinationFolder
;
65 fIsOverwrite
= isOverwrite
;
68 // ------------------------------------------------------------------------
70 // ------------------------------------------------------------------------
72 * @return name of traces after importing
74 public String
getLocalTraceName() {
75 return fLocalTraceName
;
79 * Sets the local trace name
81 * @param importTraceName
82 * - local name of trace to set (name after importing)
84 public void setLocalTraceName(String importTraceName
) {
85 this.fLocalTraceName
= importTraceName
;
88 * @return true if local trace should be overwritten if a trace with the same name already exists.
90 public boolean isOverwrite() {
94 * Sets the overwrite flag.
95 * @param isOverwrite If the Overwrite checkbox is checked or not
97 public void setOverwrite(boolean isOverwrite
) {
98 this.fIsOverwrite
= isOverwrite
;
102 * @return the remote file implementation.
104 public IRemoteFile
getImportFile() {
109 * Sets the remote file implementation
112 * The remote file implementation.
114 public void setRemoteFile(IRemoteFile remoteFile
) {
115 fRemoteFile
= remoteFile
;
119 * Returns the destination folder to import the trace to (full workspace path).
121 * @return destination folder
123 public IFolder
getDestinationFolder() {
124 return fDestinationFolder
;