> cmlenz 01/09/08 12:50:37
>
> Modified: src/share/org/apache/slide/lock Lock.java LockImpl.java
> Log:
> - added new Lock.enumerateLocks() variant with an added boolean
'inherited'
> parameter, that lets you exclude locks inherited from parent subjects.
> - updated the implementation to reflect that change
>
> /**
> - * Enumerate locks on a subject.
> + * Enumerate locks on a subject, including any locks inherited from
parent
> + * subjects.
<snip/>
> + * @param inherited if true, locks inherited from parent objects
will be
> + * included in the result, otherwise, only locks
that
> + * explicitly lock the object will be returned
> + *
> + * @return an Enumeration of NodeLock objects
> + *
> + * @exception ServiceAccessException low level service access
exception
> + * @exception ObjectNotFoundException one of the objects referenced
in
> + * the lock token were not found
> + * @exception LockTokenNotFoundException cannot find the lock in
the
> + * lock store service
> + */
> + Enumeration enumerateLocks(SlideToken slideToken, String objectUri,
> + boolean inherited)
> throws ServiceAccessException, ObjectNotFoundException,
> LockTokenNotFoundException;
>
<snip/>
> LockTokenNotFoundException {
> - // We retrieve the LockStore service from the namespace.
> - Vector locksVector = new Vector();
>
> + return enumerateLocks(slideToken, objectUri, false);
> + }
> +
> +
> + public Enumeration enumerateLocks(SlideToken slideToken, String
objectUri,
> + boolean inherited)
> + throws ServiceAccessException, ObjectNotFoundException,
> + LockTokenNotFoundException {
<snip/>
> + if (inherited) {
> + // traverse the namespace up to the root node, and add any
locks
> + // found in the process
> + Vector locksVector = new Vector();
So, here, since we want to include the inherited locks, shouldn't it be
return enumerateLocks(slideToken, objectUri, true); on line 313 ?
Remy