public abstract class AbstractFilePersistenceStrategy extends java.lang.Object implements PersistenceStrategy
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractFilePersistenceStrategy.ValidFilenameFilter |
protected class |
AbstractFilePersistenceStrategy.XmlMapEntriesIterator |
Constructor and Description |
---|
AbstractFilePersistenceStrategy(java.io.File baseDirectory,
XStream xstream,
java.lang.String encoding) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key) |
protected abstract java.lang.Object |
extractKey(java.lang.String name)
Given a filename, the unescape method returns the key which originated it.
|
java.lang.Object |
get(java.lang.Object key) |
protected ConverterLookup |
getConverterLookup() |
protected Mapper |
getMapper() |
protected abstract java.lang.String |
getName(java.lang.Object key)
Given a key, the escape method returns the filename which shall be used.
|
protected boolean |
isValid(java.io.File dir,
java.lang.String name) |
java.util.Iterator |
iterator() |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value) |
java.lang.Object |
remove(java.lang.Object key) |
int |
size() |
public AbstractFilePersistenceStrategy(java.io.File baseDirectory, XStream xstream, java.lang.String encoding)
protected ConverterLookup getConverterLookup()
protected Mapper getMapper()
protected boolean isValid(java.io.File dir, java.lang.String name)
protected abstract java.lang.Object extractKey(java.lang.String name)
name
- the filenameprotected abstract java.lang.String getName(java.lang.Object key)
key
- the keypublic java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface PersistenceStrategy
public java.util.Iterator iterator()
iterator
in interface PersistenceStrategy
public int size()
size
in interface PersistenceStrategy
public boolean containsKey(java.lang.Object key)
public java.lang.Object get(java.lang.Object key)
get
in interface PersistenceStrategy
public java.lang.Object remove(java.lang.Object key)
remove
in interface PersistenceStrategy
Copyright © 2004–2022 XStream. All rights reserved.