// arg is Event
public void update(Observable arg0, Object arg) {
		// arg is Event
		if (!(arg instanceof Event))
			return;
		Event event = (Event) arg;
		// check the event function against the functions we have notifications watching for
		String function = event.getEvent();
		//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH
		if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN_PASSWORD.equals(function)
				|| UserDirectoryService.SECURE_UPDATE_USER_ANY.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN.equals(function)) {
			//we need the userId
			Reference ref = entityManager.newReference(event.getResource());
			// look for group reference. Need to replace it with parent site reference
			String refId = ref.getId();
			try {
				String eid = userDirectoryService.getUserEid(refId);
				log.debug("removing " + eid + " from cache");
				authenticationCache.removeAuthentification(eid);
				userCache.remove(UserDirectoryService.IDCACHE + eid);
				userCache.remove(UserDirectoryService.EIDCACHE + refId);
			} catch (UserNotDefinedException e) {
				//not sure how we'd end up here
				log.warn(e.getMessage(), e);
			}
		} 
	}
public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH
if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN_PASSWORD.equals(function)
|| UserDirectoryService.SECURE_UPDATE_USER_ANY.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN.equals(function)) {
//we need the userId
Reference ref = entityManager.newReference(event.getResource());
public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH
if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN_PASSWORD.equals(function)
|| UserDirectoryService.SECURE_UPDATE_USER_ANY.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN.equals(function)) {
//we need the userId
Reference ref = entityManager.newReference(event.getResource());
// look for group reference. Need to replace it with parent site reference
String refId = ref.getId();
try {
String eid = userDirectoryService.getUserEid(refId);
log.debug("removing " + eid + " from cache");
authenticationCache.removeAuthentification(eid);
userCache.remove(UserDirectoryService.IDCACHE + eid);
userCache.remove(UserDirectoryService.EIDCACHE + refId);
} catch (UserNotDefinedException e) {
//not sure how we'd end up here