net.sourceforge.java.feednread.backend.jobs
Class TreeImportJob

java.lang.Object
  extended bynet.sourceforge.java.util.jobs.Job
      extended bynet.sourceforge.java.feednread.backend.jobs.TreeImportJob
All Implemented Interfaces:
IJob, IRunnableWithProgress

public class TreeImportJob
extends Job

Job to import the structures from the NewsFeedFavoritesTree and NewsFeedWatchesTree into a Category respective WatchFolder. This Job synchronizes both of the tree structures during import.

Author:
Sebastian Machhausen

Field Summary
private  String favoritesFile
           The name of the File to import the NewsFeedFavoritesTree structure from
private  MainApplicationWindow mainWindow
           The Feed'n Read main window
private  Category targetCategory
           The Category to import the NewsFeedFavoritesTree structure into
private  WatchFolder targetFolder
           The WatchFolder to import the NewsFeedWatchesTree structure into
private  String watchesFile
           The name of the File to import the NewsFeedWatchesTree structure from
 
Fields inherited from class net.sourceforge.java.util.jobs.Job
 
Fields inherited from interface net.sourceforge.java.util.jobs.IJob
HIGH_PRIORITY, LOW_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TreeImportJob(MainApplicationWindow mainWindow, Category targetCategory, String favoritesFile, WatchFolder targetFolder, String watchesFile)
           Creates a new TreeImportJob instance.
 
Method Summary
 void run(IProgressMonitor monitor)
           Starts this TreeImportJob.
 
Methods inherited from class net.sourceforge.java.util.jobs.Job
cancel, done, getException, getJobManager, getName, getPriority, getStatus, getThread, isCanceled, join, setException, setJobManager, setName, setPriority, setThread, start, started, statusChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainWindow

private MainApplicationWindow mainWindow

The Feed'n Read main window


targetCategory

private Category targetCategory

The Category to import the NewsFeedFavoritesTree structure into


favoritesFile

private String favoritesFile

The name of the File to import the NewsFeedFavoritesTree structure from


targetFolder

private WatchFolder targetFolder

The WatchFolder to import the NewsFeedWatchesTree structure into


watchesFile

private String watchesFile

The name of the File to import the NewsFeedWatchesTree structure from

Constructor Detail

TreeImportJob

public TreeImportJob(MainApplicationWindow mainWindow,
                     Category targetCategory,
                     String favoritesFile,
                     WatchFolder targetFolder,
                     String watchesFile)

Creates a new TreeImportJob instance.

Parameters:
mainWindow - the Feed'n Read main window
targetCategory - the Category to import into
favoritesFile - the name of the opml File to import the NewsFeedFavoritesTree structure from
targetFolder - the WatchFolder to import into
watchesFile - the name of the watches File to import the NewsFeedWatchesTree structure from
Method Detail

run

public void run(IProgressMonitor monitor)
         throws InvocationTargetException,
                InterruptedException

Starts this TreeImportJob.

Throws:
InvocationTargetException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing InterruptedException
InterruptedException
See Also:
IRunnableWithProgress.run(org.eclipse.core.runtime.IProgressMonitor)