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