much more reading needed to me to understand the DAV stuff.
thank you guys for your help !
On 3/24/06, Bart Spedden <[EMAIL PROTECTED]> wrote:
>
> While the code below doesn't solve the over-arching issue, it has worked
> for all of my use cases.
>
> /**
> * Determines whether or not a resource exists in slide.
> * @param String - the resource url
> * @return boolean
> */
> protected boolean resoruceExists(final String resourceUrl) {
> boolean resourceExists = false;
>
> try {
> // get the webdavResource
> final WebdavResource res = new WebdavResource(resourceUrl);
> resourceExists = res.exists();
> } catch (IOException e) {
> return resourceExists;
> }
>
> return resourceExists;
> }
>
> Ray Sprinkle <[EMAIL PROTECTED]> wrote: True enough. Some sort of
> appropriate query against the object must be
> made in order to test for its existence. The problem, in my opinion, is
> that WebdavResource will not update its internal existence flag when
> NOACTION is set.
>
>
>
> -----Original Message-----
> From: Julian Reschke [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 23, 2006 11:04 AM
> To: Slide Users Mailing List
> Subject: Re: How to test is a folder exists ?
>
> Ray Sprinkle wrote:
> > When you create a WebdavResource there is a ctor with an action
> > parameter, there is also a setDefaultAction() method. An action of
> > WebdavResource.NOACTION will prevent any lookups from occurring and as
>
> > a side effect, make many of the WebdavResource property tests no
> > longer function.
> > I use the NOACTION parameter almost exclusively because I don't like
> > the problems I had with the alternative and I don't want to query the
> > server multiple times if I need additional properties. It would be
> > possible to modify (heavily) the WebdavResource class to get the best
> > of both worlds, behind the scenes property population on demand with
> > no overhead if you don't use them but I have never had the time to
> pursue it.
> >
> > A note on existence checking. I accomplish my existence checks by
> > reading a standard property, in my case DISPLAY_NAME, and trap any
> > errors that occur when it is not found. If the property doesn't exist
>
> > for the path, then the object doesn't exist. It is not wise to use
> > this as a form of duplicate checking prior to a create operation,
> > because the create could still fail due to a duplicate exception.
> > ...
>
> Furthermore it's not wise because DAV:displayname may not be present,
> although the object exists (maybe not in Slide, but definitively in
> other servers).
>
> Best regards, Julian
>
>
>
> ---------------------------------------------------------------------
> 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]
>
>
>
>