Package org.apache.roller.weblogger.ui.core

Examples of org.apache.roller.weblogger.ui.core.RollerSession


        date = date.trim();
        ArrayList referers = new ArrayList();
        try {
            List refs =
                    mRefererMgr.getReferersToDate(mWebsite, date);
            RollerSession rses =
                    RollerSession.getRollerSession(mRequest);
           
            for (Iterator rdItr = refs.iterator(); rdItr.hasNext();) {
                WeblogReferrer referer = (WeblogReferrer) rdItr.next();
                String title =referer.getTitle();
                String excerpt = referer.getExcerpt();
                if (   StringUtils.isNotEmpty(title)
                && StringUtils.isNotEmpty(excerpt) ) {
                    if (referer.getVisible().booleanValue()
                     || referer.getWebsite().hasUserPermission(rses.getAuthenticatedUser(), WeblogPermission.ADMIN) ) {
                        referers.add(WeblogReferrerWrapper.wrap(referer, urlStrategy));
                    }
                }
            }
           
View Full Code Here


    /** Encapsulates RefererManager **/
    public List getEntryReferers(WeblogEntryWrapper entry) {
        ArrayList referers = new ArrayList();
        try {
            List refs = mRefererMgr.getReferersToEntry(entry.getId());
            RollerSession rses =
               RollerSession.getRollerSession(mRequest);
           
            for (Iterator rdItr = refs.iterator(); rdItr.hasNext();) {
                WeblogReferrer referer = (WeblogReferrer) rdItr.next();
                String title =referer.getTitle();
                String excerpt = referer.getExcerpt();
                if (   StringUtils.isNotEmpty(title)
                && StringUtils.isNotEmpty(excerpt) ) {
                    if (referer.getVisible().booleanValue()
                    ||  referer.getWebsite().hasUserPermission(rses.getAuthenticatedUser(), WeblogPermission.ADMIN) ) {
                        referers.add(WeblogReferrerWrapper.wrap(referer, urlStrategy));
                    }
                }
            }
           
View Full Code Here

   
    //------------------------------------------------------------------------
   
    public boolean isUserAuthorizedToEdit() {
        try {
            RollerSession rses =
                    RollerSession.getRollerSession(mRequest);
            if (rses != null && rses.getAuthenticatedUser() != null && mWebsite != null) {
                return mWebsite.hasUserPermission(rses.getAuthenticatedUser(), WeblogPermission.POST);
            }
        } catch (Exception e) {
            mLogger.warn("PageModel.isUserAuthorizedToEdit()", e);
        }
        return false;
View Full Code Here

   
    //------------------------------------------------------------------------
   
    public boolean isUserAuthorizedToAdmin() {
        try {
            RollerSession rses =
                    RollerSession.getRollerSession(mRequest);
            if (rses != null && rses.getAuthenticatedUser() != null && mWebsite != null) {
                return mWebsite.hasUserPermission(rses.getAuthenticatedUser(), WeblogPermission.POST);
            }
        } catch (Exception e) {
            mLogger.warn("PageModel.isUserAuthorizedToAdmin()", e);
        }
        return false;
View Full Code Here

    }
   
   
    public boolean isUserAuthorizedToEdit() {
        try {
            RollerSession rses =
                    RollerSession.getRollerSession(mRequest);
            if ( rses != null && rses.getAuthenticatedUser() != null
                    && mWebsite != null) {
                return mWebsite.hasUserPermission(
                        rses.getAuthenticatedUser(), WeblogPermission.ADMIN);
            }
        } catch (Exception e) {
            mLogger.warn("PageHelper.isUserAuthorizedToEdit)", e);
        }
        return false;
View Full Code Here

        this.request = (HttpServletRequest)params.get("request");
    }
   
    public UserWrapper getUser() {
        try {
            RollerSession rses = RollerSession.getRollerSession(request);
            if (rses != null && rses.getAuthenticatedUser() != null) {
                return UserWrapper.wrap(rses.getAuthenticatedUser());
            }
        } catch (Exception e) {
            log.warn("ERROR: checking user authorization", e);
        }
        return null;
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.ui.core.RollerSession

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.