roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r465749 - in /incubator/roller/trunk: src/org/apache/roller/business/ src/org/apache/roller/ui/authoring/struts/actions/ src/org/apache/roller/ui/core/ src/org/apache/roller/ui/core/plugins/ tests/org/apache/roller/business/ tests/org/apach...
Date Thu, 19 Oct 2006 19:48:52 GMT
Author: agilliland
Date: Thu Oct 19 12:48:50 2006
New Revision: 465749

URL: http://svn.apache.org/viewvc?view=rev&rev=465749
Log:
Creating a place for UI layer plugins & plugin management.  It doesn't make sense for
all plugins to be managed through the PluginManager in the business layer since many plugins
will be strictly for the UI.

1. Created UIPluginManager interface and impl (could need renaming :/)

2. Moved WeblogEntryEditor interface to ui.core.plugins package and moved logic for dealing
with entry editors from PluginManager to UIPluginManager.


Added:
    incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManager.java
    incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManagerImpl.java
    incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/WeblogEntryEditor.java
      - copied, changed from r465730, incubator/roller/trunk/src/org/apache/roller/business/WeblogEntryEditor.java
    incubator/roller/trunk/tests/org/apache/roller/ui/PluginManagerTest.java
      - copied, changed from r465716, incubator/roller/trunk/tests/org/apache/roller/business/PluginManagerTest.java
Removed:
    incubator/roller/trunk/src/org/apache/roller/business/WeblogEntryEditor.java
    incubator/roller/trunk/tests/org/apache/roller/business/PluginManagerTest.java
Modified:
    incubator/roller/trunk/src/org/apache/roller/business/PluginManager.java
    incubator/roller/trunk/src/org/apache/roller/business/PluginManagerImpl.java
    incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WeblogEntryPageModel.java
    incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WebsiteFormAction.java
    incubator/roller/trunk/src/org/apache/roller/ui/core/RollerContext.java
    incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/TextEditor.java
    incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/XinhaEditor.java

Modified: incubator/roller/trunk/src/org/apache/roller/business/PluginManager.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/PluginManager.java?view=diff&rev=465749&r1=465748&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/PluginManager.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/PluginManager.java Thu Oct 19 12:48:50
2006
@@ -22,10 +22,11 @@
 import java.util.Map;
 import org.apache.roller.pojos.WeblogEntryData;
 import org.apache.roller.pojos.WebsiteData;
+import org.apache.roller.ui.core.plugins.WeblogEntryEditor;
 
 
 /**
- * Manages Roller plugins.
+ * Plugin management for business layer and more generally applied plugins.
  */
 public interface PluginManager {
     
@@ -55,25 +56,6 @@
      * @return        the transformed text
      */
     public String applyWeblogEntryPlugins(Map pagePlugins, WeblogEntryData entry, String
str);
-    
-    
-    /**
-     * Get the list of all configured WeblogEntryEditors.
-     *
-     * @return List of all configure WeblogEntryEditor objects.
-     */
-    public List getWeblogEntryEditors();
-    
-    
-    /**
-     * Get a WeblogEntryEditor by name.  If the specified editor cannot be found
-     * or the id is null, then the default editor should be returned.
-     *
-     * @param id The id of the desired WeblogEntryEditor.
-     * @return The WeblogEntry editor desired, or the default editor if the
-     *      desired editor could not be found.
-     */
-    public WeblogEntryEditor getWeblogEntryEditor(String id);
     
     
     /**

Modified: incubator/roller/trunk/src/org/apache/roller/business/PluginManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/PluginManagerImpl.java?view=diff&rev=465749&r1=465748&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/PluginManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/PluginManagerImpl.java Thu Oct 19
12:48:50 2006
@@ -18,7 +18,6 @@
 
 package org.apache.roller.business;
 
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -26,16 +25,13 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.config.RollerConfig;
-import org.apache.roller.business.WeblogEntryPlugin;
-import org.apache.roller.business.PluginManager;
 import org.apache.roller.pojos.WeblogEntryData;
 import org.apache.roller.pojos.WebsiteData;
 import org.apache.commons.lang.StringUtils;
-import org.apache.roller.business.WeblogEntryEditor;
 
 
 /**
- * Centralized plugin management.
+ * Plugin management for business layer and more generally applied plugins.
  */
 public class PluginManagerImpl implements PluginManager {
     
@@ -44,19 +40,12 @@
     // Plugin classes keyed by plugin name
     static Map mPagePlugins = new LinkedHashMap();
     
-    // list of configured WeblogEntryEditor classes
-    Map editors = new LinkedHashMap();
-    
-    // the default WeblogEntryEditor
-    WeblogEntryEditor defaultEditor = null;
-    
     
     /**
      * Creates a new instance of PluginManagerImpl
      */
     public PluginManagerImpl() {
         loadPagePluginClasses();
-        loadEntryEditorClasses();
     }
     
     
@@ -106,25 +95,6 @@
     }
     
     
-    public List getWeblogEntryEditors() {
-        return new ArrayList(this.editors.values());
-    }
-    
-    
-    public WeblogEntryEditor getWeblogEntryEditor(String id) {
-        
-        WeblogEntryEditor editor = null;
-        
-        // see if this editor is configured
-        editor = (id == null) ? null : (WeblogEntryEditor) this.editors.get(id);
-        if(editor == null) {
-            editor = this.defaultEditor;
-        }
-        
-        return editor;
-    }
-    
-    
     /**
      * Initialize PagePlugins declared in roller.properties.
      * By using the full class name we also allow for the implementation of
@@ -157,60 +127,6 @@
                     log.error("IllegalAccessException for " + plugins[i]);
                 }
             }
-        }
-    }
-    
-    
-    /**
-     * Initialize the set of configured editors and define the default editor.
-     */
-    private void loadEntryEditorClasses() {
-        
-        log.debug("Initializing entry editor plugins");
-        
-        String editorStr = RollerConfig.getProperty("plugins.weblogEntryEditors");
-        if (editorStr != null) {
-            
-            String[] editorList = StringUtils.stripAll(StringUtils.split(editorStr, ","));
-            for (int i=0; i < editorList.length; i++) {
-                
-                log.debug("trying editor " + editorList[i]);
-                
-                try {
-                    Class editorClass = Class.forName(editorList[i]);
-                    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 "+
-                            "the WeblogEntryEditor interface", cce);
-                } catch(Exception e) {
-                    log.error("Unable to instantiate editor ["+editorList[i]+"]", e);
-                }
-            }
-        }
-        
-        if(this.editors.size() < 1) {
-            log.warn("No entry editors configured, this means that publishing "+
-                    "entries will be impossible.");
-            return;
-        }
-        
-        // make sure the default editor is defined
-        String defaultEditorId = RollerConfig.getProperty("plugins.defaultEditor");
-        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.");
-            
-            Object editor = this.editors.values().iterator().next();
-            this.defaultEditor = (WeblogEntryEditor) editor;
         }
     }
     

Modified: incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WeblogEntryPageModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WeblogEntryPageModel.java?view=diff&rev=465749&r1=465748&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WeblogEntryPageModel.java
(original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WeblogEntryPageModel.java
Thu Oct 19 12:48:50 2006
@@ -46,8 +46,10 @@
 import org.apache.roller.config.RollerRuntimeConfig;
 import org.apache.roller.business.PluginManager;
 import org.apache.roller.business.Roller;
-import org.apache.roller.business.WeblogEntryEditor;
+import org.apache.roller.ui.core.plugins.WeblogEntryEditor;
 import org.apache.roller.pojos.WebsiteData;
+import org.apache.roller.ui.core.RollerContext;
+import org.apache.roller.ui.core.plugins.UIPluginManager;
 
 /**
  * All data needed to render the edit-weblog page.
@@ -258,12 +260,9 @@
     }
 
     public WeblogEntryEditor getEditor() {
-        try {
-            PluginManager pmgr = RollerFactory.getRoller().getPagePluginManager();
-            return pmgr.getWeblogEntryEditor(this.website.getEditorPage());
-        } catch (RollerException ex) {
-            throw new RuntimeException("Couldn't access plugin manager");
-        }
+        
+        UIPluginManager pmgr = RollerContext.getUIPluginManager();
+        return pmgr.getWeblogEntryEditor(this.website.getEditorPage());
     }
     
     public UserData getUser()

Modified: incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WebsiteFormAction.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WebsiteFormAction.java?view=diff&rev=465749&r1=465748&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WebsiteFormAction.java
(original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/authoring/struts/actions/WebsiteFormAction.java
Thu Oct 19 12:48:50 2006
@@ -20,17 +20,12 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
-import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.struts.action.ActionError;
@@ -49,7 +44,6 @@
 import org.apache.roller.business.Roller;
 import org.apache.roller.business.RollerFactory;
 import org.apache.roller.business.UserManager;
-import org.apache.roller.business.WeblogEntryEditor;
 import org.apache.roller.business.WeblogManager;
 import org.apache.roller.pojos.UserData;
 import org.apache.roller.pojos.WebsiteData;
@@ -59,6 +53,8 @@
 import org.apache.roller.util.cache.CacheManager;
 import org.apache.roller.ui.authoring.struts.formbeans.WebsiteFormEx;
 import org.apache.roller.ui.core.RequestConstants;
+import org.apache.roller.ui.core.RollerContext;
+import org.apache.roller.ui.core.plugins.UIPluginManager;
 import org.apache.roller.util.Blacklist;
 
 
@@ -312,13 +308,12 @@
     
     private List getEditorsList() {
         
-        List editorsList = new ArrayList();
+        List editorsList = null;
         
-        try {
-            PluginManager pmgr = RollerFactory.getRoller().getPagePluginManager();
-            editorsList = pmgr.getWeblogEntryEditors();
-        } catch (RollerException ex) {
-            mLogger.error(ex);
+        UIPluginManager pmgr = RollerContext.getUIPluginManager();
+        editorsList = pmgr.getWeblogEntryEditors();
+        if(editorsList == null) {
+            editorsList = new ArrayList();
         }
         
         return editorsList;

Modified: incubator/roller/trunk/src/org/apache/roller/ui/core/RollerContext.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/RollerContext.java?view=diff&rev=465749&r1=465748&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/core/RollerContext.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/core/RollerContext.java Thu Oct 19 12:48:50
2006
@@ -50,6 +50,8 @@
 import org.apache.roller.business.Roller;
 import org.apache.roller.business.RollerFactory;
 import org.apache.roller.business.runnable.ThreadManager;
+import org.apache.roller.ui.core.plugins.UIPluginManager;
+import org.apache.roller.ui.core.plugins.UIPluginManagerImpl;
 import org.apache.roller.ui.core.security.AutoProvision;
 import org.apache.roller.util.cache.CacheManager;
 import org.apache.velocity.runtime.RuntimeSingleton;
@@ -495,6 +497,18 @@
       
       return null;
       
+    }
+
+    
+    /**
+     * Access to the plugin manager for the UI layer.
+     *
+     * TODO: we may want something similar to the Roller interface for the
+     *  ui layer if we dont' want methods like this here in RollerContext.
+     */
+    public static UIPluginManager getUIPluginManager() {
+        // TODO: we may want to do this another way
+        return UIPluginManagerImpl.getInstance();
     }
 
 }

Modified: incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/TextEditor.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/TextEditor.java?view=diff&rev=465749&r1=465748&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/TextEditor.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/TextEditor.java Thu Oct 19
12:48:50 2006
@@ -18,7 +18,6 @@
 
 package org.apache.roller.ui.core.plugins;
 
-import org.apache.roller.business.WeblogEntryEditor;
 import org.apache.roller.util.MessageUtilities;
 
 

Added: incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManager.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManager.java?view=auto&rev=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManager.java (added)
+++ incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManager.java Thu
Oct 19 12:48:50 2006
@@ -0,0 +1,47 @@
+/*
+ * 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.ui.core.plugins;
+
+import java.util.List;
+
+
+/**
+ * Plugin management for UI layer plugins.
+ */
+public interface UIPluginManager {
+    
+    /**
+     * Get the list of all configured WeblogEntryEditors.
+     *
+     * @return List of all configure WeblogEntryEditor objects.
+     */
+    public List getWeblogEntryEditors();
+    
+    
+    /**
+     * Get a WeblogEntryEditor by name.  If the specified editor cannot be found
+     * or the id is null, then the default editor should be returned.
+     *
+     * @param id The id of the desired WeblogEntryEditor.
+     * @return The WeblogEntry editor desired, or the default editor if the
+     *      desired editor could not be found.
+     */
+    public WeblogEntryEditor getWeblogEntryEditor(String id);
+    
+}

Added: incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManagerImpl.java?view=auto&rev=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManagerImpl.java
(added)
+++ incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/UIPluginManagerImpl.java
Thu Oct 19 12:48:50 2006
@@ -0,0 +1,138 @@
+/*
+ * 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.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.config.RollerConfig;
+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);
+    
+    // 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();
+    }
+    
+    
+    // private to enforce singleton pattern
+    private UIPluginManagerImpl() {
+        loadEntryEditorClasses();
+    }
+    
+    
+    // static singleton accessor
+    public static UIPluginManager getInstance() {
+        return instance;
+    }
+    
+    
+    public List getWeblogEntryEditors() {
+        // TODO: sort list of returned editors
+        return new ArrayList(this.editors.values());
+    }
+    
+    
+    public WeblogEntryEditor getWeblogEntryEditor(String id) {
+        
+        WeblogEntryEditor editor = null;
+        
+        // see if this editor is configured
+        editor = (id == null) ? null : (WeblogEntryEditor) this.editors.get(id);
+        if(editor == null) {
+            editor = this.defaultEditor;
+        }
+        
+        return editor;
+    }
+    
+    
+    /**
+     * Initialize the set of configured editors and define the default editor.
+     */
+    private void loadEntryEditorClasses() {
+        
+        log.debug("Initializing entry editor plugins");
+        
+        String editorStr = RollerConfig.getProperty("plugins.weblogEntryEditors");
+        if (editorStr != null) {
+            
+            String[] editorList = StringUtils.stripAll(StringUtils.split(editorStr, ","));
+            for (int i=0; i < editorList.length; i++) {
+                
+                log.debug("trying editor " + editorList[i]);
+                
+                try {
+                    Class editorClass = Class.forName(editorList[i]);
+                    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 "+
+                            "the WeblogEntryEditor interface", cce);
+                } catch(Exception e) {
+                    log.error("Unable to instantiate editor ["+editorList[i]+"]", e);
+                }
+            }
+        }
+        
+        if(this.editors.size() < 1) {
+            log.warn("No entry editors configured, this means that publishing "+
+                    "entries will be impossible.");
+            return;
+        }
+        
+        // make sure the default editor is defined
+        String defaultEditorId = RollerConfig.getProperty("plugins.defaultEditor");
+        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.");
+            
+            Object editor = this.editors.values().iterator().next();
+            this.defaultEditor = (WeblogEntryEditor) editor;
+        }
+    }
+    
+}

Copied: incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/WeblogEntryEditor.java
(from r465730, incubator/roller/trunk/src/org/apache/roller/business/WeblogEntryEditor.java)
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/WeblogEntryEditor.java?view=diff&rev=465749&p1=incubator/roller/trunk/src/org/apache/roller/business/WeblogEntryEditor.java&r1=465730&p2=incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/WeblogEntryEditor.java&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/WeblogEntryEditor.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/WeblogEntryEditor.java Thu
Oct 19 12:48:50 2006
@@ -16,7 +16,7 @@
  * directory of this distribution.
  */
 
-package org.apache.roller.business;
+package org.apache.roller.ui.core.plugins;
 
 /**
  * Represents an editor for a WeblogEntry.

Modified: incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/XinhaEditor.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/XinhaEditor.java?view=diff&rev=465749&r1=465748&r2=465749
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/XinhaEditor.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/core/plugins/XinhaEditor.java Thu Oct
19 12:48:50 2006
@@ -18,7 +18,6 @@
 
 package org.apache.roller.ui.core.plugins;
 
-import org.apache.roller.business.WeblogEntryEditor;
 import org.apache.roller.util.MessageUtilities;
 
 

Copied: incubator/roller/trunk/tests/org/apache/roller/ui/PluginManagerTest.java (from r465716,
incubator/roller/trunk/tests/org/apache/roller/business/PluginManagerTest.java)
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/ui/PluginManagerTest.java?view=diff&rev=465749&p1=incubator/roller/trunk/tests/org/apache/roller/business/PluginManagerTest.java&r1=465716&p2=incubator/roller/trunk/tests/org/apache/roller/ui/PluginManagerTest.java&r2=465749
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/PluginManagerTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/ui/PluginManagerTest.java Thu Oct 19 12:48:50
2006
@@ -16,16 +16,15 @@
  * directory of this distribution.
  */
 
-package org.apache.roller.business;
+package org.apache.roller.ui;
 
-import java.io.InputStream;
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.roller.business.PluginManager;
-import org.apache.roller.business.RollerFactory;
+import org.apache.roller.ui.core.RollerContext;
+import org.apache.roller.ui.core.plugins.UIPluginManager;
 
 
 /**
@@ -52,7 +51,7 @@
     
     public void testEntryEditors() throws Exception {
         
-        PluginManager pmgr = RollerFactory.getRoller().getPagePluginManager();
+        UIPluginManager pmgr = RollerContext.getUIPluginManager();
         
         // test getEditors() lis
         assertEquals(2, pmgr.getWeblogEntryEditors().size());



Mime
View raw message