org.jboss.system.server.profileservice.repository.clustered.local
Class JAXBRepositoryContentMetadataPersister

java.lang.Object
  extended by org.jboss.system.server.profileservice.repository.clustered.local.AbstractContentMetadataPersister
      extended by org.jboss.system.server.profileservice.repository.clustered.local.JAXBRepositoryContentMetadataPersister
All Implemented Interfaces:
ContentMetadataPersister

public class JAXBRepositoryContentMetadataPersister
extends AbstractContentMetadataPersister

RepositoryContentPersister that uses JAXB to store the content metadata as XML.

Author:
Brian Stansberry

Constructor Summary
JAXBRepositoryContentMetadataPersister(File dir)
           
JAXBRepositoryContentMetadataPersister(org.jboss.bootstrap.spi.Server server)
           
JAXBRepositoryContentMetadataPersister(URI uri)
           
 
Method Summary
 File getMetadataPath(String storeName)
          Get the file where metadata is stored.
protected  RepositoryContentMetadata loadMetadata(File metadataStore)
          Actually load the metadata
protected  void saveMetadata(File metadataStore, RepositoryContentMetadata metadata)
          Actually store the given metadata.
 
Methods inherited from class org.jboss.system.server.profileservice.repository.clustered.local.AbstractContentMetadataPersister
getContentMetadataDir, load, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBRepositoryContentMetadataPersister

public JAXBRepositoryContentMetadataPersister(org.jboss.bootstrap.spi.Server server)

JAXBRepositoryContentMetadataPersister

public JAXBRepositoryContentMetadataPersister(URI uri)

JAXBRepositoryContentMetadataPersister

public JAXBRepositoryContentMetadataPersister(File dir)
Method Detail

getMetadataPath

public File getMetadataPath(String storeName)
Description copied from class: AbstractContentMetadataPersister
Get the file where metadata is stored.

Specified by:
getMetadataPath in class AbstractContentMetadataPersister
Parameters:
storeName - the name of the store; identifies which metadata is desired
Returns:
the file. Will not be null

loadMetadata

protected RepositoryContentMetadata loadMetadata(File metadataStore)
                                          throws Exception
Description copied from class: AbstractContentMetadataPersister
Actually load the metadata

Specified by:
loadMetadata in class AbstractContentMetadataPersister
Parameters:
metadataStore - file where metadata is stored
Returns:
the metadata
Throws:
Exception

saveMetadata

protected void saveMetadata(File metadataStore,
                            RepositoryContentMetadata metadata)
                     throws Exception
Description copied from class: AbstractContentMetadataPersister
Actually store the given metadata.

Specified by:
saveMetadata in class AbstractContentMetadataPersister
Parameters:
metadataStore - file where metadata should be stored. Cannot be null
metadata - the metadata. Cannot be null
Throws:
Exception


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