//# 3 errors, 177 messages
//#
/*
    //#UIPluginManagerImpl.java:1:1: class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
 * 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.core.plugins;

import java.util.ArrayList;
import java.util.LinkedHashMap;
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.config.WebloggerConfig;
import org.apache.commons.lang.StringUtils;


/**
 * Plugin management for UI layer plugins.
 */
public class UIPluginManagerImpl implements UIPluginManager {
    
    private static Log log = LogFactory.getLog(UIPluginManagerImpl.class);
    //#UIPluginManagerImpl.java:36: method: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init
    //#UIPluginManagerImpl.java:36: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#input(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/TextEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/TextEditor]
    //#input(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor]
    //#input(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/XinhaEditor]
    //#input(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[others]
    //#input(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/XinhaEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/UIPluginManagerImpl]
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Dispatch_Table.getWeblogEntryEditor(Ljava/lang/String;)Lorg/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor;
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Dispatch_Table.getWeblogEntryEditors()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Dispatch_Table.loadEntryEditorClasses()V
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): instance
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): log
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): new LinkedHashMap(UIPluginManagerImpl#1) num objects
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): new UIPluginManagerImpl(UIPluginManagerImpl__static_init#1) num objects
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): instance.__Tag
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): instance.defaultEditor
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): instance.editors
    //#output(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/UIPluginManager.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/UIPluginManagerImpl]
    //#new obj(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): new LinkedHashMap(UIPluginManagerImpl#1)
    //#new obj(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): new UIPluginManagerImpl(UIPluginManagerImpl__static_init#1)
    //#presumption(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org.apache.commons.logging.LogFactory:getLog(...)@36 != null
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/UIPluginManagerImpl] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): org/apache/roller/weblogger/ui/core/plugins/UIPluginManager.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/UIPluginManagerImpl] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Dispatch_Table.getWeblogEntryEditor(Ljava/lang/String;)Lorg/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor; == &getWeblogEntryEditor
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Dispatch_Table.getWeblogEntryEditors()Ljava/util/List; == &getWeblogEntryEditors
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): __Dispatch_Table.loadEntryEditorClasses()V == &loadEntryEditorClasses
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): instance == &new UIPluginManagerImpl(UIPluginManagerImpl__static_init#1)
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): (soft) log != null
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): new LinkedHashMap(UIPluginManagerImpl#1) num objects == 1
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): new UIPluginManagerImpl(UIPluginManagerImpl__static_init#1) num objects == 1
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): instance.__Tag == org/apache/roller/weblogger/ui/core/plugins/UIPluginManagerImpl
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): init'ed(instance.defaultEditor)
    //#post(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): instance.editors == &new LinkedHashMap(UIPluginManagerImpl#1)
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.util.Map:values
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.util.Map:get
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:org.apache.roller.weblogger.config.WebloggerConfig:getProperty
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:org.apache.commons.lang.StringUtils:split
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:org.apache.commons.lang.StringUtils:stripAll
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.lang.Class:forName
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.lang.Class:newInstance
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:getId
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.util.Map:put
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.util.Map:size
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:org.apache.commons.logging.Log:warn
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.util.Collection:iterator
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init): Effects-of-calling:java.util.LinkedHashMap
    
    // singleton instance
    private static UIPluginManagerImpl instance = null;
    
    // list of configured WeblogEntryEditor classes
    Map editors = new LinkedHashMap();
    
    // the default WeblogEntryEditor
    WeblogEntryEditor defaultEditor = null;
    
    
    static {
        instance = new UIPluginManagerImpl();
    }
    //#UIPluginManagerImpl.java:50: end of method: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl__static_init
    
    
    // private to enforce singleton pattern
    private UIPluginManagerImpl() {
    //#UIPluginManagerImpl.java:54: method: void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): "Unable to instantiate editor ["._tainted
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): "]"._tainted
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): "trying editor "._tainted
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): log
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): org/apache/roller/weblogger/ui/core/plugins/TextEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/TextEditor]
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor]
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/XinhaEditor]
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[others]
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): org/apache/roller/weblogger/ui/core/plugins/XinhaEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): this
    //#output(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): new LinkedHashMap(UIPluginManagerImpl#1) num objects
    //#output(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): this.defaultEditor
    //#output(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): this.editors
    //#new obj(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): new LinkedHashMap(UIPluginManagerImpl#1)
    //#pre[1] (void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): log != null
    //#post(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): init'ed(this.defaultEditor)
    //#post(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): this.editors == &new LinkedHashMap(UIPluginManagerImpl#1)
    //#post(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): new LinkedHashMap(UIPluginManagerImpl#1) num objects == 1
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.util.Map:values
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:org.apache.roller.weblogger.config.WebloggerConfig:getProperty
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:org.apache.commons.lang.StringUtils:split
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:org.apache.commons.lang.StringUtils:stripAll
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.lang.Class:forName
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.lang.Class:newInstance
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:getId
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:org.apache.commons.logging.Log:error
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.util.Map:size
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:org.apache.commons.logging.Log:warn
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.util.Collection:iterator
    //#unanalyzed(void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()): Effects-of-calling:java.util.Iterator:next
        loadEntryEditorClasses();
    }
    //#UIPluginManagerImpl.java:56: end of method: void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl()
    
    
    // static singleton accessor
    public static UIPluginManager getInstance() {
        return instance;
    //#UIPluginManagerImpl.java:61: method: UIPluginManager org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.getInstance()
    //#input(UIPluginManager getInstance()): instance
    //#output(UIPluginManager getInstance()): return_value
    //#pre[1] (UIPluginManager getInstance()): init'ed(instance)
    //#post(UIPluginManager getInstance()): return_value == instance
    //#post(UIPluginManager getInstance()): init'ed(return_value)
    //#UIPluginManagerImpl.java:61: end of method: UIPluginManager org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.getInstance()
    }
    
    
    public List getWeblogEntryEditors() {
        // TODO: sort list of returned editors
        return new ArrayList(this.editors.values());
    //#UIPluginManagerImpl.java:67: method: List org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.getWeblogEntryEditors()
    //#input(List getWeblogEntryEditors()): this
    //#input(List getWeblogEntryEditors()): this.editors
    //#output(List getWeblogEntryEditors()): new ArrayList(getWeblogEntryEditors#1) num objects
    //#output(List getWeblogEntryEditors()): return_value
    //#new obj(List getWeblogEntryEditors()): new ArrayList(getWeblogEntryEditors#1)
    //#pre[2] (List getWeblogEntryEditors()): this.editors != null
    //#post(List getWeblogEntryEditors()): return_value == &new ArrayList(getWeblogEntryEditors#1)
    //#post(List getWeblogEntryEditors()): new ArrayList(getWeblogEntryEditors#1) num objects == 1
    //#UIPluginManagerImpl.java:67: end of method: List org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.getWeblogEntryEditors()
    }
    
    
    public WeblogEntryEditor getWeblogEntryEditor(String id) {
        
        WeblogEntryEditor editor = null;
    //#UIPluginManagerImpl.java:73: method: WeblogEntryEditor org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.getWeblogEntryEditor(String)
    //#UIPluginManagerImpl.java:73: Warning: unused assignment
    //#    unused assignment into editor
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: WeblogEntryEditor getWeblogEntryEditor(String)
    //#    Attribs:  Uncertain
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): id
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/TextEditor]
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor]
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/XinhaEditor]
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[others]
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): this
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): this.defaultEditor
    //#input(WeblogEntryEditor getWeblogEntryEditor(String)): this.editors
    //#output(WeblogEntryEditor getWeblogEntryEditor(String)): return_value
    //#pre[3] (WeblogEntryEditor getWeblogEntryEditor(String)): (soft) init'ed(this.defaultEditor)
    //#pre[4] (WeblogEntryEditor getWeblogEntryEditor(String)): (soft) this.editors != null
    //#presumption(WeblogEntryEditor getWeblogEntryEditor(String)): java.util.Map:get(...).__Tag@76 in {org/apache/roller/weblogger/ui/core/plugins/TextEditor, org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor, org/apache/roller/weblogger/ui/core/plugins/XinhaEditor}
    //#post(WeblogEntryEditor getWeblogEntryEditor(String)): init'ed(return_value)
        
        // see if this editor is configured
        editor = (id == null) ? null : (WeblogEntryEditor) this.editors.get(id);
        if(editor == null) {
            editor = this.defaultEditor;
        }
        
        return editor;
    //#UIPluginManagerImpl.java:81: end of method: WeblogEntryEditor org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.getWeblogEntryEditor(String)
    }
    
    
    /**
     * Initialize the set of configured editors and define the default editor.
     */
    private void loadEntryEditorClasses() {
        
        log.debug("Initializing entry editor plugins");
    //#UIPluginManagerImpl.java:90: method: void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.loadEntryEditorClasses()
    //#UIPluginManagerImpl.java:90: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
    //#input(void loadEntryEditorClasses()): "Unable to instantiate editor ["._tainted
    //#input(void loadEntryEditorClasses()): "]"._tainted
    //#input(void loadEntryEditorClasses()): "trying editor "._tainted
    //#input(void loadEntryEditorClasses()): log
    //#input(void loadEntryEditorClasses()): org/apache/roller/weblogger/ui/core/plugins/TextEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void loadEntryEditorClasses()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/TextEditor]
    //#input(void loadEntryEditorClasses()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor]
    //#input(void loadEntryEditorClasses()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[org/apache/roller/weblogger/ui/core/plugins/XinhaEditor]
    //#input(void loadEntryEditorClasses()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Descendant_Table[others]
    //#input(void loadEntryEditorClasses()): org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void loadEntryEditorClasses()): org/apache/roller/weblogger/ui/core/plugins/XinhaEditor.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void loadEntryEditorClasses()): this
    //#input(void loadEntryEditorClasses()): this.defaultEditor
    //#input(void loadEntryEditorClasses()): this.editors
    //#output(void loadEntryEditorClasses()): this.defaultEditor
    //#pre[1] (void loadEntryEditorClasses()): log != null
    //#pre[4] (void loadEntryEditorClasses()): this.editors != null
    //#pre[2] (void loadEntryEditorClasses()): (soft) init'ed(this.defaultEditor)
    //#presumption(void loadEntryEditorClasses()): editor.__Tag@133 in {org/apache/roller/weblogger/ui/core/plugins/TextEditor, org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor, org/apache/roller/weblogger/ui/core/plugins/XinhaEditor}
    //#presumption(void loadEntryEditorClasses()): editorList.length@95 <= 4_294_967_295
    //#presumption(void loadEntryEditorClasses()): java.lang.Class:forName(...)@101 != null
    //#presumption(void loadEntryEditorClasses()): java.lang.Class:newInstance(...).__Tag@102 in {org/apache/roller/weblogger/ui/core/plugins/TextEditor, org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor, org/apache/roller/weblogger/ui/core/plugins/XinhaEditor}
    //#presumption(void loadEntryEditorClasses()): java.util.Map:get(...).__Tag@125 in {org/apache/roller/weblogger/ui/core/plugins/TextEditor, org/apache/roller/weblogger/ui/core/plugins/WeblogEntryEditor, org/apache/roller/weblogger/ui/core/plugins/XinhaEditor}
    //#presumption(void loadEntryEditorClasses()): java.util.Map:values(...)@133 != null
    //#presumption(void loadEntryEditorClasses()): org.apache.commons.lang.StringUtils:stripAll(...)@95 != null
    //#post(void loadEntryEditorClasses()): init'ed(this.defaultEditor)
    //#test_vector(void loadEntryEditorClasses()): java.util.Map:size(...)@116: {1..4_294_967_295}, {-2_147_483_648..0}
    //#test_vector(void loadEntryEditorClasses()): org.apache.roller.weblogger.config.WebloggerConfig:getProperty(...)@123: Addr_Set{null}, Inverse{null}
    //#test_vector(void loadEntryEditorClasses()): org.apache.roller.weblogger.config.WebloggerConfig:getProperty(...)@92: Addr_Set{null}, Inverse{null}
        
        String editorStr = WebloggerConfig.getProperty("plugins.weblogEntryEditors");
    //#UIPluginManagerImpl.java:92: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerConfig:getProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerConfig:getProperty(String)
        if (editorStr != null) {
            
            String[] editorList = StringUtils.stripAll(StringUtils.split(editorStr, ","));
    //#UIPluginManagerImpl.java:95: Warning: method not available
    //#    -- call on String[] org.apache.commons.lang.StringUtils:split(String, String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: String[] org.apache.commons.lang.StringUtils:split(String, String)
    //#UIPluginManagerImpl.java:95: Warning: method not available
    //#    -- call on String[] org.apache.commons.lang.StringUtils:stripAll(String[])
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: String[] org.apache.commons.lang.StringUtils:stripAll(String[])
            for (int i=0; i < editorList.length; i++) {
                
                log.debug("trying editor " + editorList[i]);
    //#UIPluginManagerImpl.java:98: ?use of default init
    //#    init'ed(editorList[i])
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    basic block: bb_4
    //#    assertion: init'ed(editorList[i])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#UIPluginManagerImpl.java:98: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
                
                try {
                    Class editorClass = Class.forName(editorList[i]);
    //#UIPluginManagerImpl.java:101: ?use of default init
    //#    init'ed(editorList[i])
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    basic block: bb_5
    //#    assertion: init'ed(editorList[i])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
                    WeblogEntryEditor editor = (WeblogEntryEditor) editorClass.newInstance();
                    
                    // looks okay, add it to the map
                    this.editors.put(editor.getId(), editor);
                    
                } catch(ClassCastException cce) {
                    log.error("It appears that your editor does not implement "+
    //#UIPluginManagerImpl.java:108: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
                            "the WeblogEntryEditor interface", cce);
                } catch(Exception e) {
                    log.error("Unable to instantiate editor ["+editorList[i]+"]", e);
    //#UIPluginManagerImpl.java:111: ?use of default init
    //#    init'ed(editorList[i])
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    basic block: bb_7
    //#    assertion: init'ed(editorList[i])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#UIPluginManagerImpl.java:111: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
                }
            }
        }
        
        if(this.editors.size() < 1) {
            log.warn("No entry editors configured, this means that publishing "+
    //#UIPluginManagerImpl.java:117: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:warn(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:warn(Object)
                    "entries will be impossible.");
            return;
        }
        
        // make sure the default editor is defined
        String defaultEditorId = WebloggerConfig.getProperty("plugins.defaultEditor");
    //#UIPluginManagerImpl.java:123: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerConfig:getProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerConfig:getProperty(String)
        if(defaultEditorId != null) {
            this.defaultEditor = (WeblogEntryEditor) this.editors.get(defaultEditorId);
        }
        
        if(this.defaultEditor == null) {
            // someone didn't configure the default editor properly
            // guess we'll just have to pick one for them
            log.warn("Default editor was not properly configured, picking one at random instead.");
    //#UIPluginManagerImpl.java:131: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:warn(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
    //#    method: void loadEntryEditorClasses()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:warn(Object)
            
            Object editor = this.editors.values().iterator().next();
            this.defaultEditor = (WeblogEntryEditor) editor;
        }
    }
    //#UIPluginManagerImpl.java:136: end of method: void org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl.loadEntryEditorClasses()
    
}
    //#UIPluginManagerImpl.java:: end of class: org.apache.roller.weblogger.ui.core.plugins.UIPluginManagerImpl
