public class WebdavPropfindGenerator extends AbstractGenerator
Modifier and Type | Class and Description |
---|---|
private static class |
WebdavPropfindGenerator.PropfindType |
Modifier and Type | Field and Description |
---|---|
private static List<Pair<String,String>> |
__DEFAULT_PROPS_COLLECTION |
private static List<Pair<String,String>> |
__DEFAULT_PROPS_RESOURCE |
static int |
DEFAULT_DEPTH
Default recursion depth for folders
|
static String |
WEBDAV_NAMESPACE
The webdav namespace
|
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
WebdavPropfindGenerator() |
Modifier and Type | Method and Description |
---|---|
private void |
_endPropstatNode(String status) |
private void |
_endResponseNode() |
private Element |
_getFirstChildElement(Element element) |
private List<Pair<String,String>> |
_getProps(Element props) |
private void |
_notFoundPropstatNode(List<Pair<String,String>> notFound) |
private void |
_processCollection(ResourceCollection resource,
int currentDepth,
int maxDepth,
WebdavPropfindGenerator.PropfindType type,
List<Pair<String,String>> props)
Add a folder in the XML response
|
private void |
_processResource(Resource resource,
WebdavPropfindGenerator.PropfindType type,
List<Pair<String,String>> props) |
private void |
_startPropstatNode() |
private void |
_startResponseNode(String href) |
void |
generate() |
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
public static final String WEBDAV_NAMESPACE
public static final int DEFAULT_DEPTH
private static final List<Pair<String,String>> __DEFAULT_PROPS_RESOURCE
private static final List<Pair<String,String>> __DEFAULT_PROPS_COLLECTION
public WebdavPropfindGenerator()
public void generate() throws IOException, SAXException, ProcessingException
private Element _getFirstChildElement(Element element)
private void _processResource(Resource resource, WebdavPropfindGenerator.PropfindType type, List<Pair<String,String>> props) throws SAXException
SAXException
private void _processCollection(ResourceCollection resource, int currentDepth, int maxDepth, WebdavPropfindGenerator.PropfindType type, List<Pair<String,String>> props) throws SAXException
resource
- the resource to saxprops
- the list of properties to returncurrentDepth
- current depthmaxDepth
- max depth (if current depth >= max depth, no children nodes will be added, only the current folder)type
- the prop find typeSAXException
- an exception occurredprivate void _startResponseNode(String href) throws SAXException
SAXException
private void _startPropstatNode() throws SAXException
SAXException
private void _endResponseNode() throws SAXException
SAXException
private void _endPropstatNode(String status) throws SAXException
SAXException
private void _notFoundPropstatNode(List<Pair<String,String>> notFound) throws SAXException
SAXException