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: * Representation of an EJB resource reference for a web application, as
023: * represented in a <code><ejb-ref></code> element in the
024: * deployment descriptor.
025: *
026: * @author Craig R. McClanahan
027: * @version $Revision: 1.4 $ $Date: 2004/05/13 20:40:49 $
028: */
029:
030: public class ContextEjb implements Serializable {
031:
032: // ------------------------------------------------------------- Properties
033:
034: /**
035: * The description of this EJB.
036: */
037: private String description = null;
038:
039: public String getDescription() {
040: return (this .description);
041: }
042:
043: public void setDescription(String description) {
044: this .description = description;
045: }
046:
047: /**
048: * The name of the EJB home implementation class.
049: */
050: private String home = null;
051:
052: public String getHome() {
053: return (this .home);
054: }
055:
056: public void setHome(String home) {
057: this .home = home;
058: }
059:
060: /**
061: * The link to a J2EE EJB definition.
062: */
063: private String link = null;
064:
065: public String getLink() {
066: return (this .link);
067: }
068:
069: public void setLink(String link) {
070: this .link = link;
071: }
072:
073: /**
074: * The name of this EJB.
075: */
076: private String name = null;
077:
078: public String getName() {
079: return (this .name);
080: }
081:
082: public void setName(String name) {
083: this .name = name;
084: }
085:
086: /**
087: * The name of the EJB remote implementation class.
088: */
089: private String remote = null;
090:
091: public String getRemote() {
092: return (this .remote);
093: }
094:
095: public void setRemote(String remote) {
096: this .remote = remote;
097: }
098:
099: /**
100: * The name of the EJB bean implementation class.
101: */
102: private String type = null;
103:
104: public String getType() {
105: return (this .type);
106: }
107:
108: public void setType(String type) {
109: this .type = type;
110: }
111:
112: // --------------------------------------------------------- Public Methods
113:
114: /**
115: * Return a String representation of this object.
116: */
117: public String toString() {
118:
119: StringBuffer sb = new StringBuffer("ContextEjb[");
120: sb.append("name=");
121: sb.append(name);
122: if (description != null) {
123: sb.append(", description=");
124: sb.append(description);
125: }
126: if (type != null) {
127: sb.append(", type=");
128: sb.append(type);
129: }
130: if (home != null) {
131: sb.append(", home=");
132: sb.append(home);
133: }
134: if (remote != null) {
135: sb.append(", remote=");
136: sb.append(remote);
137: }
138: if (link != null) {
139: sb.append(", link=");
140: sb.append(link);
141: }
142: sb.append("]");
143: return (sb.toString());
144:
145: }
146:
147: // -------------------------------------------------------- Package Methods
148:
149: /**
150: * The NamingResources with which we are associated (if any).
151: */
152: protected NamingResources resources = null;
153:
154: public NamingResources getNamingResources() {
155: return (this .resources);
156: }
157:
158: void setNamingResources(NamingResources resources) {
159: this.resources = resources;
160: }
161:
162: }
|