Yeah I suppose that's the only viable alternative then, but it plays a little less nice with a JPA backed role table and also appears to be a step back to rely on inheritance rather than composition. Oh well, can't have it all - hopefully an extendable and more lenient Enum makes it into Java at some point to allow that kind of static modeling - it's in the Kijaro sandbox after all (http://freddy33.blogspot.com/search/label/abstract%20enum).

/Casper


Igor Vaynberg wrote:
this is where the classes variation comes in. class AdminRole extends
UserRole - done

-igor

On Thu, Nov 27, 2008 at 6:56 PM, Casper Bang <[EMAIL PROTECTED]> wrote:
Yeah. First I actually didn't understand why until Igor pointed it out. I'm
no longer using wicket-auth-roles, if one can live with the roles being
defined along side the authorization code it works quite nicely (and with
somewhat cleaner code). I ran into another issue however, trying to model
how an ADMIN transitively is also a USER. Sadly the Sun compiler does not
allow Enum forward referencing to itself, only the Eclipse compiler does.

/Casper


Ned Collyer wrote:
Interestingly we used a similar approach with using classes as pseudo
enums.

Not being able to extend enums is a bit suckfull.


igor.vaynberg wrote:

the problem is that the enum would have to live *inside* the
wicketstuffauth code. so wicketstuffauth would be the library that
would need to define the enum - and it doesnt know about your
application specific roles. at least this was the issue when it was
first being designed. i havent really looked at it since than.

-igor


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to