1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.filter; |
2 |
> |
package uk.org.iscream.filter; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
|
import java.io.*; |
6 |
|
import java.util.*; |
7 |
|
|
8 |
< |
import uk.ac.ukc.iscream.util.*; |
9 |
< |
import uk.ac.ukc.iscream.componentmanager.*; |
10 |
< |
import uk.ac.ukc.iscream.core.*; |
8 |
> |
import uk.org.iscream.util.*; |
9 |
> |
import uk.org.iscream.componentmanager.*; |
10 |
> |
import uk.org.iscream.core.*; |
11 |
|
|
12 |
|
/** |
13 |
|
* This class setups up and manages Plugins in a Filter. A list |
51 |
|
_logger.write(toString(), Logger.SYSINIT, "Initialising"); |
52 |
|
_logger.write(toString(), Logger.SYSMSG, "Creating filter pipeline for plugin filters ..."); |
53 |
|
|
54 |
< |
// 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"); |
54 |
> |
String pluginsPackage, pluginsList; |
55 |
|
|
56 |
+ |
try { |
57 |
+ |
// get the configuration for this plug-in setup |
58 |
+ |
ConfigurationProxy cp = ConfigurationProxy.getInstance(); |
59 |
+ |
pluginsPackage = cp.getProperty(FilterMain.NAME, "Filter.PluginsPackage"); |
60 |
+ |
pluginsList = cp.getProperty(FilterMain.NAME, "Filter.Plugins"); |
61 |
+ |
} catch (PropertyNotFoundException e) { |
62 |
+ |
_logger.write(toString(), Logger.WARNING, "Unable to locate property: "+e); |
63 |
+ |
// setting this to "" will avoid building a plugin list, |
64 |
+ |
// which is what we want when a property doesn't exist |
65 |
+ |
pluginsList = ""; |
66 |
+ |
// and set this to "", because the compiler is a git |
67 |
+ |
pluginsPackage = ""; |
68 |
+ |
} |
69 |
+ |
|
70 |
|
StringTokenizer st = new StringTokenizer(pluginsList, ";"); |
71 |
|
|
72 |
|
while(st.hasMoreTokens()) { |
122 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
123 |
|
* method to provide clean logging (every class should have this). |
124 |
|
* |
125 |
< |
* This uses the uk.ac.ukc.iscream.util.NameFormat class |
125 |
> |
* This uses the uk.org.iscream.util.NameFormat class |
126 |
|
* to format the toString() |
127 |
|
* |
128 |
|
* @return the name of this class and its CVS revision |