Package org.opencms.gwt.shared
Class CmsLockInfo
java.lang.Object
org.opencms.gwt.shared.CmsLockInfo
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
A bean for storing information about whether a resource could be locked or not, and if not, why.
- Since:
- 8.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enum indicating the success or type of failure of a locking operation. -
Constructor Summary
ModifierConstructorDescriptionprotected
Empty constructor for serialization.CmsLockInfo
(CmsLockInfo.State state, String user, String exceptionMessage) Creates a new lock info bean. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the locking succeeded.static CmsLockInfo
forChangedResource
(String user) Creates a new info bean for a resource which has changed since it was opened.static CmsLockInfo
Creates a new info bean for other types of errors.static CmsLockInfo
forLockedResource
(String lockUser) Returns a lock info bean for a resource locked by another user.static CmsLockInfo
Returns a lock info bean for a successful lock operation.Returns the additional error message.getState()
Returns the state of the locking operation.getUser()
Returns the user name.
-
Constructor Details
-
CmsLockInfo
protected CmsLockInfo()Empty constructor for serialization.
-
Method Details
-
forChangedResource
Creates a new info bean for a resource which has changed since it was opened.- Parameters:
user
- the user by which it was changed- Returns:
- the new lock info bean
-
forError
Creates a new info bean for other types of errors.- Parameters:
errorMessage
- the additional error message- Returns:
- the new lock info bean
-
forLockedResource
Returns a lock info bean for a resource locked by another user.- Parameters:
lockUser
- the other user- Returns:
- the new lock info bean
-
forSuccess
Returns a lock info bean for a successful lock operation.- Returns:
- the new lock info bean
-
couldLock
Returns true if the locking succeeded.- Returns:
- true if the locking succeeded
-
getErrorMessage
Returns the additional error message.- Returns:
- the additional error message
-
getState
Returns the state of the locking operation.- Returns:
- the state of the locking operation
-
getUser
Returns the user name.- Returns:
- a user name
-