KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > handler > HandlerMaker


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.juddi.handler;
17
18 import java.util.HashMap JavaDoc;
19
20 import org.apache.commons.logging.Log;
21 import org.apache.commons.logging.LogFactory;
22 import org.apache.juddi.datatype.Address;
23 import org.apache.juddi.datatype.AddressLine;
24 import org.apache.juddi.datatype.BindingKey;
25 import org.apache.juddi.datatype.BusinessKey;
26 import org.apache.juddi.datatype.CategoryBag;
27 import org.apache.juddi.datatype.Description;
28 import org.apache.juddi.datatype.DiscoveryURL;
29 import org.apache.juddi.datatype.DiscoveryURLs;
30 import org.apache.juddi.datatype.Email;
31 import org.apache.juddi.datatype.IdentifierBag;
32 import org.apache.juddi.datatype.KeyedReference;
33 import org.apache.juddi.datatype.Name;
34 import org.apache.juddi.datatype.OverviewDoc;
35 import org.apache.juddi.datatype.OverviewURL;
36 import org.apache.juddi.datatype.PersonName;
37 import org.apache.juddi.datatype.Phone;
38 import org.apache.juddi.datatype.ServiceKey;
39 import org.apache.juddi.datatype.SharedRelationships;
40 import org.apache.juddi.datatype.TModelBag;
41 import org.apache.juddi.datatype.TModelKey;
42 import org.apache.juddi.datatype.UploadRegister;
43 import org.apache.juddi.datatype.assertion.PublisherAssertion;
44 import org.apache.juddi.datatype.binding.AccessPoint;
45 import org.apache.juddi.datatype.binding.BindingTemplate;
46 import org.apache.juddi.datatype.binding.BindingTemplates;
47 import org.apache.juddi.datatype.binding.HostingRedirector;
48 import org.apache.juddi.datatype.binding.InstanceDetails;
49 import org.apache.juddi.datatype.binding.InstanceParms;
50 import org.apache.juddi.datatype.binding.TModelInstanceDetails;
51 import org.apache.juddi.datatype.binding.TModelInstanceInfo;
52 import org.apache.juddi.datatype.business.BusinessEntity;
53 import org.apache.juddi.datatype.business.BusinessEntityExt;
54 import org.apache.juddi.datatype.business.Contact;
55 import org.apache.juddi.datatype.business.Contacts;
56 import org.apache.juddi.datatype.publisher.Publisher;
57 import org.apache.juddi.datatype.publisher.PublisherID;
58 import org.apache.juddi.datatype.request.AddPublisherAssertions;
59 import org.apache.juddi.datatype.request.AuthInfo;
60 import org.apache.juddi.datatype.request.DeleteBinding;
61 import org.apache.juddi.datatype.request.DeleteBusiness;
62 import org.apache.juddi.datatype.request.DeletePublisher;
63 import org.apache.juddi.datatype.request.DeletePublisherAssertions;
64 import org.apache.juddi.datatype.request.DeleteService;
65 import org.apache.juddi.datatype.request.DeleteSubscription;
66 import org.apache.juddi.datatype.request.DeleteTModel;
67 import org.apache.juddi.datatype.request.DiscardAuthToken;
68 import org.apache.juddi.datatype.request.FindBinding;
69 import org.apache.juddi.datatype.request.FindBusiness;
70 import org.apache.juddi.datatype.request.FindPublisher;
71 import org.apache.juddi.datatype.request.FindQualifier;
72 import org.apache.juddi.datatype.request.FindQualifiers;
73 import org.apache.juddi.datatype.request.FindRelatedBusinesses;
74 import org.apache.juddi.datatype.request.FindService;
75 import org.apache.juddi.datatype.request.FindTModel;
76 import org.apache.juddi.datatype.request.GetAssertionStatusReport;
77 import org.apache.juddi.datatype.request.GetAuthToken;
78 import org.apache.juddi.datatype.request.GetBindingDetail;
79 import org.apache.juddi.datatype.request.GetBusinessDetail;
80 import org.apache.juddi.datatype.request.GetBusinessDetailExt;
81 import org.apache.juddi.datatype.request.GetPublisherAssertions;
82 import org.apache.juddi.datatype.request.GetPublisherDetail;
83 import org.apache.juddi.datatype.request.GetRegisteredInfo;
84 import org.apache.juddi.datatype.request.GetRegistryInfo;
85 import org.apache.juddi.datatype.request.GetServiceDetail;
86 import org.apache.juddi.datatype.request.GetSubscriptions;
87 import org.apache.juddi.datatype.request.GetTModelDetail;
88 import org.apache.juddi.datatype.request.SaveBinding;
89 import org.apache.juddi.datatype.request.SaveBusiness;
90 import org.apache.juddi.datatype.request.SavePublisher;
91 import org.apache.juddi.datatype.request.SaveService;
92 import org.apache.juddi.datatype.request.SaveSubscription;
93 import org.apache.juddi.datatype.request.SaveTModel;
94 import org.apache.juddi.datatype.request.SetPublisherAssertions;
95 import org.apache.juddi.datatype.request.ValidateValues;
96 import org.apache.juddi.datatype.response.AssertionStatusItem;
97 import org.apache.juddi.datatype.response.AssertionStatusReport;
98 import org.apache.juddi.datatype.response.AuthToken;
99 import org.apache.juddi.datatype.response.BindingDetail;
100 import org.apache.juddi.datatype.response.BusinessDetail;
101 import org.apache.juddi.datatype.response.BusinessDetailExt;
102 import org.apache.juddi.datatype.response.BusinessInfo;
103 import org.apache.juddi.datatype.response.BusinessInfos;
104 import org.apache.juddi.datatype.response.BusinessList;
105 import org.apache.juddi.datatype.response.CompletionStatus;
106 import org.apache.juddi.datatype.response.DispositionReport;
107 import org.apache.juddi.datatype.response.ErrInfo;
108 import org.apache.juddi.datatype.response.KeysOwned;
109 import org.apache.juddi.datatype.response.Property;
110 import org.apache.juddi.datatype.response.PublisherAssertions;
111 import org.apache.juddi.datatype.response.PublisherDetail;
112 import org.apache.juddi.datatype.response.PublisherInfo;
113 import org.apache.juddi.datatype.response.PublisherInfos;
114 import org.apache.juddi.datatype.response.PublisherList;
115 import org.apache.juddi.datatype.response.RegisteredInfo;
116 import org.apache.juddi.datatype.response.RegistryInfo;
117 import org.apache.juddi.datatype.response.RelatedBusinessInfo;
118 import org.apache.juddi.datatype.response.RelatedBusinessInfos;
119 import org.apache.juddi.datatype.response.RelatedBusinessesList;
120 import org.apache.juddi.datatype.response.Result;
121 import org.apache.juddi.datatype.response.ServiceDetail;
122 import org.apache.juddi.datatype.response.ServiceInfo;
123 import org.apache.juddi.datatype.response.ServiceInfos;
124 import org.apache.juddi.datatype.response.ServiceList;
125 import org.apache.juddi.datatype.response.TModelDetail;
126 import org.apache.juddi.datatype.response.TModelInfo;
127 import org.apache.juddi.datatype.response.TModelInfos;
128 import org.apache.juddi.datatype.response.TModelList;
129 import org.apache.juddi.datatype.service.BusinessService;
130 import org.apache.juddi.datatype.service.BusinessServices;
131 import org.apache.juddi.datatype.subscription.Subscription;
132 import org.apache.juddi.datatype.subscription.SubscriptionKey;
133 import org.apache.juddi.datatype.tmodel.TModel;
134 import org.apache.juddi.error.RegistryException;
135
136 /**
137  * Holds a static HashMap linking the string representation of operations to
138  * instantances of the appropriate maker class (BusinessDetail to
139  * BusinessDetailHandler). Returns a reference to an instance of a maker object.
140  * HandlerMaker follows the Singleton pattern (GoF p.127). Use getInstance
141  * instead of the 'new' operator to get an instance of this class.
142  *
143  * @author Steve Viens (sviens@apache.org)
144  */

145 public class HandlerMaker
146 {
147   // private reference to the jUDDI logger
148
private static Log log = LogFactory.getLog(HandlerMaker.class);
149
150   // singleton HandlerMaker
151
private static HandlerMaker maker = null;
152
153   // static table of Handlers
154
private HashMap JavaDoc handlers = null;
155
156   /**
157    *
158    */

159   private HandlerMaker()
160   {
161     handlers = new HashMap JavaDoc();
162     AbstractHandler handler = null;
163
164     handler = new AccessPointHandler(this);
165     handlers.put(AccessPoint.class.getName().toLowerCase(),handler);
166     handlers.put(AccessPointHandler.TAG_NAME.toLowerCase(),handler);
167
168     handler = new AddPublisherAssertionsHandler(this);
169     handlers.put(AddPublisherAssertions.class.getName().toLowerCase(),handler);
170     handlers.put(AddPublisherAssertionsHandler.TAG_NAME.toLowerCase(),handler);
171
172     handler = new AddressHandler(this);
173     handlers.put(Address.class.getName().toLowerCase(),handler);
174     handlers.put(AddressHandler.TAG_NAME.toLowerCase(),handler);
175
176     handler = new AddressLineHandler(this);
177     handlers.put(AddressLine.class.getName().toLowerCase(),handler);
178     handlers.put(AddressLineHandler.TAG_NAME.toLowerCase(),handler);
179
180     handler = new AssertionStatusItemHandler(this);
181     handlers.put(AssertionStatusItem.class.getName().toLowerCase(),handler);
182     handlers.put(AssertionStatusItemHandler.TAG_NAME.toLowerCase(),handler);
183
184     handler = new AssertionStatusReportHandler(this);
185     handlers.put(AssertionStatusReport.class.getName().toLowerCase(),handler);
186     handlers.put(AssertionStatusReportHandler.TAG_NAME.toLowerCase(),handler);
187
188     handler = new AuthInfoHandler(this);
189     handlers.put(AuthInfo.class.getName().toLowerCase(),handler);
190     handlers.put(AuthInfoHandler.TAG_NAME.toLowerCase(),handler);
191
192     handler = new AuthTokenHandler(this);
193     handlers.put(AuthToken.class.getName().toLowerCase(),handler);
194     handlers.put(AuthTokenHandler.TAG_NAME.toLowerCase(),handler);
195
196     handler = new BindingDetailHandler(this);
197     handlers.put(BindingDetail.class.getName().toLowerCase(),handler);
198     handlers.put(BindingDetailHandler.TAG_NAME.toLowerCase(),handler);
199
200     handler = new BindingKeyHandler(this);
201     handlers.put(BindingKey.class.getName().toLowerCase(),handler);
202     handlers.put(BindingKeyHandler.TAG_NAME.toLowerCase(),handler);
203
204     handler = new BindingTemplateHandler(this);
205     handlers.put(BindingTemplate.class.getName().toLowerCase(),handler);
206     handlers.put(BindingTemplateHandler.TAG_NAME.toLowerCase(),handler);
207
208     handler = new BindingTemplatesHandler(this);
209     handlers.put(BindingTemplates.class.getName().toLowerCase(),handler);
210     handlers.put(BindingTemplatesHandler.TAG_NAME.toLowerCase(),handler);
211
212     handler = new BusinessDetailHandler(this);
213     handlers.put(BusinessDetail.class.getName().toLowerCase(),handler);
214     handlers.put(BusinessDetailHandler.TAG_NAME.toLowerCase(),handler);
215
216     handler = new BusinessDetailExtHandler(this);
217     handlers.put(BusinessDetailExt.class.getName().toLowerCase(),handler);
218     handlers.put(BusinessDetailExtHandler.TAG_NAME.toLowerCase(),handler);
219
220     handler = new BusinessEntityHandler(this);
221     handlers.put(BusinessEntity.class.getName().toLowerCase(),handler);
222     handlers.put(BusinessEntityHandler.TAG_NAME.toLowerCase(),handler);
223
224     handler = new BusinessEntityExtHandler(this);
225     handlers.put(BusinessEntityExt.class.getName().toLowerCase(),handler);
226     handlers.put(BusinessEntityExtHandler.TAG_NAME.toLowerCase(),handler);
227
228     handler = new BusinessInfoHandler(this);
229     handlers.put(BusinessInfo.class.getName().toLowerCase(),handler);
230     handlers.put(BusinessInfoHandler.TAG_NAME.toLowerCase(),handler);
231
232     handler = new BusinessInfosHandler(this);
233     handlers.put(BusinessInfos.class.getName().toLowerCase(),handler);
234     handlers.put(BusinessInfosHandler.TAG_NAME.toLowerCase(),handler);
235
236     handler = new BusinessKeyHandler(this);
237     handlers.put(BusinessKey.class.getName().toLowerCase(),handler);
238     handlers.put(BusinessKeyHandler.TAG_NAME.toLowerCase(),handler);
239
240     handler = new BusinessListHandler(this);
241     handlers.put(BusinessList.class.getName().toLowerCase(),handler);
242     handlers.put(BusinessListHandler.TAG_NAME.toLowerCase(),handler);
243
244     handler = new BusinessServiceHandler(this);
245     handlers.put(BusinessService.class.getName().toLowerCase(),handler);
246     handlers.put(BusinessServiceHandler.TAG_NAME.toLowerCase(),handler);
247
248     handler = new BusinessServicesHandler(this);
249     handlers.put(BusinessServices.class.getName().toLowerCase(),handler);
250     handlers.put(BusinessServicesHandler.TAG_NAME.toLowerCase(),handler);
251
252     handler = new CategoryBagHandler(this);
253     handlers.put(CategoryBag.class.getName().toLowerCase(),handler);
254     handlers.put(CategoryBagHandler.TAG_NAME.toLowerCase(),handler);
255
256     handler = new CompletionStatusHandler(this);
257     handlers.put(CompletionStatus.class.getName().toLowerCase(),handler);
258     handlers.put(CompletionStatusHandler.TAG_NAME.toLowerCase(),handler);
259
260     handler = new ContactHandler(this);
261     handlers.put(Contact.class.getName().toLowerCase(),handler);
262     handlers.put(ContactHandler.TAG_NAME.toLowerCase(),handler);
263
264     handler = new ContactsHandler(this);
265     handlers.put(Contacts.class.getName().toLowerCase(),handler);
266     handlers.put(ContactsHandler.TAG_NAME.toLowerCase(),handler);
267
268     handler = new DeleteBindingHandler(this);
269     handlers.put(DeleteBinding.class.getName().toLowerCase(),handler);
270     handlers.put(DeleteBindingHandler.TAG_NAME.toLowerCase(),handler);
271
272     handler = new DeleteBusinessHandler(this);
273     handlers.put(DeleteBusiness.class.getName().toLowerCase(),handler);
274     handlers.put(DeleteBusinessHandler.TAG_NAME.toLowerCase(),handler);
275
276     handler = new DeletePublisherAssertionsHandler(this);
277     handlers.put(DeletePublisherAssertions.class.getName().toLowerCase(),handler);
278     handlers.put(DeletePublisherAssertionsHandler.TAG_NAME.toLowerCase(),handler);
279
280     handler = new DeletePublisherHandler(this);
281     handlers.put(DeletePublisher.class.getName().toLowerCase(),handler);
282     handlers.put(DeletePublisherHandler.TAG_NAME.toLowerCase(),handler);
283
284     handler = new DeleteServiceHandler(this);
285     handlers.put(DeleteService.class.getName().toLowerCase(),handler);
286     handlers.put(DeleteServiceHandler.TAG_NAME.toLowerCase(),handler);
287
288     handler = new DeleteSubscriptionHandler(this);
289     handlers.put(DeleteSubscription.class.getName().toLowerCase(),handler);
290     handlers.put(DeleteSubscriptionHandler.TAG_NAME.toLowerCase(),handler);
291   
292     handler = new DeleteTModelHandler(this);
293     handlers.put(DeleteTModel.class.getName().toLowerCase(),handler);
294     handlers.put(DeleteTModelHandler.TAG_NAME.toLowerCase(),handler);
295
296     handler = new DescriptionHandler(this);
297     handlers.put(Description.class.getName().toLowerCase(),handler);
298     handlers.put(DescriptionHandler.TAG_NAME.toLowerCase(),handler);
299
300     handler = new DiscardAuthTokenHandler(this);
301     handlers.put(DiscardAuthToken.class.getName().toLowerCase(),handler);
302     handlers.put(DiscardAuthTokenHandler.TAG_NAME.toLowerCase(),handler);
303
304     handler = new DiscoveryURLHandler(this);
305     handlers.put(DiscoveryURL.class.getName().toLowerCase(),handler);
306     handlers.put(DiscoveryURLHandler.TAG_NAME.toLowerCase(),handler);
307
308     handler = new DiscoveryURLsHandler(this);
309     handlers.put(DiscoveryURLs.class.getName().toLowerCase(),handler);
310     handlers.put(DiscoveryURLsHandler.TAG_NAME.toLowerCase(),handler);
311
312     handler = new DispositionReportHandler(this);
313     handlers.put(DispositionReport.class.getName().toLowerCase(),handler);
314     handlers.put(DispositionReportHandler.TAG_NAME.toLowerCase(),handler);
315
316     handler = new EmailHandler(this);
317     handlers.put(Email.class.getName().toLowerCase(),handler);
318     handlers.put(EmailHandler.TAG_NAME.toLowerCase(),handler);
319
320     handler = new ErrInfoHandler(this);
321     handlers.put(ErrInfo.class.getName().toLowerCase(),handler);
322     handlers.put(ErrInfoHandler.TAG_NAME.toLowerCase(),handler);
323
324     handler = new FindBindingHandler(this);
325     handlers.put(FindBinding.class.getName().toLowerCase(),handler);
326     handlers.put(FindBindingHandler.TAG_NAME.toLowerCase(),handler);
327
328     handler = new FindBusinessHandler(this);
329     handlers.put(FindBusiness.class.getName().toLowerCase(),handler);
330     handlers.put(FindBusinessHandler.TAG_NAME.toLowerCase(),handler);
331
332     handler = new FindPublisherHandler(this);
333     handlers.put(FindPublisher.class.getName().toLowerCase(),handler);
334     handlers.put(FindPublisherHandler.TAG_NAME.toLowerCase(),handler);
335
336     handler = new FindQualifierHandler(this);
337     handlers.put(FindQualifier.class.getName().toLowerCase(),handler);
338     handlers.put(FindQualifierHandler.TAG_NAME.toLowerCase(),handler);
339
340     handler = new FindQualifiersHandler(this);
341     handlers.put(FindQualifiers.class.getName().toLowerCase(),handler);
342     handlers.put(FindQualifiersHandler.TAG_NAME.toLowerCase(),handler);
343
344     handler = new FindRelatedBusinessesHandler(this);
345     handlers.put(FindRelatedBusinesses.class.getName().toLowerCase(),handler);
346     handlers.put(FindRelatedBusinessesHandler.TAG_NAME.toLowerCase(),handler);
347
348     handler = new FindServiceHandler(this);
349     handlers.put(FindService.class.getName().toLowerCase(),handler);
350     handlers.put(FindServiceHandler.TAG_NAME.toLowerCase(),handler);
351
352     handler = new FindTModelHandler(this);
353     handlers.put(FindTModel.class.getName().toLowerCase(),handler);
354     handlers.put(FindTModelHandler.TAG_NAME.toLowerCase(),handler);
355
356     handler = new GetAssertionStatusReportHandler(this);
357     handlers.put(GetAssertionStatusReport.class.getName().toLowerCase(),handler);
358     handlers.put(GetAssertionStatusReportHandler.TAG_NAME.toLowerCase(),handler);
359
360     handler = new GetAuthTokenHandler(this);
361     handlers.put(GetAuthToken.class.getName().toLowerCase(),handler);
362     handlers.put(GetAuthTokenHandler.TAG_NAME.toLowerCase(),handler);
363
364     handler = new GetBindingDetailHandler(this);
365     handlers.put(GetBindingDetail.class.getName().toLowerCase(),handler);
366     handlers.put(GetBindingDetailHandler.TAG_NAME.toLowerCase(),handler);
367
368     handler = new GetBusinessDetailHandler(this);
369     handlers.put(GetBusinessDetail.class.getName().toLowerCase(),handler);
370     handlers.put(GetBusinessDetailHandler.TAG_NAME.toLowerCase(),handler);
371
372     handler = new GetBusinessDetailExtHandler(this);
373     handlers.put(GetBusinessDetailExt.class.getName().toLowerCase(),handler);
374     handlers.put(GetBusinessDetailExtHandler.TAG_NAME.toLowerCase(),handler);
375
376     handler = new GetPublisherAssertionsHandler(this);
377     handlers.put(GetPublisherAssertions.class.getName().toLowerCase(),handler);
378     handlers.put(GetPublisherAssertionsHandler.TAG_NAME.toLowerCase(),handler);
379
380     handler = new GetPublisherDetailHandler(this);
381     handlers.put(GetPublisherDetail.class.getName().toLowerCase(),handler);
382     handlers.put(GetPublisherDetailHandler.TAG_NAME.toLowerCase(),handler);
383
384     handler = new GetRegisteredInfoHandler(this);
385     handlers.put(GetRegisteredInfo.class.getName().toLowerCase(),handler);
386     handlers.put(GetRegisteredInfoHandler.TAG_NAME.toLowerCase(),handler);
387
388     handler = new GetRegistryInfoHandler(this);
389     handlers.put(GetRegistryInfo.class.getName().toLowerCase(),handler);
390     handlers.put(GetRegistryInfoHandler.TAG_NAME.toLowerCase(),handler);
391
392     handler = new GetServiceDetailHandler(this);
393     handlers.put(GetServiceDetail.class.getName().toLowerCase(),handler);
394     handlers.put(GetServiceDetailHandler.TAG_NAME.toLowerCase(),handler);
395
396     handler = new GetSubscriptionsHandler(this);
397     handlers.put(GetSubscriptions.class.getName().toLowerCase(),handler);
398     handlers.put(GetSubscriptionsHandler.TAG_NAME.toLowerCase(),handler);
399       
400     handler = new GetTModelDetailHandler(this);
401     handlers.put(GetTModelDetail.class.getName().toLowerCase(),handler);
402     handlers.put(GetTModelDetailHandler.TAG_NAME.toLowerCase(),handler);
403
404     handler = new HostingRedirectorHandler(this);
405     handlers.put(HostingRedirector.class.getName().toLowerCase(),handler);
406     handlers.put(HostingRedirectorHandler.TAG_NAME.toLowerCase(),handler);
407
408     handler = new IdentifierBagHandler(this);
409     handlers.put(IdentifierBag.class.getName().toLowerCase(),handler);
410     handlers.put(IdentifierBagHandler.TAG_NAME.toLowerCase(),handler);
411
412     handler = new InstanceDetailsHandler(this);
413     handlers.put(InstanceDetails.class.getName().toLowerCase(),handler);
414     handlers.put(InstanceDetailsHandler.TAG_NAME.toLowerCase(),handler);
415
416     handler = new InstanceParmsHandler(this);
417     handlers.put(InstanceParms.class.getName().toLowerCase(),handler);
418     handlers.put(InstanceParmsHandler.TAG_NAME.toLowerCase(),handler);
419
420     handler = new KeyedReferenceHandler(this);
421     handlers.put(KeyedReference.class.getName().toLowerCase(),handler);
422     handlers.put(KeyedReferenceHandler.TAG_NAME.toLowerCase(),handler);
423
424     handler = new KeysOwnedHandler(this);
425     handlers.put(KeysOwned.class.getName().toLowerCase(),handler);
426     handlers.put(KeysOwnedHandler.TAG_NAME.toLowerCase(),handler);
427
428     handler = new NameHandler(this);
429     handlers.put(Name.class.getName().toLowerCase(),handler);
430     handlers.put(NameHandler.TAG_NAME.toLowerCase(),handler);
431
432     handler = new OverviewDocHandler(this);
433     handlers.put(OverviewDoc.class.getName().toLowerCase(),handler);
434     handlers.put(OverviewDocHandler.TAG_NAME.toLowerCase(),handler);
435
436     handler = new OverviewURLHandler(this);
437     handlers.put(OverviewURL.class.getName().toLowerCase(),handler);
438     handlers.put(OverviewURLHandler.TAG_NAME.toLowerCase(),handler);
439
440     handler = new PersonNameHandler(this);
441     handlers.put(PersonName.class.getName().toLowerCase(),handler);
442     handlers.put(PersonNameHandler.TAG_NAME.toLowerCase(),handler);
443
444     handler = new PhoneHandler(this);
445     handlers.put(Phone.class.getName().toLowerCase(),handler);
446     handlers.put(PhoneHandler.TAG_NAME.toLowerCase(),handler);
447
448     handler = new PropertyHandler(this);
449     handlers.put(Property.class.getName().toLowerCase(),handler);
450     handlers.put(PropertyHandler.TAG_NAME.toLowerCase(),handler);
451
452     handler = new PublisherAssertionHandler(this);
453     handlers.put(PublisherAssertion.class.getName().toLowerCase(),handler);
454     handlers.put(PublisherAssertionHandler.TAG_NAME.toLowerCase(),handler);
455
456     handler = new PublisherAssertionsHandler(this);
457     handlers.put(PublisherAssertions.class.getName().toLowerCase(),handler);
458     handlers.put(PublisherAssertionsHandler.TAG_NAME.toLowerCase(),handler);
459
460     handler = new PublisherDetailHandler(this);
461     handlers.put(PublisherDetail.class.getName().toLowerCase(),handler);
462     handlers.put(PublisherDetailHandler.TAG_NAME.toLowerCase(),handler);
463
464     handler = new PublisherHandler(this);
465     handlers.put(Publisher.class.getName().toLowerCase(),handler);
466     handlers.put(PublisherHandler.TAG_NAME.toLowerCase(),handler);
467
468     handler = new PublisherIDHandler(this);
469     handlers.put(PublisherID.class.getName().toLowerCase(),handler);
470     handlers.put(PublisherIDHandler.TAG_NAME.toLowerCase(),handler);
471
472     handler = new PublisherInfoHandler(this);
473     handlers.put(PublisherInfo.class.getName().toLowerCase(),handler);
474     handlers.put(PublisherInfoHandler.TAG_NAME.toLowerCase(),handler);
475
476     handler = new PublisherInfosHandler(this);
477     handlers.put(PublisherInfos.class.getName().toLowerCase(),handler);
478     handlers.put(PublisherInfosHandler.TAG_NAME.toLowerCase(),handler);
479
480     handler = new PublisherListHandler(this);
481     handlers.put(PublisherList.class.getName().toLowerCase(),handler);
482     handlers.put(PublisherListHandler.TAG_NAME.toLowerCase(),handler);
483
484     handler = new RegisteredInfoHandler(this);
485     handlers.put(RegisteredInfo.class.getName().toLowerCase(),handler);
486     handlers.put(RegisteredInfoHandler.TAG_NAME.toLowerCase(),handler);
487
488     handler = new RegistryInfoHandler(this);
489     handlers.put(RegistryInfo.class.getName().toLowerCase(),handler);
490     handlers.put(RegistryInfoHandler.TAG_NAME.toLowerCase(),handler);
491
492     handler = new RelatedBusinessInfoHandler(this);
493     handlers.put(RelatedBusinessInfo.class.getName().toLowerCase(),handler);
494     handlers.put(RelatedBusinessInfoHandler.TAG_NAME.toLowerCase(),handler);
495
496     handler = new RelatedBusinessInfosHandler(this);
497     handlers.put(RelatedBusinessInfos.class.getName().toLowerCase(),handler);
498     handlers.put(RelatedBusinessInfosHandler.TAG_NAME.toLowerCase(),handler);
499
500     handler = new RelatedBusinessesListHandler(this);
501     handlers.put(RelatedBusinessesList.class.getName().toLowerCase(),handler);
502     handlers.put(RelatedBusinessesListHandler.TAG_NAME.toLowerCase(),handler);
503
504     handler = new ResultHandler(this);
505     handlers.put(Result.class.getName().toLowerCase(),handler);
506     handlers.put(ResultHandler.TAG_NAME.toLowerCase(),handler);
507
508     handler = new SaveBindingHandler(this);
509     handlers.put(SaveBinding.class.getName().toLowerCase(),handler);
510     handlers.put(SaveBindingHandler.TAG_NAME.toLowerCase(),handler);
511
512     handler = new SaveBusinessHandler(this);
513     handlers.put(SaveBusiness.class.getName().toLowerCase(),handler);
514     handlers.put(SaveBusinessHandler.TAG_NAME.toLowerCase(),handler);
515
516     handler = new SavePublisherHandler(this);
517     handlers.put(SavePublisher.class.getName().toLowerCase(),handler);
518     handlers.put(SavePublisherHandler.TAG_NAME.toLowerCase(),handler);
519
520     handler = new SaveServiceHandler(this);
521     handlers.put(SaveService.class.getName().toLowerCase(),handler);
522     handlers.put(SaveServiceHandler.TAG_NAME.toLowerCase(),handler);
523
524     handler = new SaveSubscriptionHandler(this);
525     handlers.put(SaveSubscription.class.getName().toLowerCase(),handler);
526     handlers.put(SaveSubscriptionHandler.TAG_NAME.toLowerCase(),handler);
527   
528     handler = new SaveTModelHandler(this);
529     handlers.put(SaveTModel.class.getName().toLowerCase(),handler);
530     handlers.put(SaveTModelHandler.TAG_NAME.toLowerCase(),handler);
531
532     handler = new ServiceDetailHandler(this);
533     handlers.put(ServiceDetail.class.getName().toLowerCase(),handler);
534     handlers.put(ServiceDetailHandler.TAG_NAME.toLowerCase(),handler);
535
536     handler = new ServiceInfoHandler(this);
537     handlers.put(ServiceInfo.class.getName().toLowerCase(),handler);
538     handlers.put(ServiceInfoHandler.TAG_NAME.toLowerCase(),handler);
539
540     handler = new ServiceInfosHandler(this);
541     handlers.put(ServiceInfos.class.getName().toLowerCase(),handler);
542     handlers.put(ServiceInfosHandler.TAG_NAME.toLowerCase(),handler);
543
544     handler = new ServiceKeyHandler(this);
545     handlers.put(ServiceKey.class.getName().toLowerCase(),handler);
546     handlers.put(ServiceKeyHandler.TAG_NAME.toLowerCase(),handler);
547
548     handler = new ServiceListHandler(this);
549     handlers.put(ServiceList.class.getName().toLowerCase(),handler);
550     handlers.put(ServiceListHandler.TAG_NAME.toLowerCase(),handler);
551
552     handler = new SetPublisherAssertionsHandler(this);
553     handlers.put(SetPublisherAssertions.class.getName().toLowerCase(),handler);
554     handlers.put(SetPublisherAssertionsHandler.TAG_NAME.toLowerCase(),handler);
555
556     handler = new SharedRelationshipsHandler(this);
557     handlers.put(SharedRelationships.class.getName().toLowerCase(),handler);
558     handlers.put(SharedRelationshipsHandler.TAG_NAME.toLowerCase(),handler);
559     
560     handler = new SubscriptionHandler(this);
561     handlers.put(Subscription.class.getName().toLowerCase(),handler);
562     handlers.put(SubscriptionHandler.TAG_NAME.toLowerCase(),handler);
563
564     handler = new SubscriptionKeyHandler(this);
565     handlers.put(SubscriptionKey.class.getName().toLowerCase(),handler);
566     handlers.put(SubscriptionKeyHandler.TAG_NAME.toLowerCase(),handler);
567   
568     handler = new TModelHandler(this);
569     handlers.put(TModel.class.getName().toLowerCase(),handler);
570     handlers.put(TModelHandler.TAG_NAME.toLowerCase(),handler);
571
572     handler = new TModelBagHandler(this);
573     handlers.put(TModelBag.class.getName().toLowerCase(),handler);
574     handlers.put(TModelBagHandler.TAG_NAME.toLowerCase(),handler);
575
576     handler = new TModelDetailHandler(this);
577     handlers.put(TModelDetail.class.getName().toLowerCase(),handler);
578     handlers.put(TModelDetailHandler.TAG_NAME.toLowerCase(),handler);
579
580     handler = new TModelInfoHandler(this);
581     handlers.put(TModelInfo.class.getName().toLowerCase(),handler);
582     handlers.put(TModelInfoHandler.TAG_NAME.toLowerCase(),handler);
583
584     handler = new TModelInfosHandler(this);
585     handlers.put(TModelInfos.class.getName().toLowerCase(),handler);
586     handlers.put(TModelInfosHandler.TAG_NAME.toLowerCase(),handler);
587
588     handler = new TModelInstanceDetailsHandler(this);
589     handlers.put(TModelInstanceDetails.class.getName().toLowerCase(),handler);
590     handlers.put(TModelInstanceDetailsHandler.TAG_NAME.toLowerCase(),handler);
591
592     handler = new TModelInstanceInfoHandler(this);
593     handlers.put(TModelInstanceInfo.class.getName().toLowerCase(),handler);
594     handlers.put(TModelInstanceInfoHandler.TAG_NAME.toLowerCase(),handler);
595
596     handler = new TModelKeyHandler(this);
597     handlers.put(TModelKey.class.getName().toLowerCase(),handler);
598     handlers.put(TModelKeyHandler.TAG_NAME.toLowerCase(),handler);
599
600     handler = new TModelListHandler(this);
601     handlers.put(TModelList.class.getName().toLowerCase(),handler);
602     handlers.put(TModelListHandler.TAG_NAME.toLowerCase(),handler);
603
604     handler = new UploadRegisterHandler(this);
605     handlers.put(UploadRegister.class.getName().toLowerCase(),handler);
606     handlers.put(UploadRegisterHandler.TAG_NAME.toLowerCase(),handler);
607
608     handler = new ValidateValuesHandler(this);
609     handlers.put(ValidateValues.class.getName().toLowerCase(),handler);
610     handlers.put(ValidateValuesHandler.TAG_NAME.toLowerCase(),handler);
611
612     handler = new RegistryExceptionHandler(this);
613     handlers.put(RegistryException.class.getName().toLowerCase(),handler);
614     handlers.put(RegistryExceptionHandler.TAG_NAME.toLowerCase(),handler);
615   }
616
617   /**
618    *
619    */

620   public static HandlerMaker getInstance()
621   {
622     if (maker == null)
623       maker = createInstance();
624
625     return maker;
626   }
627
628   /**
629    *
630    */

631   private static synchronized HandlerMaker createInstance()
632   {
633     if (maker == null)
634       maker = new HandlerMaker();
635
636     return maker;
637   }
638
639   /**
640    *
641    */

642   public final AbstractHandler lookup(String JavaDoc elementName)
643   {
644     if (elementName == null)
645     {
646       log.error("Element lookup attempted using a null " +
647         "element name");
648       return null;
649     }
650
651     // element name keys are stored in lower
652
// case only so we don't need to be concerned
653
// about inconsistencies in SOAP providers
654

655     String JavaDoc key = elementName.toLowerCase();
656
657     AbstractHandler handler = (AbstractHandler)handlers.get(key);
658     if (handler == null)
659       log.error("can't find a handler for element type \"" +
660         elementName + "\" using key: "+key);
661
662     return handler;
663   }
664 }
665
Popular Tags