1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package com.xpn.xwiki.plugin.webdav.resources

File XWikiDavResource.java

 

Code metrics

0
0
0
1
99
19
0
-
-
0
-

Classes

Class Line # Actions
XWikiDavResource 37 0 - 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package com.xpn.xwiki.plugin.webdav.resources;
21   
22    import java.util.List;
23   
24    import org.apache.jackrabbit.webdav.DavException;
25    import org.apache.jackrabbit.webdav.DavResource;
26    import org.apache.jackrabbit.webdav.DavResourceLocator;
27    import org.apache.jackrabbit.webdav.property.DavPropertySet;
28   
29    import com.xpn.xwiki.plugin.webdav.utils.XWikiDavContext;
30   
31    /**
32    * The super interface for all xwiki related dav resources. Adds extra xwiki specific methods for the basic
33    * {@link DavResource}.
34    *
35    * @version $Id: 459c913281bf94f51710ef1953cdb61720b2a2ec $
36    */
 
37    public interface XWikiDavResource extends DavResource
38    {
39    /**
40    * This URI segment is used as the base workspace name.
41    */
42    public static final String BASE_URI = "/webdav";
43   
44    /**
45    * Initializes this resource with common attributes inherited from the parent.
46    *
47    * @param parent Parent resource.
48    * @param name Name of this resource.
49    * @param relativePath Path relative to the parent resource.
50    * @throws DavException If the initialization fails.
51    */
52    void init(XWikiDavResource parent, String name, String relativePath) throws DavException;
53   
54    /**
55    * Initializes this resource with the given parameters.
56    *
57    * @param name Name of this resource.
58    * @param locator Dav resource locator.
59    * @param context XWiki dav context.
60    * @throws DavException If the initialization fails.
61    */
62    void init(String name, DavResourceLocator locator, XWikiDavContext context) throws DavException;
63   
64    /**
65    * Method responsible for recursively decoding a URL which has been split into segments ("/"). The 'next' variable
66    * points to that URL segment (within tokens array) representing the next resource in chain.
67    *
68    * @param tokens segmented URL.
69    * @param next next index to be processed by this resource.
70    * @return the {@link XWikiDavResource} corresponding to the given URL.
71    * @throws DavException If it's not possible to decode the URL.
72    */
73    XWikiDavResource decode(String[] tokens, int next) throws DavException;
74   
75    /**
76    * @return List of virtual members for this resource.
77    */
78    List<XWikiDavResource> getVirtualMembers();
79   
80    /**
81    * @return Set of virtual properties for this resource.
82    */
83    DavPropertySet getVirtualProperties();
84   
85    /**
86    * @return List of members that is added to the initial virtual member list.
87    */
88    List<XWikiDavResource> getInitMembers();
89   
90    /**
91    * Removes everything belonging to this resource from the cache.
92    */
93    void clearCache();
94   
95    /**
96    * @return The {@link XWikiDavContext} for this resource.
97    */
98    XWikiDavContext getContext();
99    }