public abstract class AbstractFileRepository
extends java.lang.Object
implements org.apache.avalon.cornerstone.services.store.Repository
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BYTE_MASK |
protected static boolean |
DEBUG |
protected static java.lang.String |
HANDLED_URL |
protected static char[] |
HEX_DIGITS |
protected java.io.File |
m_baseDirectory |
protected java.lang.String |
m_destination |
protected java.lang.String |
m_extension |
protected java.io.FilenameFilter |
m_filter |
protected java.lang.String |
m_name |
protected java.lang.String |
m_path |
protected FileRepositoryMonitor |
monitor |
| Constructor and Description |
|---|
AbstractFileRepository() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(java.lang.String key)
Indicates if the given key is associated to a contained object.
|
protected AbstractFileRepository |
createChildRepository() |
protected java.lang.String |
decode(java.lang.String filename)
Inverse of encode exept it do not use path.
|
protected java.lang.String |
encode(java.lang.String key)
Returns a String that uniquely identifies the object.
|
org.apache.avalon.cornerstone.services.store.Repository |
getChildRepository(java.lang.String childName) |
protected abstract java.lang.String |
getExtensionDecorator() |
protected java.io.File |
getFile(java.lang.String key) |
protected java.io.InputStream |
getInputStream(java.lang.String key) |
protected java.io.OutputStream |
getOutputStream(java.lang.String key) |
protected abstract void |
initializeChild(AbstractFileRepository child) |
java.util.Iterator |
list()
Returns the list of used keys.
|
void |
remove(java.lang.String key)
Remove the object associated to the given key.
|
protected void |
setDestination(java.lang.String destination) |
protected static final boolean DEBUG
protected static final java.lang.String HANDLED_URL
protected static final int BYTE_MASK
protected static final char[] HEX_DIGITS
protected java.lang.String m_path
protected java.lang.String m_destination
protected java.lang.String m_extension
protected java.lang.String m_name
protected java.io.FilenameFilter m_filter
protected java.io.File m_baseDirectory
protected FileRepositoryMonitor monitor
protected abstract java.lang.String getExtensionDecorator()
protected void setDestination(java.lang.String destination)
throws java.io.IOException
java.io.IOExceptionprotected AbstractFileRepository createChildRepository() throws java.lang.Exception
java.lang.Exceptionpublic org.apache.avalon.cornerstone.services.store.Repository getChildRepository(java.lang.String childName)
getChildRepository in interface org.apache.avalon.cornerstone.services.store.Repositoryprotected abstract void initializeChild(AbstractFileRepository child) throws java.lang.Exception
java.lang.Exceptionprotected java.io.File getFile(java.lang.String key)
throws java.io.IOException
java.io.IOExceptionprotected java.io.InputStream getInputStream(java.lang.String key)
throws java.io.IOException
java.io.IOExceptionprotected java.io.OutputStream getOutputStream(java.lang.String key)
throws java.io.IOException
java.io.IOExceptionpublic void remove(java.lang.String key)
public boolean containsKey(java.lang.String key)
public java.util.Iterator list()
protected java.lang.String encode(java.lang.String key)
protected java.lang.String decode(java.lang.String filename)