Java Doc for ImportOperation.java in  » IDE-Eclipse » ui-ide » org » eclipse » ui » wizards » datatransfer » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui ide » org.eclipse.ui.wizards.datatransfer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.actions.WorkspaceModifyOperation
      org.eclipse.ui.wizards.datatransfer.ImportOperation

ImportOperation
public class ImportOperation extends WorkspaceModifyOperation (Code)
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.



Field Summary
protected  IOverwriteQueryoverwriteCallback
    

Constructor Summary
public  ImportOperation(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.

public  ImportOperation(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.

public  ImportOperation(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.


Method Summary
 voidcollectExistingReadonlyFiles(IPath sourceStart, List sources, ArrayList noOverwrite, ArrayList overwriteReadonly, int policy)
     Prompts if existing resources should be overwritten.
 IContainercreateContainersFor(IPath path)
     Creates the folders that appear in the specified resource path.
 voiddeleteResource(IResource resource)
     Deletes the given resource.
protected  voidexecute(IProgressMonitor progressMonitor)
    
 IContainergetDestinationContainerFor(Object fileSystemObject)
     Returns the container resource that the passed file system object should be imported into.
 IFilegetFile(IResource resource)
     Returns the resource either casted to or adapted to an IFile.
 IFoldergetFolder(IResource resource)
     Returns the resource either casted to or adapted to an IFolder.
 ArrayListgetRejectedFiles(IStatus multiStatus, IFile[] files)
     Returns the rejected files based on the given multi status.
Parameters:
  multiStatus - multi status to use to determine file rejection
Parameters:
  files - source files list of rejected files as absolute paths.
public  IStatusgetStatus()
     Returns the status of the import operation.
 voidimportFile(Object fileObject, int policy)
     Imports the specified file system object into the workspace.
 voidimportFileSystemObjects(List filesToImport)
     Imports the specified file system objects into the workspace.
 intimportFolder(Object folderObject, int policy)
     Imports the specified file system container object into the workspace.
 voidimportRecursivelyFrom(Object fileSystemObject, int policy)
     Imports the specified file system object recursively into the workspace.
 booleanqueryOverwrite(IPath resourcePath)
     Queries the user whether the resource with the specified path should be overwritten by a file system object that is being imported.
 booleanqueryOverwriteFile(IFile targetFile, int policy)
     Returns whether the given file should be overwritten.
public  voidsetContext(Shell shell)
     Sets the context for use by the VCM provider to prompt the user for check-out of files.
Parameters:
  shell - context for use by the VCM provider to prompt userfor check-out.
public  voidsetCreateContainerStructure(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.
public  voidsetFilesToImport(List filesToImport)
     Sets the file system objects to import.
public  voidsetOverwriteResources(boolean value)
     Sets whether imported file system objects should automatically overwrite existing workbench resources when a conflict occurs.
 ArrayListvalidateEdit(List existingFiles)
     Validates that the given source resources can be copied to the destination as decided by the VCM provider.
Parameters:
  existingFiles - existing files to validate list of rejected files as absolute paths.
 voidvalidateFiles(List sourceFiles)
     Validates the given file system objects.

Field Detail
overwriteCallback
protected IOverwriteQuery overwriteCallback(Code)




Constructor Detail
ImportOperation
public ImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor)(Code)
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 theworkspace
Parameters:
  source - the root file system object to import
Parameters:
  provider - the file system structure provider to use
Parameters:
  overwriteImplementor - the overwrite strategy to use



ImportOperation
public ImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport)(Code)
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 theworkspace
Parameters:
  source - the root file system object to import from
Parameters:
  provider - the file system structure provider to use
Parameters:
  overwriteImplementor - the overwrite strategy to use
Parameters:
  filesToImport - the list of file system objects to be imported(element type: Object)



ImportOperation
public ImportOperation(IPath containerPath, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport)(Code)
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 theworkspace
Parameters:
  provider - the file system structure provider to use
Parameters:
  overwriteImplementor - the overwrite strategy to use
Parameters:
  filesToImport - the list of file system objects to be imported(element type: Object)




Method Detail
collectExistingReadonlyFiles
void collectExistingReadonlyFiles(IPath sourceStart, List sources, ArrayList noOverwrite, ArrayList overwriteReadonly, int policy)(Code)
Prompts if existing resources should be overwritten. Recursively collects existing read-only files to overwrite and resources that should not be overwritten.
Parameters:
  sourceStart - destination path to check for existing files
Parameters:
  sources - file system objects that may exist in the destination
Parameters:
  noOverwrite - files that were selected to be skipped (don't overwrite).object type IPath
Parameters:
  overwriteReadonly - the collected existing read-only files to overwrite.object type IPath
Parameters:
  policy - on of the POLICY constants defined in theclass.



createContainersFor
IContainer createContainersFor(IPath path) throws CoreException(Code)
Creates the folders that appear in the specified resource path. These folders are created relative to the destination container.
Parameters:
  path - the relative path of the resource the container resource coresponding to the given path
exception:
  CoreException - if this method failed



deleteResource
void deleteResource(IResource resource)(Code)
Deletes the given resource. If the resource fails to be deleted, adds a status object to the list to be returned by getResult.
Parameters:
  resource - the resource



execute
protected void execute(IProgressMonitor progressMonitor)(Code)



getDestinationContainerFor
IContainer getDestinationContainerFor(Object fileSystemObject) throws CoreException(Code)
Returns the container resource that the passed file system object should be imported into.
Parameters:
  fileSystemObject - the file system object being imported the container resource that the passed file system object should beimported into
exception:
  CoreException - if this method failed



getFile
IFile getFile(IResource resource)(Code)
Returns the resource either casted to or adapted to an IFile.
Parameters:
  resource - resource to cast/adapt the resource either casted to or adapted to an IFile.null if the resource does not adapt to IFile



getFolder
IFolder getFolder(IResource resource)(Code)
Returns the resource either casted to or adapted to an IFolder.
Parameters:
  resource - resource to cast/adapt the resource either casted to or adapted to an IFolder.null if the resource does not adapt to IFolder



getRejectedFiles
ArrayList getRejectedFiles(IStatus multiStatus, IFile[] files)(Code)
Returns the rejected files based on the given multi status.
Parameters:
  multiStatus - multi status to use to determine file rejection
Parameters:
  files - source files list of rejected files as absolute paths. Object type IPath.



getStatus
public IStatus getStatus()(Code)
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. the status



importFile
void importFile(Object fileObject, int policy)(Code)
Imports the specified file system object into the workspace. If the import fails, adds a status object to the list to be returned by getResult.
Parameters:
  fileObject - the file system object to be imported
Parameters:
  policy - determines how the file object is imported



importFileSystemObjects
void importFileSystemObjects(List filesToImport)(Code)
Imports the specified file system objects into the workspace. If the import fails, adds a status object to the list to be returned by getStatus.
Parameters:
  filesToImport - the list of file system objects to import(element type: Object)
exception:
  OperationCanceledException - if canceled



importFolder
int importFolder(Object folderObject, int policy)(Code)
Imports the specified file system container object into the workspace. If the import fails, adds a status object to the list to be returned by getResult.
Parameters:
  folderObject - the file system container object to be imported
Parameters:
  policy - determines how the folder object and children are imported the policy to use to import the folder's children



importRecursivelyFrom
void importRecursivelyFrom(Object fileSystemObject, int policy)(Code)
Imports the specified file system object recursively into the workspace. If the import fails, adds a status object to the list to be returned by getStatus.
Parameters:
  fileSystemObject - the file system object to be imported
Parameters:
  policy - determines how the file system object and children are imported
exception:
  OperationCanceledException - if canceled



queryOverwrite
boolean queryOverwrite(IPath resourcePath) throws OperationCanceledException(Code)
Queries the user whether the resource with the specified path should be overwritten by a file system object that is being imported.
Parameters:
  resourcePath - the workspace path of the resource that needs to be overwritten true to overwrite, false to not overwrite
exception:
  OperationCanceledException - if canceled



queryOverwriteFile
boolean queryOverwriteFile(IFile targetFile, int policy)(Code)
Returns whether the given file should be overwritten.
Parameters:
  targetFile - the file to ask to overwrite
Parameters:
  policy - determines if the user is queried for overwrite true if the file should be overwritten, andfalse if not.



setContext
public void setContext(Shell shell)(Code)
Sets the context for use by the VCM provider to prompt the user for check-out of files.
Parameters:
  shell - context for use by the VCM provider to prompt userfor check-out. The user will not be prompted if set to null.
See Also:   IWorkspace.validateEdit(org.eclipse.core.resources.IFile[]java.lang.Object)
since:
   2.1



setCreateContainerStructure
public void setCreateContainerStructure(boolean value)(Code)
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, andfalse otherwise



setFilesToImport
public void setFilesToImport(List filesToImport)(Code)
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)(Code)
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



validateEdit
ArrayList validateEdit(List existingFiles)(Code)
Validates that the given source resources can be copied to the destination as decided by the VCM provider.
Parameters:
  existingFiles - existing files to validate list of rejected files as absolute paths. Object type IPath.



validateFiles
void validateFiles(List sourceFiles)(Code)
Validates the given file system objects. The user is prompted to overwrite existing files. Existing read-only files are validated with the VCM provider.
Parameters:
  sourceFiles - files to validate



Methods inherited from org.eclipse.ui.actions.WorkspaceModifyOperation
abstract protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException(Code)(Java Doc)
final public synchronized void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException(Code)(Java Doc)
public void threadChange(Thread thread)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.