Tina Yang wrote:
> Hi,
>
> I'm trying to get user information of a WebdavResource. Since there is
> almost no documentation about this, I tried the following:
>
> webdavResource = new WebdavResource("http://www.anurl.com/aresource");
> httpURL = webdavResource.getHttpURL();
> System.out.println("owner: " + httpURL.getUserInfo());
> But unfortunately getUserInfo returns null.
httpURL is the http connection information
getUserInfo gives you user info of the connection
but you didn't use http://user:[EMAIL PROTECTED]/aresource
and that is why it's null
> Is there any other way to find out who owns a resource, who locked it,
> and who can read/write a resource?
You need to look up the owner property, just one of the propfindMethods
Enumeration propfindMethod("owner")
Never used it, but this looks like a good start for lock owners
public Enumeration getActiveLockOwners()
or look up the LockDiscoveryProperty with:
LockDiscoveryProperty getLockDiscovery()
And the read/write permissions can be retieved using:
AclProperty aclfindMethod("/aresource")
look at the slide command line tool for an example for displaying an
AclProperty.
Dirk