org.apache.jackrabbit.core.lock
Class SessionLockManager

java.lang.Object
  extended by org.apache.jackrabbit.core.lock.SessionLockManager
All Implemented Interfaces:
LockManager

public class SessionLockManager
extends Object
implements LockManager

SessionLockManager implements the LockManager. In contrast to the internal LockManager interface that is created once for each WorkspaceInfo, the JSR 283 LockManager is associated with a single Session and its Workspace.

See Also:
Workspace.getLockManager()

Constructor Summary
SessionLockManager(SessionContext context, LockManager systemLockMgr)
          Creates a lock manager.
 
Method Summary
 void addLockToken(String lockToken)
           
 Lock getLock(String absPath)
           
 String[] getLockTokens()
           
 boolean holdsLock(String absPath)
           
 boolean isLocked(String absPath)
           
 Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo)
           
 void removeLockToken(String lockToken)
           
 void unlock(String absPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionLockManager

public SessionLockManager(SessionContext context,
                          LockManager systemLockMgr)
Creates a lock manager.

Parameters:
context - component context of the current session
systemLockMgr - internal lock manager
Method Detail

getLockTokens

public String[] getLockTokens()
                       throws RepositoryException
Specified by:
getLockTokens in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.getLockTokens()

addLockToken

public void addLockToken(String lockToken)
                  throws LockException,
                         RepositoryException
Specified by:
addLockToken in interface LockManager
Throws:
LockException
RepositoryException
See Also:
LockManager.addLockToken(String)

removeLockToken

public void removeLockToken(String lockToken)
                     throws LockException,
                            RepositoryException
Specified by:
removeLockToken in interface LockManager
Throws:
LockException
RepositoryException
See Also:
LockManager.removeLockToken(String)

isLocked

public boolean isLocked(String absPath)
                 throws RepositoryException
Specified by:
isLocked in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.isLocked(String)

getLock

public Lock getLock(String absPath)
             throws UnsupportedRepositoryOperationException,
                    LockException,
                    AccessDeniedException,
                    RepositoryException
Specified by:
getLock in interface LockManager
Throws:
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
See Also:
LockManager.getLock(String)

holdsLock

public boolean holdsLock(String absPath)
                  throws RepositoryException
Specified by:
holdsLock in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.holdsLock(String)

lock

public Lock lock(String absPath,
                 boolean isDeep,
                 boolean isSessionScoped,
                 long timeoutHint,
                 String ownerInfo)
          throws RepositoryException
Specified by:
lock in interface LockManager
Throws:
RepositoryException
See Also:
LockManager.lock(String, boolean, boolean, long, String)

unlock

public void unlock(String absPath)
            throws UnsupportedRepositoryOperationException,
                   LockException,
                   AccessDeniedException,
                   InvalidItemStateException,
                   RepositoryException
Specified by:
unlock in interface LockManager
Throws:
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException
See Also:
LockManager.unlock(String)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.