Package org.opencms.lock
Class CmsLockFilter
java.lang.Object
org.opencms.lock.CmsLockFilter
- All Implemented Interfaces:
Cloneable
A filter to retrieve the locks.
- Since:
- 6.5.4
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CmsLockFilter
To filter all locks.static final CmsLockFilter
To filter all inherited locks.static final CmsLockFilter
To filter all non inherited locks. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns an extended filter that will extend the result to the given path and all its children.Returns an extended filter that will extend the result to the given path and all its parents.filterLockableByUser
(CmsUser user) Returns an extended filter with the given user restriction.Returns an extended filter with the given user restriction.filterNotOwnedByUserId
(CmsUUID userId) Returns an extended filter with the given user restriction.filterOwnedByUserId
(CmsUUID userId) Returns an extended filter with the given user restriction.filterProject
(CmsUUID projectId) Returns an extended filter with the given project restriction.Returns an extended filter that also matches shared exclusive locks (siblings).filterType
(CmsLockType type) Returns an extended filter with the given type restriction.Returns the user that can overwrite the locks.Returns the user that can not overwrite the locks.Returns the user that has not to own the locks.Returns the user that has to own the locks.Returns the project restriction.getTypes()
Returns the types to filter.boolean
Returns the include children flag.boolean
Returns the include parents flag.boolean
Returns thetrue
if this filter also matches shared exclusive locks.boolean
Matches the given lock against this filter and the given path.protected boolean
Matches the given lock against this filter and the given path.toString()
-
Field Details
-
FILTER_ALL
To filter all locks. -
FILTER_INHERITED
To filter all inherited locks. -
FILTER_NON_INHERITED
To filter all non inherited locks.
-
-
Method Details
-
clone
-
filterIncludeChildren
Returns an extended filter that will extend the result to the given path and all its children.- Returns:
- an extended filter to search the subresources of the given path
-
filterIncludeParents
Returns an extended filter that will extend the result to the given path and all its parents.- Returns:
- an extended filter to search the subresources of the given path
-
filterLockableByUser
Returns an extended filter with the given user restriction.- Parameters:
user
- the user to filter- Returns:
- an extended filter with the given user restriction
-
filterNotLockableByUser
Returns an extended filter with the given user restriction.- Parameters:
user
- the user to filter- Returns:
- an extended filter with the given user restriction
-
filterNotOwnedByUserId
Returns an extended filter with the given user restriction.- Parameters:
userId
- the user id to filter- Returns:
- an extended filter with the given user restriction
-
filterOwnedByUserId
Returns an extended filter with the given user restriction.- Parameters:
userId
- the user id to filter- Returns:
- an extended filter with the given user restriction
-
filterProject
Returns an extended filter with the given project restriction.- Parameters:
projectId
- the project to filter the locks with- Returns:
- an extended filter with the given project restriction
-
filterType
Returns an extended filter with the given type restriction.- Parameters:
type
- the lock type to filter- Returns:
- an extended filter with the given type restriction
-
getLockableByUserId
Returns the user that can overwrite the locks.- Returns:
- the user that can overwrite the locks
-
getNotLockableByUserId
Returns the user that can not overwrite the locks.- Returns:
- the user that can not overwrite the locks
-
getNotOwnedByUserId
Returns the user that has not to own the locks.- Returns:
- the user that has not to own the locks
-
getOwnedByUserId
Returns the user that has to own the locks.- Returns:
- the user that has to own the locks
-
getProjectId
Returns the project restriction.- Returns:
- the project restriction
-
getTypes
Returns the types to filter.- Returns:
- the types to filter
-
isIncludeChildren
Returns the include children flag.- Returns:
- if set the filter extends the result to the given path and all its children
-
isIncludeParent
Returns the include parents flag.- Returns:
- if set the filter extends the result to the given path and all its parents
-
match
Matches the given lock against this filter and the given path.- Parameters:
rootPath
- the path to match the lock againstlock
- the lock to match- Returns:
true
if the given lock matches
-
toString
-
match
Matches the given lock against this filter and the given path.- Parameters:
rootPath
- the path to match the lock againstlock
- the lock to matchisRelatedCheck
- if we are currently in the recursive call for the related lock- Returns:
true
if the given lock matches
-