|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.gwt.shared.CmsLockInfo
public class CmsLockInfo
A bean for storing information about whether a resource could be locked or not, and if not, why.
Nested Class Summary | |
---|---|
static class |
CmsLockInfo.State
An enum indicating the success or type of failure of a locking operation. |
Constructor Summary | |
---|---|
protected |
CmsLockInfo()
Empty constructor for serialization. |
|
CmsLockInfo(CmsLockInfo.State state,
String user,
String exceptionMessage)
Creates a new lock info bean. |
Method Summary | |
---|---|
boolean |
couldLock()
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 |
forError(String errorMessage)
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 |
forSuccess()
Returns a lock info bean for a successful lock operation. |
String |
getErrorMessage()
Returns the additional error message. |
CmsLockInfo.State |
getState()
Returns the state of the locking operation. |
String |
getUser()
Returns the user name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsLockInfo(CmsLockInfo.State state, String user, String exceptionMessage)
state
- the state of the locking operationuser
- a user nameexceptionMessage
- an additional error messageprotected CmsLockInfo()
Method Detail |
---|
public static CmsLockInfo forChangedResource(String user)
user
- the user by which it was changed
public static CmsLockInfo forError(String errorMessage)
errorMessage
- the additional error message
public static CmsLockInfo forLockedResource(String lockUser)
lockUser
- the other user
public static CmsLockInfo forSuccess()
public boolean couldLock()
public String getErrorMessage()
public CmsLockInfo.State getState()
public String getUser()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |