001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.metamodel.descriptor;
023:
024: import org.jboss.logging.Logger;
025:
026: /**
027: * Represents a <message-destination-ref> element of the ejb-jar.xml deployment descriptor for the
028: * 1.4 schema
029: *
030: * @author <a href="mailto:bdecoste@jboss.com">William DeCoste</a>
031: * @version <tt>$Revision: 60259 $</tt>
032: */
033: public class MessageDestinationRef extends Ref {
034: private static final Logger log = Logger
035: .getLogger(MessageDestinationRef.class);
036:
037: private String description;
038:
039: private String messageDestinationRefName;
040:
041: private String messageDestinationType;
042:
043: private String messageDestinationUsage;
044:
045: private String messageDestinationLink;
046:
047: private String mappedName;
048:
049: private String jndiName;
050:
051: public String getJndiName() {
052: return jndiName;
053: }
054:
055: public void setJndiName(String jndiName) {
056: this .jndiName = jndiName;
057: }
058:
059: public String getMappedName() {
060: return mappedName;
061: }
062:
063: public void setMappedName(String mappedName) {
064: this .mappedName = mappedName;
065: }
066:
067: public String getDescription() {
068: return description;
069: }
070:
071: public void setDescription(String description) {
072: this .description = description;
073: }
074:
075: public String getMessageDestinationRefName() {
076: return messageDestinationRefName;
077: }
078:
079: public void setMessageDestinationRefName(
080: String messageDestinationRefName) {
081: this .messageDestinationRefName = messageDestinationRefName;
082: }
083:
084: public String getMessageDestinationType() {
085: return messageDestinationType;
086: }
087:
088: public void setMessageDestinationType(String messageDestinationType) {
089: this .messageDestinationType = messageDestinationType;
090: }
091:
092: public String getMessageDestinationUsage() {
093: return messageDestinationUsage;
094: }
095:
096: public void setMessageDestinationUsage(
097: String messageDestinationUsage) {
098: this .messageDestinationUsage = messageDestinationUsage;
099: }
100:
101: public String getMessageDestinationLink() {
102: return messageDestinationLink;
103: }
104:
105: public void setMessageDestinationLink(String messageDestinationLink) {
106: this .messageDestinationLink = messageDestinationLink;
107: }
108:
109: public void merge(MessageDestinationRef ref) {
110: if (ref.getJndiName() != null) {
111: this .setJndiName(ref.getJndiName());
112:
113: setMappedName(ref.getJndiName());
114: }
115: }
116:
117: public String toString() {
118: StringBuffer sb = new StringBuffer(100);
119: sb.append("[");
120: sb.append("messageDestinationRefName=").append(
121: messageDestinationRefName);
122: sb.append(", messageDestinationType=").append(
123: messageDestinationType);
124: sb.append(", messageDestinationLink=").append(
125: messageDestinationLink);
126: sb.append(", messageDestinationUsage=").append(
127: messageDestinationUsage);
128: sb.append(", mappedName=").append(mappedName);
129: sb.append("]");
130: return sb.toString();
131: }
132: }
|