|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLogEnabled | +--org.apache.james.mailrepository.filepair.AbstractFileRepository
This an abstract class implementing functionality for creating a file-store.
Field Summary | |
protected static int |
BYTE_MASK
|
protected static boolean |
DEBUG
|
protected static String |
HANDLED_URL
|
protected static char[] |
HEX_DIGITS
|
protected File |
m_baseDirectory
|
protected BlockContext |
m_context
|
protected String |
m_destination
|
protected String |
m_extension
|
protected FilenameFilter |
m_filter
|
protected String |
m_name
|
protected String |
m_path
|
protected ServiceManager |
m_serviceManager
|
Constructor Summary | |
AbstractFileRepository()
|
Method Summary | |
void |
configure(Configuration configuration)
|
boolean |
containsKey(String key)
Indicates if the given key is associated to a contained object. |
void |
contextualize(Context context)
|
protected AbstractFileRepository |
createChildRepository()
|
protected String |
decode(String filename)
Inverse of encode exept it do not use path. |
protected String |
encode(String key)
Returns a String that uniquely identifies the object. |
Repository |
getChildRepository(String childName)
|
protected abstract String |
getExtensionDecorator()
|
protected File |
getFile(String key)
|
protected InputStream |
getInputStream(String key)
|
protected OutputStream |
getOutputStream(String key)
|
void |
initialize()
|
Iterator |
list()
Returns the list of used keys. |
void |
remove(String key)
Remove the object associated to the given key. |
void |
service(ServiceManager serviceManager)
|
protected void |
setDestination(String destination)
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final boolean DEBUG
protected static final String HANDLED_URL
protected static final int BYTE_MASK
protected static final char[] HEX_DIGITS
protected String m_path
protected String m_destination
protected String m_extension
protected String m_name
protected FilenameFilter m_filter
protected File m_baseDirectory
protected ServiceManager m_serviceManager
protected BlockContext m_context
Constructor Detail |
public AbstractFileRepository()
Method Detail |
protected abstract String getExtensionDecorator()
public void contextualize(Context context)
contextualize
in interface Contextualizable
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
protected void setDestination(String destination) throws ConfigurationException
ConfigurationException
protected AbstractFileRepository createChildRepository() throws Exception
Exception
public Repository getChildRepository(String childName)
getChildRepository
in interface Repository
protected File getFile(String key) throws IOException
IOException
protected InputStream getInputStream(String key) throws IOException
IOException
protected OutputStream getOutputStream(String key) throws IOException
IOException
public void remove(String key)
public boolean containsKey(String key)
public Iterator list()
protected String encode(String key)
protected String decode(String filename)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |