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
* @version $Revision$ $Date$
*/
-public class ContextEnvironment implements Serializable, Injectable {
+public class ContextEnvironment extends ResourceBase {
private static final long serialVersionUID = 1L;
/**
- * 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?
*/
/**
- * 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;
}
- 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
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=");
}
-
- // -------------------------------------------------------- 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;
- }
-
-
}