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: * Representation of an EJB resource reference for a web application, as
024: * represented in a <code><ejb-ref></code> element in the
025: * deployment descriptor.
026: *
027: * @author Craig R. McClanahan
028: * @author Peter Rossbach (pero@apache.org)
029: * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
030: */
031:
032: public class ContextEjb extends ResourceBase implements Serializable {
033:
034: // ------------------------------------------------------------- Properties
035:
036: /**
037: * The name of the EJB home implementation class.
038: */
039: private String home = null;
040:
041: public String getHome() {
042: return (this .home);
043: }
044:
045: public void setHome(String home) {
046: this .home = home;
047: }
048:
049: /**
050: * The link to a J2EE EJB definition.
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 the EJB remote implementation class.
064: */
065: private String remote = null;
066:
067: public String getRemote() {
068: return (this .remote);
069: }
070:
071: public void setRemote(String remote) {
072: this .remote = remote;
073: }
074:
075: // --------------------------------------------------------- Public Methods
076:
077: /**
078: * Return a String representation of this object.
079: */
080: public String toString() {
081:
082: StringBuffer sb = new StringBuffer("ContextEjb[");
083: sb.append("name=");
084: sb.append(getName());
085: if (getDescription() != null) {
086: sb.append(", description=");
087: sb.append(getDescription());
088: }
089: if (getType() != null) {
090: sb.append(", type=");
091: sb.append(getType());
092: }
093: if (home != null) {
094: sb.append(", home=");
095: sb.append(home);
096: }
097: if (remote != null) {
098: sb.append(", remote=");
099: sb.append(remote);
100: }
101: if (link != null) {
102: sb.append(", link=");
103: sb.append(link);
104: }
105: sb.append("]");
106: return (sb.toString());
107:
108: }
109:
110: }
|