use of org.apereo.portal.url.IPortalRequestInfo in project uPortal by Jasig.
the class PortletCacheControlServiceImpl method getPortletResourceState.
@Override
public CacheState<CachedPortletResourceData<Long>, Long> getPortletResourceState(HttpServletRequest request, IPortletWindowId portletWindowId) {
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
if (portletWindow == null) {
logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl and no cached portlet data", portletWindowId);
return new CacheState<CachedPortletResourceData<Long>, Long>();
}
// Generate the public resource cache key
final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
final Locale locale = RequestContextUtils.getLocale(request);
final PublicPortletCacheKey publicCacheKey = PublicPortletCacheKey.createPublicPortletResourceCacheKey(portletWindow, portalRequestInfo, locale);
return this.<CachedPortletResourceData<Long>, Long>getPortletState(request, portletWindow, publicCacheKey, this.publicScopePortletResourceOutputCache, this.privateScopePortletResourceOutputCache, true);
}
use of org.apereo.portal.url.IPortalRequestInfo in project uPortal by Jasig.
the class PortletCacheControlServiceImpl method getPortletRenderState.
@Override
public CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult> getPortletRenderState(HttpServletRequest request, IPortletWindowId portletWindowId) {
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
if (portletWindow == null) {
logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl and no cached portlet data", portletWindowId);
return new CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult>();
}
// Generate the public render cache key
final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
final Locale locale = RequestContextUtils.getLocale(request);
final PublicPortletCacheKey publicCacheKey = PublicPortletCacheKey.createPublicPortletRenderCacheKey(portletWindow, portalRequestInfo, locale);
return this.<CachedPortletData<PortletRenderResult>, PortletRenderResult>getPortletState(request, portletWindow, publicCacheKey, this.publicScopePortletRenderOutputCache, this.privateScopePortletRenderOutputCache, false);
}
use of org.apereo.portal.url.IPortalRequestInfo in project uPortal by Jasig.
the class PortletCacheControlServiceImpl method getPortletRenderHeaderState.
@Override
public CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult> getPortletRenderHeaderState(HttpServletRequest request, IPortletWindowId portletWindowId) {
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
if (portletWindow == null) {
logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl and no cached portlet data", portletWindowId);
return new CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult>();
}
// Generate the public render-header cache key
final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
final Locale locale = RequestContextUtils.getLocale(request);
final PublicPortletCacheKey publicCacheKey = PublicPortletCacheKey.createPublicPortletRenderHeaderCacheKey(portletWindow, portalRequestInfo, locale);
return this.<CachedPortletData<PortletRenderResult>, PortletRenderResult>getPortletState(request, portletWindow, publicCacheKey, this.publicScopePortletRenderHeaderOutputCache, this.privateScopePortletRenderHeaderOutputCache, false);
}
use of org.apereo.portal.url.IPortalRequestInfo in project uPortal by Jasig.
the class LocalPortletRequestContextServiceImpl method getPortletRenderRequestContext.
/* (non-Javadoc)
* @see org.apache.pluto.container.PortletRequestContextService#getPortletRenderRequestContext(org.apache.pluto.container.PortletContainer, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.pluto.container.PortletWindow)
*/
@Override
public PortletRequestContext getPortletRenderRequestContext(PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) {
final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window);
final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest);
return new PortletRequestContextImpl(container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, portletCookieService, requestAttributeService);
}
use of org.apereo.portal.url.IPortalRequestInfo in project uPortal by Jasig.
the class LocalPortletRequestContextServiceImpl method getPortletResourceRequestContext.
/* (non-Javadoc)
* @see org.apache.pluto.container.PortletRequestContextService#getPortletResourceRequestContext(org.apache.pluto.container.PortletContainer, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.pluto.container.PortletWindow)
*/
@Override
public PortletResourceRequestContext getPortletResourceRequestContext(PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) {
final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window);
final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest);
return new PortletResourceRequestContextImpl(container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, this.portletCookieService, requestAttributeService);
}
Aggregations