e.g. Calendar Search Help
You must enter a value before pressing Search
tomcat

Class: org.apache.catalina.deploy.ContextResourceEnvRef   ©

 OK to copy?
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 
018 package org.apache.catalina.deploy;
019 
020 import java.io.Serializable;
021 import java.util.HashMap;
022 import java.util.Iterator;
023 
024 
025 /**
026  * Representation of an application resource reference, as represented in
027  * an <code>&lt;res-env-refy&gt;</code> element in the deployment descriptor.
028  *
029  * @author Craig R. McClanahan
030  * @version $Revision: 1.1 $ $Date: 2004/07/26 16:04:02 $
031  */
032 
033 public class ContextResourceEnvRef implements Serializable {
034 
035 
036     // ------------------------------------------------------------- Properties
037 
038 
039     /**
040      * The name of this environment entry.
041      */
042     private String name = null;
043 
044     public String getName() {
045         return (this.name);
046     }
047 
048     public void setName(String name) {
049         this.name = name;
050     }
051 
052 
053     /**
054      * Does this environment entry allow overrides by the application
055      * deployment descriptor?
056      */
057     private boolean override = true;
058 
059     public boolean getOverride() {
060         return (this.override);
061     }
062 
063     public void setOverride(boolean override) {
064         this.override = override;
065     }
066 
067 
068     /**
069      * The type of this environment entry.
070      */
071     private String type = null;
072 
073     public String getType() {
074         return (this.type);
075     }
076 
077     public void setType(String type) {
078         this.type = type;
079     }
080 
081 
082     /**
083      * Holder for our configured properties.
084      */
085     private HashMap properties = new HashMap();
086 
087     /**
088      * Return a configured property.
089      */
090     public Object getProperty(String name) {
091         return properties.get(name);
092     }
093 
094     /**
095      * Set a configured property.
096      */
097     public void setProperty(String name, Object value) {
098         properties.put(name, value);
099     }
100 
101     /** 
102      * remove a configured property.
103      */
104     public void removeProperty(String name) {
105         properties.remove(name);
106     }
107 
108     /**
109      * List properties.
110      */
111     public Iterator listProperties() {
Rate112         return properties.keySet().iterator();
113     }
114     
115     
116     // --------------------------------------------------------- Public Methods
117 
118 
119     /**
120      * Return a String representation of this object.
121      */
122     public String toString() {
123 
124         StringBuffer sb = new StringBuffer("ContextResourceEnvRef[");
125         sb.append("name=");
126         sb.append(name);
127         if (type != null) {
128             sb.append(", type=");
129             sb.append(type);
130         }
131         sb.append(", override=");
132         sb.append(override);
133         sb.append("]");
134         return (sb.toString());
135 
136     }
137 
138 
139     // -------------------------------------------------------- Package Methods
140 
141 
142     /**
143      * The NamingResources with which we are associated (if any).
144      */
145     protected NamingResources resources = null;
146 
147     public NamingResources getNamingResources() {
148         return (this.resources);
149     }
150 
151     void setNamingResources(NamingResources resources) {
152         this.resources = resources;
153     }
154 
155 
156 }

            
All Examples in File:
Example
Line
Rating (found
useful by...)
112 0% of 0