KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > webdav > lib > methods > DepthSupport


1 /*
2  * $Header: /home/cvs/jakarta-slide/webdavclient/clientlib/src/java/org/apache/webdav/lib/methods/DepthSupport.java,v 1.3 2004/07/28 09:30:47 ib Exp $
3  * $Revision: 1.3 $
4  * $Date: 2004/07/28 09:30:47 $
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
24 package org.apache.webdav.lib.methods;
25
26 /**
27  * Methods that can act on collections (for example, DELETE, LOCK, PROPFIND,
28  * etc.) support a depth header. The depth header indicates that the
29  * method applies to either:
30  * <ol>
31  * <li>the collection (depth 0);
32  * <li>the collection and its immediate contents (depth 1); or
33  * <li>the collection, its contents and all subcollections (depth infinity).
34  * </ol>
35  *
36  */

37 public interface DepthSupport {
38
39
40     // -------------------------------------------------------------- Constants
41

42
43     /**
44      * Request with depth 0.
45      */

46     public static final int DEPTH_0 = 0;
47
48
49     /**
50      * Request with depth 1.
51      */

52     public static final int DEPTH_1 = 1;
53
54
55     /**
56      * Request with depth infinity.
57      */

58     public static final int DEPTH_INFINITY = Integer.MAX_VALUE;
59
60
61     // ------------------------------------------------------------- Properties
62

63
64     /**
65      * Depth setter.
66      *
67      * @param depth New depth value
68      */

69     public void setDepth(int depth);
70
71
72     /**
73      * Depth getter.
74      *
75      * @return int depth value
76      */

77     public int getDepth();
78 }
79
Popular Tags