Package org.opencms.lock
Class CmsLockType
java.lang.Object
org.opencms.util.A_CmsModeIntEnumeration
org.opencms.lock.CmsLockType
- All Implemented Interfaces:
Serializable
Indicates the different possible lock types.
- Since:
- 7.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CmsLockTypeA lock that allows the user to edit the resource's structure record, it's resource record, and its content record.static final CmsLockTypeA lock that is inherited from a locked parent folder.static final CmsLockTypeA lock that indicates that the resource is waiting to be published in the publish queue.static final CmsLockTypeA lock that is 'shallow', i.e.static final CmsLockTypeA lock that allows the user to edit the resource's structure record only, but not it's resource record nor content record.static final CmsLockTypeA lock that allows the user to edit the resource's structure record only, but not it's resource record nor content record.protected static final CmsLockTypeType of the NULL system lock.static final CmsLockTypeA temporary exclusive lock that allows the user to edit the resource's structure record, it's resource record, and its content record.static final CmsLockTypeType of the NULL lock obtained byCmsLock.getNullLock(). -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif this is an directly inherited lock.booleanReturnstrueif this is an exclusive (or temporary exclusive) lock.booleanReturnstrueif this is an inherited lock, which may either be directly or shared inherited.booleanReturnstrueif this is a persistent lock that should be saved when the systems shuts down.booleanReturnstrueif this is a publish lock.booleanReturns true if this is a shallow lock.booleanisShared()Returnstrueif this is a shared lock.booleanReturnstrueif this is an shared exclusive lock.booleanReturnstrueif this is an shared inherited lock.booleanisSystem()Returnstrueif this is a system (2nd level) lock.booleanReturnstrueif this is a temporary lock.booleanReturnstrueif this lock is in fact unlocked.toString()static CmsLockTypevalueOf(int type) Returns the lock type for the given type value.Methods inherited from class org.opencms.util.A_CmsModeIntEnumeration
equals, getMode, hashCode
-
Field Details
-
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
A lock that is inherited from a locked parent folder. -
PUBLISH
A lock that indicates that the resource is waiting to be published in the publish queue. -
SHALLOW
A lock that is 'shallow', i.e. not inherited on child resources. -
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
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
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
EXCLUSIVElock, but it is automatically removed after a user is logged out. -
UNLOCKED
Type of the NULL lock obtained byCmsLock.getNullLock(). -
SYSTEM_UNLOCKED
Type of the NULL system lock.
-
-
Method Details
-
valueOf
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
Returnstrueif this is an directly inherited lock.- Returns:
trueif this is an directly inherited lock
-
isExclusive
Returnstrueif this is an exclusive (or temporary exclusive) lock.- Returns:
trueif this is an exclusive (or temporary exclusive) lock
-
isInherited
Returnstrueif this is an inherited lock, which may either be directly or shared inherited.- Returns:
trueif this is an inherited lock, which may either be directly or shared inherited
-
isPersistent
Returnstrueif this is a persistent lock that should be saved when the systems shuts down.- Returns:
trueif this is a persistent lock that should be saved when the systems shuts down
-
isPublish
Returnstrueif this is a publish lock.- Returns:
trueif this is a publish lock
-
isShallow
Returns true if this is a shallow lock.- Returns:
- true if this is a shallow lock
-
isSystem
Returnstrueif this is a system (2nd level) lock.- Returns:
trueif this is a system (2nd level) lock
-
isTemporary
Returnstrueif this is a temporary lock.- Returns:
trueif this is a temporary lock
-
isUnlocked
Returnstrueif this lock is in fact unlocked.Only if this is
true, the result lock is equal to theNULLlock, which can be obtained byCmsLock.getNullLock().- Returns:
trueif this lock is in fact unlocked
-
toString
- Overrides:
toStringin classA_CmsModeIntEnumeration- See Also:
-