/** * Check - sending notification is allow * * @param user User for which we check allow sending pm notification * @return flag with value (send or not) */ private boolean isSendNotificationMessage(JCUser user) { return (sendingNotificationsEnabledProperty.booleanValue() && user.isSendPmNotification()); }
/** * Set sape content to request parameters. * * @param request current HTTP request * @param response current HTTP response * @param handler chosen handler to execute, for type and/or instance examination * @param modelAndView the {@code ModelAndView} that the handler returned (can also be {@code null}) */ @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { if (!componentSapeEnableServiceProperty.booleanValue() || modelAndView == null || modelAndView.getViewName() == null || //do not apply to the redirected requests: it's unnecessary and may cause error pages to work // incorrectly (!componentSapeOnMainPageEnableProperty.booleanValue() && modelAndView.getViewName().equals("sectionList")) || modelAndView.getViewName().contains("redirect:")) { return; } String sapeLinksAsString = ""; if (componentSapeShowDummyLinksProperty.booleanValue()) { sapeLinksAsString = dummyLinks; } else if (initSape()) { SapePageLinks pageLinks = sape.getPageLinks(request.getRequestURI(), request.getCookies()); sapeLinksAsString = pageLinks.render(); } modelAndView.addObject("sapeLinks", sapeLinksAsString); }
/** * Set properties of component to request parameters. * * @param request current HTTP request * @param response current HTTP response * @param handler chosen handler to execute, for type and/or instance examination * @param modelAndView the {@code ModelAndView} that the handler returned * (can also be {@code null}) */ @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) { //do not apply to the redirected requests and error pages if (modelAndView != null && (modelAndView.getViewName() == null || checkViewNameForErrorAndRedirection(modelAndView))) { modelAndView.addObject(PARAM_CMP_NAME, componentNameProperty.getValueOfComponent()); modelAndView.addObject(PARAM_CMP_DESCRIPTION, componentDescriptionProperty.getValueOfComponent()); modelAndView.addObject(PARAM_SHOW_DUMMY_LINKS, sapeShowDummyLinksProperty.booleanValue()); modelAndView.addObject(PARAM_LOGO_TOOLTIP, logoTooltipProperty.getValue()); modelAndView.addObject(PARAM_CMP_PREFIX, allPagesTitlePrefixProperty.getValue()); modelAndView.addObject(PARAM_ADMIN_INFO_CHANGE_DATE, adminInfoChangeDateProperty.getValue()); modelAndView.addObject(PARAM_COPYRIGHT_TEMPLATE, copyrightProperty.getValue()); modelAndView.addObject(PARAM_USER_DEFINED_COPYRIGHT, getCopyrightWithYear()); modelAndView.addObject(PARAM_SESSION_TIMEOUT, sessionTimeoutProperty.getValue()); modelAndView.addObject(PARAM_AVATAR_MAX_SIZE, avatarMaxSizeProperty.getValue()); modelAndView.addObject(PARAM_EMAIL_NOTIFICATION, emailNotificationProperty.booleanValue()); } }
/** * {@inheritDoc} */ @Override @PreAuthorize("hasPermission(#componentId, 'COMPONENT', 'GeneralPermission.ADMIN')") public SapeConfiguration getSapeConfiguration(long componentId) { SapeConfiguration configuration = new SapeConfiguration(); configuration.setAccountId(sapeAccountId.getValue()); configuration.setTimeout(sapeTimeout.intValue()); configuration.setHostUrl(sapeHostUrl.getValue()); configuration.setNumberOfLinks(sapeNumberOrLinks.intValue()); configuration.setShowOnMainPage(sapeShowOnMainPage.booleanValue()); configuration.setShowDummyLinks(sapeShowDummyLinks.booleanValue()); configuration.setEnableSape(sapeEnableService.booleanValue()); return configuration; }
if (!notificationsEnabledProperty.booleanValue()) { LOGGER.debug("Email notifications are turned off in Forum Settings, skip sending to [{}]" + " mail with subject [{}]. User with Admin Permissions can enter Poulpe (that should be changed" +