You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Paulo Lopes <es...@megamail.pt> on 2001/05/08 14:07:04 UTC
WebdavResource suggestion (correction)
sorry, i made a mistake. the new getPath() would be
something like:
public String getPath() {
if (isCollection())
return httpURL.getPath();
else
return httpURL.getParent();
}
paulo lopes
>
> hi!
>
> at this moment, the WebdavResource class has a
> method
> getPath() that returns the complete uri (path +
>
> uriname)
>
> i have a suggestion to make:
>
> why don't implement new methods in this class
> like
> getURI() and getURIName(), and change the
> getPath() to
> only return the path of the uri?
>
> here is the source of the methods that i
> suggested:
>
> public String getURI() {
> return httpURL.getPath();;
> }
>
> public String getURIName() {
> return httpURL().getName();
> }
>
> public String getPath() {
> return httpURL.getParent();
> }
>
> paulo lopes
>
> p.s. sorry for my poor english
>
> -------------------------------------------------
> Email Enviado utilizando o servi�o MegaMail
>
-------------------------------------------------
Email Enviado utilizando o servi�o MegaMail
Re: WebdavResource suggestion (correction)
Posted by "Park, Sung-Gu" <je...@thinkfree.com>.
>
> i don't no what you mean by the NO_ACTION flag.
With this flag, the client doesn't try to connect to an server.
So you can set the properties manually. ;-)
> if i connect to a url
> like "http://localhost/webdav/index.html", the uri
For this, you can use the getHttpURLExceptForUserInfo method.
(It's an URI expression for HTTP URL.)
> would be "/webdav/index.html".
For this, you can use the getPath method.
(It's the path part for HTTP URL.)
>
> the getHttURL method returns this
> string: "http://username:password@localhost/webdav/inde
> x.html"
If you use the getHttpURL method, you get that. ;-)
(It's an URI expression for HTTP URL.)
>
> that was just a suggestion.
Do you prefer to get getHttpURL instead of getHttpURLExceptForUserInfo?
I thought we need to have the method to represent the whole HTTP URL
expression.
;-)
Sung-Gu
Re: WebdavResource suggestion (correction)
Posted by Paulo Lopes <es...@megamail.pt>.
hi again sun-gu!
> > sorry, i made a mistake. the new getPath()
> would be
> > something like:
> >
> > public String getPath() {
> > if (isCollection())
> > return httpURL.getPath();
> > else
> > return httpURL.getParent();
> > }
>
> Do you want to get the collection only in the
> current WebDAV resource?
> That's the way.
> However, remember there is the NO_ACTION flag
> not to connect to a server.
> So, it's dependent on the develper to use the
> WebdavResource class.
i don't no what you mean by the NO_ACTION flag.
>
> >
> >
> > >
> > > hi!
> > >
> > > at this moment, the WebdavResource class
> has a
> > > method
> > > getPath() that returns the complete uri
> (path +
> > >
> > > uriname)
> > >
> > > i have a suggestion to make:
> > >
> > > why don't implement new methods in this
> class
> > > like
> > > getURI() and getURIName(), and change the
> > > getPath() to
> > > only return the path of the uri?
> > >
> > > here is the source of the methods that i
> > > suggested:
> > >
> > > public String getURI() {
>
>
> Do you mean the URI?
> Then, there is the getHttpURL method.
if i connect to a url
like "http://localhost/webdav/index.html", the uri
would be "/webdav/index.html".
the getHttURL method returns this
string: "http://username:password@localhost/webdav/inde
x.html"
that was just a suggestion.
thanks a lot!
paulo
-------------------------------------------------
Email Enviado utilizando o servi�o MegaMail
Re: WebdavResource suggestion (correction)
Posted by "Park, Sung-Gu" <je...@thinkfree.com>.
----- Original Message -----
From: "Paulo Lopes" <es...@megamail.pt>
To: <sl...@jakarta.apache.org>
Sent: Tuesday, May 08, 2001 9:07 PM
Subject: WebdavResource suggestion (correction)
>
> sorry, i made a mistake. the new getPath() would be
> something like:
>
> public String getPath() {
> if (isCollection())
> return httpURL.getPath();
> else
> return httpURL.getParent();
> }
Do you want to get the collection only in the current WebDAV resource?
That's the way.
However, remember there is the NO_ACTION flag not to connect to a server.
So, it's dependent on the develper to use the WebdavResource class.
>
>
> >
> > hi!
> >
> > at this moment, the WebdavResource class has a
> > method
> > getPath() that returns the complete uri (path +
> >
> > uriname)
> >
> > i have a suggestion to make:
> >
> > why don't implement new methods in this class
> > like
> > getURI() and getURIName(), and change the
> > getPath() to
> > only return the path of the uri?
> >
> > here is the source of the methods that i
> > suggested:
> >
> > public String getURI() {
Do you mean the URI?
Then, there is the getHttpURL method.
> > return httpURL.getPath();;
> > }
> > public String getURIName() {
> > return httpURL().getName();
> > }
> >
> > public String getPath() {
> > return httpURL.getParent();
> > }
> >
> > paulo lopes
> >
> > p.s. sorry for my poor english
So do I. ;-)
Sung-Gu