T - the typepublic abstract class DirBasedRegistrySerializingStrategy<T> extends AbstractRegistrySerializingStrategy<T,DirBasedObjectsAccess>
AbstractRegistrySerializingStrategy.ObjectsAccessobjectsAccess| Modifier | Constructor and Description |
|---|---|
protected |
DirBasedRegistrySerializingStrategy(DirBasedObjectsAccess objectsAccess) |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(String id)
Deserialize the object
|
protected abstract T |
deserialize(String id,
File dir)
Deserialize the object from the given directory
|
void |
remove(T object,
String id) |
void |
serialize(T object,
String id)
Serialize the object
|
protected abstract void |
serialize(T object,
String id,
File dir)
Serialize the object to the given directory
|
void |
update(T object,
String id) |
deserialize, getObjectsAccessprotected DirBasedRegistrySerializingStrategy(@Nonnull DirBasedObjectsAccess objectsAccess)
@Nonnull public T deserialize(@Nonnull String id) throws IOException
RegistrySerializingStrategyid - the idIOException - if there is an io problem@Nonnull protected abstract T deserialize(@Nonnull String id, @Nonnull File dir) throws IOException
id - the iddir - the directoryIOException - if there is an io problempublic void serialize(@Nonnull T object, @Nonnull String id) throws IOException
RegistrySerializingStrategyobject - the object to serializeid - the idIOException - if there is an io problempublic void update(@Nonnull T object, @Nonnull String id) throws IOException
IOExceptionpublic void remove(@Nonnull T object, @Nonnull String id) throws IOException
IOExceptionprotected abstract void serialize(@Nonnull T object, @Nonnull String id, @Nonnull File dir) throws IOException
object - the object to serializeid - the iddir - the directoryIOException - if there is an io problemCopyright © 2007–2016 cedarsoft GmbH. All rights reserved.