Package org.apache.roller.weblogger.business.pings

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager.savePingTarget()


        testPing.setName("testCommonPing");
        testPing.setPingUrl("http://localhost/testCommonPing");
       
        // store ping
        PingTargetManager pingMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
        pingMgr.savePingTarget(testPing);
       
        // flush to db
        WebloggerFactory.getWeblogger().flush();
       
        // query for it
View Full Code Here


        if(getPingTarget() != null) {
            try {
                getPingTarget().setAutoEnabled(true);
               
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
                pingTargetMgr.savePingTarget(getPingTarget());
                WebloggerFactory.getWeblogger().flush();
            } catch (Exception ex) {
                getLogger().error("Error saving ping target", ex);
                // TODO: i18n
                addError("Error saving ping target.");
View Full Code Here

        if(getPingTarget() != null) {
            try {
                getPingTarget().setAutoEnabled(false);
               
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
                pingTargetMgr.savePingTarget(getPingTarget());
                WebloggerFactory.getWeblogger().flush();
            } catch (Exception ex) {
                getLogger().error("Error saving ping target", ex);
                // TODO: i18n
                addError("Error saving ping target.");
View Full Code Here

        if(getPingTarget() != null) {
            try {
                getPingTarget().setAutoEnabled(true);
               
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
                pingTargetMgr.savePingTarget(getPingTarget());
                WebloggerFactory.getWeblogger().flush();
            } catch (Exception ex) {
                getLogger().error("Error saving ping target", ex);
                addError("commonPingTargets.error.saving");
            }
View Full Code Here

        if(getPingTarget() != null) {
            try {
                getPingTarget().setAutoEnabled(false);
               
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
                pingTargetMgr.savePingTarget(getPingTarget());
                WebloggerFactory.getWeblogger().flush();
            } catch (Exception ex) {
                getLogger().error("Error saving ping target", ex);
                addError("commonPingTargets.error.saving");
            }
View Full Code Here

        myValidate(getPingTarget());
       
        if(!hasActionErrors()) try {
            // Appears to be ok.  Save it and flush.
            PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
            pingTargetMgr.savePingTarget(getPingTarget());
            WebloggerFactory.getWeblogger().flush();
           
            addMessage("pingTarget.saved");
           
        } catch (WebloggerException ex) {
View Full Code Here

       
        PingTargetManager mgr = WebloggerFactory.getWeblogger().getPingTargetManager();
        PingTarget ping = null;
       
        // create common ping
        mgr.savePingTarget(testCommonPing);
        String commonId = testCommonPing.getId();
        TestUtils.endSession(true);
       
        // make sure common ping was stored
        ping = null;
View Full Code Here

        assertNotNull(ping);
        assertEquals(testCommonPing.getPingUrl(), ping.getPingUrl());
       
        // create custom ping
        testCustomPing.setWebsite(TestUtils.getManagedWebsite(testWeblog));
        mgr.savePingTarget(testCustomPing);
        String customId = testCustomPing.getId();
        TestUtils.endSession(true);
       
        // make sure custom ping was stored
        ping = null;
View Full Code Here

       
        // update common ping
        ping = null;
        ping = mgr.getPingTarget(commonId);
        ping.setName("testtestCommon");
        mgr.savePingTarget(ping);
        TestUtils.endSession(true);
       
        // make sure common ping was updated
        ping = null;
        ping = mgr.getPingTarget(commonId);
View Full Code Here

       
        // update custom ping
        ping = null;
        ping = mgr.getPingTarget(customId);
        ping.setName("testtestCustom");
        mgr.savePingTarget(ping);
        TestUtils.endSession(true);
       
        // make sure custom ping was updated
        ping = null;
        ping = mgr.getPingTarget(customId);
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.