Package org.apache.roller.planet.ui.authoring.struts.forms

Examples of org.apache.roller.planet.ui.authoring.struts.forms.PlanetGroupForm


            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetGroupForm form = (PlanetGroupForm)actionForm;
                if (request.getParameter("groupHandle") != null)
                {
                    String feedUrl = request.getParameter("groupHandle");
                    PlanetGroupData group = planet.getGroup(feedUrl);
                    form.copyFrom(group, request.getLocale());
                }
                else
                {
                    form.doReset(mapping, request);
                }
                request.setAttribute("model",
                    new GroupsPageModel(request, response, mapping));
            }
            else
View Full Code Here


        ActionForward forward = mapping.findForward("planetGroups.page");
        try
        {
            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                PlanetGroupForm form = (PlanetGroupForm)actionForm;             
                form.doReset(mapping, request);
               
                request.setAttribute("model",
                    new GroupsPageModel(request, response, mapping));
            }
            else
View Full Code Here

            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetGroupForm form = (PlanetGroupForm)actionForm;
                if (form.getHandle() != null)
                {
                    PlanetGroupData group = planet.getGroup(form.getHandle());
                    planet.deleteGroup(group);
                    roller.flush();
                    // TODO: why release here?
                    roller.release();
                   
                    form.doReset(mapping, request);
                   
                    request.setAttribute("model",
                        new GroupsPageModel(request, response, mapping));
                   
                    ActionMessages messages = new ActionMessages();
View Full Code Here

        try
        {
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                PlanetGroupForm form = (PlanetGroupForm)actionForm;
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                ActionErrors errors = validate(planet, form);
                if (errors.isEmpty())
                {
                    PlanetGroupData group = null;
                    if (form.getId() == null || form.getId().trim().length() == 0)
                    {
                        group = new PlanetGroupData();
                    }
                    else
                    {
                        group = planet.getGroupById(form.getId());
                    }               
                    form.copyTo(group, request.getLocale());
                    planet.saveGroup(group)
                    roller.flush();

                    ActionMessages messages = new ActionMessages();
                    messages.add(null,
                            new ActionMessage("planetGroups.success.saved"));
                    saveMessages(request, messages);
                    form.doReset(mapping, request);

                    request.setAttribute("model",
                            new GroupsPageModel(request, response, mapping));
                }
                else
View Full Code Here

TOP

Related Classes of org.apache.roller.planet.ui.authoring.struts.forms.PlanetGroupForm

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.