com.openindex.openestate.tool.utils
Class CsvExportTask<CsvType>

java.lang.Object
  extended by javax.swing.SwingWorker<T,V>
      extended by org.jdesktop.application.Task<ResultType,Void>
          extended by com.openindex.openestate.tool.ImmoToolTask<Long>
              extended by com.openindex.openestate.tool.utils.CsvExportTask<CsvType>
Type Parameters:
CsvType - Klasse des CSV-Quellobjektes
All Implemented Interfaces:
Runnable, Future<Long>, RunnableFuture<Long>
Direct Known Subclasses:
AgencyEstateExportCsvTask, ContactsEntryExportCsvTask

public abstract class CsvExportTask<CsvType>
extends ImmoToolTask<Long>

Allgemeiner ImmoToolTask zum Export von CSV-Tabellen.
$Id: CsvExportTask.java 1820 2012-10-09 23:23:46Z andy $

Author:
Andreas Rudolph

Nested Class Summary
 
Nested classes/interfaces inherited from class com.openindex.openestate.tool.ImmoToolTask
ImmoToolTask.Callback, ImmoToolTask.TaskMessageListener
 
Nested classes/interfaces inherited from class org.jdesktop.application.Task
org.jdesktop.application.Task.BlockingScope, org.jdesktop.application.Task.InputBlocker
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
 
Field Summary
 
Fields inherited from class org.jdesktop.application.Task
PROP_COMPLETED, PROP_DESCRIPTION, PROP_DONE, PROP_INPUTBLOCKER, PROP_MESSAGE, PROP_STARTED, PROP_TASKSERVICE, PROP_TITLE, PROP_USERCANCANCEL
 
Constructor Summary
CsvExportTask(File file, Charset charset)
           
 
Method Summary
protected  Long executeExport()
           
protected  Long executeTask()
           
protected abstract  String getFieldTitle(int index)
           
protected  String[] getHeadlineValues()
           
protected abstract  CsvType[] loadCsvObjects()
           
protected abstract  String[] loadEmptyContainer()
           
protected  void writeValue(int field, String value, String[] values)
           
protected abstract  void writeValues(CsvType src, String[] dest)
           
 
Methods inherited from class com.openindex.openestate.tool.ImmoToolTask
addMessageListener, cancelled, checkCancelled, createCallback, doInBackground, failed, finished, getTaskDialog, removeMessageListener, setMessage, setTaskDialog, succeeded
 
Methods inherited from class org.jdesktop.application.Task
addTaskListener, done, getApplication, getContext, getDescription, getExecutionDuration, getInputBlocker, getMessage, getMessageDuration, getResourceMap, getTaskListeners, getTaskService, getTitle, getUserCanCancel, interrupted, isPending, isProgressPropertyValid, isStarted, message, process, removeTaskListener, resourceName, setDescription, setInputBlocker, setProgress, setProgress, setProgress, setTitle, setUserCanCancel
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvExportTask

public CsvExportTask(File file,
                     Charset charset)
Method Detail

executeExport

protected Long executeExport()
                      throws ImmoToolException,
                             IOException
Throws:
ImmoToolException
IOException

executeTask

protected Long executeTask()
                    throws Exception
Specified by:
executeTask in class ImmoToolTask<Long>
Throws:
Exception

getFieldTitle

protected abstract String getFieldTitle(int index)

getHeadlineValues

protected String[] getHeadlineValues()

loadCsvObjects

protected abstract CsvType[] loadCsvObjects()
                                     throws ImmoToolException
Throws:
ImmoToolException

loadEmptyContainer

protected abstract String[] loadEmptyContainer()

writeValue

protected void writeValue(int field,
                          String value,
                          String[] values)

writeValues

protected abstract void writeValues(CsvType src,
                                    String[] dest)


Copyright © 2012 OpenEstate. All Rights Reserved.