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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/componentmanager/ComponentManager.java (file contents):
Revision 1.38 by tdb, Tue May 29 17:02:34 2001 UTC vs.
Revision 1.39 by tdb, Wed Mar 20 13:40:29 2002 UTC

# Line 63 | Line 63 | public class ComponentManager {
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();
# Line 114 | Line 133 | public class ComponentManager {
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")) {
# Line 260 | Line 280 | public class ComponentManager {
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      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines