Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.privatrechnung.data
Class Importer

java.lang.Object
  extended by ch.elexis.util.ImporterPage
      extended by ch.elexis.privatrechnung.data.Importer

public class Importer
extends ImporterPage

A class to import codes from an external source to this code system. the external source must be an CSV or Excel(tm) file with the fields: parentCode,codeID,codeName,cost,price,time,validFrom,validUntil,factor

Please note: the codeID needs not to be a unique key. instead we might have several entries with the same codeID, but different validity-dates and prices/factors. At a given date however, only one ellement of each code should be valid. This Importer will be displayed, when the user selects "Import" from the Details-View of the codes of this plugin


Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.util.ImporterPage
ImporterPage.DBBasedImporter, ImporterPage.DirectoryBasedImporter, ImporterPage.FileBasedImporter, ImporterPage.ImporterJob, ImporterPage.ODBCBasedImporter
 
Field Summary
 
Fields inherited from class ch.elexis.util.ImporterPage
results
 
Constructor Summary
Importer()
           
 
Method Summary
 Composite createPage(Composite parent)
          Create the page that will let the user select a file to import.
 IStatus doImport(IProgressMonitor monitor)
          The import process starts when the user has selected a file and clicked "OK".
 java.lang.String getDescription()
          return a description to display in the message area of the import dialog
 java.lang.String getTitle()
          return a title to display in the title bar of the import dialog
 
Methods inherited from class ch.elexis.util.ImporterPage
collect, run, setInitializationData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Importer

public Importer()
Method Detail

createPage

public Composite createPage(Composite parent)
Create the page that will let the user select a file to import. For simplicity, we use the default FileBasedImporter of our superclass.

Specified by:
createPage in class ImporterPage
Parameters:
parent - Achtung: Hat schon ein GridlLayout, darf nicht geƤndert werden.

doImport

public IStatus doImport(IProgressMonitor monitor)
                 throws java.lang.Exception
The import process starts when the user has selected a file and clicked "OK". Warning: We can not read fields of the page created in createPage here! (The page is already disposed when doImport is called). If we have to transfer field values between createPage and doImport, we must override collect(). Our file based importer saves the user input in results[0]

Specified by:
doImport in class ImporterPage
Throws:
java.lang.Exception

getDescription

public java.lang.String getDescription()
return a description to display in the message area of the import dialog

Specified by:
getDescription in class ImporterPage

getTitle

public java.lang.String getTitle()
return a title to display in the title bar of the import dialog

Specified by:
getTitle in class ImporterPage

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis