protected PageActionAccess getPageActionAccess(RequestContext requestContext, Page page)
{
String key = page.getId();
boolean loggedOn = isLoggedOn(requestContext);
boolean anonymous = !loggedOn;
PageActionAccess pageActionAccess = null;
Map sessionActions = (Map) requestContext.getSessionAttribute(JetspeedPowerToolImpl.POWER_TOOL_SESSION_ACTIONS);
if (sessionActions == null)
{
sessionActions = new HashMap();
requestContext.setSessionAttribute(JetspeedPowerToolImpl.POWER_TOOL_SESSION_ACTIONS, sessionActions);
}
else
{
pageActionAccess = (PageActionAccess) sessionActions.get(key);
}
if (pageActionAccess == null)
{
pageActionAccess = new PageActionAccess(anonymous, page);
sessionActions.put(key, pageActionAccess);
}
else
{
pageActionAccess.checkReset(loggedOn, page);
}
return pageActionAccess;
}