public interface ILockHelper
Modifier and Type | Method and Description |
---|---|
void |
addLockTokenToSessionIfNecessary(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId)
Adds the lock token associated with the file with the given file id if the file is locked.
|
boolean |
canUnlock(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.lock.Lock lock)
Returns
true if user represented by session can potentially unlock the given lock. |
Date |
getLockDate(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.lock.Lock lock) |
String |
getLockMessage(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.lock.Lock lock) |
String |
getLockOwner(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.lock.Lock lock) |
void |
lockFile(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId,
String lockMessage)
Locks a file.
|
void |
removeLockToken(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.lock.Lock lock)
Removes a lock token so that it can never be associated with anyone's session again.
|
void |
removeLockTokenFromSessionIfNecessary(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId)
Removes the lock token associated with the file with the given file id
|
void |
unlockFile(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
Serializable fileId)
Unlocks a file.
|
void removeLockToken(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.lock.Lock lock) throws javax.jcr.RepositoryException
session
- sessionpentahoJcrConstants
- constantslock
- lockjavax.jcr.RepositoryException
- if anything goes wrongboolean canUnlock(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.lock.Lock lock) throws javax.jcr.RepositoryException
true
if user represented by session can potentially unlock the given lock. This can be a
function of access control or some other mechanism.session
- sessionpentahoJcrConstants
- constantslock
- lockjavax.jcr.RepositoryException
- if anything goes wrongvoid lockFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId, String lockMessage) throws javax.jcr.RepositoryException
session
- sessionpentahoJcrConstants
- constantsfileId
- file idlockMessage
- lock messagejavax.jcr.RepositoryException
- if anything goes wrongvoid unlockFile(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
session
- sessionpentahoJcrConstants
- constantsfileId
- file idjavax.jcr.RepositoryException
- if anything goes wrongvoid addLockTokenToSessionIfNecessary(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
session
- sessionpentahoJcrConstants
- constantsfileId
- file idjavax.jcr.RepositoryException
- if anything goes wrongvoid removeLockTokenFromSessionIfNecessary(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, Serializable fileId) throws javax.jcr.RepositoryException
session
- sessionpentahoJcrConstants
- constantsfileId
- file idjavax.jcr.RepositoryException
- if anything goes wrongDate getLockDate(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.lock.Lock lock) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
String getLockMessage(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.lock.Lock lock) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
String getLockOwner(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.lock.Lock lock) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2017 Hitachi Vantara. All rights reserved.