Hi Stan,
I guess we are on similar mindframe here.
UI becomes little difficult. I was reading about "Chain of responsibility"
pattern where the example in the GoF book given is for Context Sensitive Help but for us its not exactly fitting in we have to do something like,
Button b = new Button("Create Object1");
b.setEnabled(getActivationStatus(roleContext,"create object1"));
MenuItem mi = new MenuItem("Destroy object2"); // I have not done swing for long so this might be totally in correct but you get the idea...
mi.setEanbled(getActivationStatus(roleContext,"destroy object2"));
something along those lines I am thinking..
Here, "create object1" and "destroy object2" are similar to "resource" argument you have mentioned and action will be determined by the getActivationStatus() appropriately and checked against "cached" Permissions Datastructure.
We have not yet created model for permissions but these are just abstract thoughts right now..
Thanks, your thoughts helps.
Regards,
Maulin