//# 0 errors, 162 messages
//#
/*
    //#CommonPingTargets.java:1:1: class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  The ASF licenses this file to You
 * under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.  For additional information regarding
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.
 */

package org.apache.roller.weblogger.ui.struts2.admin;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.business.pings.PingTargetManager;
import org.apache.roller.weblogger.ui.struts2.common.PingTargetsBase;


/**
 * Admin action for managing global ping targets.
 */
public class CommonPingTargets extends PingTargetsBase {
    
    private static Log log = LogFactory.getLog(CommonPingTargets.class);
    //#CommonPingTargets.java:34: method: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init
    //#CommonPingTargets.java:34: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets]
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.delete()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.deleteConfirm()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.disable()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.enable()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.execute()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getLogger()Lorg/apache/commons/logging/Log;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getPingTarget()Lorg/apache/roller/weblogger/pojos/PingTarget;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getPingTargetId()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getPingTargets()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.isWeblogRequired()Z
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.loadPingTargets()V
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.myPrepare()V
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.requiredUserRole()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.setPingTarget(Lorg/apache/roller/weblogger/pojos/PingTarget;)V
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.setPingTargetId(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.setPingTargets(Ljava/util/List;)V
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): log
    //#output(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets]
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.delete()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.delete
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.deleteConfirm()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.deleteConfirm
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.disable()Ljava/lang/String; == &disable
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.enable()Ljava/lang/String; == &enable
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.execute()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.execute
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getLogger()Lorg/apache/commons/logging/Log; == &getLogger
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getPingTarget()Lorg/apache/roller/weblogger/pojos/PingTarget; == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.getPingTarget
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getPingTargetId()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.getPingTargetId
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.getPingTargets()Ljava/util/List; == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.getPingTargets
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.isWeblogRequired()Z == &isWeblogRequired
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.loadPingTargets()V == &loadPingTargets
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.myPrepare()V == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.myPrepare
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.requiredUserRole()Ljava/lang/String; == &requiredUserRole
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.setPingTarget(Lorg/apache/roller/weblogger/pojos/PingTarget;)V == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.setPingTarget
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.setPingTargetId(Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.setPingTargetId
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): __Dispatch_Table.setPingTargets(Ljava/util/List;)V == &org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.setPingTargets
    //#post(org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init): init'ed(log)
    //#CommonPingTargets.java:34: end of method: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets__static_init
    
    
    public CommonPingTargets() {
    //#CommonPingTargets.java:37: method: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()
    //#input(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java.util.Collections.EMPTY_LIST
    //#input(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this
    //#output(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.actionName
    //#output(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.desiredMenu
    //#output(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pageTitle
    //#output(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pingTarget
    //#output(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pingTargetId
    //#output(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pingTargets
    //#presumption(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): init'ed(org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java.util.Collections.EMPTY_LIST)
    //#post(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.actionName == &"commonPingTargets"
    //#post(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.desiredMenu == &"admin"
    //#post(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pageTitle == &"commonPingTargets.commonPingTargets"
    //#post(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pingTarget == null
    //#post(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pingTargetId == null
    //#post(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): this.pingTargets == org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java.util.Collections.EMPTY_LIST
    //#post(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): init'ed(this.pingTargets)
    //#unanalyzed(void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.util.UIAction
        this.actionName = "commonPingTargets";
        this.desiredMenu = "admin";
        this.pageTitle = "commonPingTargets.commonPingTargets";
    }
    //#CommonPingTargets.java:41: end of method: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets()
    
    
    public String requiredUserRole() {
        return "admin";
    //#CommonPingTargets.java:45: method: String org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.requiredUserRole()
    //#output(String requiredUserRole()): return_value
    //#post(String requiredUserRole()): return_value == &"admin"
    //#CommonPingTargets.java:45: end of method: String org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.requiredUserRole()
    }
    
    // no weblog required
    public boolean isWeblogRequired() {
        return false;
    //#CommonPingTargets.java:50: method: bool org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.isWeblogRequired()
    //#output(bool isWeblogRequired()): return_value
    //#post(bool isWeblogRequired()): return_value == 0
    //#CommonPingTargets.java:50: end of method: bool org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.isWeblogRequired()
    }
    
    
    protected Log getLogger() {
        return log;
    //#CommonPingTargets.java:55: method: Log org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.getLogger()
    //#input(Log getLogger()): log
    //#output(Log getLogger()): return_value
    //#pre[1] (Log getLogger()): init'ed(log)
    //#post(Log getLogger()): return_value == log
    //#post(Log getLogger()): init'ed(return_value)
    //#CommonPingTargets.java:55: end of method: Log org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.getLogger()
    }
    
    
    public void loadPingTargets() {
        try {
            PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
    //#CommonPingTargets.java:61: method: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.loadPingTargets()
    //#CommonPingTargets.java:61: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: void loadPingTargets()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#CommonPingTargets.java:61: Warning: method not available
    //#    -- call on PingTargetManager org.apache.roller.weblogger.business.Weblogger:getPingTargetManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: void loadPingTargets()
    //#    unanalyzed callee: PingTargetManager org.apache.roller.weblogger.business.Weblogger:getPingTargetManager()
    //#input(void loadPingTargets()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets]
    //#input(void loadPingTargets()): __Descendant_Table[others]
    //#input(void loadPingTargets()): __Dispatch_Table.setPingTargets(Ljava/util/List;)V
    //#input(void loadPingTargets()): log
    //#input(void loadPingTargets()): this
    //#input(void loadPingTargets()): this.__Tag
    //#output(void loadPingTargets()): this.pingTargets
    //#pre[1] (void loadPingTargets()): (soft) log != null
    //#pre[4] (void loadPingTargets()): (soft) this.__Tag == org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets
    //#presumption(void loadPingTargets()): org.apache.roller.weblogger.business.Weblogger:getPingTargetManager(...)@61 != null
    //#presumption(void loadPingTargets()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@61 != null
    //#post(void loadPingTargets()): possibly_updated(this.pingTargets)
            setPingTargets(pingTargetMgr.getCommonPingTargets());
    //#CommonPingTargets.java:62: Warning: method not available
    //#    -- call on List org.apache.roller.weblogger.business.pings.PingTargetManager:getCommonPingTargets()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: void loadPingTargets()
    //#    unanalyzed callee: List org.apache.roller.weblogger.business.pings.PingTargetManager:getCommonPingTargets()
        } catch (WebloggerException ex) {
            log.error("Error loading common ping targets", ex);
    //#CommonPingTargets.java:64: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: void loadPingTargets()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            // TODO: i18n
            addError("Error loading common ping targets");
    //#CommonPingTargets.java:66: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: void loadPingTargets()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
        }
    }
    //#CommonPingTargets.java:68: end of method: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.loadPingTargets()
    
    
    /**
     * Set a ping target auto enabled to true.
     */
    public String enable() {
        
        if(getPingTarget() != null) {
    //#CommonPingTargets.java:76: method: String org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.enable()
    //#input(String enable()): "Cannot enable ping target - "._tainted
    //#input(String enable()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets]
    //#input(String enable()): __Descendant_Table[others]
    //#input(String enable()): __Dispatch_Table.getLogger()Lorg/apache/commons/logging/Log;
    //#input(String enable()): __Dispatch_Table.getPingTarget()Lorg/apache/roller/weblogger/pojos/PingTarget;
    //#input(String enable()): __Dispatch_Table.getPingTargetId()Ljava/lang/String;
    //#input(String enable()): log
    //#input(String enable()): this
    //#input(String enable()): this.__Tag
    //#input(String enable()): this.pingTarget
    //#input(String enable()): this.pingTargetId
    //#input(String enable()): this.pingTargetId._tainted
    //#output(String enable()): return_value
    //#pre[3] (String enable()): this.__Tag == org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets
    //#pre[4] (String enable()): init'ed(this.pingTarget)
    //#pre[1] (String enable()): (soft) log != null
    //#pre[5] (String enable()): (soft) init'ed(this.pingTargetId)
    //#presumption(String enable()): org.apache.roller.weblogger.business.Weblogger:getPingTargetManager(...)@80 != null
    //#presumption(String enable()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@80 != null
    //#presumption(String enable()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@82 != null
    //#post(String enable()): return_value == &"list"
    //#test_vector(String enable()): this.pingTarget: Addr_Set{null}, Inverse{null}
            try {
                getPingTarget().setAutoEnabled(true);
    //#CommonPingTargets.java:78: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.PingTarget:setAutoEnabled(bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.PingTarget:setAutoEnabled(bool)
                
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
    //#CommonPingTargets.java:80: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#CommonPingTargets.java:80: Warning: method not available
    //#    -- call on PingTargetManager org.apache.roller.weblogger.business.Weblogger:getPingTargetManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: PingTargetManager org.apache.roller.weblogger.business.Weblogger:getPingTargetManager()
                pingTargetMgr.savePingTarget(getPingTarget());
    //#CommonPingTargets.java:81: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.pings.PingTargetManager:savePingTarget(PingTarget)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.pings.PingTargetManager:savePingTarget(PingTarget)
                WebloggerFactory.getWeblogger().flush();
    //#CommonPingTargets.java:82: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#CommonPingTargets.java:82: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
            } catch (Exception ex) {
                getLogger().error("Error saving ping target", ex);
    //#CommonPingTargets.java:84: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
                // TODO: i18n
                addError("Error saving ping target.");
    //#CommonPingTargets.java:86: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
            }
        } else {
            // TODO: i18n
            addError("Cannot enable ping target - "+getPingTargetId());
    //#CommonPingTargets.java:90: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String enable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
        }
        
        return LIST;
    //#CommonPingTargets.java:93: end of method: String org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.enable()
    }
    
    
    /**
     * Set a ping target auto-enable to false.
     */
    public String disable() {
        
        if(getPingTarget() != null) {
    //#CommonPingTargets.java:102: method: String org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.disable()
    //#input(String disable()): "Cannot disable ping target - "._tainted
    //#input(String disable()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets]
    //#input(String disable()): __Descendant_Table[others]
    //#input(String disable()): __Dispatch_Table.getLogger()Lorg/apache/commons/logging/Log;
    //#input(String disable()): __Dispatch_Table.getPingTarget()Lorg/apache/roller/weblogger/pojos/PingTarget;
    //#input(String disable()): __Dispatch_Table.getPingTargetId()Ljava/lang/String;
    //#input(String disable()): log
    //#input(String disable()): this
    //#input(String disable()): this.__Tag
    //#input(String disable()): this.pingTarget
    //#input(String disable()): this.pingTargetId
    //#input(String disable()): this.pingTargetId._tainted
    //#output(String disable()): return_value
    //#pre[3] (String disable()): this.__Tag == org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets
    //#pre[4] (String disable()): init'ed(this.pingTarget)
    //#pre[1] (String disable()): (soft) log != null
    //#pre[5] (String disable()): (soft) init'ed(this.pingTargetId)
    //#presumption(String disable()): org.apache.roller.weblogger.business.Weblogger:getPingTargetManager(...)@106 != null
    //#presumption(String disable()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@106 != null
    //#presumption(String disable()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@108 != null
    //#post(String disable()): return_value == &"list"
    //#test_vector(String disable()): this.pingTarget: Addr_Set{null}, Inverse{null}
            try {
                getPingTarget().setAutoEnabled(false);
    //#CommonPingTargets.java:104: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.pojos.PingTarget:setAutoEnabled(bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.pojos.PingTarget:setAutoEnabled(bool)
                
                PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
    //#CommonPingTargets.java:106: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#CommonPingTargets.java:106: Warning: method not available
    //#    -- call on PingTargetManager org.apache.roller.weblogger.business.Weblogger:getPingTargetManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: PingTargetManager org.apache.roller.weblogger.business.Weblogger:getPingTargetManager()
                pingTargetMgr.savePingTarget(getPingTarget());
    //#CommonPingTargets.java:107: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.pings.PingTargetManager:savePingTarget(PingTarget)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.pings.PingTargetManager:savePingTarget(PingTarget)
                WebloggerFactory.getWeblogger().flush();
    //#CommonPingTargets.java:108: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#CommonPingTargets.java:108: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
            } catch (Exception ex) {
                getLogger().error("Error saving ping target", ex);
    //#CommonPingTargets.java:110: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
                // TODO: i18n
                addError("Error saving ping target.");
    //#CommonPingTargets.java:112: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
            }
        } else {
            // TODO: i18n
            addError("Cannot disable ping target - "+getPingTargetId());
    //#CommonPingTargets.java:116: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
    //#    method: String disable()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets:addError(String)
        }
        
        return LIST;
    //#CommonPingTargets.java:119: end of method: String org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets.disable()
    }
    
}
    //#CommonPingTargets.java:: end of class: org.apache.roller.weblogger.ui.struts2.admin.CommonPingTargets
