[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-vcm-dev] RE: The WVCM API
|
Some may argue that using instanceof is a bad practice but it is probably
okay if the number of actual resource types is not big.
Thanks,
Vladimir.
----- Original Message -----
From: Geoffrey M Clemm
To: platform-vcm-dev@xxxxxxxxxxx
Sent: Wednesday, July 02, 2003 5:39 AM
Subject: Re: [platform-vcm-dev] RE: The WVCM API
Yes, a client would use the instanceof operator to determine the actual
type of a resource. Is that a problem?
(And yes, there aren't too many examples yet :-).
Cheers,
Geoff
Vladimir wrote on 07/01/2003 11:53:44 PM:
> > One of the main reasons is that what is returned from doReadProperties()
> > is the appropriate subtype of Resource, corresponding to what is on the
> > server. So a common sequence would be for the client to create a
Resource
> > for some Location, and then Resource.doReadProperties() will return the
> > appropriate class (e.g. ControllableResource or Folder).
>
> Does that imply that the clients of the API will have to rely on the
> instanceof operator to determine the actual type of a resource? I'm just
> trying to understand how would someone use this API, there aren't too many
> examples in the documentation...