//# 0 errors, 360 messages
//#
/*
    //#PlanetModel.java:1:1: class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
 * 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.rendering.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.planet.business.PlanetFactory;
import org.apache.roller.planet.business.PlanetManager;
import org.apache.roller.planet.pojos.Planet;
import org.apache.roller.planet.pojos.PlanetGroup;
import org.apache.roller.planet.pojos.Subscription;
import org.apache.roller.weblogger.business.URLStrategy;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.pojos.ThemeTemplate;
import org.apache.roller.weblogger.pojos.Weblog;
import org.apache.roller.weblogger.ui.rendering.pagers.Pager;
import org.apache.roller.weblogger.ui.rendering.pagers.PlanetEntriesPager;
import org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest;
import org.apache.roller.weblogger.ui.rendering.util.WeblogRequest;

/**
 * Model that provides access to planet aggregations, feeds and subscriptions.
 */
public class PlanetModel implements Model {
    //#PlanetModel.java:45: method: void org.apache.roller.weblogger.ui.rendering.model.PlanetModel.org.apache.roller.weblogger.ui.rendering.model.PlanetModel()
    //#input(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this
    //#output(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.pageLink
    //#output(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.pageNum
    //#output(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.urlStrategy
    //#output(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.weblog
    //#output(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.weblogRequest
    //#post(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.pageLink == null
    //#post(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.urlStrategy == null
    //#post(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.weblog == null
    //#post(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.weblogRequest == null
    //#post(void org.apache.roller.weblogger.ui.rendering.model.PlanetModel()): this.pageNum == 0
    
    public static final String DEFAULT_PLANET_HANDLE = "default";   
    
    private static Log log = LogFactory.getLog(PlanetModel.class);
    //#PlanetModel.java:49: method: org.apache.roller.weblogger.ui.rendering.model.PlanetModel.org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init
    //#PlanetModel.java:49: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PlanetModel]
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getAggregationPager(II)Lorg/apache/roller/weblogger/ui/rendering/pagers/Pager;
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getAggregationPager(Ljava/lang/String;II)Lorg/apache/roller/weblogger/ui/rendering/pagers/Pager;
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getFeedPager(Ljava/lang/String;I)Lorg/apache/roller/weblogger/ui/rendering/pagers/Pager;
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getModelName()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getRankedSubscriptions(II)Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getRankedSubscriptions(Ljava/lang/String;II)Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.init(Ljava/util/Map;)V
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): log
    //#output(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PlanetModel]
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PlanetModel] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PlanetModel] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getAggregationPager(II)Lorg/apache/roller/weblogger/ui/rendering/pagers/Pager; == &getAggregationPager
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getAggregationPager(Ljava/lang/String;II)Lorg/apache/roller/weblogger/ui/rendering/pagers/Pager; == &getAggregationPager
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getFeedPager(Ljava/lang/String;I)Lorg/apache/roller/weblogger/ui/rendering/pagers/Pager; == &getFeedPager
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getModelName()Ljava/lang/String; == &getModelName
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getRankedSubscriptions(II)Ljava/util/List; == &getRankedSubscriptions
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.getRankedSubscriptions(Ljava/lang/String;II)Ljava/util/List; == &getRankedSubscriptions
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): __Dispatch_Table.init(Ljava/util/Map;)V == &init
    //#post(org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init): init'ed(log)
    //#PlanetModel.java:49: end of method: org.apache.roller.weblogger.ui.rendering.model.PlanetModel.org.apache.roller.weblogger.ui.rendering.model.PlanetModel__static_init
    
    private WeblogRequest  weblogRequest = null;
    private URLStrategy urlStrategy = null;
    private String pageLink = null;
    private int            pageNum = 0;
    private Weblog    weblog = null;
    //#PlanetModel.java:55: end of method: void org.apache.roller.weblogger.ui.rendering.model.PlanetModel.org.apache.roller.weblogger.ui.rendering.model.PlanetModel()
    
    
    public String getModelName() {
        return "planet";
    //#PlanetModel.java:59: method: String org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getModelName()
    //#output(String getModelName()): return_value
    //#post(String getModelName()): return_value == &"planet"
    //#PlanetModel.java:59: end of method: String org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getModelName()
    }
    
    public void init(Map initData) throws WebloggerException {
        
        // we expect the init data to contain a weblogRequest object
        this.weblogRequest = (WeblogRequest) initData.get("parsedRequest");
    //#PlanetModel.java:65: method: void org.apache.roller.weblogger.ui.rendering.model.PlanetModel.init(Map)
    //#input(void init(Map)): initData
    //#input(void init(Map)): this
    //#output(void init(Map)): this.pageLink
    //#output(void init(Map)): this.pageNum
    //#output(void init(Map)): this.urlStrategy
    //#output(void init(Map)): this.weblog
    //#output(void init(Map)): this.weblogRequest
    //#pre[1] (void init(Map)): initData != null
    //#presumption(void init(Map)): java.util.Map:get(...)@65 != null
    //#presumption(void init(Map)): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@79 != null
    //#post(void init(Map)): possibly_updated(this.pageLink)
    //#post(void init(Map)): possibly_updated(this.pageNum)
    //#post(void init(Map)): init'ed(this.urlStrategy)
    //#post(void init(Map)): init'ed(this.weblog)
    //#post(void init(Map)): (soft) this.weblogRequest != null
    //#test_vector(void init(Map)): java.util.Map:get(...)@77: Inverse{null}, Addr_Set{null}
    //#test_vector(void init(Map)): org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest:instanceof(...)@70: {0}, {1}
        if(this.weblogRequest == null) {
            throw new WebloggerException("expected weblogRequest from init data");
        }
        
        if (weblogRequest instanceof WeblogPageRequest) {
            ThemeTemplate weblogPage = ((WeblogPageRequest)weblogRequest).getWeblogPage();
    //#PlanetModel.java:71: Warning: method not available
    //#    -- call on ThemeTemplate org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest:getWeblogPage()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: void init(Map)
    //#    unanalyzed callee: ThemeTemplate org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest:getWeblogPage()
            pageLink = (weblogPage != null) ? weblogPage.getLink() : null;
    //#PlanetModel.java:72: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.ThemeTemplate:getLink()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: void init(Map)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.ThemeTemplate:getLink()
            pageNum = ((WeblogPageRequest)weblogRequest).getPageNum();
    //#PlanetModel.java:73: Warning: method not available
    //#    -- call on int org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest:getPageNum()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: void init(Map)
    //#    unanalyzed callee: int org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest:getPageNum()
        }  
        
        // look for url strategy
        urlStrategy = (URLStrategy) initData.get("urlStrategy");
        if(urlStrategy == null) {
            urlStrategy = WebloggerFactory.getWeblogger().getUrlStrategy();
    //#PlanetModel.java:79: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: void init(Map)
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#PlanetModel.java:79: Warning: method not available
    //#    -- call on URLStrategy org.apache.roller.weblogger.business.Weblogger:getUrlStrategy()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: void init(Map)
    //#    unanalyzed callee: URLStrategy org.apache.roller.weblogger.business.Weblogger:getUrlStrategy()
        }
        
        // extract weblog object
        weblog = weblogRequest.getWeblog();
    //#PlanetModel.java:83: Warning: method not available
    //#    -- call on Weblog org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getWeblog()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: void init(Map)
    //#    unanalyzed callee: Weblog org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getWeblog()
    } 
    //#PlanetModel.java:84: end of method: void org.apache.roller.weblogger.ui.rendering.model.PlanetModel.init(Map)
    
    
    /**
     * Get pager for PlanetEntry objects from 'all' and
     * 'exernal' Planet groups. in reverse chrono order.
     * @param offset   Offset into results (for paging)
     * @param len      Max number of results to return
     */
    public Pager getAggregationPager(int sinceDays, int length) {
        
        String pagerUrl = urlStrategy.getWeblogPageURL(weblog, 
    //#PlanetModel.java:95: method: Pager org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getAggregationPager(int, int)
    //#PlanetModel.java:95: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getAggregationPager(int, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#PlanetModel.java:95: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.business.URLStrategy:getWeblogPageURL(Weblog, String, String, String, String, String, List, int, bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getAggregationPager(int, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.business.URLStrategy:getWeblogPageURL(Weblog, String, String, String, String, String, List, int, bool)
    //#input(Pager getAggregationPager(int, int)): length
    //#input(Pager getAggregationPager(int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager]
    //#input(Pager getAggregationPager(int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Descendant_Table[others]
    //#input(Pager getAggregationPager(int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Dispatch_Table.getItems()Ljava/util/List;
    //#input(Pager getAggregationPager(int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Dispatch_Table.getPage()I
    //#input(Pager getAggregationPager(int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.log
    //#input(Pager getAggregationPager(int, int)): sinceDays
    //#input(Pager getAggregationPager(int, int)): this
    //#input(Pager getAggregationPager(int, int)): this.pageLink
    //#input(Pager getAggregationPager(int, int)): this.pageNum
    //#input(Pager getAggregationPager(int, int)): this.urlStrategy
    //#input(Pager getAggregationPager(int, int)): this.weblog
    //#input(Pager getAggregationPager(int, int)): this.weblogRequest
    //#output(Pager getAggregationPager(int, int)): new ArrayList(getItems#2) num objects
    //#output(Pager getAggregationPager(int, int)): new PlanetEntriesPager(getAggregationPager#1) num objects
    //#output(Pager getAggregationPager(int, int)): return_value.__Tag
    //#output(Pager getAggregationPager(int, int)): return_value.entries
    //#output(Pager getAggregationPager(int, int)): return_value.feedURL
    //#output(Pager getAggregationPager(int, int)): return_value.groupHandle
    //#output(Pager getAggregationPager(int, int)): return_value.length
    //#output(Pager getAggregationPager(int, int)): return_value.locale
    //#output(Pager getAggregationPager(int, int)): return_value.more
    //#output(Pager getAggregationPager(int, int)): return_value.page
    //#output(Pager getAggregationPager(int, int)): return_value.sinceDays
    //#output(Pager getAggregationPager(int, int)): return_value.url
    //#output(Pager getAggregationPager(int, int)): return_value.urlStrategy
    //#output(Pager getAggregationPager(int, int)): return_value
    //#new obj(Pager getAggregationPager(int, int)): new ArrayList(getItems#2)
    //#new obj(Pager getAggregationPager(int, int)): new PlanetEntriesPager(getAggregationPager#1)
    //#pre[5] (Pager getAggregationPager(int, int)): init'ed(this.pageLink)
    //#pre[6] (Pager getAggregationPager(int, int)): init'ed(this.pageNum)
    //#pre[7] (Pager getAggregationPager(int, int)): this.urlStrategy != null
    //#pre[8] (Pager getAggregationPager(int, int)): init'ed(this.weblog)
    //#pre[9] (Pager getAggregationPager(int, int)): this.weblogRequest != null
    //#pre[1] (Pager getAggregationPager(int, int)): (soft) length <= 4_294_967_294
    //#pre[2] (Pager getAggregationPager(int, int)): (soft) org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.log != null
    //#pre[3] (Pager getAggregationPager(int, int)): (soft) sinceDays <= 2_147_483_648
    //#post(Pager getAggregationPager(int, int)): return_value == &new PlanetEntriesPager(getAggregationPager#1)
    //#post(Pager getAggregationPager(int, int)): new ArrayList(getItems#2) num objects == 1
    //#post(Pager getAggregationPager(int, int)): new PlanetEntriesPager(getAggregationPager#1) num objects == 1
    //#post(Pager getAggregationPager(int, int)): return_value.__Tag == org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager
    //#post(Pager getAggregationPager(int, int)): return_value.entries == &new ArrayList(getItems#2)
    //#post(Pager getAggregationPager(int, int)): return_value.feedURL == null
    //#post(Pager getAggregationPager(int, int)): return_value.groupHandle == null
    //#post(Pager getAggregationPager(int, int)): return_value.length == length
    //#post(Pager getAggregationPager(int, int)): (soft) return_value.length <= 4_294_967_294
    //#post(Pager getAggregationPager(int, int)): init'ed(return_value.locale)
    //#post(Pager getAggregationPager(int, int)): init'ed(return_value.more)
    //#post(Pager getAggregationPager(int, int)): return_value.page == One-of{0, this.pageNum}
    //#post(Pager getAggregationPager(int, int)): return_value.page >= 0
    //#post(Pager getAggregationPager(int, int)): return_value.sinceDays == sinceDays
    //#post(Pager getAggregationPager(int, int)): (soft) return_value.sinceDays <= 2_147_483_648
    //#post(Pager getAggregationPager(int, int)): init'ed(return_value.url)
    //#post(Pager getAggregationPager(int, int)): return_value.urlStrategy == this.urlStrategy
    //#post(Pager getAggregationPager(int, int)): return_value.urlStrategy != null
    //#post(Pager getAggregationPager(int, int)): length*return_value.page in -2_147_483_648..4_294_967_295
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:getPage
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.Calendar:getInstance
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.Date
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.Calendar:setTime
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.Calendar:add
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.Calendar:getTime
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetFactory:getPlanet
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.roller.planet.business.Planet:getPlanetManager
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getPlanet
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getSubscription
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getEntries
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getGroup
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.util.List:add
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(Pager getAggregationPager(int, int)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.pagers.AbstractPager
                weblogRequest.getLocale(), pageLink, 
                null, null, null, null, 0, false);
        
        return new PlanetEntriesPager(
    //#PlanetModel.java:99: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getAggregationPager(int, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#PlanetModel.java:99: end of method: Pager org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getAggregationPager(int, int)
            urlStrategy,
            null,
            null,    
            pagerUrl,
            weblogRequest.getLocale(),
            sinceDays,
            pageNum, 
            length);
    }
    
    
    /**
     * Get pager for WeblogEntry objects from specified
     * Planet groups in reverse chrono order.
     * @param offset   Offset into results (for paging)
     * @param len      Max number of results to return
     */
    public Pager getAggregationPager(String groupHandle, int sinceDays, int length) {
        
        String pagerUrl = urlStrategy.getWeblogPageURL(weblog, 
    //#PlanetModel.java:119: method: Pager org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getAggregationPager(String, int, int)
    //#PlanetModel.java:119: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getAggregationPager(String, int, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#PlanetModel.java:119: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.business.URLStrategy:getWeblogPageURL(Weblog, String, String, String, String, String, List, int, bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getAggregationPager(String, int, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.business.URLStrategy:getWeblogPageURL(Weblog, String, String, String, String, String, List, int, bool)
    //#input(Pager getAggregationPager(String, int, int)): groupHandle
    //#input(Pager getAggregationPager(String, int, int)): length
    //#input(Pager getAggregationPager(String, int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager]
    //#input(Pager getAggregationPager(String, int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Descendant_Table[others]
    //#input(Pager getAggregationPager(String, int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Dispatch_Table.getItems()Ljava/util/List;
    //#input(Pager getAggregationPager(String, int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Dispatch_Table.getPage()I
    //#input(Pager getAggregationPager(String, int, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.log
    //#input(Pager getAggregationPager(String, int, int)): sinceDays
    //#input(Pager getAggregationPager(String, int, int)): this
    //#input(Pager getAggregationPager(String, int, int)): this.pageLink
    //#input(Pager getAggregationPager(String, int, int)): this.pageNum
    //#input(Pager getAggregationPager(String, int, int)): this.urlStrategy
    //#input(Pager getAggregationPager(String, int, int)): this.weblog
    //#input(Pager getAggregationPager(String, int, int)): this.weblogRequest
    //#output(Pager getAggregationPager(String, int, int)): new ArrayList(getItems#2) num objects
    //#output(Pager getAggregationPager(String, int, int)): new PlanetEntriesPager(getAggregationPager#1) num objects
    //#output(Pager getAggregationPager(String, int, int)): return_value.__Tag
    //#output(Pager getAggregationPager(String, int, int)): return_value.entries
    //#output(Pager getAggregationPager(String, int, int)): return_value.feedURL
    //#output(Pager getAggregationPager(String, int, int)): return_value.groupHandle
    //#output(Pager getAggregationPager(String, int, int)): return_value.length
    //#output(Pager getAggregationPager(String, int, int)): return_value.locale
    //#output(Pager getAggregationPager(String, int, int)): return_value.more
    //#output(Pager getAggregationPager(String, int, int)): return_value.page
    //#output(Pager getAggregationPager(String, int, int)): return_value.sinceDays
    //#output(Pager getAggregationPager(String, int, int)): return_value.url
    //#output(Pager getAggregationPager(String, int, int)): return_value.urlStrategy
    //#output(Pager getAggregationPager(String, int, int)): return_value
    //#new obj(Pager getAggregationPager(String, int, int)): new ArrayList(getItems#2)
    //#new obj(Pager getAggregationPager(String, int, int)): new PlanetEntriesPager(getAggregationPager#1)
    //#pre[6] (Pager getAggregationPager(String, int, int)): init'ed(this.pageLink)
    //#pre[7] (Pager getAggregationPager(String, int, int)): init'ed(this.pageNum)
    //#pre[8] (Pager getAggregationPager(String, int, int)): this.urlStrategy != null
    //#pre[9] (Pager getAggregationPager(String, int, int)): init'ed(this.weblog)
    //#pre[10] (Pager getAggregationPager(String, int, int)): this.weblogRequest != null
    //#pre[2] (Pager getAggregationPager(String, int, int)): (soft) length <= 4_294_967_294
    //#pre[3] (Pager getAggregationPager(String, int, int)): (soft) org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.log != null
    //#pre[4] (Pager getAggregationPager(String, int, int)): (soft) sinceDays <= 2_147_483_648
    //#post(Pager getAggregationPager(String, int, int)): return_value == &new PlanetEntriesPager(getAggregationPager#1)
    //#post(Pager getAggregationPager(String, int, int)): new ArrayList(getItems#2) num objects == 1
    //#post(Pager getAggregationPager(String, int, int)): new PlanetEntriesPager(getAggregationPager#1) num objects == 1
    //#post(Pager getAggregationPager(String, int, int)): return_value.__Tag == org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager
    //#post(Pager getAggregationPager(String, int, int)): return_value.entries == &new ArrayList(getItems#2)
    //#post(Pager getAggregationPager(String, int, int)): return_value.feedURL == null
    //#post(Pager getAggregationPager(String, int, int)): return_value.groupHandle == groupHandle
    //#post(Pager getAggregationPager(String, int, int)): init'ed(return_value.groupHandle)
    //#post(Pager getAggregationPager(String, int, int)): return_value.length == length
    //#post(Pager getAggregationPager(String, int, int)): (soft) return_value.length <= 4_294_967_294
    //#post(Pager getAggregationPager(String, int, int)): init'ed(return_value.locale)
    //#post(Pager getAggregationPager(String, int, int)): init'ed(return_value.more)
    //#post(Pager getAggregationPager(String, int, int)): return_value.page == One-of{0, this.pageNum}
    //#post(Pager getAggregationPager(String, int, int)): return_value.page >= 0
    //#post(Pager getAggregationPager(String, int, int)): return_value.sinceDays == sinceDays
    //#post(Pager getAggregationPager(String, int, int)): (soft) return_value.sinceDays <= 2_147_483_648
    //#post(Pager getAggregationPager(String, int, int)): init'ed(return_value.url)
    //#post(Pager getAggregationPager(String, int, int)): return_value.urlStrategy == this.urlStrategy
    //#post(Pager getAggregationPager(String, int, int)): return_value.urlStrategy != null
    //#post(Pager getAggregationPager(String, int, int)): length*return_value.page in -2_147_483_648..4_294_967_295
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:getPage
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.Calendar:getInstance
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.Date
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.Calendar:setTime
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.Calendar:add
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.Calendar:getTime
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetFactory:getPlanet
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.roller.planet.business.Planet:getPlanetManager
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getPlanet
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getSubscription
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getEntries
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getGroup
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.util.List:add
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(Pager getAggregationPager(String, int, int)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.pagers.AbstractPager
                weblogRequest.getLocale(), pageLink, 
                null, null, null, null, 0, false);
        
        return new PlanetEntriesPager(
    //#PlanetModel.java:123: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getAggregationPager(String, int, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#PlanetModel.java:123: end of method: Pager org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getAggregationPager(String, int, int)
            urlStrategy,
            null,
            groupHandle,
            pagerUrl,
            weblogRequest.getLocale(),
            sinceDays,
            pageNum, 
            length);
    }
    
    
    /**
     * Get pager for WeblogEntry objects from specified
     * Planet feed in reverse chrono order.
     * @param offset   Offset into results (for paging)
     * @param len      Max number of results to return
     */
    public Pager getFeedPager(String feedURL, int length) {
        
        String pagerUrl = urlStrategy.getWeblogPageURL(weblog, 
    //#PlanetModel.java:143: method: Pager org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getFeedPager(String, int)
    //#PlanetModel.java:143: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getFeedPager(String, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#PlanetModel.java:143: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.business.URLStrategy:getWeblogPageURL(Weblog, String, String, String, String, String, List, int, bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getFeedPager(String, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.business.URLStrategy:getWeblogPageURL(Weblog, String, String, String, String, String, List, int, bool)
    //#input(Pager getFeedPager(String, int)): feedURL
    //#input(Pager getFeedPager(String, int)): length
    //#input(Pager getFeedPager(String, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager]
    //#input(Pager getFeedPager(String, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Descendant_Table[others]
    //#input(Pager getFeedPager(String, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Dispatch_Table.getItems()Ljava/util/List;
    //#input(Pager getFeedPager(String, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.__Dispatch_Table.getPage()I
    //#input(Pager getFeedPager(String, int)): org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.log
    //#input(Pager getFeedPager(String, int)): this
    //#input(Pager getFeedPager(String, int)): this.pageLink
    //#input(Pager getFeedPager(String, int)): this.pageNum
    //#input(Pager getFeedPager(String, int)): this.urlStrategy
    //#input(Pager getFeedPager(String, int)): this.weblog
    //#input(Pager getFeedPager(String, int)): this.weblogRequest
    //#output(Pager getFeedPager(String, int)): new ArrayList(getItems#2) num objects
    //#output(Pager getFeedPager(String, int)): new PlanetEntriesPager(getFeedPager#1) num objects
    //#output(Pager getFeedPager(String, int)): return_value.__Tag
    //#output(Pager getFeedPager(String, int)): return_value.entries
    //#output(Pager getFeedPager(String, int)): return_value.feedURL
    //#output(Pager getFeedPager(String, int)): return_value.groupHandle
    //#output(Pager getFeedPager(String, int)): return_value.length
    //#output(Pager getFeedPager(String, int)): return_value.locale
    //#output(Pager getFeedPager(String, int)): return_value.more
    //#output(Pager getFeedPager(String, int)): return_value.page
    //#output(Pager getFeedPager(String, int)): return_value.sinceDays
    //#output(Pager getFeedPager(String, int)): return_value.url
    //#output(Pager getFeedPager(String, int)): return_value.urlStrategy
    //#output(Pager getFeedPager(String, int)): return_value
    //#new obj(Pager getFeedPager(String, int)): new ArrayList(getItems#2)
    //#new obj(Pager getFeedPager(String, int)): new PlanetEntriesPager(getFeedPager#1)
    //#pre[5] (Pager getFeedPager(String, int)): init'ed(this.pageLink)
    //#pre[6] (Pager getFeedPager(String, int)): init'ed(this.pageNum)
    //#pre[7] (Pager getFeedPager(String, int)): this.urlStrategy != null
    //#pre[8] (Pager getFeedPager(String, int)): init'ed(this.weblog)
    //#pre[9] (Pager getFeedPager(String, int)): this.weblogRequest != null
    //#pre[2] (Pager getFeedPager(String, int)): (soft) length <= 4_294_967_294
    //#pre[3] (Pager getFeedPager(String, int)): (soft) org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.log != null
    //#post(Pager getFeedPager(String, int)): return_value == &new PlanetEntriesPager(getFeedPager#1)
    //#post(Pager getFeedPager(String, int)): new ArrayList(getItems#2) num objects == 1
    //#post(Pager getFeedPager(String, int)): new PlanetEntriesPager(getFeedPager#1) num objects == 1
    //#post(Pager getFeedPager(String, int)): return_value.__Tag == org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager
    //#post(Pager getFeedPager(String, int)): return_value.entries == &new ArrayList(getItems#2)
    //#post(Pager getFeedPager(String, int)): return_value.feedURL == feedURL
    //#post(Pager getFeedPager(String, int)): init'ed(return_value.feedURL)
    //#post(Pager getFeedPager(String, int)): return_value.groupHandle == null
    //#post(Pager getFeedPager(String, int)): return_value.length == length
    //#post(Pager getFeedPager(String, int)): (soft) return_value.length <= 4_294_967_294
    //#post(Pager getFeedPager(String, int)): init'ed(return_value.locale)
    //#post(Pager getFeedPager(String, int)): init'ed(return_value.more)
    //#post(Pager getFeedPager(String, int)): return_value.page == One-of{0, this.pageNum}
    //#post(Pager getFeedPager(String, int)): return_value.page >= 0
    //#post(Pager getFeedPager(String, int)): return_value.sinceDays == -1
    //#post(Pager getFeedPager(String, int)): init'ed(return_value.url)
    //#post(Pager getFeedPager(String, int)): return_value.urlStrategy == this.urlStrategy
    //#post(Pager getFeedPager(String, int)): return_value.urlStrategy != null
    //#post(Pager getFeedPager(String, int)): length*return_value.page in -2_147_483_648..4_294_967_295
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:getPage
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.Calendar:getInstance
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.Date
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.Calendar:setTime
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.Calendar:add
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.Calendar:getTime
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetFactory:getPlanet
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.roller.planet.business.Planet:getPlanetManager
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getPlanet
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getSubscription
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getEntries
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getGroup
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.util.List:add
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(Pager getFeedPager(String, int)): Effects-of-calling:org.apache.roller.weblogger.ui.rendering.pagers.AbstractPager
                weblogRequest.getLocale(), pageLink, 
                null, null, null, null, 0, false);
        
        return new PlanetEntriesPager(
    //#PlanetModel.java:147: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: Pager getFeedPager(String, int)
    //#    unanalyzed callee: String org.apache.roller.weblogger.ui.rendering.util.WeblogRequest:getLocale()
    //#PlanetModel.java:147: end of method: Pager org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getFeedPager(String, int)
            urlStrategy,
            feedURL,
            null,
            pagerUrl,
            weblogRequest.getLocale(),
            -1,
            pageNum, 
            length);
    }
    
    
    /**
     * Get PlanetSubscription objects in descending order by Planet ranking.
     * @param sinceDays Only consider weblogs updated in the last sinceDays
     * @param offset   Offset into results (for paging)
     * @param len      Max number of results to return
     */
    public List getRankedSubscriptions(int sinceDays, int length) {
        return getRankedSubscriptions(null, sinceDays, length);
    //#PlanetModel.java:166: method: List org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getRankedSubscriptions(int, int)
    //#input(List getRankedSubscriptions(int, int)): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PlanetModel]
    //#input(List getRankedSubscriptions(int, int)): __Descendant_Table[others]
    //#input(List getRankedSubscriptions(int, int)): __Dispatch_Table.getRankedSubscriptions(Ljava/lang/String;II)Ljava/util/List;
    //#input(List getRankedSubscriptions(int, int)): length
    //#input(List getRankedSubscriptions(int, int)): log
    //#input(List getRankedSubscriptions(int, int)): sinceDays
    //#input(List getRankedSubscriptions(int, int)): this
    //#input(List getRankedSubscriptions(int, int)): this.__Tag
    //#output(List getRankedSubscriptions(int, int)): new ArrayList(getRankedSubscriptions#1*) num objects
    //#output(List getRankedSubscriptions(int, int)): return_value
    //#new obj(List getRankedSubscriptions(int, int)): new ArrayList(getRankedSubscriptions#1*)
    //#pre[5] (List getRankedSubscriptions(int, int)): this.__Tag == org/apache/roller/weblogger/ui/rendering/model/PlanetModel
    //#pre[2] (List getRankedSubscriptions(int, int)): (soft) log != null
    //#post(List getRankedSubscriptions(int, int)): return_value == &new ArrayList(getRankedSubscriptions#1*)
    //#post(List getRankedSubscriptions(int, int)): new ArrayList(getRankedSubscriptions#1*) num objects == 1
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetFactory:getPlanet
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:org.apache.roller.planet.business.Planet:getPlanetManager
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getPlanet
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getGroup
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:org.apache.roller.planet.business.PlanetManager:getTopSubscriptions
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:java.util.List:add
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(List getRankedSubscriptions(int, int)): Effects-of-calling:org.apache.commons.logging.Log:error
    //#PlanetModel.java:166: end of method: List org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getRankedSubscriptions(int, int)
    }
    
    
    /**
     * Get PlanetSubscription objects in descending order by Planet ranking.
     * @param groupHandle Only consider weblogs updated in the last sinceDays
     * @param sinceDays   Only consider weblogs updated in the last sinceDays
     * @param offset      Offset into results (for paging)
     * @param len         Max number of results to return
     */
    public List getRankedSubscriptions(String groupHandle, int sinceDays, int length) {
        List list = new ArrayList();
    //#PlanetModel.java:178: method: List org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getRankedSubscriptions(String, int, int)
    //#input(List getRankedSubscriptions(String, int, int)): groupHandle
    //#input(List getRankedSubscriptions(String, int, int)): length
    //#input(List getRankedSubscriptions(String, int, int)): log
    //#output(List getRankedSubscriptions(String, int, int)): new ArrayList(getRankedSubscriptions#1) num objects
    //#output(List getRankedSubscriptions(String, int, int)): return_value
    //#new obj(List getRankedSubscriptions(String, int, int)): new ArrayList(getRankedSubscriptions#1)
    //#pre[3] (List getRankedSubscriptions(String, int, int)): (soft) log != null
    //#presumption(List getRankedSubscriptions(String, int, int)): org.apache.roller.planet.business.Planet:getPlanetManager(...)@180 != null
    //#presumption(List getRankedSubscriptions(String, int, int)): org.apache.roller.planet.business.PlanetFactory:getPlanet(...)@180 != null
    //#presumption(List getRankedSubscriptions(String, int, int)): org.apache.roller.planet.business.PlanetManager:getTopSubscriptions(...)@183 != null
    //#post(List getRankedSubscriptions(String, int, int)): return_value == &new ArrayList(getRankedSubscriptions#1)
    //#post(List getRankedSubscriptions(String, int, int)): new ArrayList(getRankedSubscriptions#1) num objects == 1
        try {
            PlanetManager planetManager = PlanetFactory.getPlanet().getPlanetManager();
    //#PlanetModel.java:180: Warning: method not available
    //#    -- call on Planet org.apache.roller.planet.business.PlanetFactory:getPlanet()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: List getRankedSubscriptions(String, int, int)
    //#    unanalyzed callee: Planet org.apache.roller.planet.business.PlanetFactory:getPlanet()
    //#PlanetModel.java:180: Warning: method not available
    //#    -- call on PlanetManager org.apache.roller.planet.business.Planet:getPlanetManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: List getRankedSubscriptions(String, int, int)
    //#    unanalyzed callee: PlanetManager org.apache.roller.planet.business.Planet:getPlanetManager()
            Planet defaultPlanet = planetManager.getPlanet(DEFAULT_PLANET_HANDLE);
    //#PlanetModel.java:181: Warning: method not available
    //#    -- call on Planet org.apache.roller.planet.business.PlanetManager:getPlanet(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: List getRankedSubscriptions(String, int, int)
    //#    unanalyzed callee: Planet org.apache.roller.planet.business.PlanetManager:getPlanet(String)
            PlanetGroup planetGroup = planetManager.getGroup(defaultPlanet, groupHandle);
    //#PlanetModel.java:182: Warning: method not available
    //#    -- call on PlanetGroup org.apache.roller.planet.business.PlanetManager:getGroup(Planet, String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: List getRankedSubscriptions(String, int, int)
    //#    unanalyzed callee: PlanetGroup org.apache.roller.planet.business.PlanetManager:getGroup(Planet, String)
            List subs = planetManager.getTopSubscriptions(planetGroup, 0, length);
    //#PlanetModel.java:183: Warning: method not available
    //#    -- call on List org.apache.roller.planet.business.PlanetManager:getTopSubscriptions(PlanetGroup, int, int)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: List getRankedSubscriptions(String, int, int)
    //#    unanalyzed callee: List org.apache.roller.planet.business.PlanetManager:getTopSubscriptions(PlanetGroup, int, int)
            for (Iterator it = subs.iterator(); it.hasNext();) {
                Subscription sub = (Subscription) it.next();
                // TODO needs pojo wrapping from planet
                list.add(sub); 
            }
        } catch (Exception e) {
            log.error("ERROR: get ranked blogs", e);
    //#PlanetModel.java:190: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
    //#    method: List getRankedSubscriptions(String, int, int)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
        }
        return list;
    //#PlanetModel.java:192: end of method: List org.apache.roller.weblogger.ui.rendering.model.PlanetModel.getRankedSubscriptions(String, int, int)
    }
    
}
    //#PlanetModel.java:: end of class: org.apache.roller.weblogger.ui.rendering.model.PlanetModel
