Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 38756 invoked from network); 30 Nov 2006 11:26:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Nov 2006 11:26:12 -0000 Received: (qmail 39742 invoked by uid 500); 30 Nov 2006 11:26:21 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 39467 invoked by uid 500); 30 Nov 2006 11:26:20 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 39458 invoked by uid 99); 30 Nov 2006 11:26:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 03:26:20 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 30 Nov 2006 03:26:08 -0800 Received: (qmail invoked by alias); 30 Nov 2006 11:25:46 -0000 Received: from bsl-rtr.day.com (EHLO [10.0.0.57]) [212.249.34.130] by mail.gmx.net (mp031) with SMTP; 30 Nov 2006 12:25:46 +0100 X-Authenticated: #894343 Message-ID: <456EBF80.60708@gmx.net> Date: Thu, 30 Nov 2006 12:24:48 +0100 From: Marcel Reutegger User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: howto obtain all the lock tokens? References: <1164876340.17336.8.camel@localhost> In-Reply-To: <1164876340.17336.8.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org I think this should rather be implemented based on permissions. An administrator session would then be able to unlock a node even though it does not have the lock token attached to the session. so, we'd add a permission to AccessManager: /** * BREAK_LOCK permission constant */ int BREAK_LOCK = 8; regards marcel Paco Avila wrote: > For admin purpouse, should be nice get a list of all locked documents in > the repository (or get the lock tokens). I've looking across the source > and this is the var I need (I think): > > /** > * Path map containing all locks at the leaves. > */ > private final PathMap lockMap = new PathMap(); > > > This "lockMap" should be expossed throght a public method to be > available for me. > > The other option is to read the "workspace/xxx/locks" file, but seems to > be a bit ugly.