Roles design
Hello everyone,
I am trying to find out what would be a good design to deal with roles.
What i have got so far is something like this:
- User class. Thisclass contains the information about the user (name, address...) and a List with the roles he can use.
- RoleFactory. Here i have implemented Factory Method (i think). Theclass returns a WriterRole or an EditorRole based on a parameter.
- IRole interface. Here is my main problem...i can磘 really think whatthisinterface should declare, here is where i am stuck.
- WriterRole and EditorRole. Both concrete classes thatimplements the IRoleinterface
Could someone help me if i am in the right track, and any tip in what IRole interface should declare?
I don磘 know if it is ok (if it isn磘, sorry), but here is a link to another post i wrote where you can see the code i got so far (it was really helpful, but i am still stuck):
http://forum.java.sun.com/thread.jspa?threadID=679723
Thanks in advance,
Regards

