Package org.apache.roller.presentation

Examples of org.apache.roller.presentation.RollerRequest


                        RollerRequest.WEBLOGENTRYID_KEY, entry.getId());
               
                // Reindex entry, flush caches, etc.
                reindexEntry(RollerFactory.getRoller(), entry);
                mLogger.debug("Removing from cache");
                RollerRequest rreq = RollerRequest.getRollerRequest(request);
                //PageCacheFilter.removeFromCache(request, entry.getWebsite());
                CacheManager.invalidate(entry);
               
                // Queue applicable pings for this update.
                if(entry.isPublished()) {
View Full Code Here


        ActionForward forward = mapping.findForward("rollerProperties.page");
        try {
            BasePageModel pageModel = new BasePageModel(
                    "configForm.title", request, response, mapping);
            request.setAttribute("model",pageModel);               
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rollerSession = RollerSession.getRollerSession(request);
            if (rollerSession.isGlobalAdminUser() ) {
               
                // just grab our properties map and put it in the request
                Roller mRoller = RollerFactory.getRoller();
View Full Code Here

        mLogger.debug("Handling update request");
       
        ActionForward forward = mapping.findForward("rollerProperties.page");
        ActionErrors errors = new ActionErrors();
        try {
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rollerSession = RollerSession.getRollerSession(request);
            BasePageModel pageModel = new BasePageModel(
                    "configForm.title", request, response, mapping);
            request.setAttribute("model",pageModel);               
            if (rollerSession.isGlobalAdminUser()) {
View Full Code Here

        ActionForm          actionForm,
        HttpServletRequest  request,
        HttpServletResponse response)
        throws Exception
    {
        RollerRequest rreq = RollerRequest.getRollerRequest(request);
        WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
        WeblogCategoryFormEx form = (WeblogCategoryFormEx)actionForm;
       
        BasePageModel pageModel = null;
        WeblogCategoryData parentCat = null;
        if (null!=rreq.getWeblogCategory() && null==request.getParameter("correct"))
        {
            // If request specifies Category and we are not correcting an
            // already submitted form then load that Category into the form.
            WeblogCategoryData cd = rreq.getWeblogCategory();
            form.copyFrom(cd, request.getLocale());
            request.setAttribute("state","edit");
                            
            parentCat = cd.getParent();           
            pageModel = new BasePageModel(
                "categoryForm.edit.title", request, response, mapping);
            pageModel.setWebsite(cd.getWebsite());
        }
        else if (null != request.getParameter("correct"))
        {
            // We are correcting a previously submtted form.
            // already submitted form then load that Category into the form.
            WeblogCategoryData cd = rreq.getWeblogCategory();
            request.setAttribute("state","correcting");   
           
            parentCat = wmgr.getWeblogCategory(cd.getId());         
            pageModel = new BasePageModel(
                "categoryForm.correct.title", request, response, mapping);
View Full Code Here

            HttpServletRequest  request,
            HttpServletResponse response)
            throws IOException, ServletException {
        ActionForward forward = mapping.findForward("editWebsite.page");
        try {
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            WebsiteData website = rreq.getWebsite();
            RollerSession rses = RollerSession.getRollerSession(request);
            if (rses.isUserAuthorizedToAdmin(website)) {
                Roller roller = RollerFactory.getRoller();
                UserManager umgr = roller.getUserManager();
                WeblogManager wmgr = roller.getWeblogManager();
View Full Code Here

    ActionMapping mapping, ActionForm form,
    HttpServletRequest req, HttpServletResponse res)
    throws Exception
  {
        WeblogEntryData entry = null;
        RollerRequest rreq = RollerRequest.getRollerRequest(req);
        RollerSession rollerSession = RollerSession.getRollerSession(req);
        try
        {
            if (rreq.getWebsite() != null
                 && rollerSession.isUserAuthorizedToAuthor(rreq.getWebsite()) )
            {
                String refid = req.getParameter(RollerRequest.REFERERID_KEY);
                if ( refid != null )
                {
                    RefererManager refmgr =
                        RollerFactory.getRoller().getRefererManager();                       
                    RefererData ref = refmgr.getReferer(refid);
                    entry = ref.getWeblogEntry();
                    boolean was = ref.getVisible()==null ?
                                  false : ref.getVisible().booleanValue();
                    ref.setVisible(Boolean.valueOf( !was )); // what up, dog?                    
                    refmgr.saveReferer(ref);
                   
                    RollerFactory.getRoller().flush();
                   
                    //PageCacheFilter.removeFromCache( req, rreq.getWebsite() );
                    CacheManager.invalidate(rreq.getWebsite());
                }               
            }
        }
        catch (Exception e)
        {
            mLogger.error("Toggling linkback display",e);
            throw new ServletException(e);
        }
       
        // forward back to entry or to blog if we have no entry
    String url = null;
    try
    {
      RollerContext rctx = RollerContext.getRollerContext();
            if (entry != null) {
                url = rctx.createEntryPermalink(entry, req, true);
            } else {
          url = rctx.getContextUrl(req, rreq.getWebsite());
            }
            res.sendRedirect(url);
    }
    catch (Exception e)
    {
View Full Code Here

        WebsiteData website = null;
        UserData user = null;
        try
        {
            // Get Roller request object for current thread
            RollerRequest rreq = RollerRequest.getRollerRequest();
           
            UserManager userMgr = RollerFactory.getRoller().getUserManager();
            user = userMgr.getUserByUsername(username);
            userEnabled = user.getEnabled().booleanValue();
           
View Full Code Here

        boolean enabled = false;
        UserData user = null;
        try
        {
            // Get Roller request object for current thread
            RollerRequest rreq = RollerRequest.getRollerRequest();
           
            UserManager userMgr = RollerFactory.getRoller().getUserManager();
            user = userMgr.getUserByUsername(username);
           
            enabled = user.getEnabled().booleanValue();
View Full Code Here

    }
   
    //------------------------------------------------------------------------
    protected void flushPageCache(WebsiteData website) throws Exception
    {
        RollerRequest rreq = RollerRequest.getRollerRequest();
        //PageCacheFilter.removeFromCache( rreq.getRequest(), website);
        CacheManager.invalidate(website);
    }
View Full Code Here

        ActionForward forward = mapping.findForward("editPages.page");
        try
        {
            request.setAttribute("model", new BasePageModel(
                "pagesForm.title", request, response, mapping));  
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rses = RollerSession.getRollerSession(request);
            WebsiteData website = rreq.getWebsite();
            if ( rses.isUserAuthorizedToAdmin(website) )
            {
                WeblogTemplateForm form = (WeblogTemplateForm)actionForm;
                WeblogTemplate data = new WeblogTemplate();
                form.copyTo(data, request.getLocale());
View Full Code Here

TOP

Related Classes of org.apache.roller.presentation.RollerRequest

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.