public class LockUtils
extends java.lang.Object
| Constructor and Description |
|---|
LockUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isLockedAndNotLockOwner(org.alfresco.service.cmr.repository.NodeRef nodeRef,
LockService lockService)
Indicates if the node is locked AND the current user is not lock owner.
|
static boolean |
isLockedAndReadOnly(org.alfresco.service.cmr.repository.NodeRef nodeRef,
LockService lockService)
Indicates if the node is locked AND it's not a WRITE_LOCK for the current user.
|
static LockStatus |
lockStatus(java.lang.String userName,
java.lang.String lockOwner,
java.util.Date expiryDate)
Given the lock owner and expiry date of a lock calculates the lock status with respect
to the user name supplied, e.g.
|
public static boolean isLockedAndNotLockOwner(org.alfresco.service.cmr.repository.NodeRef nodeRef,
LockService lockService)
nodeRef - node referencelockService - LockServicepublic static boolean isLockedAndReadOnly(org.alfresco.service.cmr.repository.NodeRef nodeRef,
LockService lockService)
Ideally this would be a new method on the lockService, but cannot do this at the moment, as this method is being added as part of a hot fix, so a public service cannot change as the RM AMP might be installed and it has its own security context which would also need to reflect this change.
public static LockStatus lockStatus(java.lang.String userName, java.lang.String lockOwner, java.util.Date expiryDate)
userName - User name to evaluate the lock against.lockOwner - Owner of the lock.expiryDate - Expiry date of the lock.Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.