org.eclipse.mylar.internal.tasks.ui.util
Class TaskDataExportJob

java.lang.Object
  extended by org.eclipse.mylar.internal.tasks.ui.util.TaskDataExportJob
All Implemented Interfaces:
org.eclipse.jface.operation.IRunnableWithProgress

public class TaskDataExportJob
extends java.lang.Object
implements org.eclipse.jface.operation.IRunnableWithProgress

Job that performs exporting (copying or zipping) of Mylar Task List data Assumes that check with user for overwrite already done. Overwrites destination if exists!

Author:
Wesley Coelho, Mik Kersten, Rob Elves

Field Summary
private  java.lang.String destinationDirectory
           
private  java.io.File destZipFile
           
private  boolean exportActivationHistory
           
private  boolean exportTaskContexts
           
private  boolean exportTaskList
           
private static java.lang.String JOB_LABEL
           
private  java.util.Collection<ITask> tasks
           
private  boolean zip
           
private  java.lang.String zipFileName
           
 
Constructor Summary
TaskDataExportJob(java.lang.String destinationDirectory, boolean exportTaskList, boolean exportActivationHistory, boolean exportTaskContexts, boolean zipIt, java.lang.String zipFileName, java.util.Collection<ITask> taskContextsToExport)
          export specified data
TaskDataExportJob(java.lang.String destinationDirectory, boolean zipIt, java.lang.String zipFileName)
          export all data
 
Method Summary
private  boolean copy(java.io.File src, java.io.File dst)
           
 void run(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOB_LABEL

private static final java.lang.String JOB_LABEL
See Also:
Constant Field Values

zip

private boolean zip

exportTaskList

private boolean exportTaskList

exportActivationHistory

private boolean exportActivationHistory

exportTaskContexts

private boolean exportTaskContexts

destinationDirectory

private java.lang.String destinationDirectory

zipFileName

private java.lang.String zipFileName

destZipFile

private java.io.File destZipFile

tasks

private java.util.Collection<ITask> tasks
Constructor Detail

TaskDataExportJob

public TaskDataExportJob(java.lang.String destinationDirectory,
                         boolean zipIt,
                         java.lang.String zipFileName)
export all data


TaskDataExportJob

public TaskDataExportJob(java.lang.String destinationDirectory,
                         boolean exportTaskList,
                         boolean exportActivationHistory,
                         boolean exportTaskContexts,
                         boolean zipIt,
                         java.lang.String zipFileName,
                         java.util.Collection<ITask> taskContextsToExport)
export specified data

Method Detail

run

public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
         throws java.lang.reflect.InvocationTargetException,
                java.lang.InterruptedException
Specified by:
run in interface org.eclipse.jface.operation.IRunnableWithProgress
Throws:
java.lang.reflect.InvocationTargetException
java.lang.InterruptedException

copy

private boolean copy(java.io.File src,
                     java.io.File dst)