Package org.apache.roller.presentation.forms

Examples of org.apache.roller.presentation.forms.PingTargetForm


        throws Exception
    {
        RollerRequest rreq = RollerRequest.getRollerRequest(req);
        PingTargetManager pingTargetMgr =
                RollerFactory.getRoller().getPingTargetManager();
        PingTargetForm pingTargetForm = (PingTargetForm) form;
        try
        {
            BasePageModel pageModel =
                new BasePageModel(getPingTargetEditTitle(), req, res, mapping);
            req.setAttribute("model",pageModel);           
            if (!hasRequiredRights(rreq, rreq.getWebsite()))
            {
                return mapping.findForward(ACCESS_DENIED_PAGE);
            }

            PingTargetData pingTarget = null;
            String pingTargetId = pingTargetForm.getId();
            if (pingTargetId != null && pingTargetId.length() > 0)
            {
                pingTarget = pingTargetMgr.getPingTarget(
                        pingTargetForm.getId());
                if (pingTarget == null)
                    throw new RollerException(
                            "No such ping target id: " + pingTargetId);
                pingTargetForm.copyTo(pingTarget, req.getLocale());
            }
            else
            {
                pingTarget = createPingTarget(rreq, pingTargetForm);
            }
View Full Code Here


    public ActionForward deleteConfirmed(ActionMapping mapping, ActionForm form,
                                         HttpServletRequest req, HttpServletResponse res)
        throws Exception
    {
        RollerRequest rreq = RollerRequest.getRollerRequest(req);
        PingTargetForm pingTargetForm = (PingTargetForm) form;
        PingTargetManager pingTargetMgr = RollerFactory.getRoller().getPingTargetManager();
        try
        {
            if (!hasRequiredRights(rreq, rreq.getWebsite()))
            {
                return mapping.findForward(ACCESS_DENIED_PAGE);
            }
            String pingTargetId = pingTargetForm.getId();
            if (pingTargetId == null || pingTargetId.length() == 0)
            {
                throw new RollerException("Missing ping target id.");
            }
            PingTargetData ping = pingTargetMgr.getPingTarget(pingTargetId);
View Full Code Here

TOP

Related Classes of org.apache.roller.presentation.forms.PingTargetForm

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.