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