Package org.opencms.gwt.shared
Enum CmsClientLock.LockType
- java.lang.Object
-
- java.lang.Enum<CmsClientLock.LockType>
-
- org.opencms.gwt.shared.CmsClientLock.LockType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CmsClientLock.LockType>
- Enclosing class:
- CmsClientLock
public static enum CmsClientLock.LockType extends java.lang.Enum<CmsClientLock.LockType>
The available lock types. Replace withCmsLockType
as soon that fulfills the serializable convention.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EXCLUSIVE
A lock that allows the user to edit the resource's structure record, it's resource record, and its content record.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.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.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.SYSTEM_UNLOCKED
Type of the NULL lock obtained byCmsLock.getNullLock()
.TEMPORARY
A temporary exclisive lock that allows the user to edit the resource's structure record, it's resource record, and its content record.UNLOCKED
Type of the NULL system lock.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMode()
Return the lock mode/type.boolean
isUnlocked()
Returnstrue
if this lock is in fact unlocked.java.lang.String
toString()
static CmsClientLock.LockType
valueOf(int mode)
Returns the lock type according to the given mode.static CmsClientLock.LockType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CmsClientLock.LockType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXCLUSIVE
public static final CmsClientLock.LockType 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 CmsClientLock.LockType INHERITED
A lock that is inherited from a locked parent folder.
-
PUBLISH
public static final CmsClientLock.LockType PUBLISH
A lock that indicates that the resource is waiting to be published in the publish queue.
-
SHARED_EXCLUSIVE
public static final CmsClientLock.LockType 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 CmsClientLock.LockType 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 if it's parent folders gets locked.
-
TEMPORARY
public static final CmsClientLock.LockType TEMPORARY
A temporary exclisive 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.
-
SYSTEM_UNLOCKED
public static final CmsClientLock.LockType SYSTEM_UNLOCKED
Type of the NULL lock obtained byCmsLock.getNullLock()
.
-
UNLOCKED
public static final CmsClientLock.LockType UNLOCKED
Type of the NULL system lock.
-
-
Method Detail
-
values
public static CmsClientLock.LockType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CmsClientLock.LockType c : CmsClientLock.LockType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CmsClientLock.LockType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
valueOf
public static CmsClientLock.LockType valueOf(int mode)
Returns the lock type according to the given mode.- Parameters:
mode
- the lock mode/type int- Returns:
- the lock type
-
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 classjava.lang.Enum<CmsClientLock.LockType>
- See Also:
Object.toString()
-
getMode
public int getMode()
Return the lock mode/type.- Returns:
- the lock mode/type
-
-