KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > metamodel > ApplicationClientDD


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.ejb3.metamodel;
23
24 import java.util.ArrayList JavaDoc;
25 import java.util.Collection JavaDoc;
26 import java.util.HashSet JavaDoc;
27 import java.util.List JavaDoc;
28
29 import org.jboss.logging.Logger;
30 import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
31
32 /**
33  * This represents a application client deployment descriptor.
34  *
35  * FIXME: should not extend EnviromentRefGroup, but InjectionHandler wants this
36  *
37  * @author <a HREF="mailto:carlo.dewolf@jboss.com">Carlo de Wolf</a>
38  * @version $Revision: $
39  */

40 public class ApplicationClientDD extends EnvironmentRefGroup
41 {
42    @SuppressWarnings JavaDoc("unused")
43    private static final Logger log = Logger.getLogger(ApplicationClientDD.class);
44    
45    private String JavaDoc displayName;
46    
47 // protected HashMap<String, EnvEntry> envEntries = new HashMap<String, EnvEntry>();
48
// protected HashMap<String, EjbRef> ejbRefs = new HashMap<String, EjbRef>();
49
// // TODO: javaee:service-refGroup
50
// protected HashMap<String, ResourceRef> resourceRefs = new HashMap<String, ResourceRef>();
51
// protected HashMap<String, ResourceEnvRef> resourceEnvRefs = new HashMap<String, ResourceEnvRef>();
52
// protected HashMap<String, MessageDestinationRef> messageDestinationRefs = new HashMap<String, MessageDestinationRef>();
53
// protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
54

55    private List JavaDoc<LifecycleCallback> postConstructs = new ArrayList JavaDoc<LifecycleCallback>();
56    private List JavaDoc<LifecycleCallback> preDestroys = new ArrayList JavaDoc<LifecycleCallback>();
57    private String JavaDoc callbackHandlerClass = null;
58    
59    private String JavaDoc version = null;
60    private boolean metadataComplete = false;
61    
62    // from jboss-client.xml
63

64    private String JavaDoc jndiName;
65    
66    private Collection JavaDoc<String JavaDoc> dependencies = new HashSet JavaDoc<String JavaDoc>();
67    
68    public void addDependency(String JavaDoc depends)
69    {
70       dependencies.add(depends);
71    }
72    
73    public Collection JavaDoc<String JavaDoc> getDependencies()
74    {
75       return dependencies;
76    }
77    
78    public String JavaDoc getDisplayName()
79    {
80       return displayName;
81    }
82    
83    public void setDisplayName(String JavaDoc displayName)
84    {
85       this.displayName = displayName;
86    }
87    
88    public String JavaDoc getJndiName()
89    {
90       if(jndiName == null)
91          return getDisplayName();
92       return jndiName;
93    }
94    
95    public void setJndiName(String JavaDoc jndiName)
96    {
97       this.jndiName = jndiName;
98    }
99    
100    public boolean isMetaDataComplete()
101    {
102       return metadataComplete;
103    }
104    
105    public void setMetadataComplete(boolean metadataComplete)
106    {
107       this.metadataComplete = metadataComplete;
108    }
109    
110    public List JavaDoc<LifecycleCallback> getPostConstructs()
111    {
112       return postConstructs;
113    }
114    
115    public List JavaDoc<LifecycleCallback> getPreDestroys()
116    {
117       return preDestroys;
118    }
119    
120    public String JavaDoc getVersion()
121    {
122       return version;
123    }
124    
125    public void setVersion(String JavaDoc version)
126    {
127       this.version = version;
128    }
129 }
130
Popular Tags