org.hudsonci.maven.plugin.documents.internal
Class DocumentStoreImpl

java.lang.Object
  extended by org.hudsonci.maven.plugin.documents.internal.DocumentStoreImpl
All Implemented Interfaces:
DocumentStore

@Singleton
public class DocumentStoreImpl
extends Object
implements DocumentStore

File-based XStream marshaled DocumentDTO store.

Since:
2.1.0
Author:
Jason Dillon

Field Summary
static String FILE_SUFFIX
           
static String ROOT_PATH
           
 
Constructor Summary
DocumentStoreImpl(SystemService system)
           
 
Method Summary
 boolean contains(UUID id)
           
 void delete(DocumentDTO document)
           
 Marshaller getMarshaller()
           
 File getRootDir()
           
 DocumentDTO load(UUID id)
           
 Collection<DocumentDTO> loadAll()
           
 void setMarshaller(Marshaller marshaller)
           
 void setRootDir(File dir)
           
 void store(DocumentDTO document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_PATH

public static final String ROOT_PATH
See Also:
Constant Field Values

FILE_SUFFIX

public static final String FILE_SUFFIX
See Also:
Constant Field Values
Constructor Detail

DocumentStoreImpl

@Inject
public DocumentStoreImpl(SystemService system)
Method Detail

getRootDir

public File getRootDir()

setRootDir

public void setRootDir(File dir)

getMarshaller

public Marshaller getMarshaller()

setMarshaller

public void setMarshaller(Marshaller marshaller)

loadAll

public Collection<DocumentDTO> loadAll()
                                throws IOException
Specified by:
loadAll in interface DocumentStore
Throws:
IOException

contains

public boolean contains(UUID id)
Specified by:
contains in interface DocumentStore

load

public DocumentDTO load(UUID id)
                 throws IOException
Specified by:
load in interface DocumentStore
Throws:
IOException

store

public void store(DocumentDTO document)
           throws IOException
Specified by:
store in interface DocumentStore
Throws:
IOException

delete

public void delete(DocumentDTO document)
            throws IOException
Specified by:
delete in interface DocumentStore
Throws:
IOException


Copyright © 2004-2011 Hudson. All Rights Reserved.