@Override @Cacheable(CacheNames.ACHIEVEMENTS) public Image getUnlockedIcon(AchievementDefinition achievementDefinition) { if (Strings.isNullOrEmpty(achievementDefinition.getUnlockedIconUrl())) { return new Image(themeService.getThemeFile(ThemeService.DEFAULT_ACHIEVEMENT_IMAGE), true); } return new Image(achievementDefinition.getUnlockedIconUrl(), true); }
private void notifyAboutUnlockedAchievement(AchievementDefinition achievementDefinition) { notificationService.addNotification( new TransientNotification( i18n.get("achievement.unlockedTitle"), achievementDefinition.getName(), new Image(achievementDefinition.getUnlockedIconUrl()))); }