//# 0 errors, 236 messages
//#
/*
    //#Referrers.java:1:1: class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
 * 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.editor;

import java.util.Collections;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.business.referrers.RefererManager;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.pojos.WeblogPermission;
import org.apache.roller.weblogger.pojos.WeblogReferrer;
import org.apache.roller.weblogger.ui.struts2.util.UIAction;
import org.apache.roller.weblogger.util.cache.CacheManager;


/**
 * Manage weblog referrer data.
 */
public class Referrers extends UIAction {
    
    private static Log log = LogFactory.getLog(Referrers.class);
    //#Referrers.java:38: method: org.apache.roller.weblogger.ui.struts2.editor.Referrers.org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init
    //#Referrers.java:38: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/Referrers]
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.execute()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.getDayHits()I
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.getReferrers()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.getRemoveIds()[Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.remove()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.requiredWeblogPermissions()S
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.reset()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.setDayHits(I)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.setReferrers(Ljava/util/List;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.setRemoveIds([Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): log
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/Referrers] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.execute()Ljava/lang/String; == &execute
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.getDayHits()I == &getDayHits
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.getReferrers()Ljava/util/List; == &getReferrers
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.getRemoveIds()[Ljava/lang/String; == &getRemoveIds
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.remove()Ljava/lang/String; == &remove
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.requiredWeblogPermissions()S == &requiredWeblogPermissions
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.reset()Ljava/lang/String; == &reset
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.setDayHits(I)V == &setDayHits
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.setReferrers(Ljava/util/List;)V == &setReferrers
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): __Dispatch_Table.setRemoveIds([Ljava/lang/String;)V == &setRemoveIds
    //#post(org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init): init'ed(log)
    //#Referrers.java:38: end of method: org.apache.roller.weblogger.ui.struts2.editor.Referrers.org.apache.roller.weblogger.ui.struts2.editor.Referrers__static_init
    
    // list of referrers to display
    private List<WeblogReferrer> referrers = Collections.EMPTY_LIST;
    
    // referrers hits today
    private int dayHits = 0;
    
    // ids of referrers to remove
    private String[] removeIds = null;
    
    
    public Referrers() {
    //#Referrers.java:50: method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.org.apache.roller.weblogger.ui.struts2.editor.Referrers()
    //#Referrers.java:50: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.util.UIAction()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.util.UIAction()
    //#input(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): java.util.Collections.EMPTY_LIST
    //#input(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.actionName
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.dayHits
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.desiredMenu
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.pageTitle
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.referrers
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.removeIds
    //#presumption(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): init'ed(java.util.Collections.EMPTY_LIST)
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.actionName == &"referrers"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.dayHits == 0
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.desiredMenu == &"editor"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.pageTitle == &"referers.todaysReferers"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.referrers == java.util.Collections.EMPTY_LIST
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): (soft) init'ed(this.referrers)
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.Referrers()): this.removeIds == null
        this.actionName = "referrers";
        this.desiredMenu = "editor";
        this.pageTitle = "referers.todaysReferers";
    }
    //#Referrers.java:54: end of method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.org.apache.roller.weblogger.ui.struts2.editor.Referrers()
    
    
    @Override
    public short requiredWeblogPermissions() {
        return WeblogPermission.ADMIN;
    //#Referrers.java:59: method: short org.apache.roller.weblogger.ui.struts2.editor.Referrers.requiredWeblogPermissions()
    //#input(short requiredWeblogPermissions()): org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN
    //#output(short requiredWeblogPermissions()): return_value
    //#presumption(short requiredWeblogPermissions()): init'ed(org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN)
    //#post(short requiredWeblogPermissions()): return_value == org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN
    //#post(short requiredWeblogPermissions()): (soft) init'ed(return_value)
    //#Referrers.java:59: end of method: short org.apache.roller.weblogger.ui.struts2.editor.Referrers.requiredWeblogPermissions()
    }
    
    
    /**
     * Show list of weblog referrers.
     */
    public String execute() {
        
        RefererManager refmgr = WebloggerFactory.getWeblogger().getRefererManager();
    //#Referrers.java:68: method: String org.apache.roller.weblogger.ui.struts2.editor.Referrers.execute()
    //#Referrers.java:68: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#Referrers.java:68: Warning: method not available
    //#    -- call on RefererManager org.apache.roller.weblogger.business.Weblogger:getRefererManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: RefererManager org.apache.roller.weblogger.business.Weblogger:getRefererManager()
    //#input(String execute()): "Error getting referrer data for weblog - "._tainted
    //#input(String execute()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/Referrers]
    //#input(String execute()): __Descendant_Table[others]
    //#input(String execute()): __Dispatch_Table.setDayHits(I)V
    //#input(String execute()): __Dispatch_Table.setReferrers(Ljava/util/List;)V
    //#input(String execute()): log
    //#input(String execute()): this
    //#input(String execute()): this.__Tag
    //#output(String execute()): return_value
    //#output(String execute()): this.dayHits
    //#output(String execute()): this.referrers
    //#pre[1] (String execute()): (soft) log != null
    //#pre[5] (String execute()): (soft) this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/Referrers
    //#presumption(String execute()): org.apache.roller.weblogger.business.Weblogger:getRefererManager(...)@68 != null
    //#presumption(String execute()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@68 != null
    //#presumption(String execute()): org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog(...)@73 != null
    //#post(String execute()): return_value == &"list"
    //#post(String execute()): possibly_updated(this.dayHits)
    //#post(String execute()): possibly_updated(this.referrers)
        try {
            setDayHits(refmgr.getDayHits(getActionWeblog()));
    //#Referrers.java:70: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#Referrers.java:70: Warning: method not available
    //#    -- call on int org.apache.roller.weblogger.business.referrers.RefererManager:getDayHits(Weblog)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: int org.apache.roller.weblogger.business.referrers.RefererManager:getDayHits(Weblog)
            setReferrers(refmgr.getTodaysReferers(getActionWeblog()));
    //#Referrers.java:71: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#Referrers.java:71: Warning: method not available
    //#    -- call on List org.apache.roller.weblogger.business.referrers.RefererManager:getTodaysReferers(Weblog)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: List org.apache.roller.weblogger.business.referrers.RefererManager:getTodaysReferers(Weblog)
        } catch (Exception ex) {
            log.error("Error getting referrer data for weblog - "+getActionWeblog().getHandle(), ex);
    //#Referrers.java:73: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#Referrers.java:73: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.Weblog:getHandle()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.Weblog:getHandle()
    //#Referrers.java:73: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            // TODO: i18n
            addError("Error loading referrer data");
    //#Referrers.java:75: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String execute()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
        }
        
        return LIST;
    //#Referrers.java:78: end of method: String org.apache.roller.weblogger.ui.struts2.editor.Referrers.execute()
    }
    
    
    /**
     * Reset all referrer counts.
     */
    public String reset() {
        
        try {
            RefererManager refmgr = WebloggerFactory.getWeblogger().getRefererManager();
    //#Referrers.java:88: method: String org.apache.roller.weblogger.ui.struts2.editor.Referrers.reset()
    //#Referrers.java:88: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#Referrers.java:88: Warning: method not available
    //#    -- call on RefererManager org.apache.roller.weblogger.business.Weblogger:getRefererManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: RefererManager org.apache.roller.weblogger.business.Weblogger:getRefererManager()
    //#input(String reset()): "Error getting referrer data for weblog - "._tainted
    //#input(String reset()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/Referrers]
    //#input(String reset()): __Descendant_Table[others]
    //#input(String reset()): __Dispatch_Table.execute()Ljava/lang/String;
    //#input(String reset()): __Dispatch_Table.setDayHits(I)V
    //#input(String reset()): __Dispatch_Table.setReferrers(Ljava/util/List;)V
    //#input(String reset()): log
    //#input(String reset()): this
    //#input(String reset()): this.__Tag
    //#output(String reset()): return_value
    //#output(String reset()): this.dayHits
    //#output(String reset()): this.referrers
    //#pre[5] (String reset()): this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/Referrers
    //#pre[1] (String reset()): (soft) log != null
    //#presumption(String reset()): org.apache.roller.weblogger.business.Weblogger:getRefererManager(...)@88 != null
    //#presumption(String reset()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@88 != null
    //#presumption(String reset()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@90 != null
    //#post(String reset()): return_value == &"list"
    //#post(String reset()): possibly_updated(this.dayHits)
    //#post(String reset()): possibly_updated(this.referrers)
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.roller.weblogger.business.Weblogger:getRefererManager
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog
    //#unanalyzed(String reset()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.roller.weblogger.business.referrers.RefererManager:getDayHits
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.roller.weblogger.business.referrers.RefererManager:getTodaysReferers
    //#unanalyzed(String reset()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String reset()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String reset()): Effects-of-calling:org.apache.roller.weblogger.pojos.Weblog:getHandle
    //#unanalyzed(String reset()): Effects-of-calling:java.lang.StringBuilder:toString
            refmgr.clearReferrers(getActionWeblog());
    //#Referrers.java:89: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#Referrers.java:89: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.referrers.RefererManager:clearReferrers(Weblog)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.referrers.RefererManager:clearReferrers(Weblog)
            WebloggerFactory.getWeblogger().flush();
    //#Referrers.java:90: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#Referrers.java:90: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
            
            CacheManager.invalidate(getActionWeblog());
    //#Referrers.java:92: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#Referrers.java:92: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(Weblog)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(Weblog)
        } catch (Exception ex) {
            log.error("Error resetting referrers", ex);
    //#Referrers.java:94: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            // TODO: i18n
            addError("Error resetting referrers");
    //#Referrers.java:96: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String reset()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
        }
        
        return execute();
    //#Referrers.java:99: end of method: String org.apache.roller.weblogger.ui.struts2.editor.Referrers.reset()
    }
    
    
    /**
     * Remove selected referrers.
     */
    public String remove() {
        
        String[] removeIds = getRemoveIds();
    //#Referrers.java:108: method: String org.apache.roller.weblogger.ui.struts2.editor.Referrers.remove()
    //#input(String remove()): "Error getting referrer data for weblog - "._tainted
    //#input(String remove()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/Referrers]
    //#input(String remove()): __Descendant_Table[others]
    //#input(String remove()): __Dispatch_Table.execute()Ljava/lang/String;
    //#input(String remove()): __Dispatch_Table.getRemoveIds()[Ljava/lang/String;
    //#input(String remove()): __Dispatch_Table.setDayHits(I)V
    //#input(String remove()): __Dispatch_Table.setReferrers(Ljava/util/List;)V
    //#input(String remove()): log
    //#input(String remove()): this
    //#input(String remove()): this.__Tag
    //#input(String remove()): this.removeIds
    //#input(String remove()): this.removeIds.length
    //#input(String remove()): this.removeIds[0..4_294_967_295]
    //#output(String remove()): return_value
    //#output(String remove()): this.dayHits
    //#output(String remove()): this.referrers
    //#pre[5] (String remove()): this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/Referrers
    //#pre[6] (String remove()): init'ed(this.removeIds)
    //#pre[1] (String remove()): (soft) log != null
    //#pre[7] (String remove()): (soft) this.removeIds.length <= 4_294_967_295
    //#pre[8] (String remove()): (soft) init'ed(this.removeIds[0..4_294_967_295])
    //#presumption(String remove()): org.apache.roller.weblogger.business.Weblogger:getRefererManager(...)@110 != null
    //#presumption(String remove()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@110 != null
    //#presumption(String remove()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@124 != null
    //#presumption(String remove()): org.apache.roller.weblogger.business.referrers.RefererManager:getReferer(...)@115 != null
    //#presumption(String remove()): org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog(...)@118 != null
    //#post(String remove()): return_value == &"list"
    //#post(String remove()): possibly_updated(this.dayHits)
    //#post(String remove()): possibly_updated(this.referrers)
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.business.Weblogger:getRefererManager
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog
    //#unanalyzed(String remove()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.business.referrers.RefererManager:getDayHits
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.business.referrers.RefererManager:getTodaysReferers
    //#unanalyzed(String remove()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String remove()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.pojos.Weblog:getHandle
    //#unanalyzed(String remove()): Effects-of-calling:java.lang.StringBuilder:toString
    //#test_vector(String remove()): this.removeIds: Addr_Set{null}, Inverse{null}
    //#test_vector(String remove()): org.apache.roller.weblogger.pojos.Weblog:equals(...)@118: {0}, {1}
        if(removeIds != null) {
            RefererManager refmgr = WebloggerFactory.getWeblogger().getRefererManager();
    //#Referrers.java:110: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#Referrers.java:110: Warning: method not available
    //#    -- call on RefererManager org.apache.roller.weblogger.business.Weblogger:getRefererManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: RefererManager org.apache.roller.weblogger.business.Weblogger:getRefererManager()
            
            try {
                WeblogReferrer referer = null;
    //#Referrers.java:113: Warning: unused assignment
    //#    unused assignment into referer
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    Attribs:  Uncertain
                for (int i=0; i < removeIds.length; i++) {
                    referer = refmgr.getReferer(removeIds[i]);
    //#Referrers.java:115: Warning: method not available
    //#    -- call on WeblogReferrer org.apache.roller.weblogger.business.referrers.RefererManager:getReferer(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: WeblogReferrer org.apache.roller.weblogger.business.referrers.RefererManager:getReferer(String)
                    
                    // make sure referrer belongs to action weblog
                    if(getActionWeblog().equals(referer.getWebsite())) {
    //#Referrers.java:118: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#Referrers.java:118: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.pojos.WeblogReferrer:getWebsite()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.pojos.WeblogReferrer:getWebsite()
    //#Referrers.java:118: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.pojos.Weblog:equals(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: bool org.apache.roller.weblogger.pojos.Weblog:equals(Object)
                        refmgr.removeReferer(referer);
    //#Referrers.java:119: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.referrers.RefererManager:removeReferer(WeblogReferrer)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.referrers.RefererManager:removeReferer(WeblogReferrer)
                    }
                }
                
                // flush
                WebloggerFactory.getWeblogger().flush();
    //#Referrers.java:124: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#Referrers.java:124: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
                
                // notify caches
                CacheManager.invalidate(getActionWeblog());
    //#Referrers.java:127: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.struts2.editor.Referrers:getActionWeblog()
    //#Referrers.java:127: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(Weblog)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(Weblog)
                
                addMessage("referers.deletedReferers");
    //#Referrers.java:129: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addMessage(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addMessage(String)

            } catch (Exception ex) {
                log.error("Error removing referrers", ex);
    //#Referrers.java:132: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
                // TODO: i18n
                addError("Error removing referrers");
    //#Referrers.java:134: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
            }
        } else {
            addError("referers.noReferersSpecified");
    //#Referrers.java:137: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.Referrers:addError(String)
        }
        
        return execute();
    //#Referrers.java:140: end of method: String org.apache.roller.weblogger.ui.struts2.editor.Referrers.remove()
    }

    
    public List<WeblogReferrer> getReferrers() {
        return referrers;
    //#Referrers.java:145: method: List org.apache.roller.weblogger.ui.struts2.editor.Referrers.getReferrers()
    //#input(List getReferrers()): this
    //#input(List getReferrers()): this.referrers
    //#output(List getReferrers()): return_value
    //#pre[2] (List getReferrers()): init'ed(this.referrers)
    //#post(List getReferrers()): return_value == this.referrers
    //#post(List getReferrers()): init'ed(return_value)
    //#Referrers.java:145: end of method: List org.apache.roller.weblogger.ui.struts2.editor.Referrers.getReferrers()
    }

    public void setReferrers(List<WeblogReferrer> referrers) {
        this.referrers = referrers;
    //#Referrers.java:149: method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.setReferrers(List)
    //#input(void setReferrers(List)): referrers
    //#input(void setReferrers(List)): this
    //#output(void setReferrers(List)): this.referrers
    //#post(void setReferrers(List)): this.referrers == referrers
    //#post(void setReferrers(List)): init'ed(this.referrers)
    }
    //#Referrers.java:150: end of method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.setReferrers(List)

    public int getDayHits() {
        return dayHits;
    //#Referrers.java:153: method: int org.apache.roller.weblogger.ui.struts2.editor.Referrers.getDayHits()
    //#input(int getDayHits()): this
    //#input(int getDayHits()): this.dayHits
    //#output(int getDayHits()): return_value
    //#pre[2] (int getDayHits()): init'ed(this.dayHits)
    //#post(int getDayHits()): return_value == this.dayHits
    //#post(int getDayHits()): init'ed(return_value)
    //#Referrers.java:153: end of method: int org.apache.roller.weblogger.ui.struts2.editor.Referrers.getDayHits()
    }

    public void setDayHits(int dayHits) {
        this.dayHits = dayHits;
    //#Referrers.java:157: method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.setDayHits(int)
    //#input(void setDayHits(int)): dayHits
    //#input(void setDayHits(int)): this
    //#output(void setDayHits(int)): this.dayHits
    //#post(void setDayHits(int)): this.dayHits == dayHits
    //#post(void setDayHits(int)): init'ed(this.dayHits)
    }
    //#Referrers.java:158: end of method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.setDayHits(int)

    public String[] getRemoveIds() {
        return removeIds;
    //#Referrers.java:161: method: String[] org.apache.roller.weblogger.ui.struts2.editor.Referrers.getRemoveIds()
    //#input(String[] getRemoveIds()): this
    //#input(String[] getRemoveIds()): this.removeIds
    //#output(String[] getRemoveIds()): return_value
    //#pre[2] (String[] getRemoveIds()): init'ed(this.removeIds)
    //#post(String[] getRemoveIds()): return_value == this.removeIds
    //#post(String[] getRemoveIds()): init'ed(return_value)
    //#Referrers.java:161: end of method: String[] org.apache.roller.weblogger.ui.struts2.editor.Referrers.getRemoveIds()
    }

    public void setRemoveIds(String[] removeIds) {
        this.removeIds = removeIds;
    //#Referrers.java:165: method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.setRemoveIds(String[])
    //#input(void setRemoveIds(String[])): removeIds
    //#input(void setRemoveIds(String[])): this
    //#output(void setRemoveIds(String[])): this.removeIds
    //#post(void setRemoveIds(String[])): this.removeIds == removeIds
    //#post(void setRemoveIds(String[])): init'ed(this.removeIds)
    }
    //#Referrers.java:166: end of method: void org.apache.roller.weblogger.ui.struts2.editor.Referrers.setRemoveIds(String[])
    
}
    //#Referrers.java:: end of class: org.apache.roller.weblogger.ui.struts2.editor.Referrers
