pero 2004/10/04 23:57:20
Modified: catalina/src/share/org/apache/catalina/deploy
ContextEjb.java ContextLocalEjb.java
ContextResource.java ContextResourceEnvRef.java
ContextResourceLink.java
webapps/docs changelog.xml
Log:
refactor o.a.c.deploy.ContextXXX classes to use new super class ContextBase.
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.6 +8 -102
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java
Index: ContextEjb.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ContextEjb.java 26 Jul 2004 16:04:02 -0000 1.5
+++ ContextEjb.java 5 Oct 2004 06:57:20 -0000 1.6
@@ -18,8 +18,6 @@
package org.apache.catalina.deploy;
import java.io.Serializable;
-import java.util.Iterator;
-import java.util.HashMap;
/**
@@ -28,28 +26,16 @@
* deployment descriptor.
*
* @author Craig R. McClanahan
+ * @author Peter Rossbach ([EMAIL PROTECTED])
* @version $Revision$ $Date$
*/
-public class ContextEjb implements Serializable {
+public class ContextEjb extends ContextBase implements Serializable {
// ------------------------------------------------------------- Properties
- /**
- * The description of this EJB.
- */
- private String description = null;
-
- public String getDescription() {
- return (this.description);
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
/**
* The name of the EJB home implementation class.
@@ -78,21 +64,6 @@
this.link = link;
}
-
- /**
- * The name of this EJB.
- */
- private String name = null;
-
- public String getName() {
- return (this.name);
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
/**
* The name of the EJB remote implementation class.
*/
@@ -106,54 +77,6 @@
this.remote = remote;
}
-
- /**
- * The name of the EJB bean implementation class.
- */
- private String type = null;
-
- public String getType() {
- return (this.type);
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
-
- /**
- * Holder for our configured properties.
- */
- private HashMap properties = new HashMap();
-
- /**
- * Return a configured property.
- */
- public Object getProperty(String name) {
- return properties.get(name);
- }
-
- /**
- * Set a configured property.
- */
- public void setProperty(String name, Object value) {
- properties.put(name, value);
- }
-
- /**
- * remove a configured property.
- */
- public void removeProperty(String name) {
- properties.remove(name);
- }
-
- /**
- * List properties.
- */
- public Iterator listProperties() {
- return properties.keySet().iterator();
- }
-
// --------------------------------------------------------- Public Methods
@@ -165,14 +88,14 @@
StringBuffer sb = new StringBuffer("ContextEjb[");
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 (home != null) {
sb.append(", home=");
@@ -189,23 +112,6 @@
sb.append("]");
return (sb.toString());
- }
-
-
- // -------------------------------------------------------- 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;
}
1.6 +8 -105
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextLocalEjb.java
Index: ContextLocalEjb.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextLocalEjb.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ContextLocalEjb.java 26 Jul 2004 16:04:02 -0000 1.5
+++ ContextLocalEjb.java 5 Oct 2004 06:57:20 -0000 1.6
@@ -18,8 +18,6 @@
package org.apache.catalina.deploy;
import java.io.Serializable;
-import java.util.Iterator;
-import java.util.HashMap;
/**
@@ -28,29 +26,15 @@
* deployment descriptor.
*
* @author Craig R. McClanahan
+ * @author Peter Rossbach ([EMAIL PROTECTED])
* @version $Revision$ $Date$
*/
-public class ContextLocalEjb implements Serializable {
+public class ContextLocalEjb extends ContextBase implements Serializable {
// ------------------------------------------------------------- Properties
-
- /**
- * The description of this EJB.
- */
- private String description = null;
-
- public String getDescription() {
- return (this.description);
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
-
/**
* The name of the EJB home implementation class.
*/
@@ -92,68 +76,6 @@
this.local = local;
}
-
- /**
- * The name of this EJB.
- */
- private String name = null;
-
- public String getName() {
- return (this.name);
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- * The name of the EJB bean implementation class.
- */
- private String type = null;
-
- public String getType() {
- return (this.type);
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
-
- /**
- * Holder for our configured properties.
- */
- private HashMap properties = new HashMap();
-
- /**
- * Return a configured property.
- */
- public Object getProperty(String name) {
- return properties.get(name);
- }
-
- /**
- * Set a configured property.
- */
- public void setProperty(String name, Object value) {
- properties.put(name, value);
- }
-
- /**
- * remove a configured property.
- */
- public void removeProperty(String name) {
- properties.remove(name);
- }
-
- /**
- * List properties.
- */
- public Iterator listProperties() {
- return properties.keySet().iterator();
- }
-
// --------------------------------------------------------- Public Methods
@@ -165,14 +87,14 @@
StringBuffer sb = new StringBuffer("ContextLocalEjb[");
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 (home != null) {
sb.append(", home=");
@@ -190,23 +112,4 @@
return (sb.toString());
}
-
-
- // -------------------------------------------------------- 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;
- }
-
-
}
1.6 +8 -105
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResource.java
Index: ContextResource.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResource.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ContextResource.java 26 Jul 2004 16:04:02 -0000 1.5
+++ ContextResource.java 5 Oct 2004 06:57:20 -0000 1.6
@@ -18,9 +18,6 @@
package org.apache.catalina.deploy;
import java.io.Serializable;
-import java.util.Iterator;
-import java.util.HashMap;
-
/**
* Representation of a resource reference for a web application, as
@@ -28,10 +25,11 @@
* deployment descriptor.
*
* @author Craig R. McClanahan
+ * @author Peter Rossbach ([EMAIL PROTECTED])
* @version $Revision$ $Date$
*/
-public class ContextResource implements Serializable {
+public class ContextResource extends ContextBase implements Serializable {
// ------------------------------------------------------------- Properties
@@ -51,35 +49,6 @@
this.auth = auth;
}
-
- /**
- * The description of this resource.
- */
- private String description = null;
-
- public String getDescription() {
- return (this.description);
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
-
- /**
- * The name of this resource.
- */
- private String name = null;
-
- public String getName() {
- return (this.name);
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
/**
* The sharing scope of this resource factory (<code>Shareable</code>
* or <code>Unshareable</code>).
@@ -95,54 +64,6 @@
}
- /**
- * The type of this resource.
- */
- private String type = null;
-
- public String getType() {
- return (this.type);
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
-
- /**
- * Holder for our configured properties.
- */
- private HashMap properties = new HashMap();
-
- /**
- * Return a configured property.
- */
- public Object getProperty(String name) {
- return properties.get(name);
- }
-
- /**
- * Set a configured property.
- */
- public void setProperty(String name, Object value) {
- properties.put(name, value);
- }
-
- /**
- * remove a configured property.
- */
- public void removeProperty(String name) {
- properties.remove(name);
- }
-
- /**
- * List properties.
- */
- public Iterator listProperties() {
- return properties.keySet().iterator();
- }
-
-
// --------------------------------------------------------- Public Methods
@@ -153,14 +74,14 @@
StringBuffer sb = new StringBuffer("ContextResource[");
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 (auth != null) {
sb.append(", auth=");
@@ -174,23 +95,5 @@
return (sb.toString());
}
-
-
- // -------------------------------------------------------- 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;
- }
-
}
1.2 +6 -87
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResourceEnvRef.java
Index: ContextResourceEnvRef.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResourceEnvRef.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ContextResourceEnvRef.java 26 Jul 2004 16:04:02 -0000 1.1
+++ ContextResourceEnvRef.java 5 Oct 2004 06:57:20 -0000 1.2
@@ -18,8 +18,6 @@
package org.apache.catalina.deploy;
import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Iterator;
/**
@@ -27,29 +25,15 @@
* an <code><res-env-refy></code> element in the deployment descriptor.
*
* @author Craig R. McClanahan
+ * @author Peter Rossbach ([EMAIL PROTECTED])
* @version $Revision$ $Date$
*/
-public class ContextResourceEnvRef implements Serializable {
+public class ContextResourceEnvRef extends ContextBase implements Serializable {
// ------------------------------------------------------------- Properties
-
- /**
- * 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?
@@ -63,55 +47,6 @@
public void setOverride(boolean override) {
this.override = override;
}
-
-
- /**
- * The type of this environment entry.
- */
- private String type = null;
-
- public String getType() {
- return (this.type);
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
-
- /**
- * Holder for our configured properties.
- */
- private HashMap properties = new HashMap();
-
- /**
- * Return a configured property.
- */
- public Object getProperty(String name) {
- return properties.get(name);
- }
-
- /**
- * Set a configured property.
- */
- public void setProperty(String name, Object value) {
- properties.put(name, value);
- }
-
- /**
- * remove a configured property.
- */
- public void removeProperty(String name) {
- properties.remove(name);
- }
-
- /**
- * List properties.
- */
- public Iterator listProperties() {
- return properties.keySet().iterator();
- }
-
// --------------------------------------------------------- Public Methods
@@ -123,10 +58,10 @@
StringBuffer sb = new StringBuffer("ContextResourceEnvRef[");
sb.append("name=");
- sb.append(name);
- if (type != null) {
+ sb.append(getName());
+ if (getType() != null) {
sb.append(", type=");
- sb.append(type);
+ sb.append(getType());
}
sb.append(", override=");
sb.append(override);
@@ -135,22 +70,6 @@
}
-
- // -------------------------------------------------------- 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;
- }
}
1.5 +9 -55
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResourceLink.java
Index: ContextResourceLink.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResourceLink.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ContextResourceLink.java 13 May 2004 20:40:49 -0000 1.4
+++ ContextResourceLink.java 5 Oct 2004 06:57:20 -0000 1.5
@@ -26,44 +26,16 @@
* server configuration file.
*
* @author Remy Maucherat
+ * @author Peter Rossbach (Peter Rossbach ([EMAIL PROTECTED]))
* @version $Revision$ $Date$
*/
-public class ContextResourceLink implements Serializable {
+public class ContextResourceLink extends ContextBase implements Serializable {
// ------------------------------------------------------------- Properties
-
- /**
- * The name of this resource.
- */
- private String name = null;
-
- public String getName() {
- return (this.name);
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- * The type of this resource.
- */
- private String type = null;
-
- public String getType() {
- return (this.type);
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
-
- /**
+ /**
* The global name of this resource.
*/
private String global = null;
@@ -87,36 +59,18 @@
StringBuffer sb = new StringBuffer("ContextResourceLink[");
sb.append("name=");
- sb.append(name);
- if (type != null) {
+ sb.append(getName());
+ if (getType() != null) {
sb.append(", type=");
- sb.append(type);
+ sb.append(getType());
}
- if (global != null) {
+ if (getGlobal() != null) {
sb.append(", global=");
- sb.append(global);
+ sb.append(getGlobal());
}
sb.append("]");
return (sb.toString());
}
-
-
- // -------------------------------------------------------- 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;
- }
-
}
1.131 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml
Index: changelog.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- changelog.xml 4 Oct 2004 21:37:47 -0000 1.130
+++ changelog.xml 5 Oct 2004 06:57:20 -0000 1.131
@@ -125,6 +125,9 @@
<fix>
Remove authenticator "debug" attributes from the descriptors. (remm)
</fix>
+ <update>
+ Refactor org.apache.catalina.deploy.ContextXXX to use new super class
ContextBase. (pero)
+ </update>
</changelog>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]