| java.lang.Object org.opencms.lock.CmsLock
CmsLock | public CmsLock(String resourceName, CmsUUID userId, CmsProject project, CmsLockType type)(Code) | | Constructor for a new Cms lock.
Parameters: resourceName - the full resource name including the site root Parameters: userId - the ID of the user who locked the resource Parameters: project - the project where the resource is locked Parameters: type - flag indicating how the resource is locked |
equals | public boolean equals(Object obj)(Code) | | Compares this lock to the specified object.
Parameters: obj - the object to compare to true if and only if member values of this CmsLock are the same with the compared CmsLock |
getEditionLock | public CmsLock getEditionLock()(Code) | | Returns the edition lock.
the edition lock |
getNullLock | public static CmsLock getNullLock()(Code) | | Returns the shared Null CmsLock.
the shared Null CmsLock |
getProject | public CmsProject getProject()(Code) | | Returns the project where the resource is currently locked.
the project where the resource is currently locked |
getProjectId | public CmsUUID getProjectId()(Code) | | Returns the ID of the project where the resource is currently locked.
the ID of the project |
getRelatedLock | protected CmsLock getRelatedLock()(Code) | | Returns the related Lock.
the related Lock |
getResourceName | public String getResourceName()(Code) | | Returns the name of the locked resource.
the name of the locked resource |
getSystemLock | public CmsLock getSystemLock()(Code) | | Returns the system lock.
the system lock |
getType | public CmsLockType getType()(Code) | | Returns the type about how the resource is locked.
the type of the lock |
getUserId | public CmsUUID getUserId()(Code) | | Returns the ID of the user who currently locked the resource.
the ID of the user |
isDirectlyInherited | public boolean isDirectlyInherited()(Code) | | Returns true if this is an directly inherited lock.
true if this is an directly inherited lock |
isExclusive | public boolean isExclusive()(Code) | | Returns true if this is an exclusive (or temporary exclusive) lock.
true if this is an exclusive (or temporary exclusive) lock |
isExclusiveOwnedBy | public boolean isExclusiveOwnedBy(CmsUser user)(Code) | | Returns true if this is an exclusive (or temporary exclusive) lock,
and the given user is the owner of this lock.
Parameters: user - the user to compare to the owner of this lock true if this is an exclusive (or temporary exclusive) lock, and the given user is the owner of this lock |
isExclusiveOwnedInProjectBy | public boolean isExclusiveOwnedInProjectBy(CmsUser user, CmsProject project)(Code) | | Returns true if this is an exclusive (or temporary exclusive) lock,
and the given user is the owner and the given project is the project of this lock.
Parameters: user - the user to compare to the owner of this lock Parameters: project - the project to compare to the project of this lock true if this is an exclusive (or temporary exclusive) lock, and the given user is the owner and the given project is the project of this lock |
isInProject | public boolean isInProject(CmsProject project)(Code) | | Returns true if the given project is the project of this lock.
Parameters: project - the project to compare to the project of this lock true if the given project is the project of this lock |
isInherited | public boolean isInherited()(Code) | | Returns true if this is an inherited lock, which may either be directly or shared inherited.
true if this is an inherited lock, which may either be directly or shared inherited |
isLockableBy | public boolean isLockableBy(CmsUser user)(Code) | | Checks if a resource can be locked by a user.
The resource is not lockable if it already has a lock of type
CmsLockType.PUBLISH .
The resource is lockable either
- if it is currently unlocked
- if it has a lock of another type set and the user is the lock owner
Parameters: user - the user to test lockeability for true if this lock blocks any operation on the locked resource until it is unlocked |
isOwnedBy | public boolean isOwnedBy(CmsUser user)(Code) | | Returns true if the given user is the owner of this lock.
Parameters: user - the user to compare to the owner of this lock true if the given user is the owner of this lock |
isOwnedInProjectBy | public boolean isOwnedInProjectBy(CmsUser user, CmsProject project)(Code) | | Returns true if the given user is the owner of this lock,
and this lock belongs to the given project.
Parameters: user - the user to compare to the owner of this lock Parameters: project - the project to compare to the project of this lock true if the given user is the owner of this lock,and this lock belongs to the given project |
isPersistent | public boolean isPersistent()(Code) | | Returns true if this is a persistent lock that should be saved when the systems shuts down.
true if this is a persistent lock that should be saved when the systems shuts down |
isPublish | public boolean isPublish()(Code) | | Returns true if this is a publish lock.
true if this is a publish lock |
isShared | public boolean isShared()(Code) | | Returns true if this is a shared lock.
true if this is a shared lock |
isSystemLock | public boolean isSystemLock()(Code) | | Returns true if this is a system (2nd level) lock.
true if this is a system (2nd level) lock |
isTemporary | public boolean isTemporary()(Code) | | Returns true if this is a temporary lock.
true if this is a temporary lock |
isUnlocked | public boolean isUnlocked()(Code) | | Returns true if this lock is in fact unlocked.
Only if this is true , the result lock is equal to the NULL lock,
which can be obtained by
CmsLock.getNullLock() .
true if this lock is in fact unlocked |
setRelatedLock | protected void setRelatedLock(CmsLock relatedLock)(Code) | | Sets the related Lock.
Parameters: relatedLock - the related Lock to set |
|
|