Ok! That's a cleaner way to get the extra info rather than doing a
reportMethod afterwards, but do you know why the reportMethod always
returns both checked-in and checked-out with empty values? How do you
know the resource is checked out? It seems in your code you only check
if it not null or just exists in the returned properties?
Best regards
Eiki, Idega.
On 21.12.2004, at 04:54, BillyJoe McCue wrote:
Hey
Check out my second screenshot at
http://sourceforge.net/projects/swingdaver
titled:
Local working directory assigned to collection.
and notice the "checked-in" tooltip value. (green icons mean it has a
checked-in value)
This value is what gives me the path to the latest version of that
resource.
I don't use the report method for this, rather I have my own
listWithDeltaV method defined in my extended version of WebdavResource
(ExtDavResource) in which one of the properties I add are as follows:
properties.addElement(CHECKED_IN);
and near the end of the method:
setNamedProp(DepthSupport.DEPTH_1, properties);
I also over-rode the method:
protected void processProperty(Property property)
to catch these new properties and deal with them appropriately, ie:
if(propName.equals(CHECKED_IN))
{
setCheckedIn(strVal);
}
it is this value (getCheckedIn() ) that you see as a tooltip in my
screenshot.
Fun, huh?
cheers!
On Sun, 19 Dec 2004 23:12:44 +0000, Eirikur Hrafnsson <[EMAIL PROTECTED]>
wrote:
I have some (FAQ?) questions about the version control and the webdav
client.
1. I'm having a hard time to lookup the "latest" version name/number
of
a webdav resource.
The only (bad) way I have now is to do a
Vector p = new Vector();
Map propMap = new HashMap();
p.add(PROPERTY_VERSION_NAME);
p.add(PROPERTY_CREATOR_DISPLAY_NAME);
p.add(PROPERTY_COMMENT);
p.add(PROPERTY_CHECKED_OUT);
p.add(PROPERTY_CHECKED_IN);
p.add(PROPERTY_LAST_MODIFIED);
p.add(PROPERTY_SUCCESSOR_SET);
Enumeration props =
resource.reportMethod(resource.getHttpURL(), p);
REPORT and sort it descending and get the first in the list. (I
know...very stupid)
2. Is there any URL that I can use to get an old version of a file
that
can have the original name of the file and .extension?
The url you get through a version report is pretty useless e.g.
http://localhost:8090/cms/servlet/webdav/history/22/1.1
because most browser will save this as a file of an unknown type with
the name "1.1".
Something like history/22/1.1/mycustomname.extension mapping with the
webdav servlet would be better, right?
3. How do I see if a resource has been checked out? locked?
Best Regards
Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Best Regards
Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]