com.googlecode.fascinator.storage.ram
Class RamStorage

java.lang.Object
  extended by com.googlecode.fascinator.storage.ram.RamStorage
All Implemented Interfaces:
Plugin, Storage

public class RamStorage
extends Object
implements Storage

RAM based storage. This is not a persistent store, it's primary use is for testing purposes.

Author:
Oliver Lucido

Constructor Summary
RamStorage()
           
 
Method Summary
 DigitalObject createObject(String oid)
           
 String getId()
           
 Map<String,DigitalObject> getManifest()
           
 String getName()
           
 DigitalObject getObject(String oid)
           
 Set<String> getObjectIdList()
           
 PluginDescription getPluginDetails()
          Gets a PluginDescription object relating to this plugin.
 void init(File jsonFile)
           
 void init(String jsonString)
           
 void removeObject(String oid)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RamStorage

public RamStorage()
Method Detail

getId

public String getId()
Specified by:
getId in interface Plugin

getName

public String getName()
Specified by:
getName in interface Plugin

getPluginDetails

public PluginDescription getPluginDetails()
Gets a PluginDescription object relating to this plugin.

Specified by:
getPluginDetails in interface Plugin
Returns:
a PluginDescription

init

public void init(File jsonFile)
          throws StorageException
Specified by:
init in interface Plugin
Throws:
StorageException

init

public void init(String jsonString)
          throws StorageException
Specified by:
init in interface Plugin
Throws:
StorageException

shutdown

public void shutdown()
              throws StorageException
Specified by:
shutdown in interface Plugin
Throws:
StorageException

createObject

public DigitalObject createObject(String oid)
                           throws StorageException
Specified by:
createObject in interface Storage
Throws:
StorageException

getObject

public DigitalObject getObject(String oid)
                        throws StorageException
Specified by:
getObject in interface Storage
Throws:
StorageException

getObjectIdList

public Set<String> getObjectIdList()
Specified by:
getObjectIdList in interface Storage

removeObject

public void removeObject(String oid)
                  throws StorageException
Specified by:
removeObject in interface Storage
Throws:
StorageException

getManifest

public Map<String,DigitalObject> getManifest()


Copyright © 2009-2012. All Rights Reserved.