uk.co.lakesidetech.springxmldb.processor
Class XMLDBAutoLoader
java.lang.Object
uk.co.lakesidetech.springxmldb.processor.XMLDBImportProcessor
uk.co.lakesidetech.springxmldb.processor.XMLDBAutoLoader
- public class XMLDBAutoLoader
- extends XMLDBImportProcessor
The XMLDBAutoLoader can be used in a Spring context to automatically upload documents
to a XMLDatabase on startup. The auto loader uses Spring Resource abstraction to indicate
the location of the directory to upload. This allows it to work in web applications
and standalone.
- Author:
- Stuart Eccles
Method Summary |
void |
init()
run the upload directory and recursively upload the directory resource
specified to the xml database |
void |
setCollection(java.lang.String collection)
|
void |
setInitDirectory(org.springframework.core.io.Resource initDirectory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
initDirectory
protected org.springframework.core.io.Resource initDirectory
collection
protected java.lang.String collection
XMLDBAutoLoader
public XMLDBAutoLoader()
setInitDirectory
public void setInitDirectory(org.springframework.core.io.Resource initDirectory)
- Parameters:
initDirectory
- The initDirectory to set.
setCollection
public void setCollection(java.lang.String collection)
- Parameters:
collection
- The collection to set.
init
public void init()
throws java.io.IOException
- run the upload directory and recursively upload the directory resource
specified to the xml database
- Throws:
java.io.IOException
- if the resource cannot be found