/** * @return the portal service. */ public static PortalService createPortalService() { return (PortalService) BeanUtilsWeb.getBean(PORTAL_SERVICE_BEAN); }
/** * Bind the servlet request and context to the current thread (to use Sping-scoped beans). * @param request * @param context * @return the request attributes (that should be released by unbindRequest()). */ public static ServletRequestAttributes bindRequestAndContext( final HttpServletRequest request, final ServletContext context) { LocaleContextHolder.setLocale(request.getLocale()); ServletRequestAttributes requestAttributes = new ServletRequestAttributes(request); RequestContextHolder.setRequestAttributes(requestAttributes); BeanUtilsWeb.initBeanFactory(context); return requestAttributes; }
/** * Bind the portlet request and context to the current thread (to use Sping-scoped beans). * @param request * @param context * @return the request attributes (that should be released by unbindRequest()). */ public static PortletRequestAttributes bindRequestAndContext( final PortletRequest request, final PortletContext context) { LocaleContextHolder.setLocale(request.getLocale()); PortletRequestAttributes requestAttributes = new PortletRequestAttributes(request); RequestContextHolder.setRequestAttributes(requestAttributes); BeanUtilsWeb.initBeanFactory(context); return requestAttributes; }
previousRequestAttributes = ContextUtils.bindRequestAndContext( request, getServletContext()); BeanUtilsWeb.initBeanFactory(getServletContext()); String contentType = (String) DownloadUtils.getDownloadAttribute( CONTENT_TYPE_ATTRIBUTE + id);
/** * @return a URL generator. */ public static UrlGenerator createUrlGenerator() { return (UrlGenerator) BeanUtilsWeb.getBean(URL_GENERATOR_BEAN); }
throws ServletException, IOException { try { BeanUtilsWeb.initBeanFactory(getServletContext());
/** * @return the cache manager. */ protected CacheManager getCacheManager() { if (cacheManager == null) { cacheManager = (CacheManager) BeanUtilsWeb.getBean(CACHE_MANAGER_BEAN); } return cacheManager; }