org.jboss.system.server.profileservice.repository
Class AbstractFileAttachmentsSerializer

java.lang.Object
  extended by org.jboss.system.server.profileservice.repository.AbstractFileAttachmentsSerializer
Direct Known Subclasses:
JAXBAttachmentSerializer

public abstract class AbstractFileAttachmentsSerializer
extends Object

A base AttachmentsSerializer that uses a file system based store.

Version:
$Revision: 85526 $
Author:
Scott.Stark@jboss.org, Emanuel Muckenhuber

Constructor Summary
AbstractFileAttachmentsSerializer(File dir)
           
 
Method Summary
protected  File getAttachmentPath(String baseName)
           
 File getAttachmentsStoreDir()
           
protected abstract
<T> T
loadAttachment(File attachmentsStore, Class<T> expected)
           
<T> T
loadAttachment(String baseName, Class<T> expected)
           
protected abstract  void saveAttachment(File attachmentsStore, Object attachment)
           
 void saveAttachment(String baseName, Object attachment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFileAttachmentsSerializer

public AbstractFileAttachmentsSerializer(File dir)
Method Detail

getAttachmentsStoreDir

public File getAttachmentsStoreDir()

loadAttachment

public <T> T loadAttachment(String baseName,
                            Class<T> expected)
                 throws Exception
Throws:
Exception

saveAttachment

public void saveAttachment(String baseName,
                           Object attachment)
                    throws Exception
Throws:
Exception

getAttachmentPath

protected File getAttachmentPath(String baseName)

loadAttachment

protected abstract <T> T loadAttachment(File attachmentsStore,
                                        Class<T> expected)
                             throws Exception
Throws:
Exception

saveAttachment

protected abstract void saveAttachment(File attachmentsStore,
                                       Object attachment)
                                throws Exception
Throws:
Exception


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.