Package org.opencms.lock
Class CmsLockType
- java.lang.Object
-
- org.opencms.util.A_CmsModeIntEnumeration
-
- org.opencms.lock.CmsLockType
-
- All Implemented Interfaces:
java.io.Serializable
public final class CmsLockType extends A_CmsModeIntEnumeration
Indicates the different possible lock types.- Since:
- 7.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CmsLockType
EXCLUSIVE
A lock that allows the user to edit the resource's structure record, it's resource record, and its content record.static CmsLockType
INHERITED
A lock that is inherited from a locked parent folder.static CmsLockType
PUBLISH
A lock that indicates that the resource is waiting to be published in the publish queue.static CmsLockType
SHALLOW
A lock that is 'shallow', i.e.static CmsLockType
SHARED_EXCLUSIVE
A lock that allows the user to edit the resource's structure record only, but not it's resource record nor content record.static CmsLockType
SHARED_INHERITED
A lock that allows the user to edit the resource's structure record only, but not it's resource record nor content record.protected static CmsLockType
SYSTEM_UNLOCKED
Type of the NULL system lock.static CmsLockType
TEMPORARY
A temporary exclusive lock that allows the user to edit the resource's structure record, it's resource record, and its content record.static CmsLockType
UNLOCKED
Type of the NULL lock obtained byCmsLock.getNullLock()
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDirectlyInherited()
Returnstrue
if this is an directly inherited lock.boolean
isExclusive()
Returnstrue
if this is an exclusive (or temporary exclusive) lock.boolean
isInherited()
Returnstrue
if this is an inherited lock, which may either be directly or shared inherited.boolean
isPersistent()
Returnstrue
if this is a persistent lock that should be saved when the systems shuts down.boolean
isPublish()
Returnstrue
if this is a publish lock.boolean
isShallow()
Returns true if this is a shallow lock.boolean
isShared()
Returnstrue
if this is a shared lock.boolean
isSharedExclusive()
Returnstrue
if this is an shared exclusive lock.boolean
isSharedInherited()
Returnstrue
if this is an shared inherited lock.boolean
isSystem()
Returnstrue
if this is a system (2nd level) lock.boolean
isTemporary()
Returnstrue
if this is a temporary lock.boolean
isUnlocked()
Returnstrue
if this lock is in fact unlocked.java.lang.String
toString()
static CmsLockType
valueOf(int type)
Returns the lock type for the given type value.-
Methods inherited from class org.opencms.util.A_CmsModeIntEnumeration
equals, getMode, hashCode
-
-
-
-
Field Detail
-
EXCLUSIVE
public static final CmsLockType EXCLUSIVE
A lock that allows the user to edit the resource's structure record, it's resource record, and its content record.This lock is assigned to files that are locked via the context menu.
-
INHERITED
public static final CmsLockType INHERITED
A lock that is inherited from a locked parent folder.
-
PUBLISH
public static final CmsLockType PUBLISH
A lock that indicates that the resource is waiting to be published in the publish queue.
-
SHALLOW
public static final CmsLockType SHALLOW
A lock that is 'shallow', i.e. not inherited on child resources.
-
SHARED_EXCLUSIVE
public static final CmsLockType SHARED_EXCLUSIVE
A lock that allows the user to edit the resource's structure record only, but not it's resource record nor content record.This lock is assigned to files if a sibling of the resource record has already an exclusive lock.
-
SHARED_INHERITED
public static final CmsLockType SHARED_INHERITED
A lock that allows the user to edit the resource's structure record only, but not it's resource record nor content record.This lock is assigned to resources that already have a shared exclusive lock, and then inherit a lock because one of it's parent folders gets locked.
-
TEMPORARY
public static final CmsLockType TEMPORARY
A temporary exclusive lock that allows the user to edit the resource's structure record, it's resource record, and its content record.This lock is identical to the
EXCLUSIVE
lock, but it is automatically removed after a user is logged out.
-
UNLOCKED
public static final CmsLockType UNLOCKED
Type of the NULL lock obtained byCmsLock.getNullLock()
.
-
SYSTEM_UNLOCKED
protected static final CmsLockType SYSTEM_UNLOCKED
Type of the NULL system lock.
-
-
Method Detail
-
valueOf
public static CmsLockType valueOf(int type)
Returns the lock type for the given type value.This is used only for serialization and should not be accessed for other purposes.
- Parameters:
type
- the type value to get the lock type for- Returns:
- the lock type for the given type value
-
isDirectlyInherited
public boolean isDirectlyInherited()
Returnstrue
if this is an directly inherited lock.- Returns:
true
if this is an directly inherited lock
-
isExclusive
public boolean isExclusive()
Returnstrue
if this is an exclusive (or temporary exclusive) lock.- Returns:
true
if this is an exclusive (or temporary exclusive) lock
-
isInherited
public boolean isInherited()
Returnstrue
if this is an inherited lock, which may either be directly or shared inherited.- Returns:
true
if this is an inherited lock, which may either be directly or shared inherited
-
isPersistent
public boolean isPersistent()
Returnstrue
if this is a persistent lock that should be saved when the systems shuts down.- Returns:
true
if this is a persistent lock that should be saved when the systems shuts down
-
isPublish
public boolean isPublish()
Returnstrue
if this is a publish lock.- Returns:
true
if this is a publish lock
-
isShallow
public boolean isShallow()
Returns true if this is a shallow lock.- Returns:
- true if this is a shallow lock
-
isShared
public boolean isShared()
Returnstrue
if this is a shared lock.- Returns:
true
if this is a shared lock
-
isSharedExclusive
public boolean isSharedExclusive()
Returnstrue
if this is an shared exclusive lock.- Returns:
true
if this is an shared exclusive lock
-
isSharedInherited
public boolean isSharedInherited()
Returnstrue
if this is an shared inherited lock.- Returns:
true
if this is an shared inherited lock
-
isSystem
public boolean isSystem()
Returnstrue
if this is a system (2nd level) lock.- Returns:
true
if this is a system (2nd level) lock
-
isTemporary
public boolean isTemporary()
Returnstrue
if this is a temporary lock.- Returns:
true
if this is a temporary lock
-
isUnlocked
public boolean isUnlocked()
Returnstrue
if this lock is in fact unlocked.Only if this is
true
, the result lock is equal to theNULL
lock, which can be obtained byCmsLock.getNullLock()
.- Returns:
true
if this lock is in fact unlocked
-
toString
public java.lang.String toString()
- Overrides:
toString
in classA_CmsModeIntEnumeration
- See Also:
Object.toString()
-
-