KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > webdav > util > PropertyRetriever


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyRetriever.java,v 1.14 2004/08/05 14:43:31 dflorey Exp $
3  * $Revision: 1.14 $
4  * $Date: 2004/08/05 14:43:31 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23 package org.apache.slide.webdav.util;
24
25 // import list
26
import java.util.List JavaDoc;
27
28 import org.apache.slide.common.RequestedProperties;
29 import org.apache.slide.common.SlideException;
30 import org.apache.slide.content.NodeRevisionDescriptor;
31 import org.apache.slide.content.NodeRevisionDescriptors;
32 import org.apache.slide.content.NodeRevisionNumber;
33 import org.apache.slide.search.RequestedResource;
34 import org.apache.slide.webdav.util.resourcekind.ResourceKind;
35 import org.jdom.JDOMException;
36
37 /**
38  * An implementation of this interface is used to retrieve the properties of a
39  * resource as a list of <code>&lt;propstat&gt;</code> elements. The main code of this
40  * class has been copied from the <code>PropFindMethod</code>. All methods
41  * providing property information (<code>PropFindMethod</code>,
42  * <code>ReportMethod</code>) should use an implementation of this interface.
43  *
44  * @version $Revision: 1.14 $
45  *
46  */

47 public interface PropertyRetriever {
48     
49     
50     
51     /**
52      * Returns the requested properties of the last revision of the resource
53      * identified by the given <code>uri</code> as list of <code>&lt;propstat&gt;</code>
54      * JDOM Elements.
55      *
56      * @param requestedProperties the requested properties.
57      * @param uri the URI of the resource.
58      * @param contextPath a String , the result of HttpRequest.getContextPath()
59      * @param servletPath a String, the result of HttpRequest.getServletPath()
60      * @param allpropSupportsDeltaV indicates if the <code>DeltaV</code> specific
61      * properties should be included in case
62      * all properties are requested.
63      *
64      * @return the requested properties as list of <code>&lt;propstat&gt;</code>
65      * JDOM Element.
66      *
67      * @throws SlideException
68      * @throws JDOMException if creating the JDOM Element fails.
69      */

70     public List JavaDoc getPropertiesOfObject(RequestedProperties requestedProperties, String JavaDoc uri, String JavaDoc servletContextPath, boolean allpropSupportsDeltaV) throws SlideException, JDOMException;
71     
72     /**
73      * Returns the requested properties of the resource identified by the given
74      * <code>uri</code> and <code>revisionNumber</code> as list of
75      * <code>&lt;propstat&gt;</code> JDOM Elements.
76      *
77      * @param requestedProperties the requested properties.
78      * @param uri the URI of the resource.
79      * @param revisionNumber the revision number of the requested resource.
80      * @param contextPath a String , the result of HttpRequest.getContextPath()
81      * @param servletPath a String, the result of HttpRequest.getServletPath()
82      * @param allpropSupportsDeltaV indicates if the <code>DeltaV</code> specific
83      * properties should be included in case
84      * all properties are requested.
85      *
86      * @return the requested properties as list of <code>&lt;propstat&gt;</code>
87      * JDOM Element.
88      *
89      * @throws SlideException
90      * @throws JDOMException if creating the JDOM Element fails.
91      */

92     public List JavaDoc getPropertiesOfObject(RequestedProperties requestedProperties, String JavaDoc uri, NodeRevisionNumber revisionNumber, String JavaDoc servletContextPath, boolean allpropSupportsDeltaV) throws SlideException, JDOMException;
93     
94     /**
95      * Returns the requested properties of the resource identified by the given
96      * <code>uri</code> and <code>revisionNumber</code> as list of
97      * <code>&lt;propstat&gt;</code> JDOM Elements.
98      *
99      * @param requestedProperties the requested properties.
100      * @param revisionDescriptors the NodeRevisionDescriptors of the resource.
101      * @param revisionDescriptor the NodeRevisionDescriptor of the resource.
102      * @param contextPath a String , the result of HttpRequest.getContextPath()
103      * @param servletPath a String, the result of HttpRequest.getServletPath()
104      * @param allpropSupportsDeltaV indicates if the <code>DeltaV</code> specific
105      * properties should be included in case
106      * all properties are requested.
107      *
108      * @return the requested properties as list of <code>&lt;propstat&gt;</code>
109      * JDOM Element.
110      *
111      * @throws SlideException
112      * @throws JDOMException if creating the JDOM Element fails.
113      */

114     public List JavaDoc getPropertiesOfObject(RequestedProperties requestedProperties, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String JavaDoc servletContextPath, boolean allpropSupportsDeltaV) throws SlideException, JDOMException;
115     
116     /**
117      * Returns the requested properties of the <code><requestedResource/code>
118      * as list of <code>&lt;propstat&gt;</code> JDOM Elements.
119      *
120      * @param requestedProperties the requested properties.
121      * @param requestedResource the resource for which to return the properties.
122      * @param contextPath a String , the result of HttpRequest.getContextPath()
123      * @param servletPath a String, the result of HttpRequest.getServletPath()
124      * @param allpropSupportsDeltaV indicates if the <code>DeltaV</code> specific
125      * properties should be included in case
126      * all properties are requested.
127      *
128      * @return the requested properties as list of <code>&lt;propstat&gt;</code>
129      * JDOM Element.
130      *
131      * @throws SlideException
132      * @throws JDOMException if creating the JDOM Element fails.
133      */

134     public List JavaDoc getPropertiesOfObject(RequestedProperties requestedProperties, RequestedResource requestedResource, String JavaDoc servletContextPath, boolean allpropSupportsDeltaV) throws SlideException, JDOMException;
135     
136     /**
137      * Discover what properties exist or are supported by a resource.
138      * @param resourcePath a String
139      * @param liveOnly only live properties
140      * @return a RequestedProperties
141      * @throws SlideException
142      */

143     public RequestedProperties getAllPropertyNames(String JavaDoc resourcePath, boolean liveOnly) throws SlideException;
144     
145     /**
146      * Discover what properties are supported by the specified resourcetype.
147      *
148      * @param resourceKind a ResourceKind
149      *
150      * @return a RequestedProperties
151      *
152      * @throws SlideException
153      *
154      */

155     public RequestedProperties getAllPropertyNames(ResourceKind resourceKind) throws SlideException;
156 }
157
158
159
Popular Tags