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 * Markus Schorn - Bug 448058: Use org.eclipse.remote in favor of RSE
12 **********************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.dialogs
;
15 import org
.eclipse
.core
.filesystem
.IFileStore
;
16 import org
.eclipse
.core
.resources
.IFolder
;
20 * Helper class for storing information about a remote file to import.
23 * @author Bernd Hufmann
25 public class ImportFileInfo
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
31 * Remote file reference
33 private IFileStore fRemoteFile
;
37 private String fLocalTraceName
;
39 * Global overwrite flag
41 private boolean fIsOverwrite
;
43 * Destination folder to import the trace to (full workspace path)
45 private IFolder fDestinationFolder
;
47 // ------------------------------------------------------------------------
49 // ------------------------------------------------------------------------
51 * Standard constructor
54 * A remote file reference
57 * @param destinationFolder
58 * The destination folder (full workspace path)
60 * global overwrite flag
62 public ImportFileInfo(IFileStore file
, String traceName
, IFolder destinationFolder
, boolean isOverwrite
) {
64 fLocalTraceName
= traceName
;
65 fDestinationFolder
= destinationFolder
;
66 fIsOverwrite
= isOverwrite
;
69 // ------------------------------------------------------------------------
71 // ------------------------------------------------------------------------
73 * @return name of traces after importing
75 public String
getLocalTraceName() {
76 return fLocalTraceName
;
80 * Sets the local trace name
82 * @param importTraceName
83 * - local name of trace to set (name after importing)
85 public void setLocalTraceName(String importTraceName
) {
86 this.fLocalTraceName
= importTraceName
;
89 * @return true if local trace should be overwritten if a trace with the same name already exists.
91 public boolean isOverwrite() {
95 * Sets the overwrite flag.
96 * @param isOverwrite If the Overwrite checkbox is checked or not
98 public void setOverwrite(boolean isOverwrite
) {
99 this.fIsOverwrite
= isOverwrite
;
103 * @return the remote file implementation.
105 public IFileStore
getImportFile() {
110 * Sets the remote file implementation
113 * The remote file implementation.
115 public void setRemoteFile(IFileStore remoteFile
) {
116 fRemoteFile
= remoteFile
;
120 * Returns the destination folder to import the trace to (full workspace path).
122 * @return destination folder
124 public IFolder
getDestinationFolder() {
125 return fDestinationFolder
;