*/
public class DefaultCoreListener implements CoreListener {
public void coreEvent(CoreEvent evt) {
if (evt instanceof PropertyChangeEvent) {
PropertyChangeEvent pce = (PropertyChangeEvent) evt;
StringBuffer buf = new StringBuffer("Property ");
buf.append(pce.getDefinition().getName());
if (pce.getDefinition().getType() == PropertyDefinition.TYPE_PASSWORD) {
buf.append(" changed");
} else {
buf.append(" from ");
buf.append(pce.getOldValue());
buf.append(" to ");
buf.append(pce.getNewValue());
}
if (pce.getSessionInfo() != null) {
buf.append(" (by user ");
buf.append(pce.getSessionInfo().getUser().getPrincipalName());
buf.append(" )");
}
if (CoreServlet.log.isInfoEnabled())
CoreServlet.log.info(buf.toString());
if(pce.getDefinition().isRestartRequired()) {
GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS,
new BundleActionMessage("properties", "event.configurationChangeRestartRequired.warning"), DismissType.DISMISS_FOR_USER));
}
} else if (evt.getId() >= CoreEventConstants.KEYSTORE_CREATED && evt.getId() <= CoreEventConstants.KEYSTORE_PKCS12_KEY_KEY_IMPORTED
&& evt.getSessionInfo() != null) {