com.openindex.openestate.tool.contacts
Class ContactsEntryImportCsvTask

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.CsvImportTask<ContactsEntry>
                  extended by com.openindex.openestate.tool.contacts.ContactsEntryImportCsvTask
All Implemented Interfaces:
ContactsEntryImportFields, Runnable, Future<Long>, RunnableFuture<Long>

public class ContactsEntryImportCsvTask
extends CsvImportTask<ContactsEntry>
implements ContactsEntryImportFields

ImmoToolTask zum Tabellenimport von Adressen im CSV-Format.
$Id: ContactsEntryImportCsvTask.java 1829 2012-10-14 14:24:52Z 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
 
Fields inherited from interface com.openindex.openestate.tool.contacts.ContactsEntryImportFields
ADDRESS_CITY, ADDRESS_CITY_PART, ADDRESS_COUNTRY, ADDRESS_LATITUDE, ADDRESS_LONGITUDE, ADDRESS_POSTALCODE, ADDRESS_REGION, ADDRESS_STREET, ADDRESS_STREETNR, COMPANY_BUSINESS, COMPANY_DEPARTMENT, COMPANY_FAX, COMPANY_MAIL, COMPANY_MOBILEPHONE, COMPANY_NAME, COMPANY_NAME_ADDITION, COMPANY_PHONE, COMPANY_POSITION, COMPANY_TYPE, COMPANY_WEBSITE, FIELDCOUNT, NOTES, PERSON_FAX, PERSON_FIRSTNAME, PERSON_GENDER, PERSON_LASTNAME, PERSON_MAIL, PERSON_MIDDLENAME, PERSON_MOBILEPHONE, PERSON_PHONE, PERSON_TITLE
 
Constructor Summary
ContactsEntryImportCsvTask(File importFile)
           
 
Method Summary
protected  ContactsEntry createCsvObject()
           
protected  Long executeImport()
           
protected  int getDefinedFieldCount()
           
protected  String getFieldTitle(int index)
           
 boolean isMultipleSelectionAllowed(int field)
           
protected  void readValues(String[] src, ContactsEntry dest)
           
protected  boolean saveCsvObject(ContactsEntry contact)
           
 
Methods inherited from class com.openindex.openestate.tool.utils.CsvImportTask
createFieldModel, executeTask, getCsvFile, getFieldMapping, readValue, setupReader, setupReader, setupReader
 
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

ContactsEntryImportCsvTask

public ContactsEntryImportCsvTask(File importFile)
Method Detail

createCsvObject

protected ContactsEntry createCsvObject()
Specified by:
createCsvObject in class CsvImportTask<ContactsEntry>

executeImport

protected Long executeImport()
                      throws ImmoToolException,
                             IOException
Overrides:
executeImport in class CsvImportTask<ContactsEntry>
Throws:
ImmoToolException
IOException

getDefinedFieldCount

protected int getDefinedFieldCount()
Specified by:
getDefinedFieldCount in class CsvImportTask<ContactsEntry>

getFieldTitle

protected final String getFieldTitle(int index)
Specified by:
getFieldTitle in class CsvImportTask<ContactsEntry>

isMultipleSelectionAllowed

public boolean isMultipleSelectionAllowed(int field)
Overrides:
isMultipleSelectionAllowed in class CsvImportTask<ContactsEntry>

readValues

protected void readValues(String[] src,
                          ContactsEntry dest)
Specified by:
readValues in class CsvImportTask<ContactsEntry>

saveCsvObject

protected boolean saveCsvObject(ContactsEntry contact)
Specified by:
saveCsvObject in class CsvImportTask<ContactsEntry>


Copyright © 2012 OpenEstate. All Rights Reserved.