// Path: src/main/java/net/sf/webdav/ITransaction.java
// public interface ITransaction {
// 
//     Principal getPrincipal();
// 
// }
// 
// Path: src/main/java/net/sf/webdav/exceptions/LockFailedException.java
// public class LockFailedException extends WebdavException {
// 
//     public LockFailedException() {
//         super();
//     }
// 
//     public LockFailedException(String message) {
//         super(message);
//     }
// 
//     public LockFailedException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public LockFailedException(Throwable cause) {
//         super(cause);
//     }
// }


import net.sf.webdav.ITransaction;
import net.sf.webdav.exceptions.LockFailedException;
package net.sf.webdav.locking;


public interface IResourceLocks {

    /**
     * Tries to lock the resource at "path".
     * 
     * @param transaction
     * @param path
     *      what resource to lock
     * @param owner
     *      the owner of the lock
     * @param exclusive
     *      if the lock should be exclusive (or shared)
     * @param depth
     *      depth
     * @param timeout
     *      Lock Duration in seconds.
     * @return true if the resource at path was successfully locked, false if an
     *  existing lock prevented this
     * @throws LockFailedException
     */
    boolean lock(ITransaction transaction, String path, String owner,
            boolean exclusive, int depth, int timeout, boolean temporary)
// Path: src/main/java/net/sf/webdav/ITransaction.java
// public interface ITransaction {
// 
//     Principal getPrincipal();
// 
// }
// 
// Path: src/main/java/net/sf/webdav/exceptions/LockFailedException.java
// public class LockFailedException extends WebdavException {
// 
//     public LockFailedException() {
//         super();
//     }
// 
//     public LockFailedException(String message) {
//         super(message);
//     }
// 
//     public LockFailedException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public LockFailedException(Throwable cause) {
//         super(cause);
//     }
// }


// Path: src/main/java/net/sf/webdav/locking/IResourceLocks.java
import net.sf.webdav.ITransaction;
import net.sf.webdav.exceptions.LockFailedException;

package net.sf.webdav.locking;


public interface IResourceLocks {

    /**
     * Tries to lock the resource at "path".
     * 
     * @param transaction
     * @param path
     *      what resource to lock
     * @param owner
     *      the owner of the lock
     * @param exclusive
     *      if the lock should be exclusive (or shared)
     * @param depth
     *      depth
     * @param timeout
     *      Lock Duration in seconds.
     * @return true if the resource at path was successfully locked, false if an
     *  existing lock prevented this
     * @throws LockFailedException
     */
    boolean lock(ITransaction transaction, String path, String owner,
            boolean exclusive, int depth, int timeout, boolean temporary)
            throws LockFailedException;