Examples of PageActionAccess


Examples of org.apache.jetspeed.decoration.PageActionAccess

    {
        ContentPage page = requestContext.getPage();
        String key = page.getId();
        boolean loggedOn = requestContext.getRequest().getUserPrincipal() != null;
        boolean anonymous = !loggedOn;
        PageActionAccess pageActionAccess = null;

        Map sessionActions = null;
        synchronized (this)
        {
            sessionActions = (Map) requestContext.getSessionAttribute(PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY);
            if (sessionActions == null)
            {
                sessionActions = new HashMap();
                requestContext.setSessionAttribute(PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY, sessionActions);
            }
            else
            {
                pageActionAccess = (PageActionAccess) sessionActions.get(key);
            }
        }
        synchronized (sessionActions)
        {
            if (pageActionAccess == null)
            {
                pageActionAccess = new PageActionAccess(anonymous, page);
                sessionActions.put(key, pageActionAccess);
            }
            else
            {
                pageActionAccess.checkReset(anonymous, page);
            }       
        }
       
        return pageActionAccess;
    }
View Full Code Here

Examples of org.apache.jetspeed.decoration.PageActionAccess

           
            String profiledPath = siteRequestContext.getPageOrTemplate().getPath();
            resultMap.put( PROFILED_PATH, profiledPath );
            putSecurityInformation( resultMap, page.getPageOrTemplate() ); //TODO: REVIEW: RANDY
    
            PageActionAccess pageActionAccess = (PageActionAccess)requestContext.getAttribute( PortalReservedParameters.PAGE_EDIT_ACCESS_ATTRIBUTE );
            Boolean userIsAnonymous = Boolean.TRUE;
            if ( pageActionAccess != null )
              userIsAnonymous = new Boolean( pageActionAccess.isAnonymous() );
            resultMap.put( USER_IS_ANONYMOUS, userIsAnonymous.toString() );
    
            Boolean isPageQualifiedForCreateNewPageOnEdit = Boolean.FALSE;
            if ( ! userIsAnonymous.booleanValue() )
              isPageQualifiedForCreateNewPageOnEdit = new Boolean( isPageQualifiedForCreateNewPageOnEdit( requestContext ) );
View Full Code Here

Examples of org.apache.jetspeed.velocity.PageActionAccess

        }
        ContentPage page = requestContext.getPage();
        Theme theme = decorationFactory.getTheme(page, requestContext);
        requestContext.setAttribute(PortalReservedParameters.PAGE_THEME_ATTRIBUTE, theme);
       
        PageActionAccess pageActionAccess = getPageActionAccess(requestContext, page);
       
        ContentFragment rootFragment = page.getRootContentFragment();
       
        initFragment(requestContext, theme, rootFragment, pageActionAccess);
       
View Full Code Here

Examples of org.apache.jetspeed.velocity.PageActionAccess

    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;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.