@Override public void onNotification(SilverpeasNotification notification, NotificationTopic onTopic) { if (onTopic.getName().equals(ADMIN_TOPIC.getTopicName())) { SpaceLogicalDeletionNotification deletion = (SpaceLogicalDeletionNotification) notification; String spaceId = deletion.getSpaceId(); SilverpeasServiceProvider.getPersonalizationService().resetDefaultSpace(spaceId); } }
@Override public void publish(SilverpeasNotification notification, NotificationTopic onTopic) { try { String topicName = onTopic.getName(); TopicPublisher publisher = jmsService.createTopicPublisher(topicName); ObjectMessage message = jmsService.createObjectMessageFor(publisher); message.setObject(notification); publisher.publish(message); jmsService.disposeTopicPublisher(publisher); } catch (Exception ex) { throw new PublishingException(ex); } }