de.smartics.maven.issues.cache
Class XmlTaskDataStore

Package class diagram package XmlTaskDataStore
java.lang.Object
  extended by de.smartics.maven.issues.cache.AbstractFileTaskDataStore
      extended by de.smartics.maven.issues.cache.XmlTaskDataStore
All Implemented Interfaces:
TaskDataStore

public class XmlTaskDataStore
     
     
extends AbstractFileTaskDataStore

Implementation of the data store that writes task data to XML files.


Field Summary
 
Fields inherited from class de.smartics.maven.issues.cache.AbstractFileTaskDataStore
fileNameExtension, persistentStoreDirectory
 
Constructor Summary
XmlTaskDataStore(String encoding, File persistentStoreDirectory)
          Default constructor.
 
Method Summary
protected  org.eclipse.mylyn.tasks.core.data.TaskData readTask(InputStream inputStream)
          Reads the task from the given input stream.
protected  void writeTask(OutputStream outputStream, org.eclipse.mylyn.tasks.core.data.TaskData task)
          Persists the task to the given output stream.
 
Methods inherited from class de.smartics.maven.issues.cache.AbstractFileTaskDataStore
close, close, createFile, load, persist, readTask, writeTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlTaskDataStore

public XmlTaskDataStore(String encoding,
                        File persistentStoreDirectory)
Default constructor.

Parameters:
encoding - the character encoding to read and write files.
persistentStoreDirectory - the reference to the directory to store the individual task files.
Method Detail

readTask

protected org.eclipse.mylyn.tasks.core.data.TaskData readTask(InputStream inputStream)
                                                       throws PersistenceException
Reads the task from the given input stream.

Specified by:
readTask in class AbstractFileTaskDataStore
Parameters:
inputStream - the input stream to read from.
Returns:
the task information read from the given input stream.
Throws:
PersistenceException - if the task data cannot be read from the given input stream.

writeTask

protected void writeTask(OutputStream outputStream,
                         org.eclipse.mylyn.tasks.core.data.TaskData task)
                  throws PersistenceException
Persists the task to the given output stream. This method takes responsibility of closing the stream.

Specified by:
writeTask in class AbstractFileTaskDataStore
Parameters:
outputStream - the output stream to write to.
task - the task data to store.
Throws:
PersistenceException - if the task data cannot be written to the given output stream.


Copyright © 2008-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.