Package org.apache.roller.ui.core

Examples of org.apache.roller.ui.core.BasePageModel


                // save the updated profile
                UserManager mgr = RollerFactory.getRoller().getUserManager();
                mgr.saveUser(data);
                RollerFactory.getRoller().flush();
               
                request.setAttribute("model", new BasePageModel(
                        "yourProfile.title", request, response, mapping));
               
                saveMessages(request, msgs);
            } else {
                saveErrors(request, errors);
View Full Code Here


        try
        {
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                BasePageModel pageModel = new BasePageModel(
                    "planetConfig.pageTitle", request, response, mapping);
                request.setAttribute("model",pageModel);               
                Roller roller = RollerFactory.getRoller();
                RefreshEntriesTask task = new RefreshEntriesTask();
                task.init(roller, "dummy");
View Full Code Here

        try
        {
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                BasePageModel pageModel = new BasePageModel(
                    "planetConfig.pageTitle", request, response, mapping);
                request.setAttribute("model",pageModel);               
                Roller roller = (Roller)RollerFactory.getRoller();
                SyncWebsitesTask task = new SyncWebsitesTask();
                task.init(roller, "dummy");
View Full Code Here

            FolderData fd = rreq.getFolder();
            form.copyFrom(fd, request.getLocale());
            parentFolder = fd.getParent();
           
            BasePageModel pageModel = new BasePageModel(
                "folderForm.add.title", request, response, mapping);
            pageModel.setWebsite(parentFolder.getWebsite());
            request.setAttribute("model", pageModel);
        }
        else if (null != request.getParameter("correct"))
        {
            // We are correcting a previously submtted form.
            request.setAttribute("state","correcting");
           
            String parentId = request.getParameter(RequestConstants.PARENT_ID);
            parentFolder = bmgr.getFolder(parentId);
           
            BasePageModel pageModel = new BasePageModel(
                "folderForm.correct.title", request, response, mapping);
            pageModel.setWebsite(parentFolder.getWebsite());
            request.setAttribute("model", pageModel);
        }
        else
        {
            // We are adding a new bookmark
            request.setAttribute("state","add");
           
            String parentId = request.getParameter(RequestConstants.PARENT_ID);
            parentFolder = bmgr.getFolder(parentId);
           
            BasePageModel pageModel = new BasePageModel(
                "folderForm.add.title", request, response, mapping);
            pageModel.setWebsite(parentFolder.getWebsite());
            request.setAttribute("model", pageModel);
        }
       
        request.setAttribute(RequestConstants.PARENT_ID, parentFolder.getId());
        request.setAttribute("parentFolder", parentFolder);
View Full Code Here

    /** Create params based on incoming request */
    static Hashtable createParams(HttpServletRequest req) {
        Hashtable params = new Hashtable();
        try {
            WebsiteData website = getRequestedWeblog(req);
            BasePageModel pageModel = (BasePageModel)req.getAttribute("model");
            if (website == null && pageModel != null) {
                website = pageModel.getWebsite();
            }
            if (website != null) {
                params.put("weblog", website.getHandle());
            }
        } catch (Exception e) {
View Full Code Here

            HttpServletRequest  request,
            HttpServletResponse response)
            throws IOException, ServletException {
        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) ) {
View Full Code Here

            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            WeblogTemplate pd = (WeblogTemplate)rreq.getPage();
           
            RollerSession rses = RollerSession.getRollerSession(request);
            if ( rses.isUserAuthorizedToAdmin(pd.getWebsite()) ) {
                BasePageModel pageModel = new BasePageModel(
                        "pageForm.title", request, response, mapping);
                pageModel.setWebsite(pd.getWebsite());
                request.setAttribute("model", pageModel);
               
                WeblogTemplateForm pf = (WeblogTemplateForm)actionForm;
                pf.copyFrom(pd, request.getLocale());
               
View Full Code Here

        ActionForward forward = mapping.findForward("editPages.page");
        try {
            WeblogTemplateForm form = (WeblogTemplateForm)actionForm;
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rses = RollerSession.getRollerSession(request);
            request.setAttribute("model", new BasePageModel(
                    "pagesForm.title", request, response, mapping));
           
            WebsiteData website = rreq.getWebsite();
            if (website == null && form.getId()!=null) {
                UserManager mgr = RollerFactory.getRoller().getUserManager();
View Full Code Here

            ActionForm          actionForm,
            HttpServletRequest  request,
            HttpServletResponse response)
            throws IOException, ServletException {
        ActionForward forward = mapping.findForward("editPages");
        request.setAttribute("model", new BasePageModel(
                "pagesForm.title", request, response, mapping));
        try {
            UserManager mgr = RollerFactory.getRoller().getUserManager();
            WeblogTemplateForm form = (WeblogTemplateForm)actionForm;
            WeblogTemplate template = mgr.getPage(form.getId());
View Full Code Here

        // if group blogging is disabled then you can't change permissions
        if (!RollerConfig.getBooleanProperty("groupblogging.enabled")) {
            return mapping.findForward("access-denied");
        }
       
        BasePageModel pageModel = new BasePageModel(
                "inviteMember.title", request, response, mapping);
        RollerSession rses = RollerSession.getRollerSession(request);
       
        // Ensure use has admin perms for this weblog
        if (pageModel.getWebsite() != null && rses.isUserAuthorizedToAdmin(pageModel.getWebsite())) {
            request.setAttribute("model", pageModel);
            InviteMemberForm form = (InviteMemberForm)actionForm;
            form.setWebsiteId(pageModel.getWebsite().getId());
            ActionForward forward = mapping.findForward("inviteMember.page");
            return forward;
        } else {
            return mapping.findForward("access-denied");
        }
View Full Code Here

TOP

Related Classes of org.apache.roller.ui.core.BasePageModel

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.