KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > ApplicationClientDescriptor


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23  package com.sun.enterprise.deployment;
24
25 import java.util.*;
26 import java.util.jar.*;
27 import com.sun.enterprise.util.LocalStringManagerImpl;
28
29 import com.sun.enterprise.deployment.xml.ApplicationTagNames;
30 import com.sun.enterprise.deployment.types.EjbReference;
31 import com.sun.enterprise.deployment.types.ResourceReferenceContainer;
32 import com.sun.enterprise.deployment.types.ResourceEnvReferenceContainer;
33 import com.sun.enterprise.deployment.types.MessageDestinationReference;
34 import com.sun.enterprise.deployment.types.MessageDestinationReferencer;
35 import com.sun.enterprise.deployment.types.ServiceReferenceContainer;
36 import com.sun.enterprise.deployment.types.MessageDestinationReferenceContainer;
37 import com.sun.enterprise.deployment.types.EjbReferenceContainer;
38 import com.sun.enterprise.deployment.node.appclient.AppClientNode;
39 import com.sun.enterprise.deployment.util.AppClientVisitor;
40 import com.sun.enterprise.deployment.util.DescriptorVisitor;
41 import com.sun.enterprise.deployment.util.ModuleDescriptor;
42 import com.sun.enterprise.deployment.runtime.JavaWebStartAccessDescriptor;
43 import javax.enterprise.deploy.shared.ModuleType JavaDoc;
44     /**
45     * I represent all the deployment information about
46     * an application client.
47     * @author Danny Coward */

48
49 public class ApplicationClientDescriptor extends BundleDescriptor
50             implements WritableJndiNameEnvironment,
51                        ResourceReferenceContainer,
52                        EjbReferenceContainer,
53                        ResourceEnvReferenceContainer,
54                        ServiceReferenceContainer,
55                        MessageDestinationReferenceContainer
56 {
57     private Set environmentProperties;
58     private Set ejbReferences;
59     private Set jmsDestReferences;
60     private Set messageDestReferences;
61     private Set resourceReferences;
62     private Set serviceReferences;
63     private Set<EntityManagerFactoryReferenceDescriptor>
64         entityManagerFactoryReferences =
65         new HashSet<EntityManagerFactoryReferenceDescriptor>();
66     private Set<EntityManagerReferenceDescriptor>
67         entityManagerReferences =
68         new HashSet<EntityManagerReferenceDescriptor>();
69     private Set<LifecycleCallbackDescriptor> postConstructDescs =
70         new HashSet<LifecycleCallbackDescriptor>();
71     private Set<LifecycleCallbackDescriptor> preDestroyDescs =
72         new HashSet<LifecycleCallbackDescriptor>();
73     private String JavaDoc mainClassName;
74     private static LocalStringManagerImpl localStrings =
75         new LocalStringManagerImpl(ApplicationClientDescriptor.class);
76     private String JavaDoc callbackHandler = null;
77     private JavaWebStartAccessDescriptor jwsAccessDescriptor = null;
78         
79     /**
80     * Return true if there is runtime information in this
81     * object that must be saved.
82     */

83     public boolean hasRuntimeInformation() {
84     for (Iterator itr = this.getNamedDescriptors().iterator(); itr.hasNext();) {
85         NamedDescriptor next = (NamedDescriptor) itr.next();
86         if (!"".equals(next.getJndiName())) {
87         return true;
88         }
89     }
90     return false;
91     }
92
93     /**
94      * @return the default version of the deployment descriptor
95      * loaded by this descriptor
96      */

97     public String JavaDoc getDefaultSpecVersion() {
98         return AppClientNode.SPEC_VERSION;
99     }
100     
101     /**
102     * Return the fq Java clasname of this application client.
103     */

104     public String JavaDoc getMainClassName() {
105     if (this.mainClassName == null) {
106             this.mainClassName = "";
107     }
108     return this.mainClassName;
109     }
110     
111     /**
112     * Sets the main classname of this app client.
113     */

114     
115     public void setMainClassName(String JavaDoc mainClassName) {
116     this.mainClassName = mainClassName;
117     this.changed();
118     }
119     
120     /**
121      * Get the classname of the callback handler.
122      */

123      public String JavaDoc getCallbackHandler() {
124     return callbackHandler;
125      }
126
127     /**
128      * Set the classname of the callback handler.
129      */

130      public void setCallbackHandler(String JavaDoc handler) {
131     callbackHandler = handler;
132     this.changed();
133      }
134
135     /**
136     * Return the set of named descriptors I reference.
137     */

138     
139     public Collection getNamedDescriptors() {
140     return super.getNamedDescriptorsFrom(this);
141     }
142     
143     /**
144     * Return the set of named reference pairs I reference.
145     */

146     public Vector getNamedReferencePairs() {
147     return super.getNamedReferencePairsFrom(this);
148     }
149     
150     /**
151     * Returns the set of environment properties of this app client.
152     */

153     public Set getEnvironmentProperties() {
154     if (this.environmentProperties == null) {
155         this.environmentProperties = new OrderedSet();
156     }
157     return this.environmentProperties = new OrderedSet(this.environmentProperties);
158     }
159
160     /**
161      * Returns the environment property object searching on the supplied key.
162      * throws an illegal argument exception if no such environment property exists.
163      */

164     public EnvironmentProperty getEnvironmentPropertyByName(String JavaDoc name) {
165     for (Iterator itr = this.getEnvironmentProperties().iterator();
166              itr.hasNext();) {
167         EnvironmentProperty ev = (EnvironmentProperty) itr.next();
168         if (ev.getName().equals(name)) {
169         return ev;
170         }
171     }
172     throw new IllegalArgumentException JavaDoc(localStrings.getLocalString(
173         "enterprise.deployment.exceptionbeanhasnoenvpropertybyname",
174         "This bean has no environment property by the name of {0}",
175                 new Object JavaDoc[] {name}));
176     }
177
178     
179     /**
180     * Adds an environment property to this application client.
181     */

182     
183     public void addEnvironmentProperty(EnvironmentProperty environmentProperty) {
184     this.getEnvironmentProperties().add(environmentProperty);
185     this.changed();
186     }
187     
188     /**
189     * Remove the given environment property
190     */

191     public void removeEnvironmentProperty(EnvironmentProperty environmentProperty) {
192     this.getEnvironmentProperties().remove(environmentProperty);
193     this.changed();
194     }
195     
196     /**
197     * Return the set of references to ejbs that I have.
198     */

199     public Set getEjbReferenceDescriptors() {
200     if (this.ejbReferences == null) {
201         this.ejbReferences = new OrderedSet();
202     }
203     return this.ejbReferences = new OrderedSet(this.ejbReferences);
204     }
205     
206     /**
207     * Add a reference to an ejb.
208     */

209     public void addEjbReferenceDescriptor(EjbReferenceDescriptor ejbReference) {
210         addEjbReferenceDescriptor((EjbReference) ejbReference);
211     }
212     
213     public void addEjbReferenceDescriptor(EjbReference ejbReference) {
214     this.getEjbReferenceDescriptors().add(ejbReference);
215         ejbReference.setReferringBundleDescriptor(this);
216     this.changed();
217     }
218     
219     /**
220     * Removes the given reference to an ejb.
221     */

222     public void removeEjbReferenceDescriptor(EjbReferenceDescriptor ejbReference) {
223         removeEjbReferenceDescriptor((EjbReference) ejbReference);
224     }
225     
226     public void removeEjbReferenceDescriptor(EjbReference ejbReference) {
227     this.getEjbReferenceDescriptors().remove(ejbReference);
228     ejbReference.setReferringBundleDescriptor(null);
229     this.changed();
230     }
231
232     public Set<LifecycleCallbackDescriptor>
233         getPostConstructDescriptors() {
234         if (postConstructDescs == null) {
235             postConstructDescs =
236                 new HashSet<LifecycleCallbackDescriptor>();
237         }
238         return postConstructDescs;
239     }
240
241     public void addPostConstructDescriptor(LifecycleCallbackDescriptor
242         postConstructDesc) {
243         String JavaDoc className = postConstructDesc.getLifecycleCallbackClass();
244         boolean found = false;
245         for (LifecycleCallbackDescriptor next :
246              getPostConstructDescriptors()) {
247             if ( (next.getLifecycleCallbackClass() != null) &&
248                 next.getLifecycleCallbackClass().equals(className)) {
249                 found = true;
250                 break;
251             }
252         }
253         if (!found) {
254             getPostConstructDescriptors().add(postConstructDesc);
255         }
256     }
257
258     public LifecycleCallbackDescriptor
259         getPostConstructDescriptorByClass(String JavaDoc className) {
260         return getPostConstructDescriptorByClass(className, this);
261     }
262
263     public Set<LifecycleCallbackDescriptor> getPreDestroyDescriptors() {
264         if (preDestroyDescs == null) {
265             preDestroyDescs =
266                 new HashSet<LifecycleCallbackDescriptor>();
267         }
268         return preDestroyDescs;
269     }
270
271     public void addPreDestroyDescriptor(LifecycleCallbackDescriptor preDestroyDesc) {
272         String JavaDoc className = preDestroyDesc.getLifecycleCallbackClass();
273         boolean found = false;
274         for (LifecycleCallbackDescriptor next :
275              getPreDestroyDescriptors()) {
276             if ( (next.getLifecycleCallbackClass() != null) &&
277                 next.getLifecycleCallbackClass().equals(className)) {
278                 found = true;
279                 break;
280             }
281         }
282         if (!found) {
283             getPreDestroyDescriptors().add(preDestroyDesc);
284         }
285     }
286
287     public LifecycleCallbackDescriptor
288         getPreDestroyDescriptorByClass(String JavaDoc className) {
289         return getPreDestroyDescriptorByClass(className, this);
290     }
291
292     public InjectionInfo getInjectionInfoByClass(String JavaDoc className) {
293         return getInjectionInfoByClass(className, this);
294     }
295
296     public Set getServiceReferenceDescriptors() {
297         if( this.serviceReferences == null ) {
298             this.serviceReferences = new OrderedSet();
299         }
300         return this.serviceReferences = new OrderedSet(this.serviceReferences);
301     }
302
303     public void addServiceReferenceDescriptor(ServiceReferenceDescriptor
304                                               serviceRef) {
305         serviceRef.setBundleDescriptor(this);
306         this.getServiceReferenceDescriptors().add(serviceRef);
307         this.changed();
308     }
309
310     public void removeServiceReferenceDescriptor(ServiceReferenceDescriptor
311                                                  serviceRef) {
312         this.getServiceReferenceDescriptors().remove(serviceRef);
313         this.changed();
314     }
315     
316     /**
317      * Looks up an service reference with the given name.
318      * Throws an IllegalArgumentException if it is not found.
319      */

320     public ServiceReferenceDescriptor getServiceReferenceByName(String JavaDoc name) {
321     for (Iterator itr = this.getServiceReferenceDescriptors().iterator();
322              itr.hasNext();) {
323         ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor)
324                 itr.next();
325         if (srd.getName().equals(name)) {
326         return srd;
327         }
328     }
329     throw new IllegalArgumentException JavaDoc("This application client has no service refernce by the name " + name);
330     }
331
332     public Set getMessageDestinationReferenceDescriptors() {
333         if( this.messageDestReferences == null ) {
334             this.messageDestReferences = new OrderedSet();
335         }
336         return this.messageDestReferences =
337             new OrderedSet(this.messageDestReferences);
338     }
339
340     public void addMessageDestinationReferenceDescriptor
341         (MessageDestinationReferenceDescriptor messageDestRef) {
342         messageDestRef.setReferringBundleDescriptor(this);
343
344         this.getMessageDestinationReferenceDescriptors().add(messageDestRef);
345         this.changed();
346     }
347
348     public void removeMessageDestinationReferenceDescriptor
349         (MessageDestinationReferenceDescriptor msgDestRef) {
350         this.getMessageDestinationReferenceDescriptors().remove(msgDestRef);
351         this.changed();
352     }
353     
354     /**
355      * Looks up an message destination reference with the given name.
356      * Throws an IllegalArgumentException if it is not found.
357      */

358     public MessageDestinationReferenceDescriptor
359         getMessageDestinationReferenceByName(String JavaDoc name) {
360     for (Iterator itr =
361                  this.getMessageDestinationReferenceDescriptors().iterator();
362              itr.hasNext();) {
363         MessageDestinationReferenceDescriptor mdr =
364                 (MessageDestinationReferenceDescriptor) itr.next();
365         if (mdr.getName().equals(name)) {
366         return mdr;
367         }
368     }
369     throw new IllegalArgumentException JavaDoc("This ejb has no message destination refernce by the name " + name);
370     }
371
372    /**
373     * Return the set of JMS destination references this ejb declares.
374     */

375     public Set getJmsDestinationReferenceDescriptors() {
376     if (this.jmsDestReferences == null) {
377         this.jmsDestReferences = new OrderedSet();
378     }
379     return this.jmsDestReferences = new OrderedSet(this.jmsDestReferences);
380     }
381
382     public void addJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference) {
383     this.getJmsDestinationReferenceDescriptors().add(jmsDestReference);
384     this.changed();
385     }
386     
387     public void removeJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference) {
388     this.getJmsDestinationReferenceDescriptors().remove(jmsDestReference);
389     this.changed();
390     }
391     
392     /**
393     * Looks up an ejb reference with the given name. Throws an IllegalArgumentException
394     * if it is not found.
395     */

396     public EjbReferenceDescriptor getEjbReferenceByName(String JavaDoc name) {
397     for (Iterator itr = this.getEjbReferenceDescriptors().iterator(); itr.hasNext();) {
398         EjbReferenceDescriptor ejr = (EjbReferenceDescriptor) itr.next();
399         if (ejr.getName().equals(name)) {
400         return ejr;
401         }
402     }
403     throw new IllegalArgumentException JavaDoc("This appclient has no ejb refernce by the name " + name);
404     }
405
406     public Set<EntityManagerFactoryReferenceDescriptor>
407         getEntityManagerFactoryReferenceDescriptors() {
408         if( this.entityManagerFactoryReferences == null ) {
409             this.entityManagerFactoryReferences =
410                 new HashSet<EntityManagerFactoryReferenceDescriptor>();
411         }
412         return this.entityManagerFactoryReferences =
413             new HashSet<EntityManagerFactoryReferenceDescriptor>
414             (entityManagerFactoryReferences);
415     }
416
417     /**
418      * Return the entity manager factory reference descriptor corresponding to
419      * the given name.
420      */

421     public EntityManagerFactoryReferenceDescriptor
422         getEntityManagerFactoryReferenceByName(String JavaDoc name) {
423         for (EntityManagerFactoryReferenceDescriptor next :
424              getEntityManagerFactoryReferenceDescriptors()) {
425
426             if (next.getName().equals(name)) {
427                 return next;
428             }
429         }
430         throw new IllegalArgumentException JavaDoc("This appclient has no entity "
431                  + "manager factory reference by the name " + name);
432     }
433
434     public void addEntityManagerFactoryReferenceDescriptor
435         (EntityManagerFactoryReferenceDescriptor reference) {
436         reference.setReferringBundleDescriptor(this);
437         this.getEntityManagerFactoryReferenceDescriptors().add(reference);
438         this.changed();
439     }
440
441     public Set<EntityManagerReferenceDescriptor>
442         getEntityManagerReferenceDescriptors() {
443         return new HashSet<EntityManagerReferenceDescriptor>();
444     }
445
446     /**
447      * Return the entity manager factory reference descriptor corresponding to
448      * the given name.
449      */

450     public EntityManagerReferenceDescriptor
451         getEntityManagerReferenceByName(String JavaDoc name) {
452         throw new IllegalArgumentException JavaDoc("This appclient has no entity "
453                  + "manager refernce by the name " + name);
454     }
455
456     public void addEntityManagerReferenceDescriptor
457         (EntityManagerReferenceDescriptor reference) {
458         reference.setReferringBundleDescriptor(this);
459         this.getEntityManagerReferenceDescriptors().add(reference);
460         this.changed();
461     }
462     
463     public List<InjectionCapable>
464         getInjectableResourcesByClass(String JavaDoc className) {
465         return getInjectableResourcesByClass(className, this);
466     }
467     
468     /**
469     * Looks up an ejb reference with the given name. Throws an IllegalArgumentException
470     * if it is not found.
471     */

472     public EjbReference getEjbReference(String JavaDoc name) {
473     for (Iterator itr = this.getEjbReferenceDescriptors().iterator(); itr.hasNext();) {
474         EjbReference ejr = (EjbReference) itr.next();
475         if (ejr.getName().equals(name)) {
476         return ejr;
477         }
478     }
479     throw new IllegalArgumentException JavaDoc("This application client has no ejb refernce by the name " + name);
480     }
481
482     /**
483     * Return a JMS destination reference by the same name or throw an IllegalArgumentException.
484     */

485     public JmsDestinationReferenceDescriptor getJmsDestinationReferenceByName(String JavaDoc name) {
486     for (Iterator itr = this.getJmsDestinationReferenceDescriptors().iterator(); itr.hasNext();) {
487         JmsDestinationReferenceDescriptor jdr = (JmsDestinationReferenceDescriptor) itr.next();
488         if (jdr.getName().equals(name)) {
489         return jdr;
490         }
491     }
492     throw new IllegalArgumentException JavaDoc(localStrings.getLocalString(
493                                        "enterprise.deployment.exceptionappclienthasnojmsdestrefbyname",
494                                        "This application client has no JMS destination reference by the name of {0}", new Object JavaDoc[] {name}));
495     }
496
497     /**
498     * Return the set of references to resources that I have.
499     */

500     public Set getResourceReferenceDescriptors() {
501     if (this.resourceReferences == null) {
502         this.resourceReferences = new OrderedSet();
503     }
504     return this.resourceReferences = new OrderedSet(this.resourceReferences);
505     }
506     
507     /**
508     * Looks up a reference to a resource by its name (getName()). Throws an IllegalArgumentException
509     * if no such descriptor is found.
510     */

511     public ResourceReferenceDescriptor getResourceReferenceByName(String JavaDoc name) {
512     for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) {
513         ResourceReferenceDescriptor rr = (ResourceReferenceDescriptor) itr.next();
514         if (rr.getName().equals(name)) {
515         return rr;
516         }
517     }
518     throw new IllegalArgumentException JavaDoc(localStrings.getLocalString(
519                                   "enterprise.deployment.exceptionappclienthasnoejbrefname",
520                                "This application client has no ejb refernce by the name {0}", new Object JavaDoc[] {name}));
521     }
522     
523     /**
524     * Adds a reference to a resource.
525     */

526     
527     public void addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference) {
528     this.getResourceReferenceDescriptors().add(resourceReference);
529     this.changed();
530     }
531     
532     /**
533     * Removes the given resource reference from this app client.
534     */

535     public void removeResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference) {
536     this.getResourceReferenceDescriptors().remove(resourceReference);
537     this.changed();
538     }
539
540     /**
541      * @return a set of class names that need to have full annotation processing
542      */

543     public Set<String JavaDoc> getComponentClassNames() {
544         Set set = new HashSet<String JavaDoc>();
545         set.add(getMainClassName());
546         return set;
547     }
548
549     
550     /**
551      * @return true if this bundle descriptor defines web service clients
552      */

553     public boolean hasWebServiceClients() {
554         return !(getServiceReferenceDescriptors().isEmpty());
555     }
556     
557     /**
558      * @return true if this bundle descriptor defines web services
559      */

560     public boolean hasWebServices() {
561         return false;
562     }
563     
564     public void print(StringBuffer JavaDoc toStringBuffer) {
565         toStringBuffer.append("Application Client Descriptor");
566     toStringBuffer.append("\n ");
567         super.print(toStringBuffer);
568     toStringBuffer.append("\n environmentProperties ").append(environmentProperties);
569     toStringBuffer.append("\n ejbReferences ");
570         if(ejbReferences != null)
571             printDescriptorSet(ejbReferences,toStringBuffer);
572         toStringBuffer.append("\n jmsDestReferences ");
573         if(jmsDestReferences != null)
574             printDescriptorSet(jmsDestReferences,toStringBuffer);
575         toStringBuffer.append("\n messageDestReferences ");
576         if(messageDestReferences != null)
577             printDescriptorSet(messageDestReferences,toStringBuffer);
578     toStringBuffer.append("\n resourceReferences ");
579         if(resourceReferences != null)
580             printDescriptorSet(resourceReferences,toStringBuffer);
581         toStringBuffer.append("\n serviceReferences ");
582         if(serviceReferences != null)
583             printDescriptorSet(serviceReferences,toStringBuffer);
584     toStringBuffer.append("\n mainClassName ").append(mainClassName);
585     }
586     private void printDescriptorSet(Set descSet, StringBuffer JavaDoc sbuf){
587         for(Iterator itr = descSet.iterator(); itr.hasNext();){
588             Object JavaDoc obj = itr.next();
589             if(obj instanceof Descriptor)
590                 ((Descriptor)obj).print(sbuf);
591             else
592                 sbuf.append(obj);
593         }
594     }
595
596     /**
597      * visit the descriptor and all sub descriptors with a DOL visitor implementation
598      *
599      * @param a visitor to traverse the descriptors
600      */

601     public void visit(DescriptorVisitor aVisitor) {
602         if (aVisitor instanceof AppClientVisitor) {
603             visit((AppClientVisitor) aVisitor);
604         } else {
605             super.visit(aVisitor);
606         }
607     }
608     
609      /**
610      * visit the descriptor and all sub descriptors with a DOL visitor implementation
611      *
612      * @param a visitor to traverse the descriptors
613      */

614     public void visit(AppClientVisitor aVisitor) {
615         aVisitor.accept(this);
616
617         // Visit all injectables first. In some cases, basic type information
618
// has to be derived from target inject method or inject field.
619
for(InjectionCapable injectable : getInjectableResources(this)) {
620             aVisitor.accept(injectable);
621         }
622
623         Set ejbRefs = getEjbReferenceDescriptors();
624         for (Iterator itr = ejbRefs.iterator();itr.hasNext();) {
625             aVisitor.accept((EjbReference) itr.next());
626         }
627
628         for (Iterator itr=getResourceReferenceDescriptors().iterator();
629              itr.hasNext();) {
630             ResourceReferenceDescriptor next =
631                 (ResourceReferenceDescriptor) itr.next();
632             aVisitor.accept(next);
633         }
634
635         for (Iterator itr=getJmsDestinationReferenceDescriptors().iterator();
636              itr.hasNext();) {
637             JmsDestinationReferenceDescriptor next =
638                 (JmsDestinationReferenceDescriptor) itr.next();
639             aVisitor.accept(next);
640         }
641
642         Set msgDestRefs = getMessageDestinationReferenceDescriptors();
643         for (Iterator itr = msgDestRefs.iterator();itr.hasNext();) {
644             aVisitor.accept((MessageDestinationReferencer) itr.next());
645         }
646
647         for (Iterator itr = getMessageDestinations().iterator();
648                 itr.hasNext();) {
649             MessageDestinationDescriptor msgDestDescriptor =
650                 (MessageDestinationDescriptor)itr.next();
651             aVisitor.accept(msgDestDescriptor);
652         }
653
654         Set serviceRefs = getServiceReferenceDescriptors();
655         for (Iterator itr = serviceRefs.iterator();itr.hasNext();) {
656             aVisitor.accept((ServiceReferenceDescriptor) itr.next());
657         }
658     }
659     
660     /**
661      * @return the module type for this bundle descriptor
662      */

663     public ModuleType JavaDoc getModuleType() {
664         return ModuleType.CAR;
665     }
666     
667     public JavaWebStartAccessDescriptor getJavaWebStartAccessDescriptor() {
668         if (jwsAccessDescriptor == null) {
669             jwsAccessDescriptor = new JavaWebStartAccessDescriptor();
670             jwsAccessDescriptor.setBundleDescriptor(this);
671         }
672         return jwsAccessDescriptor;
673     }
674     
675     public void setJavaWebStartAccessDescriptor(JavaWebStartAccessDescriptor descr) {
676         descr.setBundleDescriptor(this);
677         jwsAccessDescriptor = descr;
678         this.changed();
679     }
680     
681 }
682
683
Popular Tags