*/
void sendEvent(int type, Role role) {
// dont send event if type = CHANGED and role has been removed
if (!(type == UserAdminEvent.ROLE_CHANGED
&& roles.get(role.getName()) == null)) {
UserAdminEvent event = new UserAdminEvent(uasr, type, role);
eventQueue.enqueue( new SendUserAdminEventJob(Activator.bc,
eventAdminTracker,
event,
listeners) );
if (Activator.log.doDebug())
Activator.log.debug(event.toString(), uasr);
} else {
if (Activator.log.doDebug())
Activator.log.debug("Event not sent, " + role.getName()
+ " has been removed.", uasr);
}