Package org.apache.jetspeed.decoration

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


           
            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

TOP

Related Classes of org.apache.jetspeed.decoration.PageActionAccess

Copyright © 2018 www.massapicom. 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.