VdexReload 1.1.3 API

uk.ac.reload.editor.contentpackaging.resourceview
Class ResourceImporter

java.lang.Object
  extended byuk.ac.reload.editor.contentpackaging.resourceview.ResourceImporter
All Implemented Interfaces:
DweezilConstants

public class ResourceImporter
extends java.lang.Object
implements DweezilConstants

ResourceImporter class. Class is used to decide what type of resource the user is trying to import into the resources pool. It will decide on which it is and then either call the HTMLParser to find dependencies or simply copy over the files (or folder contents) into the project folder (resource pool)


Field Summary
protected  boolean _cancelOperation
          Because we are using nested and recursive function calls it is neccessary to hold a implementation of when a user clicks on the cancel button of a dialogue box.
protected  boolean _yesToAll
           
 
Fields inherited from interface uk.ac.reload.dweezil.DweezilConstants
CR, DEBUG
 
Constructor Summary
ResourceImporter(java.io.File[] files, java.io.File destination, boolean obtainDependencies, ReloadProgressMonitor progressMonitor)
          Constructor - Is passed an array of file references
ResourceImporter(java.io.File aFile, java.io.File destination, boolean obtainDependencies, ReloadProgressMonitor progressMonitor)
          Constructor - Is passed a file reference
 
Method Summary
static void copyFile(java.io.File from, java.io.File to)
          Copy a file to a different file.
 boolean getHasUserImportedFiles()
          Accessor method to return the above variable
protected  void showMessageDialog(java.lang.String msg, java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_yesToAll

protected boolean _yesToAll

_cancelOperation

protected boolean _cancelOperation
Because we are using nested and recursive function calls it is neccessary to hold a implementation of when a user clicks on the cancel button of a dialogue box.

Constructor Detail

ResourceImporter

public ResourceImporter(java.io.File aFile,
                        java.io.File destination,
                        boolean obtainDependencies,
                        ReloadProgressMonitor progressMonitor)
Constructor - Is passed a file reference

Parameters:
aFile - - The file we want to import
destination - - The destination folder to copy it to
obtainDependencies - - Does the user want to pull all dependencies across

ResourceImporter

public ResourceImporter(java.io.File[] files,
                        java.io.File destination,
                        boolean obtainDependencies,
                        ReloadProgressMonitor progressMonitor)
Constructor - Is passed an array of file references

Parameters:
files - - An array of files we wish to import
destination - - The destination folder to copy it to
obtainDependencies - - Does the user want to pull all dependencies across
Method Detail

getHasUserImportedFiles

public boolean getHasUserImportedFiles()
Accessor method to return the above variable

Returns:
a boolean indicating if the user actually imported anything

showMessageDialog

protected void showMessageDialog(java.lang.String msg,
                                 java.lang.String title)

copyFile

public static void copyFile(java.io.File from,
                            java.io.File to)
Copy a file to a different file.

Parameters:
from -
to -
Throws:
java.io.IOException

VdexReload 1.1.3 API