com.jalios.jcms
Class WeakLockManager

java.lang.Object
  extended by com.jalios.jcms.WeakLockManager
All Implemented Interfaces:
JPropertiesListener

public class WeakLockManager
extends Object
implements JPropertiesListener


Field Summary
static String REVISION
           
 
Method Summary
 boolean checkLockMember(Data data, Member mbr)
          Returns true if the given data can be locked by the given member.
static WeakLockManager getInstance()
           
 Date getLockDate(Data data)
          Returns the date the given data has been locked.
 Member getLockMember(Data data)
          Returns the member who has locked the given data.
 long getLockTimeout()
          Returns the lock timeout (in millis).
 boolean isLocked(Data data)
          Returns true if the given data is locked.
 boolean isLockedBy(Data data, Member mbr)
          Returns true if the given data is locked by the given member.
 void lock(Data data, Member mbr)
          Locks the given data for the given member.
 void propertiesChange(JProperties properties)
          Invoked after properties have been modified in JCMS and save on disk.
 void setLockTimeout(long lockTimeout)
          Sets the lock timeout (in millis)
 void unlock(Data data)
          Unlocks the given data
 void unlock(Data data, Member mbr)
          Unlocks the given data for the given member.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Method Detail

getInstance

public static WeakLockManager getInstance()

lock

public void lock(Data data,
                 Member mbr)
Locks the given data for the given member.

Parameters:
data - the data
mbr - the mbmer
Since:
jcms-7.1.0

unlock

public void unlock(Data data,
                   Member mbr)
Unlocks the given data for the given member.

Parameters:
data - the data
mbr - the member
Since:
jcms-7.1.0

unlock

public void unlock(Data data)
Unlocks the given data

Parameters:
data - the data
Since:
jcms-7.1.0

getLockMember

public Member getLockMember(Data data)
Returns the member who has locked the given data.

Parameters:
data - the data
Returns:
the member who has locked the given data.
Since:
jcms-7.1.0

getLockDate

public Date getLockDate(Data data)
Returns the date the given data has been locked.

Parameters:
data - the data
Returns:
the date the given data has been locked.
Since:
jcms-7.1.0

isLocked

public boolean isLocked(Data data)
Returns true if the given data is locked.

Parameters:
data - the data
Returns:
true if the given data is locked.
Since:
jcms-7.1.0

isLockedBy

public boolean isLockedBy(Data data,
                          Member mbr)
Returns true if the given data is locked by the given member.

Parameters:
data - the data
mbr - the member
Returns:
true if the given data is locked by the given member.
Since:
jcms-7.1.0

checkLockMember

public boolean checkLockMember(Data data,
                               Member mbr)
Returns true if the given data can be locked by the given member.

Parameters:
data - the data
mbr - the member
Returns:
true if the given data can be locked by the given member.
Since:
jcms-7.0.1

getLockTimeout

public long getLockTimeout()
Returns the lock timeout (in millis).

Returns:
the lock timeout (in millis).
Since:
jcms-7.1.0

setLockTimeout

public void setLockTimeout(long lockTimeout)
Sets the lock timeout (in millis)

Parameters:
lockTimeout -
Since:
jcms-7.1.0

propertiesChange

public void propertiesChange(JProperties properties)
Description copied from interface: JPropertiesListener
Invoked after properties have been modified in JCMS and save on disk.

You cannot alter the value received in parameters.

Specified by:
propertiesChange in interface JPropertiesListener
Parameters:
properties - the properties which have been modified (may not contain all JCMS properties)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.