Remote Systems
v6.4.1

com.ibm.etools.systems.files.importexport.files
Class RemoteFileImportOperation

java.lang.Object
  extended byWorkspaceModifyOperation
      extended bycom.ibm.etools.systems.files.importexport.files.RemoteFileImportOperation

public class RemoteFileImportOperation
extends WorkspaceModifyOperation

An operation which does the actual work of copying objects from the local file system into the workspace.

This class may be instantiated; it is not intended to be subclassed.

See Also:
Serialized Form

Field Summary
static String Copyright
           
protected  IOverwriteQuery overwriteCallback
           
 
Constructor Summary
RemoteFileImportOperation(IPath containerPath, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport)
          Creates a new operation that imports specific file system objects.
RemoteFileImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor)
          Creates a new operation that recursively imports the entire contents of the specified root file system object.
RemoteFileImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport)
          Creates a new operation that imports specific file system objects.
RemoteFileImportOperation(RemoteFileImportData data, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor)
           
 
Method Summary
protected  void execute(IProgressMonitor progressMonitor)
           
 IStatus getStatus()
          Returns the status of the import operation.
protected  void saveDescription()
          Saves a description file for the export.
 void setCreateContainerStructure(boolean value)
          Sets whether the containment structures that are implied from the full paths of file system objects being imported should be duplicated in the workbench.
 void setFilesToImport(List filesToImport)
          Sets the file system objects to import.
 void setOverwriteResources(boolean value)
          Sets whether imported file system objects should automatically overwrite existing workbench resources when a conflict occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

overwriteCallback

protected IOverwriteQuery overwriteCallback
Constructor Detail

RemoteFileImportOperation

public RemoteFileImportOperation(IPath containerPath,
                                 Object source,
                                 IImportStructureProvider provider,
                                 IOverwriteQuery overwriteImplementor)
Creates a new operation that recursively imports the entire contents of the specified root file system object.

The source parameter represents the root file system object to import. All contents of this object are imported. Valid types for this parameter are determined by the supplied IImportStructureProvider.

The provider parameter allows this operation to deal with the source object in an abstract way. This operation calls methods on the provider and the provider in turn calls specific methods on the source object.

The default import behavior is to recreate the complete container structure for the contents of the root file system object in their destination. If setCreateContainerStructure is set to false then the container structure created is relative to the root file system object.

Parameters:
containerPath - the full path of the destination container within the workspace
source - the root file system object to import
provider - the file system structure provider to use
overwriteImplementor - the overwrite strategy to use

RemoteFileImportOperation

public RemoteFileImportOperation(IPath containerPath,
                                 Object source,
                                 IImportStructureProvider provider,
                                 IOverwriteQuery overwriteImplementor,
                                 List filesToImport)
Creates a new operation that imports specific file system objects. In this usage context, the specified source file system object is used by the operation solely to determine the destination container structure of the file system objects being imported.

The source parameter represents the root file system object to import. Valid types for this parameter are determined by the supplied IImportStructureProvider. The contents of the source which are to be imported are specified in the filesToImport parameter.

The provider parameter allows this operation to deal with the source object in an abstract way. This operation calls methods on the provider and the provider in turn calls specific methods on the source object.

The filesToImport parameter specifies what contents of the root file system object are to be imported.

The default import behavior is to recreate the complete container structure for the file system objects in their destination. If setCreateContainerStructure is set to false, then the container structure created for each of the file system objects is relative to the supplied root file system object.

Parameters:
containerPath - the full path of the destination container within the workspace
source - the root file system object to import from
provider - the file system structure provider to use
overwriteImplementor - the overwrite strategy to use
filesToImport - the list of file system objects to be imported (element type: Object)

RemoteFileImportOperation

public RemoteFileImportOperation(RemoteFileImportData data,
                                 IImportStructureProvider provider,
                                 IOverwriteQuery overwriteImplementor)

RemoteFileImportOperation

public RemoteFileImportOperation(IPath containerPath,
                                 IImportStructureProvider provider,
                                 IOverwriteQuery overwriteImplementor,
                                 List filesToImport)
Creates a new operation that imports specific file system objects.

The provider parameter allows this operation to deal with the source object in an abstract way. This operation calls methods on the provider and the provider in turn calls specific methods on the source object.

The filesToImport parameter specifies what file system objects are to be imported.

The default import behavior is to recreate the complete container structure for the file system objects in their destination. If setCreateContainerStructure is set to false, then no container structure is created for each of the file system objects.

Parameters:
containerPath - the full path of the destination container within the workspace
provider - the file system structure provider to use
overwriteImplementor - the overwrite strategy to use
filesToImport - the list of file system objects to be imported (element type: Object)
Method Detail

execute

protected void execute(IProgressMonitor progressMonitor)

saveDescription

protected void saveDescription()
                        throws CoreException,
                               IOException
Saves a description file for the export.

Throws:
CoreException - if an unexpected exception occurs.
IOException - if an I/O error occurs.

getStatus

public IStatus getStatus()
Returns the status of the import operation. If there were any errors, the result is a status object containing individual status objects for each error. If there were no errors, the result is a status object with error code OK.

Returns:
the status

setCreateContainerStructure

public void setCreateContainerStructure(boolean value)
Sets whether the containment structures that are implied from the full paths of file system objects being imported should be duplicated in the workbench.

Parameters:
value - true if containers should be created, and false otherwise

setFilesToImport

public void setFilesToImport(List filesToImport)
Sets the file system objects to import.

Parameters:
filesToImport - the list of file system objects to be imported (element type: Object)

setOverwriteResources

public void setOverwriteResources(boolean value)
Sets whether imported file system objects should automatically overwrite existing workbench resources when a conflict occurs.

Parameters:
value - true to automatically overwrite, and false otherwise

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.