use of org.olat.commons.info.model.InfoMessageImpl in project openolat by klemens.
the class InfoMessageFrontendManagerImpl method updateInfoMessagesOfIdentity.
@Override
public void updateInfoMessagesOfIdentity(BusinessGroupRef businessGroup, IdentityRef identity) {
List<InfoMessage> infoMessages = infoMessageManager.loadInfoMessagesOfIdentity(businessGroup, identity);
for (InfoMessage infoMessage : infoMessages) {
Identity author = infoMessage.getAuthor();
if (author != null && author.getKey().equals(identity.getKey())) {
((InfoMessageImpl) infoMessage).setAuthor(null);
}
Identity modifier = infoMessage.getModifier();
if (modifier != null && modifier.getKey().equals(identity.getKey())) {
infoMessage.setModifier(null);
}
infoMessageManager.saveInfoMessage(infoMessage);
}
}
Aggregations