com.liferay.lock.service
Class LockServiceUtil

java.lang.Object
  extended bycom.liferay.lock.service.LockServiceUtil

public class LockServiceUtil
extends java.lang.Object

View Source

Author:
Brian Wing Shun Chan

Constructor Summary
LockServiceUtil()
           
 
Method Summary
static void clear()
           
static Lock getLock(java.lang.String className, java.lang.Comparable pk)
           
static java.util.Set getLocksByCompanyId(long companyId)
           
static java.util.Set getLocksByUserId(long userId)
           
static boolean hasLock(java.lang.String className, java.lang.Comparable pk, long userId)
           
static boolean isLocked(java.lang.String className, java.lang.Comparable pk)
           
static void lock(java.lang.String className, java.lang.Comparable pk, long companyId, long userId, long expirationTime)
           
static void unlock(java.lang.String className, java.lang.Comparable pk)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockServiceUtil

public LockServiceUtil()
Method Detail

clear

public static void clear()
                  throws java.rmi.RemoteException,
                         com.liferay.portal.SystemException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException

getLock

public static Lock getLock(java.lang.String className,
                           java.lang.Comparable pk)
                    throws com.liferay.portal.PortalException,
                           java.rmi.RemoteException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

getLocksByCompanyId

public static java.util.Set getLocksByCompanyId(long companyId)
                                         throws java.rmi.RemoteException,
                                                com.liferay.portal.SystemException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException

getLocksByUserId

public static java.util.Set getLocksByUserId(long userId)
                                      throws java.rmi.RemoteException,
                                             com.liferay.portal.SystemException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException

hasLock

public static boolean hasLock(java.lang.String className,
                              java.lang.Comparable pk,
                              long userId)
                       throws java.rmi.RemoteException,
                              com.liferay.portal.SystemException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException

isLocked

public static boolean isLocked(java.lang.String className,
                               java.lang.Comparable pk)
                        throws java.rmi.RemoteException,
                               com.liferay.portal.SystemException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException

lock

public static void lock(java.lang.String className,
                        java.lang.Comparable pk,
                        long companyId,
                        long userId,
                        long expirationTime)
                 throws com.liferay.portal.PortalException,
                        java.rmi.RemoteException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

unlock

public static void unlock(java.lang.String className,
                          java.lang.Comparable pk)
                   throws java.rmi.RemoteException,
                          com.liferay.portal.SystemException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException