More inheritance
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 6 Nov 2009 23:51:30 +0000 (23:51 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 6 Nov 2009 23:51:30 +0000 (23:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@833608 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/deploy/ContextEnvironment.java

index 74b08ec..70f2b4a 100644 (file)
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
 
 /**
  * Representation of an application environment entry, as represented in
@@ -31,7 +27,7 @@ import java.util.List;
  * @version $Revision$ $Date$
  */
 
-public class ContextEnvironment implements Serializable, Injectable {
+public class ContextEnvironment extends ResourceBase {
 
     private static final long serialVersionUID = 1L;
 
@@ -39,34 +35,6 @@ public class ContextEnvironment implements Serializable, Injectable {
 
 
     /**
-     * The description of this environment entry.
-     */
-    private String description = null;
-
-    public String getDescription() {
-        return (this.description);
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-
-    /**
-     * The name of this environment entry.
-     */
-    private String name = null;
-
-    public String getName() {
-        return (this.name);
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-
-    /**
      * Does this environment entry allow overrides by the application
      * deployment descriptor?
      */
@@ -82,20 +50,6 @@ public class ContextEnvironment implements Serializable, Injectable {
 
 
     /**
-     * The type of this environment entry.
-     */
-    private String type = null;
-
-    public String getType() {
-        return (this.type);
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-
-    /**
      * The value of this environment entry.
      */
     private String value = null;
@@ -109,17 +63,6 @@ public class ContextEnvironment implements Serializable, Injectable {
     }
 
 
-    private List<InjectionTarget> injectionTargets = new ArrayList<InjectionTarget>();
-
-    public void addInjectionTarget(String injectionTargetName, String jndiName) {
-        InjectionTarget target = new InjectionTarget(injectionTargetName, jndiName);
-        injectionTargets.add(target);
-    }
-
-    public List<InjectionTarget> getInjectionTargets() {
-        return injectionTargets;
-    }
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -131,14 +74,14 @@ public class ContextEnvironment implements Serializable, Injectable {
 
         StringBuilder sb = new StringBuilder("ContextEnvironment[");
         sb.append("name=");
-        sb.append(name);
-        if (description != null) {
+        sb.append(getName());
+        if (getDescription() != null) {
             sb.append(", description=");
-            sb.append(description);
+            sb.append(getDescription());
         }
-        if (type != null) {
+        if (getType() != null) {
             sb.append(", type=");
-            sb.append(type);
+            sb.append(getType());
         }
         if (value != null) {
             sb.append(", value=");
@@ -151,22 +94,4 @@ public class ContextEnvironment implements Serializable, Injectable {
 
     }
 
-
-    // -------------------------------------------------------- Package Methods
-
-
-    /**
-     * The NamingResources with which we are associated (if any).
-     */
-    protected NamingResources resources = null;
-
-    public NamingResources getNamingResources() {
-        return (this.resources);
-    }
-
-    void setNamingResources(NamingResources resources) {
-        this.resources = resources;
-    }
-
-
 }