Examples of PingTargetManager


Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

       
        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

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

       
        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

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

    }
   
   
    public void loadPingTargets() {
        try {
            PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
            setPingTargets(pingTargetMgr.getCommonPingTargets());
        } catch (WebloggerException ex) {
            log.error("Error loading common ping targets", ex);
            addError("commonPingTargets.error.loading");
        }
    }
View Full Code Here

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

       
        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

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

       
        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

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

    /**
     * Prepare action by loading ping target to work on.
     */
    public void myPrepare() {
       
        PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
        if(!StringUtils.isEmpty(getBean().getId())) {
           
            try {
                setPingTarget(pingTargetMgr.getPingTarget(getBean().getId()));
            } catch (WebloggerException ex) {
                getLogger().error("Error looking up ping target - "+getBean().getId());
            }
           
            if(getPingTarget() == null) {
View Full Code Here

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

        // If there are errors, go back to the target edit page.
        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

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

     * Private helper to validate a ping target.
     */
    protected void myValidate(PingTarget pingTarget) {
       
        try {
            PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
            if (!pingTargetMgr.isNameUnique(pingTarget)) {
                addError("pingTarget.nameNotUnique");
            }
           
            if (!pingTargetMgr.isUrlWellFormed(pingTarget)) {
                addError("pingTarget.malformedUrl");
            } else if (!pingTargetMgr.isHostnameKnown(pingTarget)) {
                addError("pingTarget.unknownHost");
            }
        } catch (WebloggerException ex) {
            getLogger().error("Error validating ping target", ex);
            // TODO: i18n
View Full Code Here

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

        loadPingTargets();
       
        // load specified ping target if possible
        if(!StringUtils.isEmpty(getPingTargetId())) {
            try {
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
                setPingTarget(pingTargetMgr.getPingTarget(getPingTargetId()));
            } catch (WebloggerException ex) {
                getLogger().error("Error looking up ping target - "+getPingTargetId(), ex);
            }
        }
    }
View Full Code Here

Examples of org.apache.roller.weblogger.business.pings.PingTargetManager

    public String delete() {
       
        if(getPingTarget() != null) {
           
            try {
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
                pingTargetMgr.removePingTarget(getPingTarget());
                WebloggerFactory.getWeblogger().flush();
               
                // remove deleted target from list
                getPingTargets().remove(getPingTarget());
               
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.