-
Notifications
You must be signed in to change notification settings - Fork 33
/
ObjMgr.java
677 lines (551 loc) · 23.5 KB
/
ObjMgr.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
/*
* Copyright (c) 2000, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package com.sun.messaging.jmq.admin.apps.objmgr;
import java.io.*;
import java.util.Enumeration;
import com.sun.messaging.jmq.Version;
import com.sun.messaging.jmq.util.options.OptionException;
import com.sun.messaging.jmq.util.options.UnrecognizedOptionException;
import com.sun.messaging.jmq.util.options.InvalidBasePropNameException;
import com.sun.messaging.jmq.util.options.InvalidHardCodedValueException;
import com.sun.messaging.jmq.util.options.MissingArgException;
import com.sun.messaging.jmq.util.options.BadNameValueArgException;
import com.sun.messaging.jmq.admin.util.Globals;
import com.sun.messaging.jmq.admin.resources.AdminResources;
/**
* This is a utility that allows administrators to store administration objects in an object store. The utility has the
* following features:
*
* <OL>
* <LI>Add an administration object
* <LI>Delete an administration object
* <LI>Query and display an administration object
* <LI>List all administration objects
* </OL>
*
* The user will execute this utility by running a imqobjmgr script.
*
*/
public class ObjMgr implements ObjMgrOptions {
public final static String FIRST_VERSION = "2.0";
public final static String VERSION = "2.0";
private final static String PROP_NAME_VERSION = "version";
private static AdminResources ar = Globals.getAdminResources();
public static void main(String[] args) {
int exitcode = 0;
if (silentModeOptionSpecified(args)) {
Globals.setSilentMode(true);
}
/*
* Check for -h or -H, or that the first argument is the command type (-a, -d, -l or -q) if we still want to have that
* restriction.
*/
if (shortHelpOptionSpecified(args)) {
HelpPrinter hp = new HelpPrinter();
hp.printShortHelp(0);
} else if (longHelpOptionSpecified(args)) {
HelpPrinter hp = new HelpPrinter();
hp.printLongHelp();
}
/*
* Check for -version.
*/
if (versionOptionSpecified(args)) {
printBanner();
printVersion();
System.exit(0);
}
ObjMgrProperties objMgrProps = null;
/*
* Convert String args[] into a ObjMgrProperties object. The ObjMgrProperties class is just a Properties subclass with
* some convenience methods in it.
*/
try {
objMgrProps = ObjMgrOptionParser.parseArgs(args);
} catch (OptionException e) {
handleArgsParsingExceptions(e);
}
String propFileName = objMgrProps.getInputFileName();
if ((propFileName != null) && !propFileName.equals("")) {
/*
* Read in property file.
*/
ObjMgrProperties tmpProps = new ObjMgrProperties();
try {
FileInputStream fis = new FileInputStream(propFileName);
tmpProps.load(fis);
} catch (IOException ioe) {
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_PROB_LOADING_PROP_FILE), false);
System.err.println(ioe);
System.exit(1);
}
String v = getFileVersion(tmpProps);
/*
* If no version property found, assume the file is the current version and skip otherwise continue to check it.
*/
if (v != null) {
try {
checkVersion(propFileName, v, VERSION, FIRST_VERSION);
} catch (ObjMgrException ome) {
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ome.getMessage(), false);
// System.err.println(ome);
System.exit(1);
}
}
/*
* Override the values with properties that exist on the command line.
*/
for (Enumeration e = objMgrProps.propertyNames(); e.hasMoreElements();) {
String propName = (String) e.nextElement(), propVal;
/*
* Globals.stdErrPrintln("Override propname: " + propName);
*/
if (propName == null) {
continue;
}
propVal = objMgrProps.getProperty(propName);
if (propVal == null) {
continue;
}
if (!propName.equals(OBJMGR_INPUTFILE_PROP_NAME)) {
tmpProps.put(propName, propVal);
}
}
objMgrProps = tmpProps;
}
/*
* Remove trailing spaces in prop values.
*/
objMgrProps = trimPropValues(objMgrProps);
/*
* For each command type used, check that the information passed in is sufficient. e.g. for add (-a), a lookupname and
* type is required.
*/
try {
checkOptions(objMgrProps);
} catch (ObjMgrException ome) {
handleCheckOptionsExceptions(ome);
}
if (objMgrProps.previewModeSet()) {
CmdPreviewer cmdPreviewer = new CmdPreviewer(objMgrProps);
cmdPreviewer.previewCommands();
System.exit(0);
}
/*
* Execute the commands specified by the user
*/
CmdRunner cmdRunner = new CmdRunner(objMgrProps);
exitcode = cmdRunner.runCommands();
System.exit(exitcode);
}
/**
* Check ObjMgrProperties object to make sure it contains all the correct info to execute user commands. This method may
* print out errors/warnings and exit with an error code.
*/
private static void checkOptions(ObjMgrProperties objMgrProps) throws ObjMgrException {
/*
* Globals.stdErrPrintln("ObjMgrProperties dump:"); objMgrProps.list(System.err);
* Globals.stdErrPrintln("-------------\n");
*
* String objType = objMgrProps.getObjType(); Properties props = objMgrProps.getObjProperties(); ObjStoreAttrs osa =
* objMgrProps.getObjStoreAttrs();
*
* Globals.stdErrPrintln("Obj Type: " + objType); Globals.stdErrPrintln("");
* Globals.stdErrPrintln("objMgrProps.forceModeSet(): " + objMgrProps.forceModeSet());
* Globals.stdErrPrintln("objMgrProps.previewModeSet(): " + objMgrProps.previewModeSet());
* Globals.stdErrPrintln("objMgrProps.getInputFileName(): " + objMgrProps.getInputFileName());
*
* Globals.stdErrPrintln("ObjProps:"); props.list(System.err); Globals.stdErrPrintln("");
*
* Globals.stdErrPrintln("ObjStoreAttrs:\n " + osa); Globals.stdErrPrintln("");
*/
String cmd = objMgrProps.getCommand();
if (cmd == null) {
ObjMgrException objMgrEx;
objMgrEx = new ObjMgrException(ObjMgrException.NO_CMD_SPEC);
objMgrEx.setProperties(objMgrProps);
throw (objMgrEx);
}
/**
* Validate the value to the read only option, if specified
*/
if (readOnlyOptionSpecified(objMgrProps)) {
checkReadOnly(objMgrProps);
}
/*
* Determine type of command and invoke the relevant check method to verify the contents of the ObjMgrProperties object.
*
*/
if (cmd.equals(OBJMGR_ADD_PROP_VALUE)) {
checkAdd(objMgrProps);
} else if (cmd.equals(OBJMGR_DELETE_PROP_VALUE)) {
checkDelete(objMgrProps);
} else if (cmd.equals(OBJMGR_QUERY_PROP_VALUE)) {
checkQuery(objMgrProps);
} else if (cmd.equals(OBJMGR_LIST_PROP_VALUE)) {
checkList(objMgrProps);
} else if (cmd.equals(OBJMGR_UPDATE_PROP_VALUE)) {
checkUpdate(objMgrProps);
} else {
ObjMgrException objMgrEx;
objMgrEx = new ObjMgrException(ObjMgrException.BAD_CMD_SPEC);
objMgrEx.setProperties(objMgrProps);
throw (objMgrEx);
}
}
/*
* Check ObjMgrProperties object to make sure it contains all the correct info to execute the ADD command. This method
* may print out errors/warnings and exit with an error code.
*/
private static void checkAdd(ObjMgrProperties objMgrProps) throws ObjMgrException {
String objType = objMgrProps.getObjType();
if (objType == null) {
ObjMgrException objMgrEx;
objMgrEx = new ObjMgrException(ObjMgrException.NO_OBJ_TYPE_SPEC);
objMgrEx.setProperties(objMgrProps);
throw (objMgrEx);
}
if (Utils.isDestObjType(objType)) {
checkAddDestination(objMgrProps);
} else if (Utils.isFactoryObjType(objType)) {
checkAddFactory(objMgrProps);
}
else {
ObjMgrException objMgrEx;
objMgrEx = new ObjMgrException(ObjMgrException.INVALID_OBJ_TYPE);
objMgrEx.setProperties(objMgrProps);
throw (objMgrEx);
}
}
/*
* Check ObjMgrProperties object to make sure it contains all the correct info to execute the ADD command on a
* destination object (Topic or Queue). This method may print out errors/warnings and exit with an error code.
*/
private static void checkAddDestination(ObjMgrProperties objMgrProps) throws ObjMgrException {
ObjMgrException e;
String lookupName = objMgrProps.getLookupName();
// String objDestName = objMgrProps.getObjDestName();
if (lookupName == null) {
e = new ObjMgrException(ObjMgrException.NO_LOOKUP_NAME_SPEC);
e.setProperties(objMgrProps);
throw (e);
/*
* XXX Not mandatory any more. } else if (objDestName == null) { e = new
* ObjMgrException(ObjMgrException.NO_DEST_NAME_SPEC); e.setProperties(objMgrProps); throw (e);
*/
}
}
/*
* Check ObjMgrProperties object to make sure it contains all the correct info to execute the ADD command on a factory
* object (TopicConnectionFactory or QueueConnectionFactory). This method may print out errors/warnings and exit with an
* error code.
*/
private static void checkAddFactory(ObjMgrProperties objMgrProps) throws ObjMgrException {
ObjMgrException e;
String lookupName = objMgrProps.getLookupName();
if (lookupName == null) {
e = new ObjMgrException(ObjMgrException.NO_LOOKUP_NAME_SPEC);
e.setProperties(objMgrProps);
throw (e);
}
}
/*
* Check ObjMgrProperties object to make sure it contains all the correct info to execute the DELETE command. This
* method may print out errors/warnings and exit with an error code.
*/
private static void checkDelete(ObjMgrProperties objMgrProps) throws ObjMgrException {
ObjMgrException e;
String lookupName = objMgrProps.getLookupName();
if (lookupName == null) {
e = new ObjMgrException(ObjMgrException.NO_LOOKUP_NAME_SPEC);
e.setProperties(objMgrProps);
throw (e);
}
}
/*
* Check ObjMgrProperties object to make sure it contains all the correct info to execute the QUERY command. This method
* may print out errors/warnings and exit with an error code.
*/
private static void checkQuery(ObjMgrProperties objMgrProps) throws ObjMgrException {
ObjMgrException e;
String lookupName = objMgrProps.getLookupName();
if (lookupName == null) {
e = new ObjMgrException(ObjMgrException.NO_LOOKUP_NAME_SPEC);
e.setProperties(objMgrProps);
throw (e);
}
}
/*
* Check ObjMgrProperties object to make sure it contains all the correct info to execute the LIST command. This method
* may print out errors/warnings and exit with an error code.
*/
private static void checkList(ObjMgrProperties objMgrProps) throws ObjMgrException {
ObjMgrException e;
String type = objMgrProps.getObjType();
if (type != null) {
if (!Utils.isValidObjType(type)) {
e = new ObjMgrException(ObjMgrException.INVALID_OBJ_TYPE);
e.setProperties(objMgrProps);
throw e;
}
}
}
/*
* Check ObjMgrProperties object to make sure it contains all the correct info to execute the UPDATE command. This
* method may print out errors/warnings and exit with an error code.
*/
private static void checkUpdate(ObjMgrProperties objMgrProps) throws ObjMgrException {
ObjMgrException e;
String type = objMgrProps.getObjType();
if (type != null) {
if (!Utils.isValidObjType(type)) {
e = new ObjMgrException(ObjMgrException.INVALID_OBJ_TYPE);
e.setProperties(objMgrProps);
throw e;
}
}
}
/*
* Check ObjMgrProperties object to make sure it contains a true or false for the readonly command.
*/
private static void checkReadOnly(ObjMgrProperties objMgrProps) throws ObjMgrException {
ObjMgrException e;
String s = objMgrProps.getProperty(OBJMGR_READONLY_PROP_NAME);
if (s.equalsIgnoreCase("t") || s.equalsIgnoreCase(Boolean.TRUE.toString())) {
s = Boolean.TRUE.toString();
objMgrProps.put(OBJMGR_READONLY_PROP_NAME, Boolean.TRUE.toString());
} else if (s.equalsIgnoreCase("f") || s.equalsIgnoreCase(Boolean.FALSE.toString())) {
s = Boolean.FALSE.toString();
objMgrProps.put(OBJMGR_READONLY_PROP_NAME, Boolean.FALSE.toString());
}
if (!s.equalsIgnoreCase(Boolean.TRUE.toString()) && !s.equalsIgnoreCase(Boolean.FALSE.toString())) {
e = new ObjMgrException(ObjMgrException.INVALID_READONLY_VALUE);
e.setProperties(objMgrProps);
throw (e);
}
}
/*
* private static void previewCommands(ObjMgrProperties objMgrProps) { Globals.stdOutPrintln("Preview mode", true); }
*/
/**
* Print banner. XXX REVISIT 07/26/00 nakata: Add build number to M_BANNER
*/
private static void printBanner() {
Version version = new Version(false);
Globals.stdOutPrintln(version.getBanner(false));
}
/*
* REVISIT: Is it possible for any option value to be '-h' ?
*/
private static boolean shortHelpOptionSpecified(String args[]) {
for (int i = 0; i < args.length; ++i) {
if (args[i].equals(OBJMGR_SHORT_HELP1) || args[i].equals(OBJMGR_SHORT_HELP2)) {
return (true);
}
}
return (false);
}
private static boolean longHelpOptionSpecified(String args[]) {
for (int i = 0; i < args.length; ++i) {
if (args[i].equals(OBJMGR_LONG_HELP1) || args[i].equals(OBJMGR_LONG_HELP2)) {
return (true);
}
}
return (false);
}
private static boolean readOnlyOptionSpecified(ObjMgrProperties objMgrProps) {
String s = objMgrProps.getProperty(OBJMGR_READONLY_PROP_NAME);
if (s != null) {
return (true);
} else {
return (false);
}
}
private static boolean versionOptionSpecified(String args[]) {
for (int i = 0; i < args.length; ++i) {
if (args[i].equals(OBJMGR_VERSION1) || args[i].equals(OBJMGR_VERSION2)) {
return (true);
}
}
return (false);
}
private static boolean silentModeOptionSpecified(String args[]) {
for (int i = 0; i < args.length; ++i) {
if (args[i].equals(OBJMGR_SILENTMODE)) {
return (true);
}
}
return (false);
}
private static void printVersion() {
Version version = new Version(false);
Globals.stdOutPrintln(version.getVersion());
Globals.stdOutPrintln(ar.getString(ar.I_JAVA_VERSION) + System.getProperty("java.version") + " " + System.getProperty("java.vendor") + " "
+ System.getProperty("java.home"));
Globals.stdOutPrintln(ar.getString(ar.I_JAVA_CLASSPATH) + System.getProperty("java.class.path"));
}
/*
* Error handling methods
*/
private static void handleArgsParsingExceptions(OptionException e) {
String option = e.getOption();
if (e instanceof UnrecognizedOptionException) {
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_UNRECOG_OPTION, option, "imqobjmgr"), true);
} else if (e instanceof InvalidBasePropNameException) {
Globals.stdErrPrintln(ar.getString(ar.I_INTERNAL_ERROR_MESG), ar.getKString(ar.E_INVALID_BASE_PROPNAME, option), true);
} else if (e instanceof InvalidHardCodedValueException) {
Globals.stdErrPrintln(ar.getString(ar.I_INTERNAL_ERROR_MESG), ar.getKString(ar.E_INVALID_HARDCODED_VAL, option), true);
} else if (e instanceof MissingArgException) {
/*
* REVISIT: We can provide more specific messages here depending on what the option was e.g. for -t: Error: An object
* type was expected for option -t
*/
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_MISSING_ARG, option, "imqobjmgr"), true);
} else if (e instanceof BadNameValueArgException) {
BadNameValueArgException bnvae = (BadNameValueArgException) e;
String badArg = bnvae.getArg();
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_BAD_NV_ARG, badArg, option), true);
} else {
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_OPTION_PARSE_ERROR), true);
}
}
private static void handleCheckOptionsExceptions(ObjMgrException e) {
ObjMgrProperties objMgrProps = e.getProperties();
int type = e.getType();
/*
* REVISIT: should check objMgrProps != null
*/
switch (type) {
case ObjMgrException.NO_CMD_SPEC:
printBanner();
HelpPrinter hp = new HelpPrinter();
hp.printShortHelp(1);
break;
case ObjMgrException.BAD_CMD_SPEC:
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_BAD_COMMAND_SPEC, objMgrProps.getCommand()), true);
break;
case ObjMgrException.NO_OBJ_TYPE_SPEC:
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_NO_OBJ_TYPE_SPEC, ObjMgrOptions.OBJMGR_TYPE), true);
break;
case ObjMgrException.INVALID_OBJ_TYPE:
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_INVALID_OBJ_TYPE, objMgrProps.getObjType()), true);
break;
case ObjMgrException.INVALID_READONLY_VALUE:
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_INVALID_READONLY_VALUE, objMgrProps.getProperty(OBJMGR_READONLY_PROP_NAME)),
true);
break;
case ObjMgrException.NO_LOOKUP_NAME_SPEC:
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_NO_LOOKUP_NAME, ObjMgrOptions.OBJMGR_NAME), true);
break;
case ObjMgrException.NO_DEST_NAME_SPEC:
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_NO_DEST_NAME, ObjMgrOptions.OBJMGR_OBJ_ATTRS), true);
break;
default:
Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_OPTION_VALID_ERROR), true);
break;
}
}
private static ObjMgrProperties trimPropValues(ObjMgrProperties props) {
for (Enumeration e = props.propertyNames(); e.hasMoreElements();) {
String propName = (String) e.nextElement();
String propValue = props.getProperty(propName);
if (propValue != null) {
propValue = propValue.trim();
props.put(propName, propValue);
}
}
return props;
}
private static String getFileVersion(ObjMgrProperties props) {
String val = props.getProperty(PROP_NAME_VERSION);
return (val);
}
private static void checkVersion(String propFileName, String fileVersionStr, String expectedVersionStr, String firstVersionStr) throws ObjMgrException {
double expectedVersion, fileVersion, firstVersion;
/*
* Convert current version string to double.
*/
try {
expectedVersion = Double.parseDouble(expectedVersionStr);
} catch (NumberFormatException nfe) {
ObjMgrException ome;
expectedVersion = 0;
ome = new ObjMgrException(ar.getKString(ar.E_BAD_INPUTFILE_VERSION, expectedVersionStr));
throw (ome);
}
/*
* Convert first version string to double.
*/
try {
firstVersion = Double.parseDouble(firstVersionStr);
} catch (NumberFormatException nfe) {
ObjMgrException ome;
firstVersion = 0;
ome = new ObjMgrException(ar.getKString(ar.E_BAD_INPUTFILE_VERSION, firstVersionStr));
throw (ome);
}
/*
* Convert file version string to double.
*/
try {
fileVersion = Double.parseDouble(fileVersionStr);
} catch (NumberFormatException nfe) {
ObjMgrException ome;
Object args[] = new Object[4];
fileVersion = 0;
args[0] = propFileName;
args[1] = PROP_NAME_VERSION;
args[2] = fileVersionStr;
args[3] = expectedVersionStr;
String s = ar.getKString(ar.E_UNPARSABLE_INPUTFILE_VERSION, args);
ome = new ObjMgrException(s);
throw (ome);
}
/*
* File version is less than our first version - error !
*/
if (fileVersion < firstVersion) {
ObjMgrException ome;
Object args[] = new Object[4];
args[0] = propFileName;
args[1] = PROP_NAME_VERSION;
args[2] = fileVersionStr;
args[3] = expectedVersionStr;
String s = ar.getKString(ar.E_NOT_SUP_INPUTFILE_VERSION, args);
ome = new ObjMgrException(s);
throw (ome);
}
/*
* File version is greater than our current version - error !
*/
if (fileVersion > expectedVersion) {
ObjMgrException ome;
Object args[] = new Object[4];
args[0] = propFileName;
args[1] = PROP_NAME_VERSION;
args[2] = fileVersionStr;
args[3] = expectedVersionStr;
String s = ar.getKString(ar.E_NOT_SUP_INPUTFILE_VERSION, args);
ome = new ObjMgrException(s);
throw (ome);
}
/*
* Add checks for firstVersion < fileVersion < expectedVersion here. Currently we don't have any - since this is our
* first official version.
*/
}
}