�
> -----Original Message----- > From: Luta, Raphael (VUN) [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 05, 2003 10:13 AM > To: 'Jetspeed Developers List' > Subject: RE : RE : RE : [J2] New Page API committed to CVS > > > Right now, I'm simply using JetspeedIDGenerator, which > We may possibly extend to provide "scoped" unique ID, like: > > getPortalUniqueID(String seed) +1 I like that, it could easily be made a fa�ade over the UID class if we want it to be. > > to get a guaranteed unique portal-wide ID using the > > provided seed. > > We could also have: > > getUserUniqueID(User user, String seed) > > And so on... > > What do you think ? > That might be unneeded unless what you are aiming to generate is a human-readable key, then it makes a lot of sense. Here is something I want throw out and see if it makes sense. How about we write an object instance factory class that we can pass a key into and get a concrete class instance? Example: ObjectInstanceFactory.newInstance("org.apache.om.pluto.Preference:defintion") Would return a org.apache.jetspeed.om.preference.PreferenceImpl instance. Were as ObjectInstanceFactory.newInstance("org.apache.om.pluto.Preference:user") Would return a org.apache.jetspeed.om.preference.UserPreferenceImpl instance. Or we could use a discovery mechanism to find and load concrete classes. The end result I am aiming for is to get away from directly invoking constructors on specific objects, i.e. hide the implementation as much as possible. The more suggestions on how to approach this the better. Regards, *===================================* * Scott T Weaver * * Jakarta Jetspeed Portal Project * * [EMAIL PROTECTED] * *===================================*
