KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > metamodel > descriptor > MessageDestinationRef


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.metamodel.descriptor;
23
24 import org.jboss.logging.Logger;
25
26
27 /**
28  * Represents a <message-destination-ref> element of the ejb-jar.xml deployment descriptor for the
29  * 1.4 schema
30  *
31  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
32  * @version <tt>$Revision: 56237 $</tt>
33  */

34 public class MessageDestinationRef extends Ref
35 {
36    private static final Logger log = Logger.getLogger(MessageDestinationRef.class);
37    
38    private String JavaDoc description;
39
40    private String JavaDoc messageDestinationRefName;
41
42    private String JavaDoc messageDestinationType;
43
44    private String JavaDoc messageDestinationUsage;
45
46    private String JavaDoc messageDestinationLink;
47
48    private String JavaDoc mappedName;
49    
50    private String JavaDoc jndiName;
51    
52    public String JavaDoc getJndiName()
53    {
54       return jndiName;
55    }
56
57    public void setJndiName(String JavaDoc jndiName)
58    {
59       this.jndiName = jndiName;
60    }
61
62    public String JavaDoc getMappedName()
63    {
64       return mappedName;
65    }
66
67    public void setMappedName(String JavaDoc mappedName)
68    {
69       this.mappedName = mappedName;
70    }
71
72    public String JavaDoc getDescription()
73    {
74       return description;
75    }
76
77    public void setDescription(String JavaDoc description)
78    {
79       this.description = description;
80    }
81
82    public String JavaDoc getMessageDestinationRefName()
83    {
84       return messageDestinationRefName;
85    }
86
87    public void setMessageDestinationRefName(String JavaDoc messageDestinationRefName)
88    {
89       this.messageDestinationRefName = messageDestinationRefName;
90    }
91
92    public String JavaDoc getMessageDestinationType()
93    {
94       return messageDestinationType;
95    }
96
97    public void setMessageDestinationType(String JavaDoc messageDestinationType)
98    {
99       this.messageDestinationType = messageDestinationType;
100    }
101
102    public String JavaDoc getMessageDestinationUsage()
103    {
104       return messageDestinationUsage;
105    }
106
107    public void setMessageDestinationUsage(String JavaDoc messageDestinationUsage)
108    {
109       this.messageDestinationUsage = messageDestinationUsage;
110    }
111
112    public String JavaDoc getMessageDestinationLink()
113    {
114       return messageDestinationLink;
115    }
116
117    public void setMessageDestinationLink(String JavaDoc messageDestinationLink)
118    {
119       this.messageDestinationLink = messageDestinationLink;
120    }
121    
122    public void merge(MessageDestinationRef ref)
123    {
124       if (ref.getJndiName() != null)
125       {
126          this.setJndiName(ref.getJndiName());
127          
128          setMappedName(ref.getJndiName());
129       }
130    }
131
132
133    public String JavaDoc toString()
134    {
135       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
136       sb.append("[");
137       sb.append("messageDestinationRefName=").append(messageDestinationRefName);
138       sb.append(", messageDestinationType=").append(messageDestinationType);
139       sb.append(", messageDestinationLink=").append(messageDestinationLink);
140       sb.append(", messageDestinationUsage=").append(messageDestinationUsage);
141       sb.append(", mappedName=").append(mappedName);
142       sb.append("]");
143       return sb.toString();
144    }
145 }
146
Popular Tags