public class CmsLockInfo extends java.lang.Object implements com.google.gwt.user.client.rpc.IsSerializable
Modifier and Type | Class and Description |
---|---|
static class |
CmsLockInfo.State
An enum indicating the success or type of failure of a locking operation.
|
Modifier | Constructor and Description |
---|---|
protected |
CmsLockInfo()
Empty constructor for serialization.
|
|
CmsLockInfo(CmsLockInfo.State state,
java.lang.String user,
java.lang.String exceptionMessage)
Creates a new lock info bean.
|
Modifier and Type | Method and Description |
---|---|
boolean |
couldLock()
Returns true if the locking succeeded.
|
static CmsLockInfo |
forChangedResource(java.lang.String user)
Creates a new info bean for a resource which has changed since it was opened.
|
static CmsLockInfo |
forError(java.lang.String errorMessage)
Creates a new info bean for other types of errors.
|
static CmsLockInfo |
forLockedResource(java.lang.String lockUser)
Returns a lock info bean for a resource locked by another user.
|
static CmsLockInfo |
forSuccess()
Returns a lock info bean for a successful lock operation.
|
java.lang.String |
getErrorMessage()
Returns the additional error message.
|
CmsLockInfo.State |
getState()
Returns the state of the locking operation.
|
java.lang.String |
getUser()
Returns the user name.
|
protected CmsLockInfo()
public CmsLockInfo(CmsLockInfo.State state, java.lang.String user, java.lang.String exceptionMessage)
state
- the state of the locking operationuser
- a user nameexceptionMessage
- an additional error messagepublic boolean couldLock()
public static CmsLockInfo forChangedResource(java.lang.String user)
user
- the user by which it was changedpublic static CmsLockInfo forError(java.lang.String errorMessage)
errorMessage
- the additional error messagepublic static CmsLockInfo forLockedResource(java.lang.String lockUser)
lockUser
- the other userpublic static CmsLockInfo forSuccess()
public java.lang.String getErrorMessage()
public CmsLockInfo.State getState()
public java.lang.String getUser()