Package org.apache.roller.presentation.website.formbeans

Examples of org.apache.roller.presentation.website.formbeans.WebsiteFormEx


                UserManager umgr = roller.getUserManager();
                WeblogManager wmgr = roller.getWeblogManager();
                UserData ud = rses.getAuthenticatedUser();
                request.setAttribute("user",ud);
               
                WebsiteFormEx wf = (WebsiteFormEx)actionForm;
                wf.copyFrom(website, request.getLocale());
               
                List cd = wmgr.getWeblogCategories(website, true);
                request.setAttribute("categories",cd);
               
                List bcd = wmgr.getWeblogCategories(website, false);
View Full Code Here


            throws Exception {
        ActionErrors errors = new ActionErrors();
        ActionMessages messages = new ActionMessages();
        ActionForward forward = mapping.findForward("editWebsite");
        try {
            WebsiteFormEx form = (WebsiteFormEx)actionForm;
            WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
            UserManager umgr = RollerFactory.getRoller().getUserManager();
           
            WebsiteData wd = umgr.getWebsite(form.getId());
           
            // Set website in request, so subsequent action gets it
            RollerRequest.getRollerRequest(request).setWebsite(wd);
           
            RollerSession rollerSession = RollerSession.getRollerSession(request);
            if ( rollerSession.isUserAuthorizedToAdmin(wd)) {
                checkBlacklist(errors, messages, form.getBlacklist());
                if (errors.isEmpty()) {
                    // ensure getEnabled can't be changed
                    form.setEnabled(wd.getEnabled());
                    form.copyTo(wd, request.getLocale());
                   
                    // ROL-485: comments not be allowed on inactive weblogs
                    if (wd.getActive() != null && !wd.getActive().booleanValue()) {
                        wd.setAllowComments(Boolean.FALSE);
                        messages.add(null, new ActionMessage(
                            "websiteSettings.commentsOffForInactiveWeblog"));
                    }
                                       
                    umgr.saveWebsite(wd)
                   
                    // ROL-1050: apply comment defaults to existing entries
                    if (form.getApplyCommentDefaults() != null && form.getApplyCommentDefaults().booleanValue()) {
                        wmgr.applyCommentDefaultsToEntries(wd);
                    }

                    RollerFactory.getRoller().getRefererManager().applyRefererFilters(wd);
                   
                    RollerFactory.getRoller().flush();
                   
                    messages.add(null,
                        new ActionMessage("websiteSettings.savedChanges"));
                   
                    request.getSession().setAttribute(
                        RollerRequest.WEBSITEID_KEY, form.getId());
                   
                    // Clear cache entries associated with website
                    CacheManager.invalidate(wd);
           
                    actionForm.reset(mapping,request);
View Full Code Here

            ActionMapping       mapping,
            ActionForm          actionForm,
            HttpServletRequest  request,
            HttpServletResponse response)
            throws Exception {
        WebsiteFormEx form = (WebsiteFormEx)actionForm;
        UserManager umgr = RollerFactory.getRoller().getUserManager();
        WebsiteData website = umgr.getWebsite(form.getId());
        ActionForward forward = mapping.findForward("removeWebsite.page");
        request.setAttribute("model", new WebsitePageModel(
                "websiteRemove.title", request, response, mapping, website));
        try {
            RollerSession rses = RollerSession.getRollerSession(request);
            if (rses.isUserAuthorizedToAdmin(website)) {
                form.copyFrom(website, request.getLocale());
                request.setAttribute("website", website);
            } else {
                forward = mapping.findForward("access-denied");
            }
        } catch (Exception e) {
View Full Code Here

            HttpServletResponse response)
            throws Exception {
        ActionForward forward = mapping.findForward("yourWebsites");
        try {
            UserManager umgr = RollerFactory.getRoller().getUserManager();
            WebsiteFormEx form = (WebsiteFormEx)actionForm;
            WebsiteData website = umgr.getWebsite(form.getId());
           
            RollerSession rses = RollerSession.getRollerSession(request);
            if ( rses.isUserAuthorizedToAdmin(website) ) {
               
                // remove website
View Full Code Here

TOP

Related Classes of org.apache.roller.presentation.website.formbeans.WebsiteFormEx

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.