[OpenAFS-devel] Java API for AFS Admin -- CORRECTION!
Kevin Coffman
kwc@citi.umich.edu
Tue, 19 Mar 2002 17:29:19 -0500
> "Leo Luan" <luan@almaden.ibm.com> writes:
>
> > The problem with getCreator returning a User object is that a Group could
> > actually be the creator (e.g. system:administrators is the creator of
> > system:administrators), and Java doesn't support covariant types. The
> > underlying native library refers to the creator by name and id, and we
> > found this useful; and the user of the API could determine whether it's a
> > user or a group from the id and then construct the appropriate object with
> > name if needed.
>
> Perhaps the way to do this is to define a "PtsEntry" Interface and have
> both User and Group classes implement the PtsEntry Interface. Then the
> getCreator method can return a PtsEntry.
>
> The reason for this approach is that users and groups do have similar
> actions that can be done, but it's certainly true that there are
> differences, too. However, it's clear that you could generalize a
> common Interface and use that to share method interfaces for return
> values.
>
> -derek
And if we ever get our act together here and submit the PTS
groups-within-groups code to OpenAFS, there may be even less difference
between users and groups?
K.C.