org.sakaiproject.component.legacy.calendar.readers
Class OutlookReader

java.lang.Object
  extended byorg.sakaiproject.component.legacy.calendar.readers.Reader
      extended byorg.sakaiproject.component.legacy.calendar.readers.CSVReader
          extended byorg.sakaiproject.component.legacy.calendar.readers.OutlookReader

public class OutlookReader
extends CSVReader

This class parses a comma (or other separator other than a double-quote) delimited file.


Nested Class Summary
 
Nested classes inherited from class org.sakaiproject.component.legacy.calendar.readers.Reader
Reader.ColumnHeader, Reader.ReaderImportCell, Reader.ReaderImportRowHandler
 
Field Summary
 String ALL_DAY_EVENT_HEADER
           
 String DESCRIPTION_HEADER
           
 String END_DATE_HEADER
           
 String END_TIME_HEADER
           
 String LOCATION_HEADER
           
 String START_DATE_HEADER
           
 String START_TIME_HEADER
           
 String SUBJECT_HEADER
           
 
Fields inherited from class org.sakaiproject.component.legacy.calendar.readers.Reader
columnHeaderMap, timeService
 
Constructor Summary
OutlookReader()
          Default constructor
 
Method Summary
 List filterEvents(List events, String[] customFieldNames)
          Each derived class must implement this filter to convert the properties as set by the reader into a common set of properties that will be used to create calendar events.
 Map getDefaultColumnMap()
          Get the default column map for CSV files.
 void importStreamFromDelimitedFile(InputStream stream, Reader.ReaderImportRowHandler handler)
          Import a CSV file from a stream and callback on each row.
 
Methods inherited from class org.sakaiproject.component.legacy.calendar.readers.CSVReader
parseLineFromDelimitedFile, setColumnDelimiter
 
Methods inherited from class org.sakaiproject.component.legacy.calendar.readers.Reader
buildColumnDescriptionArray, getColumnHeaderMap, getReader, getTimeService, processLine, setColumnHeaderToAtributeMapping, setTimeService, trimLeadingTrailingQuotes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBJECT_HEADER

public final String SUBJECT_HEADER
See Also:
Constant Field Values

START_DATE_HEADER

public final String START_DATE_HEADER
See Also:
Constant Field Values

START_TIME_HEADER

public final String START_TIME_HEADER
See Also:
Constant Field Values

END_DATE_HEADER

public final String END_DATE_HEADER
See Also:
Constant Field Values

END_TIME_HEADER

public final String END_TIME_HEADER
See Also:
Constant Field Values

ALL_DAY_EVENT_HEADER

public final String ALL_DAY_EVENT_HEADER
See Also:
Constant Field Values

DESCRIPTION_HEADER

public final String DESCRIPTION_HEADER
See Also:
Constant Field Values

LOCATION_HEADER

public final String LOCATION_HEADER
See Also:
Constant Field Values
Constructor Detail

OutlookReader

public OutlookReader()
Default constructor

Method Detail

importStreamFromDelimitedFile

public void importStreamFromDelimitedFile(InputStream stream,
                                          Reader.ReaderImportRowHandler handler)
                                   throws ImportException
Import a CSV file from a stream and callback on each row.

Overrides:
importStreamFromDelimitedFile in class CSVReader
Parameters:
stream - Stream of CSV (or other delimited data)
handler - Callback for each row.
Throws:
ImportException

filterEvents

public List filterEvents(List events,
                         String[] customFieldNames)
                  throws ImportException
Description copied from class: Reader
Each derived class must implement this filter to convert the properties as set by the reader into a common set of properties that will be used to create calendar events. Notably, this filter must create a ScheduleImporterService.ACTUAL_TIMERANGE property that will define the actual start time/date of the event.

Overrides:
filterEvents in class CSVReader
Throws:
ImportException

getDefaultColumnMap

public Map getDefaultColumnMap()
Description copied from class: CSVReader
Get the default column map for CSV files.

Overrides:
getDefaultColumnMap in class CSVReader