protected Map<String, PortletWindowBaseNavigationalState> getWindowStates(ContentPage page) { PageState pageState = pageStates.get(page.getId()); return pageState != null ? pageState.windowStates : null; } }
public String toString() { if (fragment != null) { return "event_target="+fragment.getId()+",event_type_code="+ eventType + ",orginial_coordinate="+ originalCoordinate+",new_coordinate="+ newCoordinate; } else if (page != null) { return "event_target="+page.getId()+",event_type_code="+ eventType + ",portlet_type="+ portletType+",portlet_name="+ portletName; } else { return "event_type_code="+ eventType; } } }
public String createSessionKey(RequestContext context) { boolean isAjaxRequest = (context == null); String mode = isAjaxRequest ? "-d-" : "-p-"; String user = context.getRequest().getRemoteUser(); if (user == null) user = "guest"; return user + mode + context.getPage().getId(); }
public String createSessionKey(RequestContext context) { boolean isAjaxRequest = (context == null); String mode = isAjaxRequest ? "-d-" : "-p-"; String user = context.getRequest().getRemoteUser(); if (user == null) user = "guest"; return user + mode + context.getPage().getId(); }
private void registerInstantWindow(String windowId, String portletUniqueName) { if (session == null) { session = getRequest().getSession(true); } Map<String,Map<String,String>> pages = null; synchronized (session) { pages = (Map<String,Map<String,String>>) session.getAttribute(INSTANT_WINDOWS_SESSION_KEY); if (pages == null) { pages = Collections.synchronizedMap(new HashMap<String,Map<String,String>>()); session.setAttribute(INSTANT_WINDOWS_SESSION_KEY, pages); } } String pageId = getPage().getId(); Map<String,String> instantWindows = pages.get(pageId); if (instantWindows == null) { instantWindows = Collections.synchronizedMap(new HashMap<String,String>()); pages.put(pageId, instantWindows); } instantWindows.put(windowId, portletUniqueName); }
public String resolve(RequestContext context, RuleCriterion criterion) { String path = null; ContentPage page = context.getPage(); if(page != null) { path = page.getId(); } else { path = context.getPath(); } if ((path == null) || path.equals("/")) { path = criterion.getValue(); } return path; }
String pageId = getPage().getId(); Map<String,String> instantWindows = pages.get(pageId);
String pageId = context.getPage().getId(); Map<QName, ValuesAndWindowUsage> publicRenderParametersMap = (Map<QName, ValuesAndWindowUsage>)session.getAttribute(NavigationalState.PRP_SESSION_KEY); if (publicRenderParametersMap == null)
public String resolve(RequestContext context, RuleCriterion criterion) { String path = null; ContentPage page = context.getPage(); if (page != null) { path = page.getId(); } else { path = context.getPath(); } if ((path == null) || path.equals("/")) { String key = this.getClass() + "." + criterion.getName(); path = (String)context.getSessionAttribute(key); if (path == null) { path = criterion.getValue(); } } return path; }
public void invalidate(RequestContext context) { ContentPage page = context.getPage(); ContentCacheKey themeContentCacheKey = createCacheKey(context, page.getId()); CacheElement themeCacheElem = get(themeContentCacheKey); if (themeCacheElem != null) { Theme theme = (Theme) themeCacheElem.getContent(); theme.setInvalidated(true); } } }
String key = page.getId(); boolean loggedOn = requestContext.getRequest().getUserPrincipal() != null; boolean anonymous = !loggedOn;
Map<String,String> instantWindows = pages.get(page.getId());
String curPageId = page.getId();
rd.setPageId(context.getPage().getId());
Map<String,String> instantWindows = pages.get(getPage().getId());
public ContentPageBean(final ContentPage contentPage) { id = contentPage.getId(); name = contentPage.getName(); path = contentPage.getPath(); title = contentPage.getTitle(); shortTitle = contentPage.getShortTitle(); url = contentPage.getUrl(); skin = contentPage.getSkin(); ContentFragment rootFragment = contentPage.getRootFragment(); if (rootFragment != null) { rootFragmentBean = new ContentFragmentBean(rootFragment); } }
synchronized (pageStates) pageState = pageStates.get(page.getId()); if (pageState == null) pageStates.put(page.getId(), pageState); removeFromCache(context, page.getId(), decorationCache); if (storeParameters) removeFromCache(context, page.getId(), decorationCache); if (storeParameters) removeFromCache(context, page.getId(), decorationCache); iter.remove();
themeContentCacheKey = cache.createCacheKey(requestContext, page.getId()); CacheElement themeCacheElem = cache.get(themeContentCacheKey); themeContentCacheKey = cache.createCacheKey(requestContext, page.getId()); cache.remove(themeContentCacheKey); themeContentCacheKey = cache.createCacheKey(requestContext, page.getId()); requestContext.setSessionAttribute(themeCacheKey, theme);
sessionStates.removeFromCache(context, page.getId(), decorationCache);