Class PropertyManager
- java.lang.Object
-
- org.crumbleworks.forge.crumbprops.PropertyManager
-
public class PropertyManager extends Object
Manages (loading & storing) property files.- Since:
- 1.0
- Author:
- Michael Stocker
-
-
Constructor Summary
Constructors Constructor Description PropertyManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Object object)Add object to the managed property files.booleanisManaged(Object object)Tells if an object is managed by this manager.voidload(Object object)Loads managed property file from storage.voidloadAll()voidremove(Object object)Remove managed property file from manager.voidremoveAll()voidsave(Object object)Save managed property file to storage.voidsaveAll()
-
-
-
Method Detail
-
add
public void add(Object object)
Add object to the managed property files.- Parameters:
object- an instance of aPropertyFile-annotated class
-
remove
public void remove(Object object)
Remove managed property file from manager.- Parameters:
object- object an instance of aPropertyFile-annotated class- Throws:
ObjectNotManagedException
-
removeAll
public void removeAll()
-
save
public void save(Object object) throws ObjectNotManagedException, StorageIOException
Save managed property file to storage.Storage is defined via the
PropertyFileannotation.- Parameters:
object- object an instance of aPropertyFile-annotated class- Throws:
ObjectNotManagedExceptionStorageIOException
-
saveAll
public void saveAll() throws StorageIOException- Throws:
StorageIOException
-
load
public void load(Object object) throws ObjectNotManagedException, StorageIOException
Loads managed property file from storage.Storage is defined via the
PropertyFileannotation.- Parameters:
object- object an instance of aPropertyFile-annotated class- Throws:
ObjectNotManagedExceptionStorageIOException
-
loadAll
public void loadAll() throws StorageIOException- Throws:
StorageIOException
-
isManaged
public boolean isManaged(Object object)
Tells if an object is managed by this manager.- Parameters:
object- object an instance of aPropertyFile-annotated class- Returns:
trueif the object is managed.
-
-