Class CmsLockFilter

java.lang.Object
org.opencms.lock.CmsLockFilter
All Implemented Interfaces:
Cloneable

public final class CmsLockFilter extends Object implements Cloneable
A filter to retrieve the locks.

Since:
6.5.4
  • Field Details

  • Method Details

    • clone

      public Object clone()
      Overrides:
      clone in class Object
      See Also:
    • 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

      public CmsLockFilter filterProject(CmsUUID projectId)
      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
    • filterSharedExclusive

      Returns an extended filter that also matches shared exclusive locks (siblings).

      Returns:
      an extended filter that also matches shared exclusive locks
    • 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

      public boolean isIncludeChildren()
      Returns the include children flag.

      Returns:
      if set the filter extends the result to the given path and all its children
    • isIncludeParent

      public boolean isIncludeParent()
      Returns the include parents flag.

      Returns:
      if set the filter extends the result to the given path and all its parents
    • isSharedExclusive

      public boolean isSharedExclusive()
      Returns the true if this filter also matches shared exclusive locks.

      Returns:
      the true if this filter also matches shared exclusive locks
    • match

      public boolean match(String rootPath, CmsLock lock)
      Matches the given lock against this filter and the given path.

      Parameters:
      rootPath - the path to match the lock against
      lock - the lock to match
      Returns:
      true if the given lock matches
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • match

      protected boolean match(String rootPath, CmsLock lock, boolean isRelatedCheck)
      Matches the given lock against this filter and the given path.

      Parameters:
      rootPath - the path to match the lock against
      lock - the lock to match
      isRelatedCheck - if we are currently in the recursive call for the related lock
      Returns:
      true if the given lock matches