01: /*
02: JSPWiki - a JSP-based WikiWiki clone.
03:
04: Copyright (C) 2001-2002 Janne Jalkanen (Janne.Jalkanen@iki.fi)
05:
06: This program is free software; you can redistribute it and/or modify
07: it under the terms of the GNU Lesser General Public License as published by
08: the Free Software Foundation; either version 2.1 of the License, or
09: (at your option) any later version.
10:
11: This program is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: GNU Lesser General Public License for more details.
15:
16: You should have received a copy of the GNU Lesser General Public License
17: along with this program; if not, write to the Free Software
18: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: */
20: package com.ecyrd.jspwiki.dav;
21:
22: import java.util.ArrayList;
23: import java.util.Collection;
24:
25: import com.ecyrd.jspwiki.WikiContext;
26: import com.ecyrd.jspwiki.WikiEngine;
27: import com.ecyrd.jspwiki.dav.items.DavItem;
28: import com.ecyrd.jspwiki.dav.items.TopLevelDavItem;
29:
30: public class WikiRootProvider extends WikiDavProvider {
31: public WikiRootProvider(WikiEngine engine) {
32: super (engine);
33: }
34:
35: public Collection listItems(DavPath path) {
36: ArrayList list = new ArrayList();
37:
38: list.add(new TopLevelDavItem(this ));
39:
40: return list;
41: }
42:
43: public DavItem getItem(DavPath path) {
44: return new TopLevelDavItem(this );
45: }
46:
47: public DavItem refreshItem(DavItem old, DavPath path) {
48: return new TopLevelDavItem(this );
49: }
50:
51: public void setItem(DavPath path, DavItem item) {
52: // TODO Auto-generated method stub
53:
54: }
55:
56: public String getURL(DavPath path) {
57: return m_engine.getURL(WikiContext.NONE, "dav/"
58: + path.getPath(), null, false);
59: }
60:
61: }
|