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 a resource link for a web application, as
023: * represented in a <code><ResourceLink></code> element in the
024: * server configuration file.
025: *
026: * @author Remy Maucherat
027: * @version $Revision: 1.4 $ $Date: 2004/05/13 20:40:49 $
028: */
029:
030: public class ContextResourceLink implements Serializable {
031:
032: // ------------------------------------------------------------- Properties
033:
034: /**
035: * The name of this resource.
036: */
037: private String name = null;
038:
039: public String getName() {
040: return (this .name);
041: }
042:
043: public void setName(String name) {
044: this .name = name;
045: }
046:
047: /**
048: * The type of this resource.
049: */
050: private String type = null;
051:
052: public String getType() {
053: return (this .type);
054: }
055:
056: public void setType(String type) {
057: this .type = type;
058: }
059:
060: /**
061: * The global name of this resource.
062: */
063: private String global = null;
064:
065: public String getGlobal() {
066: return (this .global);
067: }
068:
069: public void setGlobal(String global) {
070: this .global = global;
071: }
072:
073: // --------------------------------------------------------- Public Methods
074:
075: /**
076: * Return a String representation of this object.
077: */
078: public String toString() {
079:
080: StringBuffer sb = new StringBuffer("ContextResourceLink[");
081: sb.append("name=");
082: sb.append(name);
083: if (type != null) {
084: sb.append(", type=");
085: sb.append(type);
086: }
087: if (global != null) {
088: sb.append(", global=");
089: sb.append(global);
090: }
091: sb.append("]");
092: return (sb.toString());
093:
094: }
095:
096: // -------------------------------------------------------- Package Methods
097:
098: /**
099: * The NamingResources with which we are associated (if any).
100: */
101: protected NamingResources resources = null;
102:
103: public NamingResources getNamingResources() {
104: return (this .resources);
105: }
106:
107: void setNamingResources(NamingResources resources) {
108: this.resources = resources;
109: }
110:
111: }
|