Examples of PingTargetData


Examples of org.apache.roller.pojos.PingTargetData

     * Load delete confirmation view.
     */
    public ActionForward disableSelected(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception {
        RollerRequest rreq = RollerRequest.getRollerRequest(req);
        AutoPingManager autoPingMgr = RollerFactory.getRoller().getAutopingManager();
        PingTargetData pingTarget = select(rreq);
        try {
            if (!isAuthorized(rreq, rreq.getWebsite())) {
                return mapping.findForward("access-denied");
            }
            autoPingMgr.removeAutoPing(pingTarget, rreq.getWebsite());
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

     * Ping the selected target now.
     */
    public ActionForward pingSelectedNow(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception {
        try {
            RollerRequest rreq = RollerRequest.getRollerRequest(req);
            PingTargetData pingTarget = select(rreq);
            WebsiteData website = rreq.getWebsite();
            try {
                if (!isAuthorized(rreq, website)) {
                    return mapping.findForward("access-denied");
                }
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

        PingTargetManager pingTargetMgr = RollerFactory.getRoller().getPingTargetManager();
        if (pingTargetId == null || pingTargetId.length() == 0) {
            throw new RollerException("Missing ping target id: " + pingTargetId);
        }

        PingTargetData pingTarget = pingTargetMgr.getPingTarget(pingTargetId);
        if (pingTarget == null) {
            throw new RollerException("No such ping target id: " + pingTargetId);
        }
        return pingTarget;
    }
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

        }
       
        // Within that set of targets, fail if there is a target with the same name and that target doesn't
        // have the same id.
        for (Iterator i = brotherTargets.iterator(); i.hasNext();) {
            PingTargetData brother = (PingTargetData) i.next();
            // Fail if it has the same name but not the same id.
            if (brother.getName().equals(name) && (id == null || !brother.getId().equals(id))) {
                return false;
            }
        }
        // No conflict found
        return true;
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

            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());
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

            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 = select(rreq);
            ((PingTargetForm) form).copyFrom(pingTarget, req.getLocale());
            return forward;
        } catch (Exception e) {
            getLogger().error("ERROR in action", e);
            throw new ServletException(e);
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

            BasePageModel pageModel = new BasePageModel(getPingTargetDeleteOKTitle(), req, res, mapping);
            req.setAttribute("model", pageModel);
            if (!hasRequiredRights(rreq, rreq.getWebsite())) {
                return mapping.findForward(ACCESS_DENIED_PAGE);
            }
            PingTargetData pingTarget = select(rreq);
            ((PingTargetForm) form).copyFrom(pingTarget, req.getLocale());
            return forward;
        } catch (Exception e) {
            getLogger().error("ERROR in action", e);
            throw new ServletException(e);
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

            }
            String pingTargetId = pingTargetForm.getId();
            if (pingTargetId == null || pingTargetId.length() == 0) {
                throw new RollerException("Missing ping target id.");
            }
            PingTargetData ping = pingTargetMgr.getPingTarget(pingTargetId);
            pingTargetMgr.removePingTarget(ping);
            RollerFactory.getRoller().flush();
            return view(mapping, form, req, res);
        } catch (Exception e) {
            getLogger().error("ERROR in action", e);
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

        PingTargetManager pingTargetMgr = RollerFactory.getRoller().getPingTargetManager();
        if (pingTargetId == null || pingTargetId.length() == 0) {
            throw new RollerException("Missing ping target id: " + pingTargetId);
        }

        PingTargetData pingTarget = pingTargetMgr.getPingTarget(pingTargetId);
        if (pingTarget == null) {
            throw new RollerException("No such ping target id: " + pingTargetId);
        }
        return pingTarget;
    }
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

        } catch (Exception ex) {
            log.error(ex);
            throw new Exception("Test setup failed", ex);
        }
       
        testCommonPing = new PingTargetData();
        testCommonPing.setName("testCommonPing");
        testCommonPing.setPingUrl("http://localhost/testCommonPing");
       
        testCustomPing = new PingTargetData();
        testCustomPing.setName("testCommonPing");
        testCustomPing.setPingUrl("http://localhost/testCommonPing");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.