Skip to main content
summaryrefslogtreecommitdiffstats
blob: 2786f2fe33245f07b2f4614100fdb6fe40726469 (plain) (blame)
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
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
/*******************************************************************************
 * Copyright (c) 2001, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.j2ee.commonarchivecore.internal.impl;



import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.eclipse.jst.j2ee.commonarchivecore.internal.ApplicationClientFile;
import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
import org.eclipse.jst.j2ee.commonarchivecore.internal.ArchiveTypeDiscriminatorRegistry;
import org.eclipse.jst.j2ee.commonarchivecore.internal.ClientModuleRef;
import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonArchiveFactoryRegistry;
import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonArchiveResourceHandler;
import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage;
import org.eclipse.jst.j2ee.commonarchivecore.internal.ConnectorModuleRef;
import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
import org.eclipse.jst.j2ee.commonarchivecore.internal.EJBJarFile;
import org.eclipse.jst.j2ee.commonarchivecore.internal.EJBModuleRef;
import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile;
import org.eclipse.jst.j2ee.commonarchivecore.internal.RARFile;
import org.eclipse.jst.j2ee.commonarchivecore.internal.ReadOnlyDirectory;
import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile;
import org.eclipse.jst.j2ee.commonarchivecore.internal.WebModuleRef;
import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveOptions;
import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveTypeDiscriminator;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.AppClient12ImportStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.DirectoryArchiveLoadStrategy;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.DirectoryArchiveLoadStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.Ear12ImportStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.EjbJar11ImportStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategy;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.NestedArchiveLoadStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.NullLoadStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.RarImportStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.ReadOnlyDirectoryLoadStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.TempZipFileLoadStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.War22ImportStrategyImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
import org.eclipse.jst.j2ee.commonarchivecore.internal.util.DeleteOnExitUtility;
import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseArchive;


/**
 * @generated
 */
public class CommonarchiveFactoryImpl extends EFactoryImpl implements CommonarchiveFactory {


	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static CommonarchiveFactory init() {
		try {
			CommonarchiveFactory theCommonarchiveFactory = (CommonarchiveFactory)EPackage.Registry.INSTANCE.getEFactory("commonarchive.xmi"); //$NON-NLS-1$ 
			if (theCommonarchiveFactory != null) {
				return theCommonarchiveFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new CommonarchiveFactoryImpl();
	}

	protected Map openArchives;
	private static boolean delegateNeedsInit = true;
	private CommonarchiveFactory delegate = null;

	static {
		initPrereqs();
	}

	/**
	 *  
	 */
	public CommonarchiveFactoryImpl() {
		super();
		initDelegate();
	}

	/**
	 *  
	 */
	private void initDelegate() {
		if (delegateNeedsInit) {
			delegateNeedsInit = false;
			delegate = new CommonarchiveFactoryImpl() {

				@Override
				public ApplicationClientFile createApplicationClientFile() {
					return createApplicationClientFileGen();
				}


				@Override
				public ClientModuleRef createClientModuleRef() {
					return createClientModuleRefGen();
				}

				@Override
				public ConnectorModuleRef createConnectorModuleRef() {
					return createConnectorModuleRefGen();
				}

				@Override
				public EARFile createEARFile() {
					return createEARFileGen();
				}

				@Override
				public EJBJarFile createEJBJarFile() {
					return createEJBJarFileGen();
				}

				@Override
				public EJBModuleRef createEJBModuleRef() {
					return createEJBModuleRefGen();
				}

				@Override
				public RARFile createRARFile() {
					return createRARFileGen();
				}

				@Override
				public WARFile createWARFile() {
					return createWARFileGen();
				}

				@Override
				public WebModuleRef createWebModuleRef() {
					return createWebModuleRefGen();
				}
			};
		}

	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case CommonarchivePackage.FILE: return createFile();
			case CommonarchivePackage.ARCHIVE: return createArchive();
			case CommonarchivePackage.EJB_JAR_FILE: return createEJBJarFile();
			case CommonarchivePackage.WAR_FILE: return createWARFile();
			case CommonarchivePackage.EAR_FILE: return createEARFile();
			case CommonarchivePackage.APPLICATION_CLIENT_FILE: return createApplicationClientFile();
			case CommonarchivePackage.READ_ONLY_DIRECTORY: return createReadOnlyDirectory();
			case CommonarchivePackage.RAR_FILE: return createRARFile();
			case CommonarchivePackage.EJB_MODULE_REF: return createEJBModuleRef();
			case CommonarchivePackage.WEB_MODULE_REF: return createWebModuleRef();
			case CommonarchivePackage.CLIENT_MODULE_REF: return createClientModuleRef();
			case CommonarchivePackage.CONNECTOR_MODULE_REF: return createConnectorModuleRef();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
		}
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public void archiveClosed(Archive aClosedArchive) {
		getOpenArchives().remove(aClosedArchive);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public void archiveOpened(Archive anOpenArchive) {
		getOpenArchives().put(anOpenArchive, null);
	}

	/**
	 * @deprecated Use {@link #getOpenArchivesDependingOn(Archive)}
	 */
	public boolean canClose(Archive anArchive) {
		return !getOpenArchivesDependingOn(anArchive).isEmpty();
	}

	public void closeOpenArchives() {
		if (getOpenArchives().isEmpty())
			return;
		synchronized (getOpenArchives()) {
			List opened = new ArrayList(getOpenArchives().size());
			Iterator it = getOpenArchives().keySet().iterator();
			while (it.hasNext()) {
				opened.add(it.next());
			}
			for (int i = 0; i < opened.size(); i++) {
				Archive anArchive = (Archive) opened.get(i);
				anArchive.close();
			}
		}
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public Archive copy(Archive anArchive) {
		return new ArchiveCopyUtility().copy(anArchive);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public ModuleFile copy(ModuleFile aModuleFile) {
		return new ArchiveCopyUtility().copy(aModuleFile);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public ApplicationClientFile createApplicationClientFileInitialized(java.lang.String uri) {
		ApplicationClientFile clientFile = createApplicationClientFile();
		initializeNewApplicationClientFile(clientFile, uri);
		return clientFile;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public Archive createArchiveInitialized(java.lang.String uri) {
		Archive anArchive = createArchive();
		initializeNewArchive(anArchive, uri);
		return anArchive;

	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public Archive createArchiveInitialized(ArchiveOptions options, java.lang.String uri) {
		Archive anArchive = createArchive();
		initializeNewArchive(anArchive, uri, options);
		return anArchive;

	}

	public LoadStrategy createChildLoadStrategy(String uri, LoadStrategy parent) throws java.io.IOException, java.io.FileNotFoundException {

		LoadStrategy childStrategy = null;
		if (parent.isDirectory()) {
			String dirName = ((DirectoryArchiveLoadStrategy) parent).getDirectoryUri();
			String qualifiedUri = ArchiveUtil.getOSUri(dirName, uri);
			childStrategy = createLoadStrategy(qualifiedUri);
		} else {
			childStrategy = createNestedLoadStrategy(uri, parent);
		}
		return childStrategy;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EARFile createEARFileInitialized(java.lang.String uri) {
		EARFile earFile = createEARFile();
		initializeNewEARFile(earFile, uri);
		return earFile;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EARFile createEARFileInitialized(ArchiveOptions options, java.lang.String uri) {
		EARFile earFile = createEARFile();
		initializeNewEARFile(earFile, uri, options);
		return earFile;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile createEJBJarFileInitialized(java.lang.String uri) {
		EJBJarFile ejbJarFile = createEJBJarFile();
		initializeNewEJBJarFile(ejbJarFile, uri);
		return ejbJarFile;

	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile createEJBJarFileInitialized(ArchiveOptions options, java.lang.String uri) {
		EJBJarFile ejbJarFile = createEJBJarFile();
		initializeNewEJBJarFile(ejbJarFile, uri, options);
		return ejbJarFile;

	}

	/**
	 * Returns a NullLoadStrategyImpl; used for new archives
	 */
	public LoadStrategy createEmptyLoadStrategy() {
		return new NullLoadStrategyImpl();
	}

	/**
	 * Helper method to dynamically build a load strategy from the file system. Determines whether
	 * the uri points to a jar file or directory and returns the appropriate strategy
	 */
	public LoadStrategy createLoadStrategy(String uri) throws FileNotFoundException, IOException {
		String filename = uri.replace('/', java.io.File.separatorChar);
		java.io.File file = new java.io.File(filename);
		if (!file.exists()) {
			throw new FileNotFoundException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.file_not_found_EXC_, (new Object[]{uri, file.getAbsolutePath()}))); // = "URI Name: {0}; File name: {1}"
		}
		if (file.isDirectory()) {
			return new DirectoryArchiveLoadStrategyImpl(uri);
		}
		return new org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.ZipFileLoadStrategyImpl(file);
	}

	/**
	 * Create a load strategy for a nested archive; by default will extract the nested archive to a
	 * temp file for performance reasons. This is because random access to the zip entries in a
	 * nested archive is not supported by the java.util.zip package, and if the archive's contents
	 * are being modified, copied, etc, this is much faster. If a temp file can not be created, or
	 * if the archive is opened read only (for runtime), then use a NestedArchiveLoadStrategy, which
	 * retrieves the contents of a zip entry by sequentially searching a zip input stream
	 */
	public LoadStrategy createNestedLoadStrategy(String uri, LoadStrategy parent) {
		LoadStrategy loadStrategy = null;
		ArchiveOptions options = ((Archive) parent.getContainer()).getOptions();

		if (!options.isReadOnly(uri))
			loadStrategy = createTempZipFileStrategyIfPossible(uri, parent);

		if (loadStrategy == null)
			return new NestedArchiveLoadStrategyImpl(parent);
		return loadStrategy;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public RARFile createRARFileInitialized(java.lang.String uri) {
		RARFile rarFile = createRARFile();
		initializeNewRARFile(rarFile, uri);
		return rarFile;
	}

	public LoadStrategy createTempZipFileStrategyIfPossible(String uri, LoadStrategy parent) {

		if (!ArchiveUtil.shouldUseTempDirectoryForRead())
			return null;

		try {
			java.io.File tempFile = ArchiveUtil.createTempFile(uri);
			DeleteOnExitUtility.markForDeletion(tempFile);
			InputStream in = parent.getInputStream(uri);
			OutputStream out = new FileOutputStream(tempFile);
			ArchiveUtil.copy(in, out);
			return new TempZipFileLoadStrategyImpl(tempFile);
		} catch (IOException ex) {
			ArchiveUtil.inform(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.make_temp_file_WARN_, (new Object[]{uri})) + ex.getLocalizedMessage()); // = "Warning: Unable to create temp file for {0}.  This will impact performance."
		}
		return null;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public WARFile createWARFileInitialized(java.lang.String uri) {
		WARFile warFile = createWARFile();
		initializeNewWARFile(warFile, uri);
		return warFile;
	}

	protected ArchiveOptions defaultOptions(LoadStrategy aLoadStrategy) {
		ArchiveOptions options = new ArchiveOptions();
		options.setLoadStrategy(aLoadStrategy);
		return options;
	}

	public static CommonarchiveFactory getActiveFactory() {
		CommonarchivePackage pkg = getPackage();
		if (pkg != null)
			return pkg.getCommonarchiveFactory();
		return null;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public java.lang.String[] getManifestClassPathValues(java.lang.String uri) throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		String[] result = anArchive.getManifest().getClassPathTokenized();
		anArchive.close();
		return result;
	}

	/**
	 * Insert the method's description here. Creation date: (02/23/01 2:35:55 PM)
	 * 
	 * @return java.util.Map
	 */
	public java.util.Map getOpenArchives() {
		if (openArchives == null)
			openArchives = Collections.synchronizedMap(new WeakHashMap());
		return openArchives;
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public Set getOpenArchivesDependingOn(Archive anArchive) {
		Set dependents = new HashSet();
		synchronized (getOpenArchives()) {
			Iterator opened = getOpenArchives().keySet().iterator();
			while (opened.hasNext()) {
				Archive openedArchive = (Archive) opened.next();
				if (openedArchive == anArchive)
					continue;
				if (!openedArchive.isIndexed())
					// **********Optimization***********
					// If the file list has never been built for the archive, we
					// don't want to trigger
					// it now,
					// and we are sure that the archive is not preventing the
					// parameter from closing
					continue;
				List files = openedArchive.getFiles();
				for (int i = 0; i < files.size(); i++) {
					File aFile = (File) files.get(i);
					if (aFile.getLoadingContainer() == anArchive) {
						Archive outermost = openedArchive;
						org.eclipse.jst.j2ee.commonarchivecore.internal.Container c = openedArchive.getContainer();
						while (c != null && c.isArchive()) {
							outermost = (Archive) c;
							c = c.getContainer();
						}
						dependents.add(outermost);
					}
				}
			}
		}
		//Elements from one of the children (e.g., a module file in an ear) may have been copied to
		//another archive
		List nestedArchives = anArchive.getArchiveFiles();
		for (int i = 0; i < nestedArchives.size(); i++) {
			dependents.addAll(getOpenArchivesDependingOn((Archive) nestedArchives.get(i)));
		}
		return dependents;
	}

	protected static void initPrereqs() {
		org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveInit.invokePrereqInits(true);
		ArchiveTypeDiscriminator disc = RootArchiveTypeDescriminatorImpl.singleton();
		disc.addChild(Ear12ImportStrategyImpl.getDiscriminator());
		disc.addChild(War22ImportStrategyImpl.getDiscriminator());
		disc.addChild(AppClient12ImportStrategyImpl.getDiscriminator());
		disc.addChild(RarImportStrategyImpl.getDiscriminator());
		disc.addChild(RootEJBJarDescriminatorImpl.singleton());
	}

	public void initializeNewApplicationClientFile(ApplicationClientFile anArchive, String uri) {
		initializeNewModuleFile(anArchive, uri);
	}

	public void initializeNewArchive(Archive anArchive, String uri) {
		anArchive.setURI(uri);
		anArchive.setSize(0);
		anArchive.setLastModified(System.currentTimeMillis());
		anArchive.setDirectoryEntry(false);
		anArchive.setLoadStrategy(createEmptyLoadStrategy());
	}

	public void initializeNewEARFile(EARFile anArchive, String uri) {
		initializeNewModuleFile(anArchive, uri);
	}

	public void initializeNewEJBJarFile(EJBJarFile anArchive, String uri) {
		initializeNewModuleFile(anArchive, uri);
	}

	public void initializeNewModuleFile(ModuleFile anArchive, String uri) {
		initializeNewArchive(anArchive, uri);
		anArchive.makeDeploymentDescriptorResource();
	}

	public void initializeNewRARFile(RARFile anArchive, String uri) {
		initializeNewModuleFile(anArchive, uri);
	}

	public void initializeNewWARFile(WARFile anArchive, String uri) {
		initializeNewModuleFile(anArchive, uri);
	}

	public void initializeNewApplicationClientFile(ApplicationClientFile anArchive, String uri, ArchiveOptions options) {
		initializeNewModuleFile(anArchive, uri, options);
	}

	public void initializeNewArchive(Archive anArchive, String uri, ArchiveOptions options) {
		if (options.getLoadStrategy() == null) {
			try {
				options.setLoadStrategy(createEmptyLoadStrategy());
			} catch (Exception ex) {
				Logger.getLogger().logError(ex);
			}
		}

		anArchive.setURI(uri);
		anArchive.setSize(0);
		anArchive.setLastModified(System.currentTimeMillis());
		anArchive.setDirectoryEntry(false);
		anArchive.setLoadStrategy(options.getLoadStrategy());
		anArchive.setOptions(options);

	}

	public void initializeNewEARFile(EARFile anArchive, String uri, ArchiveOptions options) {
		initializeNewModuleFile(anArchive, uri, options);
	}

	public void initializeNewEJBJarFile(EJBJarFile anArchive, String uri, ArchiveOptions options) {
		initializeNewModuleFile(anArchive, uri, options);
	}

	public void initializeNewModuleFile(ModuleFile anArchive, String uri, ArchiveOptions options) {
		initializeNewArchive(anArchive, uri, options);
		anArchive.makeDeploymentDescriptorResource();
	}

	public void initializeNewRARFile(RARFile anArchive, String uri, ArchiveOptions options) {
		initializeNewModuleFile(anArchive, uri, options);
	}

	public void initializeNewWARFile(WARFile anArchive, String uri, ArchiveOptions options) {
		initializeNewModuleFile(anArchive, uri, options);
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public ApplicationClientFile openApplicationClientFile(ArchiveOptions options, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(options, uri);
		ArchiveTypeDiscriminator disc = AppClient12ImportStrategyImpl.getDiscriminator();
		return (ApplicationClientFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public ApplicationClientFile openApplicationClientFile(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		ArchiveTypeDiscriminator disc = AppClient12ImportStrategyImpl.getDiscriminator();
		return (ApplicationClientFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public ApplicationClientFile openApplicationClientFile(String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		ArchiveTypeDiscriminator disc = AppClient12ImportStrategyImpl.getDiscriminator();
		return (ApplicationClientFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public Archive openArchive(ArchiveOptions options, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(options, uri);
		return openSpecificArchive(anArchive, RootArchiveTypeDescriminatorImpl.singleton());
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public Archive openArchive(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		return openSpecificArchive(anArchive, RootArchiveTypeDescriminatorImpl.singleton());
	}

	/**
	 * openArchive(String uri) - open the archive by the passed name, setting up the appropriate
	 * strategies. Name may be a path to a jar, a zip, or a directory return the appropriate Archive
	 * type
	 */
	public Archive openArchive(java.lang.String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		return openSpecificArchive(anArchive, RootArchiveTypeDescriminatorImpl.singleton());
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public Archive openArchive(String uri, String extraClassPath) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		anArchive.setExtraClasspath(extraClassPath);
		return openSpecificArchive(anArchive, RootArchiveTypeDescriminatorImpl.singleton());
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public EARFile openEARFile(ArchiveOptions options, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(options, uri);
		ArchiveTypeDiscriminator disc = Ear12ImportStrategyImpl.getDiscriminator();
		return (EARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EARFile openEARFile(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		ArchiveTypeDiscriminator disc = Ear12ImportStrategyImpl.getDiscriminator();
		return (EARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EARFile openEARFile(String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		ArchiveTypeDiscriminator disc = Ear12ImportStrategyImpl.getDiscriminator();
		return (EARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public EJBJarFile openEJB11JarFile(ArchiveOptions options, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(options, uri);
		ArchiveTypeDiscriminator disc = EjbJar11ImportStrategyImpl.getDiscriminator();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile openEJB11JarFile(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		ArchiveTypeDiscriminator disc = EjbJar11ImportStrategyImpl.getDiscriminator();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile openEJB11JarFile(String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		ArchiveTypeDiscriminator disc = EjbJar11ImportStrategyImpl.getDiscriminator();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public EJBJarFile openEJBJarFile(ArchiveOptions options, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(options, uri);
		RootEJBJarDescriminatorImpl disc = (RootEJBJarDescriminatorImpl) RootEJBJarDescriminatorImpl.singleton();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile openEJBJarFile(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		RootEJBJarDescriminatorImpl disc = (RootEJBJarDescriminatorImpl) RootEJBJarDescriminatorImpl.singleton();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile openEJBJarFile(LoadStrategy aLoadStrategy, String uri, String extraClassPath) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		anArchive.setExtraClasspath(extraClassPath);
		RootEJBJarDescriminatorImpl disc = (RootEJBJarDescriminatorImpl) RootEJBJarDescriminatorImpl.singleton();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile openEJBJarFile(String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		RootEJBJarDescriminatorImpl disc = (RootEJBJarDescriminatorImpl) RootEJBJarDescriminatorImpl.singleton();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public EJBJarFile openEJBJarFile(String uri, String extraClassPath) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		anArchive.setExtraClasspath(extraClassPath);
		RootEJBJarDescriminatorImpl disc = (RootEJBJarDescriminatorImpl) RootEJBJarDescriminatorImpl.singleton();
		return (EJBJarFile) openSpecificArchive(anArchive, disc);
	}

	public Archive openNestedArchive(LooseArchive loose, Archive parent) throws OpenFailureException {
		String uri = loose.getUri();
		try {
			if(loose.getBinariesPath() == null){
				throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.open_nested_EXC_, (new Object[] {uri,parent.getURI()})), null); // = "Could not open the nested archive "{0}" in "{1}""
			}
			LoadStrategy childStrategy = createLoadStrategy(loose.getBinariesPath());
			childStrategy.setLooseArchive(loose);
			ArchiveOptions options = parent.getOptions().cloneWith(childStrategy, loose.getUri());
			return primOpenArchive(options, uri);
		} catch (IOException ex) {
			throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.open_nested_EXC_, (new Object[]{uri, parent.getURI()})), ex); // = "Could not open the nested archive "{0}" in "{1}""
		}
	}

	/**
	 * @see CommonarchiveFactory
	 */
	public Archive openNestedArchive(String uri, Archive parent) throws OpenFailureException {
		try {
			LoadStrategy childStrategy = createChildLoadStrategy(uri, parent.getLoadStrategy());
			ArchiveOptions options = parent.getOptions().cloneWith(childStrategy, uri);
			if (options.shouldDiscriminateNestedArchives())
				return openArchive(options, uri);
			return primOpenArchive(options, uri);
		} catch (IOException ex) {
			throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.open_nested_EXC_, (new Object[]{uri, parent.getURI()})), ex); // = "Could not open the nested archive "{0}" in "{1}""
		}
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public RARFile openRARFile(ArchiveOptions options, java.lang.String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(options, uri);
		ArchiveTypeDiscriminator disc = RarImportStrategyImpl.getDiscriminator();
		return (RARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public RARFile openRARFile(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		ArchiveTypeDiscriminator disc = RarImportStrategyImpl.getDiscriminator();
		return (RARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public RARFile openRARFile(String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		ArchiveTypeDiscriminator disc = RarImportStrategyImpl.getDiscriminator();
		return (RARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * openReadOnlyDirectory method comment.
	 */
	public ReadOnlyDirectory openReadOnlyDirectory(java.lang.String uri) throws java.io.IOException {
		java.io.File aFile = new java.io.File(uri);
		if (!aFile.exists())
			throw new FileNotFoundException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.could_not_find_dir_EXC_, (new Object[]{uri}))); // = "Unable to open directory "
		if (!aFile.isDirectory())
			throw new IOException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.not_a_dir_EXC_, (new Object[]{uri}))); // = "Unable to open directory because file is not a directory :"
		LoadStrategy strategy = new ReadOnlyDirectoryLoadStrategyImpl(uri);
		ReadOnlyDirectory container = createReadOnlyDirectory();
		container.setURI(uri);
		container.setLoadStrategy(strategy);
		container.setLastModified(aFile.lastModified());
		return container;
	}

	/**
	 * Take the primitive archive and run it through the list of discriminators to convert it to the
	 * correct specialized type; after after conversion, tell the archive to initalize itself if
	 * necessary.
	 */
	protected Archive openSpecificArchive(Archive anArchive, ArchiveTypeDiscriminator disc) throws OpenFailureException {
		if (!disc.canImport(anArchive)) {
			anArchive.close();
			throw new OpenFailureException(disc.getUnableToOpenMessage());
		}
		Archive specificArchive = disc.openArchive(anArchive);
		specificArchive.initializeAfterOpen();
		return specificArchive;
	}

	/**
	 * Special case for ejb jar files, because of the need to support non-compliant 1.0 jars
	 */
	protected Archive openSpecificArchive(Archive anArchive, RootEJBJarDescriminatorImpl disc) throws OpenFailureException {
		Archive specific = openSpecificArchive(anArchive, (ArchiveTypeDiscriminator) disc);
		if (specific == anArchive) {
			//The discriminator failed to convert the archve to an ejb jar file
			anArchive.close();
			throw new OpenFailureException(disc.getUnableToOpenMessage());
		}
		return specific;
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public WARFile openWARFile(ArchiveOptions options, java.lang.String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(options, uri);
		ArchiveTypeDiscriminator disc = War22ImportStrategyImpl.getDiscriminator();
		return (WARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public WARFile openWARFile(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(aLoadStrategy, uri);
		ArchiveTypeDiscriminator disc = War22ImportStrategyImpl.getDiscriminator();
		return (WARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public WARFile openWARFile(String uri) throws OpenFailureException {
		Archive anArchive = primOpenArchive(uri);
		ArchiveTypeDiscriminator disc = War22ImportStrategyImpl.getDiscriminator();
		return (WARFile) openSpecificArchive(anArchive, disc);
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public Archive primOpenArchive(ArchiveOptions options, String uri) throws OpenFailureException {
		if (options.getLoadStrategy() == null) {
			try {
				options.setLoadStrategy(createLoadStrategy(uri));
			} catch (IOException ex) {
				throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.could_not_open_EXC_, (new Object[]{uri})), ex); // = "Could not open "
			}
		}
		Archive anArchive = createArchive();
		anArchive.setURI(uri);
		anArchive.setOriginalURI(uri);
		anArchive.setLoadStrategy(options.getLoadStrategy());
		anArchive.setOptions(options);
		ArchiveTypeDiscriminatorRegistry.getInstance().contributeTypes(anArchive);
		return anArchive;
	}

	/**
	 * open the archive, setting up the appropriate strategies, using the loadStrategy passed in;
	 * URI still necessary so the archive has a name, but it will not be used for io.
	 */
	public Archive primOpenArchive(LoadStrategy aLoadStrategy, String uri) throws OpenFailureException {
		return primOpenArchive(defaultOptions(aLoadStrategy), uri);
	}

	/**
	 * @see com.ibm.etools.commonarchive.CommonarchiveFactory
	 */
	public Archive primOpenArchive(String uri) throws OpenFailureException {
		return primOpenArchive(new ArchiveOptions(), uri);
	}

	protected void setOpenArchives(java.util.Map newOpenArchives) {
		openArchives = newOpenArchives;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public WARFile createWARFileGen() {
		WARFileImpl warFile = new WARFileImpl();
		return warFile;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public EJBJarFile createEJBJarFileGen() {
		EJBJarFileImpl ejbJarFile = new EJBJarFileImpl();
		return ejbJarFile;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public ApplicationClientFile createApplicationClientFileGen() {
		ApplicationClientFileImpl applicationClientFile = new ApplicationClientFileImpl();
		return applicationClientFile;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public EARFile createEARFileGen() {
		EARFileImpl earFile = new EARFileImpl();
		return earFile;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public RARFile createRARFileGen() {
		RARFileImpl rarFile = new RARFileImpl();
		return rarFile;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public File createFile() {
		FileImpl file = new FileImpl();
		return file;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public ReadOnlyDirectory createReadOnlyDirectory() {
		ReadOnlyDirectoryImpl readOnlyDirectory = new ReadOnlyDirectoryImpl();
		return readOnlyDirectory;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public CommonarchivePackage getCommonarchivePackage() {
		return (CommonarchivePackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	public static CommonarchivePackage getPackage() {
		return CommonarchivePackage.eINSTANCE;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public EJBModuleRef createEJBModuleRefGen() {
		EJBModuleRefImpl ejbModuleRef = new EJBModuleRefImpl();
		return ejbModuleRef;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public WebModuleRef createWebModuleRefGen() {
		WebModuleRefImpl webModuleRef = new WebModuleRefImpl();
		return webModuleRef;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public ClientModuleRef createClientModuleRefGen() {
		ClientModuleRefImpl clientModuleRef = new ClientModuleRefImpl();
		return clientModuleRef;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public ConnectorModuleRef createConnectorModuleRefGen() {
		ConnectorModuleRefImpl connectorModuleRef = new ConnectorModuleRefImpl();
		return connectorModuleRef;
	}

	public ClientModuleRef createClientModuleRef(ApplicationClientFile clientFile) {
		ClientModuleRef ref = createClientModuleRef();
		ref.setModuleFile(clientFile);
		return ref;
	}

	/*
	 * @see CommonarchiveFactory#createConnectorModuleRef(RARFile)
	 */
	public ConnectorModuleRef createConnectorModuleRef(RARFile rarFile) {
		ConnectorModuleRef ref = createConnectorModuleRef();
		ref.setModuleFile(rarFile);
		return ref;

	}

	/*
	 * @see CommonarchiveFactory#createEJBModuleRef(EJBJarFile)
	 */
	public EJBModuleRef createEJBModuleRef(EJBJarFile ejbJarFile) {
		EJBModuleRef ref = createEJBModuleRef();
		ref.setModuleFile(ejbJarFile);
		return ref;
	}

	/*
	 * @see CommonarchiveFactory#createWebModuleRef(WARFile)
	 */
	public WebModuleRef createWebModuleRef(WARFile warFile) {
		WebModuleRef ref = createWebModuleRef();
		ref.setModuleFile(warFile);
		return ref;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public Archive createArchive() {
		ArchiveImpl archive = new ArchiveImpl();
		return archive;
	}

	public ApplicationClientFile createApplicationClientFile() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createApplicationClientFile();
	}


	public ClientModuleRef createClientModuleRef() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createClientModuleRef();
	}

	public ConnectorModuleRef createConnectorModuleRef() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createConnectorModuleRef();
	}

	public EARFile createEARFile() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createEARFile();
	}

	public EJBJarFile createEJBJarFile() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createEJBJarFile();
	}

	public EJBModuleRef createEJBModuleRef() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createEJBModuleRef();
	}

	public RARFile createRARFile() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createRARFile();
	}

	public WARFile createWARFile() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createWARFile();
	}

	public WebModuleRef createWebModuleRef() {
		return CommonArchiveFactoryRegistry.INSTANCE.getCommonArchiveFactory().createWebModuleRef();
	}

	/**
	 * @return
	 */
	public CommonarchiveFactory getDelegate() {
		return delegate;
	}

}

Back to the top