|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.cornerstone.blocks.masterstore.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 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)
Configuration of the component by the container. |
boolean |
containsKey(String key)
Indicates if the given key is associated to a contained object. |
void |
contextualize(Context context)
Contextualization of the component by the container during which the working home directory will be provided. |
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()
Initialization of the component by the container. |
Iterator |
list()
Returns the list of used keys. |
void |
remove(String key)
Remove the object associated to the given key. |
void |
service(ServiceManager serviceManager)
Serviceing of the component by the container. |
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
Constructor Detail |
public AbstractFileRepository()
Method Detail |
protected abstract String getExtensionDecorator()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
context
- the supplied context object
ContextException
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
serviceManager
- a service manager
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configuration
- the configuration
ConfigurationException
- if a configuration error occurspublic void initialize() throws Exception
initialize
in interface Initializable
Exception
- if a initialization stage error occursprotected 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 |