ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/filter/PluginFilterManager.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filter/PluginFilterManager.java (file contents):
Revision 1.6 by tdb, Thu Feb 1 00:18:42 2001 UTC vs.
Revision 1.11 by tdb, Sat May 18 18:16:02 2002 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * Copyright (C) 2000-2002 i-scream
4 + *
5 + * This program is free software; you can redistribute it and/or
6 + * modify it under the terms of the GNU General Public License
7 + * as published by the Free Software Foundation; either version 2
8 + * of the License, or (at your option) any later version.
9 + *
10 + * This program is distributed in the hope that it will be useful,
11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 + * GNU General Public License for more details.
14 + *
15 + * You should have received a copy of the GNU General Public License
16 + * along with this program; if not, write to the Free Software
17 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 + */
19 +
20   //---PACKAGE DECLARATION---
21 < package uk.ac.ukc.iscream.filter;
21 > package uk.org.iscream.cms.server.filter;
22  
23   //---IMPORTS---
24   import java.io.*;
25   import java.util.*;
26  
27 < import uk.ac.ukc.iscream.util.*;
28 < import uk.ac.ukc.iscream.componentmanager.*;
29 < import uk.ac.ukc.iscream.core.*;
27 > import uk.org.iscream.cms.server.util.*;
28 > import uk.org.iscream.cms.server.componentmanager.*;
29 > import uk.org.iscream.cms.server.core.*;
30  
31   /**
32   * This class setups up and manages Plugins in a Filter. A list
# Line 51 | Line 70 | class PluginFilterManager {
70          _logger.write(toString(), Logger.SYSINIT, "Initialising");
71          _logger.write(toString(), Logger.SYSMSG, "Creating filter pipeline for plugin filters ...");
72          
73 <        // get the configuration for this plug-in setup
55 <        Configuration config = _refman.getCM().getConfiguration(FilterMain.NAME);
56 <        String pluginsPackage = config.getProperty("Filter.PluginsPackage");
57 <        String pluginsList = config.getProperty("Filter.Plugins");
73 >        String pluginsPackage, pluginsList;
74          
75 +        try {
76 +            // get the configuration for this plug-in setup
77 +            ConfigurationProxy cp = ConfigurationProxy.getInstance();
78 +            pluginsPackage = cp.getProperty("Filter." + FilterMain.NAME, "Filter.PluginsPackage");
79 +            pluginsList = cp.getProperty("Filter." + FilterMain.NAME, "Filter.Plugins");
80 +        } catch (PropertyNotFoundException e) {
81 +            _logger.write(toString(), Logger.WARNING, "Unable to locate property: "+e);
82 +            // setting this to "" will avoid building a plugin list,
83 +            // which is what we want when a property doesn't exist
84 +            pluginsList = "";
85 +            // and set this to "", because the compiler is a git
86 +            pluginsPackage = "";
87 +        }
88 +        
89          StringTokenizer st = new StringTokenizer(pluginsList, ";");
90          
91          while(st.hasMoreTokens()) {
# Line 111 | Line 141 | class PluginFilterManager {
141       * Overrides the {@link java.lang.Object#toString() Object.toString()}
142       * method to provide clean logging (every class should have this).
143       *
144 <     * This uses the uk.ac.ukc.iscream.util.NameFormat class
144 >     * This uses the uk.org.iscream.cms.server.util.NameFormat class
145       * to format the toString()
146       *
147       * @return the name of this class and its CVS revision

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines