Examples of PingTargetData


Examples of org.apache.roller.pojos.PingTargetData

    }
   
   
    public void removePingTarget(String id) throws RollerException {
       
        PingTargetData pingTarget = getPingTarget(id);
       
        // remove contents and then target
        this.removePingTargetContents(pingTarget);
        strategy.remove(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

            if (m.matches() && m.groupCount() == 2)
            {
                String name = m.group(1);
                String url = m.group(2);
                logger.info("Creating common ping target '" + name + "' from configuration properties.");
                PingTargetData pingTarget = new PingTargetData(null, name, url, null);
                pingTargetMgr.savePingTarget(pingTarget);
            }
            else
            {
                logger.error("Unable to parse configured initial ping target '" + configuredTargets[i] +
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

     * Convenience method for creating a ping target.
     */
    public static PingTargetData setupPingTarget(String name, String url)
            throws Exception {
       
        PingTargetData testPing = new PingTargetData();
        testPing.setName("testCommonPing");
        testPing.setPingUrl("http://localhost/testCommonPing");
       
        // store ping
        PingTargetManager pingMgr = RollerFactory.getRoller().getPingTargetManager();
        pingMgr.savePingTarget(testPing);
       
        // query for it
        PingTargetData ping = pingMgr.getPingTarget(testPing.getId());
       
        if(ping == null)
            throw new RollerException("error setting up ping target");
       
        return ping;
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

     */
    public static void teardownPingTarget(String id) throws Exception {
       
        // query for it
        PingTargetManager pingMgr = RollerFactory.getRoller().getPingTargetManager();
        PingTargetData ping = pingMgr.getPingTarget(id);
       
        // remove the ping
        pingMgr.removePingTarget(ping);
    }
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

            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());
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 = select(rreq);
            ((PingTargetForm) form).copyFrom(pingTarget, req.getLocale());
            return forward;
        }
        catch (Exception e)
        {
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 = select(rreq);
            ((PingTargetForm) form).copyFrom(pingTarget, req.getLocale());
            return forward;
        }
        catch (Exception 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)
View Full Code Here

Examples of org.apache.roller.pojos.PingTargetData

        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
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.