|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.vfs.impl.DefaultFileSystemManager
org.apache.commons.vfs.impl.StandardFileSystemManager
public class StandardFileSystemManager
A FileSystemManager
that configures itself
from an XML (Default: providers.xml) configuration file.
Certain providers are only loaded and available if the dependend library is in your
classpath. You have to configure your debugging facility to log "debug" messages to see
if a provider was skipped due to "unresolved externals".
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.commons.vfs.impl.DefaultFileSystemManager |
---|
DefaultFileSystemManager.VfsStreamHandlerFactory |
Field Summary | |
---|---|
private java.lang.ClassLoader |
classLoader
|
private static java.lang.String |
CONFIG_RESOURCE
|
private java.net.URL |
configUri
|
private org.apache.commons.logging.Log |
log
|
private static java.lang.String |
PLUGIN_CONFIG_RESOURCE
|
Constructor Summary | |
---|---|
StandardFileSystemManager()
|
Method Summary | |
---|---|
private void |
addExtensionMap(org.w3c.dom.Element map)
Adds an extension map. |
private void |
addMimeTypeMap(org.w3c.dom.Element map)
Adds a mime-type map. |
private void |
addOperationProvider(org.w3c.dom.Element providerDef)
Adds a operationProvider from a operationProvider definition. |
private void |
addProvider(org.w3c.dom.Element providerDef,
boolean isDefault)
Adds a provider from a provider definition. |
private void |
configure(org.w3c.dom.Element config)
Configures this manager from an parsed XML configuration file |
private void |
configure(java.lang.String configUri,
java.io.InputStream configStream)
Configures this manager from an XML configuration file. |
private void |
configure(java.net.URL configUri)
Configures this manager from an XML configuration file. |
protected void |
configurePlugins()
Scans the classpath to find any droped plugin. The plugin-description has to be in /META-INF/vfs-providers.xml |
protected DefaultFileReplicator |
createDefaultFileReplicator()
|
private javax.xml.parsers.DocumentBuilder |
createDocumentBuilder()
Configure and create a DocumentBuilder |
private java.lang.Object |
createInstance(java.lang.String className)
Creates a provider. |
private boolean |
findClass(java.lang.String className)
Tests if a class is available. |
private java.lang.ClassLoader |
findClassLoader()
|
private java.lang.String[] |
getRequiredClasses(org.w3c.dom.Element providerDef)
Extracts the required classes from a provider definition. |
private java.lang.String[] |
getRequiredSchemes(org.w3c.dom.Element providerDef)
Extracts the required schemes from a provider definition. |
private java.lang.String[] |
getSchemas(org.w3c.dom.Element provider)
Extracts the schema names from a provider definition. |
void |
init()
Initializes this manager. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the ClassLoader to use to load the providers. |
void |
setConfiguration(java.lang.String configUri)
Sets the configuration file for this manager. |
void |
setConfiguration(java.net.URL configUri)
Sets the configuration file for this manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private org.apache.commons.logging.Log log
private static final java.lang.String CONFIG_RESOURCE
private static final java.lang.String PLUGIN_CONFIG_RESOURCE
private java.net.URL configUri
private java.lang.ClassLoader classLoader
Constructor Detail |
---|
public StandardFileSystemManager()
Method Detail |
---|
public void setConfiguration(java.lang.String configUri)
public void setConfiguration(java.net.URL configUri)
public void setClassLoader(java.lang.ClassLoader classLoader)
public void init() throws FileSystemException
init
in class DefaultFileSystemManager
FileSystemException
protected void configurePlugins() throws FileSystemException
FileSystemException
private java.lang.ClassLoader findClassLoader()
protected DefaultFileReplicator createDefaultFileReplicator()
private void configure(java.net.URL configUri) throws FileSystemException
FileSystemException
private void configure(java.lang.String configUri, java.io.InputStream configStream) throws FileSystemException
FileSystemException
private javax.xml.parsers.DocumentBuilder createDocumentBuilder() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
private void configure(org.w3c.dom.Element config) throws FileSystemException
FileSystemException
private void addExtensionMap(org.w3c.dom.Element map)
private void addMimeTypeMap(org.w3c.dom.Element map)
private void addProvider(org.w3c.dom.Element providerDef, boolean isDefault) throws FileSystemException
FileSystemException
private void addOperationProvider(org.w3c.dom.Element providerDef) throws FileSystemException
FileSystemException
private boolean findClass(java.lang.String className)
private java.lang.String[] getRequiredClasses(org.w3c.dom.Element providerDef)
private java.lang.String[] getRequiredSchemes(org.w3c.dom.Element providerDef)
private java.lang.String[] getSchemas(org.w3c.dom.Element provider)
private java.lang.Object createInstance(java.lang.String className) throws FileSystemException
FileSystemException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |