|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler
public class CastorFileSystemDocumentHandler
CastorFileSystemDocumentHandler
Field Summary | |
---|---|
private org.exolab.castor.xml.ClassDescriptorResolver |
classDescriptorResolver
|
protected String |
documentRoot
|
protected File |
documentRootDir
|
protected String |
documentType
|
protected Class |
expectedReturnType
|
protected org.apache.jetspeed.cache.file.FileCache |
fileCache
|
private org.apache.xml.serialize.OutputFormat |
format
|
private org.apache.jetspeed.page.document.DocumentHandlerFactory |
handlerFactory
|
private static org.apache.commons.logging.Log |
log
|
private static String |
PSML_DOCUMENT_ENCODING
|
private XMLReader |
xmlReader
|
Constructor Summary | |
---|---|
CastorFileSystemDocumentHandler(String mappingFile,
String documentType,
Class expectedReturnType,
String documentRoot,
org.apache.jetspeed.cache.file.FileCache fileCache)
|
|
CastorFileSystemDocumentHandler(String mappingFile,
String documentType,
String expectedReturnType,
String documentRoot,
org.apache.jetspeed.cache.file.FileCache fileCache)
|
Method Summary | |
---|---|
protected void |
addToCache(String path,
Object objectToCache)
addToCache |
protected void |
createCastorClassDescriptorResolver(String mappingFile)
|
void |
evict(org.apache.jetspeed.cache.file.FileCacheEntry entry)
evict |
org.apache.jetspeed.om.page.Document |
getDocument(String name)
getDocument |
org.apache.jetspeed.om.page.Document |
getDocument(String name,
boolean fromCache)
getDocument |
org.apache.jetspeed.page.document.DocumentHandlerFactory |
getHandlerFactory()
getHandlerFactory |
String |
getType()
getType |
void |
refresh(org.apache.jetspeed.cache.file.FileCacheEntry entry)
refresh |
void |
removeDocument(org.apache.jetspeed.om.page.Document document)
removeDocument |
void |
setHandlerFactory(org.apache.jetspeed.page.document.DocumentHandlerFactory factory)
setHandlerFactory |
protected Object |
unmarshallDocument(Class clazz,
String path,
String extension)
|
void |
updateDocument(org.apache.jetspeed.om.page.Document document)
|
protected void |
updateDocument(org.apache.jetspeed.om.page.Document document,
boolean systemUpdate)
updateDocument |
protected void |
verifyPath(File path)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private static final String PSML_DOCUMENT_ENCODING
protected String documentType
protected Class expectedReturnType
protected String documentRoot
protected File documentRootDir
protected org.apache.jetspeed.cache.file.FileCache fileCache
private org.apache.xml.serialize.OutputFormat format
private final XMLReader xmlReader
private org.apache.jetspeed.page.document.DocumentHandlerFactory handlerFactory
private org.exolab.castor.xml.ClassDescriptorResolver classDescriptorResolver
Constructor Detail |
---|
public CastorFileSystemDocumentHandler(String mappingFile, String documentType, Class expectedReturnType, String documentRoot, org.apache.jetspeed.cache.file.FileCache fileCache) throws FileNotFoundException, SAXException, ParserConfigurationException, org.exolab.castor.mapping.MappingException
mappingFile
- Castor mapping file. THe mapping file must be in the class
pathdocumentType
- expectedReturnType
-
FileNotFoundException
SAXException
ParserConfigurationException
org.exolab.castor.mapping.MappingException
public CastorFileSystemDocumentHandler(String mappingFile, String documentType, String expectedReturnType, String documentRoot, org.apache.jetspeed.cache.file.FileCache fileCache) throws FileNotFoundException, ClassNotFoundException, SAXException, ParserConfigurationException, org.exolab.castor.mapping.MappingException
FileNotFoundException
ClassNotFoundException
SAXException
ParserConfigurationException
org.exolab.castor.mapping.MappingException
Method Detail |
---|
public org.apache.jetspeed.om.page.Document getDocument(String name) throws org.apache.jetspeed.page.document.NodeException, org.apache.jetspeed.page.document.DocumentNotFoundException
getDocument
getDocument
in interface org.apache.jetspeed.page.document.DocumentHandler
name
-
DocumentException,
- DocumentNotFoundException
org.apache.jetspeed.page.document.NodeException
org.apache.jetspeed.page.document.DocumentNotFoundException
DocumentHandler.getDocument(java.lang.String)
public void updateDocument(org.apache.jetspeed.om.page.Document document) throws org.apache.jetspeed.page.document.FailedToUpdateDocumentException
updateDocument
in interface org.apache.jetspeed.page.document.DocumentHandler
org.apache.jetspeed.page.document.FailedToUpdateDocumentException
protected void updateDocument(org.apache.jetspeed.om.page.Document document, boolean systemUpdate) throws org.apache.jetspeed.page.document.FailedToUpdateDocumentException
updateDocument
document
- systemUpdate
-
org.apache.jetspeed.page.document.FailedToUpdateDocumentException
DocumentHandler.updateDocument(org.apache.jetspeed.om.page.Document)
protected void createCastorClassDescriptorResolver(String mappingFile) throws org.exolab.castor.mapping.MappingException
org.exolab.castor.mapping.MappingException
protected Object unmarshallDocument(Class clazz, String path, String extension) throws org.apache.jetspeed.page.document.DocumentNotFoundException, org.apache.jetspeed.page.document.DocumentException
org.apache.jetspeed.page.document.DocumentNotFoundException
org.apache.jetspeed.page.document.DocumentException
protected void verifyPath(File path) throws FileNotFoundException
FileNotFoundException
public void removeDocument(org.apache.jetspeed.om.page.Document document) throws org.apache.jetspeed.page.document.DocumentNotFoundException, org.apache.jetspeed.page.document.FailedToDeleteDocumentException
removeDocument
removeDocument
in interface org.apache.jetspeed.page.document.DocumentHandler
document
-
org.apache.jetspeed.page.document.DocumentNotFoundException
org.apache.jetspeed.page.document.FailedToDeleteDocumentException
DocumentHandler.removeDocument(org.apache.jetspeed.om.page.Document)
public org.apache.jetspeed.om.page.Document getDocument(String name, boolean fromCache) throws org.apache.jetspeed.page.document.DocumentNotFoundException, org.apache.jetspeed.page.document.NodeException
getDocument
getDocument
in interface org.apache.jetspeed.page.document.DocumentHandler
name
- fromCahe
- Whether or not the Document should be pulled from the cache.
org.apache.jetspeed.page.document.DocumentNotFoundException
org.apache.jetspeed.page.document.NodeException
DocumentHandler.getDocument(java.lang.String,
boolean)
protected void addToCache(String path, Object objectToCache)
addToCache
path
- objectToCache
- public void refresh(org.apache.jetspeed.cache.file.FileCacheEntry entry) throws Exception
refresh
refresh
in interface org.apache.jetspeed.cache.file.FileCacheEventListener
entry
-
Exception
FileCacheEventListener.refresh(org.apache.jetspeed.cache.file.FileCacheEntry)
public void evict(org.apache.jetspeed.cache.file.FileCacheEntry entry) throws Exception
evict
evict
in interface org.apache.jetspeed.cache.file.FileCacheEventListener
entry
-
Exception
FileCacheEventListener.evict(org.apache.jetspeed.cache.file.FileCacheEntry)
public String getType()
getType
getType
in interface org.apache.jetspeed.page.document.DocumentHandler
DocumentHandler.getType()
public org.apache.jetspeed.page.document.DocumentHandlerFactory getHandlerFactory()
getHandlerFactory
getHandlerFactory
in interface org.apache.jetspeed.page.document.DocumentHandler
DocumentHandler.getHandlerFactory()
public void setHandlerFactory(org.apache.jetspeed.page.document.DocumentHandlerFactory factory)
setHandlerFactory
setHandlerFactory
in interface org.apache.jetspeed.page.document.DocumentHandler
factory
- DocumentHandler.setHandlerFactory(org.apache.jetspeed.page.document.DocumentHandlerFactory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |