org.apache.felix.deployment.rp.autoconf
Class PersistencyManager

java.lang.Object
  extended by org.apache.felix.deployment.rp.autoconf.PersistencyManager

public class PersistencyManager
extends Object


Constructor Summary
PersistencyManager(File root)
           
 
Method Summary
 void delete(String name)
          Deletes a resource.
 List load(String name)
          Loads a stored resource.
 Map loadAll()
          Loads all stored resources.
 void store(String name, List configs)
          Stores a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistencyManager

public PersistencyManager(File root)
Method Detail

store

public void store(String name,
                  List configs)
           throws IOException
Stores a resource.

Parameters:
name - Name of the resource.
configs - List of AutoConfResources representing the specified resource.
Throws:
IOException - If the resource could not be stored.

delete

public void delete(String name)
            throws IOException
Deletes a resource.

Parameters:
name - Name of the resource.
Throws:
IOException - If the resource could not be deleted.

load

public List load(String name)
          throws IOException
Loads a stored resource.

Parameters:
name - Name of the resource.
Returns:
List of AutoConfResources representing the specified resource, if the resource is unknown an empty list is returned.
Throws:
IOException - If the resource could not be properly read.

loadAll

public Map loadAll()
            throws IOException
Loads all stored resources.

Returns:
A map containing all persisted resources which is typed >
Throws:
IOException - If not all resources could be loaded.


Copyright © 2011 Apache Software Foundation. All Rights Reserved.