KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jcr > lock > LockType


1 /*
2  * $Id: LockType.java,v 1.2 2004/07/24 00:16:22 benjmestrallet Exp $
3  *
4  * Copyright 2002-2004 Day Management AG, Switzerland.
5  *
6  * Licensed under the Day RI License, Version 2.0 (the "License"),
7  * as a reference implementation of the following specification:
8  *
9  * Content Repository API for Java Technology, revision 0.12
10  * <http://www.jcp.org/en/jsr/detail?id=170>
11  *
12  * You may not use this file except in compliance with the License.
13  * You may obtain a copy of the License files at
14  *
15  * http://www.day.com/content/en/licenses/day-ri-license-2.0
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */

24 package javax.jcr.lock;
25
26 /**
27  * The lock types defined by the JCR standard.
28  * <p/>
29  * <b>Level 2 only</b>
30  * <p/>
31  * This interface defines the following lock type:
32  * <UL>
33  * <LI>WRITE_LOCK
34  * </UL>
35  * Implementations of the JCR standard may support additional lock types.
36  *
37  * @author Peeter Piegaze
38  * @author Stefan Guggisberg
39  */

40 public interface LockType {
41
42   /**
43    * The lock type <code>WRITE_LOCK</code>.
44    * If a lock of this type is put on an item then any attempt to
45    * write to the item (i.e., add a child node or property to a node, or
46    * set the value of a property) will throw an <code>AccessDeniedException</code>
47    * if the user of the ticket attempting to perform the operation is not an owner of
48    * the lock.
49    */

50   public static final int WRITE_LOCK = 1;
51
52   /**
53    * Returns the numerical constant identifying this lock type.
54    *
55    * @return the numerical value
56    * @see LockCapabilities#getSupportedLockTypes
57    */

58   public int getValue();
59
60   /**
61    * Returns the descriptive name of this lock type.
62    *
63    * @return the name
64    * @see LockCapabilities#getSupportedLockTypes
65    */

66   public String JavaDoc getName();
67 }
68
69
Popular Tags