001: /*
002: * Copyright 1999,2004 The Apache Software Foundation.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.apache.catalina.deploy;
018:
019: import java.io.Serializable;
020:
021: /**
022: * <p>Representation of a message destination reference for a web application,
023: * as represented in a <code><message-destination-ref></code> element
024: * in the deployment descriptor.</p>
025: *
026: * @author Craig R. McClanahan
027: * @version $Revision: 1.4 $ $Date: 2004/05/13 20:40:49 $
028: * @since Tomcat 5.0
029: */
030:
031: public class MessageDestinationRef implements Serializable {
032:
033: // ------------------------------------------------------------- Properties
034:
035: /**
036: * The description of this destination ref.
037: */
038: private String description = null;
039:
040: public String getDescription() {
041: return (this .description);
042: }
043:
044: public void setDescription(String description) {
045: this .description = description;
046: }
047:
048: /**
049: * The link of this destination ref.
050: */
051: private String link = null;
052:
053: public String getLink() {
054: return (this .link);
055: }
056:
057: public void setLink(String link) {
058: this .link = link;
059: }
060:
061: /**
062: * The name of this destination ref.
063: */
064: private String name = null;
065:
066: public String getName() {
067: return (this .name);
068: }
069:
070: public void setName(String name) {
071: this .name = name;
072: }
073:
074: /**
075: * The type of this destination ref.
076: */
077: private String type = null;
078:
079: public String getType() {
080: return (this .type);
081: }
082:
083: public void setType(String type) {
084: this .type = type;
085: }
086:
087: /**
088: * The usage of this destination ref.
089: */
090: private String usage = null;
091:
092: public String getUsage() {
093: return (this .usage);
094: }
095:
096: public void setUsage(String usage) {
097: this .usage = usage;
098: }
099:
100: // --------------------------------------------------------- Public Methods
101:
102: /**
103: * Return a String representation of this object.
104: */
105: public String toString() {
106:
107: StringBuffer sb = new StringBuffer("MessageDestination[");
108: sb.append("name=");
109: sb.append(name);
110: if (link != null) {
111: sb.append(", link=");
112: sb.append(link);
113: }
114: if (type != null) {
115: sb.append(", type=");
116: sb.append(type);
117: }
118: if (usage != null) {
119: sb.append(", usage=");
120: sb.append(usage);
121: }
122: if (description != null) {
123: sb.append(", description=");
124: sb.append(description);
125: }
126: sb.append("]");
127: return (sb.toString());
128:
129: }
130:
131: // -------------------------------------------------------- Package Methods
132:
133: /**
134: * The NamingResources with which we are associated (if any).
135: */
136: protected NamingResources resources = null;
137:
138: public NamingResources getNamingResources() {
139: return (this .resources);
140: }
141:
142: void setNamingResources(NamingResources resources) {
143: this.resources = resources;
144: }
145:
146: }
|