63 |
|
// get the command line args |
64 |
|
String defaultProperties = DEFAULTPROPERTIES; |
65 |
|
String filterName = null; |
66 |
+ |
String filterManagerName = null; |
67 |
|
for(int i=0; i < args.length; i++) { |
68 |
|
if(args[i].equals("-h")) { |
69 |
|
usage(); |
70 |
|
} |
71 |
|
else if(args[i].equals("-f")) { |
72 |
< |
i++; filterName = args[i]; |
72 |
> |
if(++i < args.length) { |
73 |
> |
filterName = args[i]; |
74 |
> |
} |
75 |
> |
else { |
76 |
> |
usage(); |
77 |
> |
} |
78 |
|
} |
79 |
+ |
else if(args[i].equals("-fm")) { |
80 |
+ |
if(++i < args.length) { |
81 |
+ |
filterManagerName = args[i]; |
82 |
+ |
} |
83 |
+ |
else { |
84 |
+ |
usage(); |
85 |
+ |
} |
86 |
+ |
} |
87 |
|
else if(args[i].equals("-l")) { |
88 |
< |
i++; defaultProperties = args[i]; |
88 |
> |
if(++i < args.length) { |
89 |
> |
defaultProperties = args[i]; |
90 |
> |
} |
91 |
> |
else { |
92 |
> |
usage(); |
93 |
> |
} |
94 |
|
} |
95 |
|
else { |
96 |
|
usage(); |
133 |
|
// ### This is where the list of supported components is checked! ### |
134 |
|
if (componentName.equalsIgnoreCase("core")) { |
135 |
|
component = new uk.org.iscream.cms.server.core.Core(); |
136 |
+ |
// note the passing of the FilterManagers's name in its constructor |
137 |
|
} else if (componentName.equalsIgnoreCase("filtermanager")) { |
138 |
< |
component = new uk.org.iscream.cms.server.filtermanager.FilterManager(); |
138 |
> |
component = new uk.org.iscream.cms.server.filtermanager.FilterManager(filterManagerName); |
139 |
|
} else if (componentName.equalsIgnoreCase("rootfilter")) { |
140 |
|
component = new uk.org.iscream.cms.server.rootfilter.RootFilter(); |
141 |
|
} else if (componentName.equalsIgnoreCase("dbinterface")) { |
280 |
|
System.out.println(" -l <filename> - the location of initial system properties"); |
281 |
|
System.out.println(" the default is ./etc/default.properties"); |
282 |
|
System.out.println(" -f <name> - the name of the filter (if there is one configured"); |
283 |
+ |
System.out.println(" -fm <name> - the name of the filter manager (if there is one configured"); |
284 |
|
System.out.println(" -h - this help screen"); |
285 |
|
System.exit(1); |
286 |
|
} |