KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snipsnap > feeder > FeederLoader


1 /*
2  * This file is part of "SnipSnap Radeox Rendering Engine".
3  *
4  * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel
5  * All Rights Reserved.
6  *
7  * Please visit http://radeox.org/ for updates and contact.
8  *
9  * --LICENSE NOTICE--
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23  * --LICENSE NOTICE--
24  */

25
26 package org.snipsnap.feeder;
27
28 import org.apache.commons.logging.Log;
29 import org.apache.commons.logging.LogFactory;
30 import org.radeox.macro.PluginLoader;
31 import org.radeox.macro.Repository;
32
33 /**
34  * Plugin loader for feeder
35  *
36  * @author Stephan J. Schmidt
37  * @version $Id: FeederLoader.java 1606 2004-05-17 10:56:18Z leo $
38  */

39
40 public class FeederLoader extends PluginLoader {
41   private static Log log = LogFactory.getLog(FeederLoader.class);
42
43   public Class JavaDoc getLoadClass() {
44     return Feeder.class;
45   }
46
47   /**
48    * Add a plugin to the known plugin map
49    *
50    * @param repository the repository to add the feeder to
51    * @param plugin a feeder to add to the repository
52    */

53   public void add(Repository repository, Object JavaDoc plugin) {
54     if (plugin instanceof Feeder) {
55       repository.put(((Feeder) plugin).getName(), plugin);
56     } else {
57       log.debug("Feeder Loader: " + plugin.getClass() + " not of Type " + getLoadClass());
58     }
59   }
60
61 }
62
Popular Tags