//# 0 errors, 176 messages
//#
/*
    //#ModelLoader.java:1:1: class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
 * 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.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.business.URLStrategy;
import org.apache.roller.weblogger.config.WebloggerConfig;
import org.apache.roller.weblogger.pojos.Weblog;
import org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest;
import org.apache.roller.weblogger.ui.rendering.velocity.deprecated.ContextLoader;
import org.apache.roller.weblogger.util.Utilities;


/**
 * Helps with model loading process.
 */
public class ModelLoader {
    //#ModelLoader.java:39: method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.org.apache.roller.weblogger.ui.rendering.model.ModelLoader()
    //#ModelLoader.java:39: end of method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.org.apache.roller.weblogger.ui.rendering.model.ModelLoader()
    
    private static Log log = LogFactory.getLog(ModelLoader.class);
    //#ModelLoader.java:41: method: org.apache.roller.weblogger.ui.rendering.model.ModelLoader.org.apache.roller.weblogger.ui.rendering.model.ModelLoader__static_init
    //#ModelLoader.java:41: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: org.apache.roller.weblogger.ui.rendering.model.ModelLoader__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.rendering.model.ModelLoader__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/ModelLoader]
    //#output(org.apache.roller.weblogger.ui.rendering.model.ModelLoader__static_init): log
    //#post(org.apache.roller.weblogger.ui.rendering.model.ModelLoader__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/ModelLoader] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.model.ModelLoader__static_init): init'ed(log)
    //#ModelLoader.java:41: end of method: org.apache.roller.weblogger.ui.rendering.model.ModelLoader.org.apache.roller.weblogger.ui.rendering.model.ModelLoader__static_init
    
    
    /**
     * Load old page models, but only if they are enabled.
     */
    public static void loadOldModels(
            Map model,
            HttpServletRequest  request,
            HttpServletResponse response,
            PageContext pageContext,
            WeblogPageRequest pageRequest,
            URLStrategy urlStrategy) throws WebloggerException {
        
        // Only load old models if it's enabled     
        if (WebloggerConfig.getBooleanProperty("rendering.legacyModels.enabled")) { 
    //#ModelLoader.java:56: method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)
    //#ModelLoader.java:56: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)
    //#    unanalyzed callee: bool org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(String)
    //#input(void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)): model
    //#input(void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)): pageContext
    //#input(void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)): pageRequest
    //#input(void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)): request
    //#input(void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)): response
    //#input(void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)): urlStrategy
    //#test_vector(void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)): org.apache.roller.weblogger.config.WebloggerConfig:getBooleanProperty(...)@56: {0}, {1}
            ContextLoader.setupContext(model, request, response, pageContext, pageRequest, urlStrategy);            
    //#ModelLoader.java:57: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.ContextLoader:setupContext(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.ContextLoader:setupContext(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)
        }
    }
    //#ModelLoader.java:59: end of method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.loadOldModels(Map, HttpServletRequest, HttpServletResponse, PageContext, WeblogPageRequest, URLStrategy)
    
    
    /**
     * Load set of custom models set for the given weblog.
     *
     * Does not fail if there is a problem with one of the models.
     */
    public static void loadCustomModels(Weblog weblog, Map model, Map initData) {
        
        if (weblog.getPageModels() != null) {
    //#ModelLoader.java:69: method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.loadCustomModels(Weblog, Map, Map)
    //#ModelLoader.java:69: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.Weblog:getPageModels()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadCustomModels(Weblog, Map, Map)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.Weblog:getPageModels()
    //#input(void loadCustomModels(Weblog, Map, Map)): "Error accessing model: "._tainted
    //#input(void loadCustomModels(Weblog, Map, Map)): "Error finding model: "._tainted
    //#input(void loadCustomModels(Weblog, Map, Map)): "Error initializing model: "._tainted
    //#input(void loadCustomModels(Weblog, Map, Map)): "Error insantiating model: "._tainted
    //#input(void loadCustomModels(Weblog, Map, Map)): initData
    //#input(void loadCustomModels(Weblog, Map, Map)): log
    //#input(void loadCustomModels(Weblog, Map, Map)): model
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/CalendarModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/CalendarModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/ConfigModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/ConfigModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/FeedModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/FeedModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/MenuModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/MenuModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/MessageModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/MessageModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/CalendarModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/ConfigModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/FeedModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/MenuModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/MessageModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/Model]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PageModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PlanetModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PreviewPageModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/SiteModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/URLModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[others]
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/Model.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PageModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PageModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PlanetModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PlanetModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PreviewPageModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PreviewPageModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/SiteModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/SiteModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/URLModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/URLModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadCustomModels(Weblog, Map, Map)): org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadCustomModels(Weblog, Map, Map)): weblog
    //#pre[4] (void loadCustomModels(Weblog, Map, Map)): weblog != null
    //#pre[2] (void loadCustomModels(Weblog, Map, Map)): (soft) log != null
    //#pre[3] (void loadCustomModels(Weblog, Map, Map)): (soft) model != null
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.util.StringTokenizer
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.util.StringTokenizer:countTokens
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.util.StringTokenizer:hasMoreTokens
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.util.StringTokenizer:nextToken
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.lang.Class:forName
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.lang.Class:newInstance
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:init
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:getModelName
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:org.apache.commons.logging.Log:warn
    //#unanalyzed(void loadCustomModels(Weblog, Map, Map)): Effects-of-calling:org.apache.roller.weblogger.WebloggerException
    //#test_vector(void loadCustomModels(Weblog, Map, Map)): org.apache.roller.weblogger.pojos.Weblog:getPageModels(...)@69: Addr_Set{null}, Inverse{null}
            try {
                loadModels(weblog.getPageModels(), model, initData, false);
    //#ModelLoader.java:71: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.Weblog:getPageModels()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadCustomModels(Weblog, Map, Map)
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.Weblog:getPageModels()
            } catch(WebloggerException ex) {
                // shouldn't happen, but log it just in case
                log.error("Error loading weblog custom models", ex);
    //#ModelLoader.java:74: 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.ModelLoader
    //#    method: void loadCustomModels(Weblog, Map, Map)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            }
        }     
    }
    //#ModelLoader.java:77: end of method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.loadCustomModels(Weblog, Map, Map)
    
    
    /**
     * Convenience method to load a comma-separated list of page models.
     *
     * Optionally fails if any exceptions are thrown when initializing
     * the Model instances.
     */
    public static void loadModels(String modelsString, Map model, 
                                   Map initData, boolean fail) 
            throws WebloggerException {
        
        String[] models = Utilities.stringToStringArray(modelsString, ",");
    //#ModelLoader.java:90: method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.loadModels(String, Map, Map, bool)
    //#input(void loadModels(String, Map, Map, bool)): "Error accessing model: "._tainted
    //#input(void loadModels(String, Map, Map, bool)): "Error finding model: "._tainted
    //#input(void loadModels(String, Map, Map, bool)): "Error initializing model: "._tainted
    //#input(void loadModels(String, Map, Map, bool)): "Error insantiating model: "._tainted
    //#input(void loadModels(String, Map, Map, bool)): fail
    //#input(void loadModels(String, Map, Map, bool)): initData
    //#input(void loadModels(String, Map, Map, bool)): log
    //#input(void loadModels(String, Map, Map, bool)): model
    //#input(void loadModels(String, Map, Map, bool)): modelsString
    //#input(void loadModels(String, Map, Map, bool)): modelsString._tainted
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/CalendarModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/CalendarModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/ConfigModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/ConfigModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/FeedModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/FeedModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/MenuModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/MenuModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/MessageModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/MessageModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/CalendarModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/ConfigModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/FeedModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/MenuModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/MessageModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/Model]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PageModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PlanetModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PreviewPageModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/SiteModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/URLModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Descendant_Table[others]
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/Model.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PageModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PageModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PlanetModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PlanetModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PreviewPageModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PreviewPageModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/SiteModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/SiteModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/URLModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/URLModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.__Dispatch_Table.getModelName()Ljava/lang/String;
    //#input(void loadModels(String, Map, Map, bool)): org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.__Dispatch_Table.init(Ljava/util/Map;)V
    //#pre[1] (void loadModels(String, Map, Map, bool)): (soft) fail == 0
    //#pre[3] (void loadModels(String, Map, Map, bool)): (soft) log != null
    //#pre[4] (void loadModels(String, Map, Map, bool)): (soft) model != null
    //#presumption(void loadModels(String, Map, Map, bool)): java.lang.Class:forName(...)@93 != null
    //#presumption(void loadModels(String, Map, Map, bool)): java.lang.Class:newInstance(...).__Tag@94 in {org/apache/roller/weblogger/ui/rendering/model/CalendarModel, org/apache/roller/weblogger/ui/rendering/model/ConfigModel, org/apache/roller/weblogger/ui/rendering/model/FeedModel, org/apache/roller/weblogger/ui/rendering/model/MenuModel, org/apache/roller/weblogger/ui/rendering/model/MessageModel, org/apache/roller/weblogger/ui/rendering/model/Model, org/apache/roller/weblogger/ui/rendering/model/PageModel, org/apache/roller/weblogger/ui/rendering/model/PlanetModel, org/apache/roller/weblogger/ui/rendering/model/PreviewPageModel, org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel, org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel, org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel, org/apache/roller/weblogger/ui/rendering/model/SiteModel, org/apache/roller/weblogger/ui/rendering/model/URLModel, org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel}
    //#unanalyzed(void loadModels(String, Map, Map, bool)): Effects-of-calling:java.util.StringTokenizer
    //#unanalyzed(void loadModels(String, Map, Map, bool)): Effects-of-calling:java.util.StringTokenizer:countTokens
    //#unanalyzed(void loadModels(String, Map, Map, bool)): Effects-of-calling:java.util.StringTokenizer:hasMoreTokens
    //#unanalyzed(void loadModels(String, Map, Map, bool)): Effects-of-calling:java.util.StringTokenizer:nextToken
        for(int i=0; i < models.length; i++) {
            try {
                Class modelClass = Class.forName(models[i]);
                Model pageModel = (Model) modelClass.newInstance();
                pageModel.init(initData);
    //#ModelLoader.java:95: Warning: call too complex - analysis skipped
    //#    -- call on void init(Map)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void init(Map)
                model.put(pageModel.getModelName(), pageModel);
    //#ModelLoader.java:96: Warning: call too complex - analysis skipped
    //#    -- call on String getModelName()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: String getModelName()
            } catch (WebloggerException re) {
                if(fail) {
                    throw re;
                } else {
                    log.warn("Error initializing model: " + models[i]);
    //#ModelLoader.java:101: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:warn(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:warn(Object)
                }
            } catch (ClassNotFoundException cnfe) {
                if(fail) {
                    throw new WebloggerException("Error finding model: " + models[i], cnfe);
    //#ModelLoader.java:105: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.WebloggerException(String, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void org.apache.roller.weblogger.WebloggerException(String, Throwable)
                } else {
                    log.warn("Error finding model: " + models[i]);
    //#ModelLoader.java:107: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:warn(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:warn(Object)
                }
            } catch (InstantiationException ie) {
                if(fail) {
                    throw new WebloggerException("Error insantiating model: " + models[i], ie);
    //#ModelLoader.java:111: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.WebloggerException(String, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void org.apache.roller.weblogger.WebloggerException(String, Throwable)
                } else {
                    log.warn("Error insantiating model: " + models[i]);
    //#ModelLoader.java:113: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:warn(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:warn(Object)
                }
            } catch (IllegalAccessException iae) {
                if(fail) {
                    throw new WebloggerException("Error accessing model: " + models[i], iae);
    //#ModelLoader.java:117: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.WebloggerException(String, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void org.apache.roller.weblogger.WebloggerException(String, Throwable)
                } else {
                    log.warn("Error accessing model: " + models[i]);
    //#ModelLoader.java:119: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:warn(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
    //#    method: void loadModels(String, Map, Map, bool)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:warn(Object)
                }
            }
        }
    }
    //#ModelLoader.java:123: end of method: void org.apache.roller.weblogger.ui.rendering.model.ModelLoader.loadModels(String, Map, Map, bool)
    
}
    //#ModelLoader.java:: end of class: org.apache.roller.weblogger.ui.rendering.model.ModelLoader
