Package com.jalios.jcms
Class WeakLockManager
- java.lang.Object
-
- com.jalios.jcms.WeakLockManager
-
- All Implemented Interfaces:
JPropertiesListener
public class WeakLockManager extends java.lang.Object implements JPropertiesListener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkLockMember(Data data, Member mbr)
Returns true if the given data can be locked by the given member.static WeakLockManager
getInstance()
java.util.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 datavoid
unlock(Data data, Member mbr)
Unlocks the given data for the given member.
-
-
-
Field Detail
-
REVISION
public static final java.lang.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 datambr
- 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 datambr
- 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 java.util.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 datambr
- 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 datambr
- 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.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getProperties
orchannel.getProperty
.- Specified by:
propertiesChange
in interfaceJPropertiesListener
- Parameters:
properties
- the properties which have been submitted to change
-
-