On Wed, Sep 16, 2009 at 5:46 PM, Alan D. Cabrera <[email protected]> wrote: > >> Well, yes, it is up to interpretation, but that's ok - each Realm has >> control over that already when it constructs the PrincipalCollection >> that represents its own data. > > By this statement do you mean that it does this by placing the "primary" > principal first in the collection?
Yes - that's the existing assumption - not too clean. >> My thought is that adding the method >> >> 1. materializes something we already discuss frequently (which to me >> means it probably should be represented in code somewhere) and >> 2. allows an end-user exact control over what the 'primary' principal >> would be if they don't like our default heuristics. > > By overriding PrincipalCollection.getPrimaryPrincipal(). Seems ok to me. Yep, that's what I was thinking - the default 'index 0' assumption is probably fine for most applications, but a Realm implementor could override that method if they want anything different. Thanks for the feedback, Les
