1 /* 2 * $Id: LockCapabilities.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 /** 28 * Allows discovery of locking support. 29 * <p/> 30 * <b>Level 2 only</b> 31 * <p/> 32 * Returned by <code>{@link javax.jcr.Workspace#getLockCapabilities()}</code>. Provides information 33 * about what locking features are supported by this implementation. 34 * 35 * @author Peeter Piegaze 36 * @author Stefan Guggisberg 37 */ 38 public interface LockCapabilities { 39 40 /** 41 * Reports whether exclusive locks are supported by this implementation. 42 * 43 * @return <code>true</code> if exclusive locks are supported; 44 * <code>false</code> otherwise. 45 */ 46 public boolean isExclusiveLockSupported(); 47 48 /** 49 * Reports whether shared locks are supported by this implementation. 50 * 51 * @return <code>true</code> if shared locks are supported; 52 * <code>false</code> otherwise. 53 */ 54 public boolean isSharedLockSupported(); 55 56 /** 57 * Reports whether locking at the the level of individual properties is 58 * supported by this implementation. 59 * 60 * @return <code>true</code> if property locking is supported; 61 * <code>false</code> otherwise. 62 */ 63 public boolean isPropertyLockSupported(); 64 65 /** 66 * Reports the supported lock types. If locking is supported at all, this 67 * will include at least <code>{@link LockType#WRITE_LOCK}</code>. If 68 * other lock types are also supported then these are returned as well. 69 * 70 * @return An array of <code>LockType</code> objects representing all 71 * supported lock types. 72 */ 73 public LockType[] getSupportedLockTypes(); 74 } 75