rleland 2002/11/25 18:33:07
Modified: src/share/org/apache/struts/action ActionServlet.java
PlugIn.java
src/share/org/apache/struts/tiles TilesPlugin.java
src/share/org/apache/struts/validator ValidatorPlugIn.java
Removed: src/share/org/apache/struts/action PlugInPatch.java
Log:
PluginPatch has now been removed.
PlugIn developers must rename their ApplicationConfig
classes to ModuleConfig.
Revision Changes Path
1.130 +9 -18
jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
Index: ActionServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- ActionServlet.java 12 Nov 2002 03:56:08 -0000 1.129
+++ ActionServlet.java 26 Nov 2002 02:33:07 -0000 1.130
@@ -676,13 +676,13 @@
* @since Struts 1.1
*/
protected void destroyApplications() {
-
+
ArrayList values = new ArrayList();
Enumeration names = getServletContext().getAttributeNames();
while (names.hasMoreElements()) {
values.add(names.nextElement());
}
-
+
Iterator keys = values.iterator();
while (keys.hasNext()) {
String name = (String) keys.next();
@@ -1030,18 +1030,9 @@
for (int i = 0; i < plugIns.length; i++) {
try {
plugIns[i] =
- (PlugIn)
RequestUtils.applicationInstance(plugInConfigs[i].getClassName());
+
(PlugIn)RequestUtils.applicationInstance(plugInConfigs[i].getClassName());
BeanUtils.populate(plugIns[i], plugInConfigs[i].getProperties());
- if (plugIns[i] instanceof PlugInPatch) {
- ((PlugInPatch) plugIns[i]).init(this, (ModuleConfig) config);
- } else {
- /* Since Struts 1.1 only has one implementation for
- ModuleConfig casting is safe here. Used only for
- transition purposes !
- */
- ApplicationConfig ac = new ApplicationConfig((ModuleConfigImpl)
config);
- plugIns[i].init(this, ac);
- }
+ plugIns[i].init(this, (ModuleConfig) config);
} catch (ServletException e) {
// Lets propagate
throw e;
@@ -1323,7 +1314,7 @@
log.debug("Mapping for servlet '" + servletName + "' = '" +
servletMapping + "'");
}
-
+
if (servletMapping != null) {
getServletContext().setAttribute(Globals.SERVLET_KEY, servletMapping);
}
1.7 +21 -7 jakarta-struts/src/share/org/apache/struts/action/PlugIn.java
Index: PlugIn.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/PlugIn.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PlugIn.java 9 Nov 2002 16:30:02 -0000 1.6
+++ PlugIn.java 26 Nov 2002 02:33:07 -0000 1.7
@@ -64,7 +64,7 @@
import javax.servlet.ServletException;
-import org.apache.struts.config.ApplicationConfig;
+import org.apache.struts.config.ModuleConfig;
/**
@@ -108,9 +108,23 @@
*
* @exception ServletException if this <code>PlugIn</code> cannot
* be successfully initialized
- * @deprecated use {@link PlugInPatch#init)}
+ * @deprecated and removed use {@link PlugInPatch#init)}
*/
- public void init(ActionServlet servlet, ApplicationConfig config)
+
+
+ /**
+ * <p>Receive notification that the specified module is being
+ * started up.</p>
+ *
+ * @param servlet ActionServlet that is managing all the application
+ * modules in this web application
+ * @param config ModuleConfig for the module with which
+ * this plug-in is associated
+ *
+ * @exception ServletException if this <code>PlugIn</code> cannot
+ * be successfully initialized
+ */
+ public void init(ActionServlet servlet, ModuleConfig config)
throws ServletException;
1.12 +3 -19
jakarta-struts/src/share/org/apache/struts/tiles/TilesPlugin.java
Index: TilesPlugin.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/tiles/TilesPlugin.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TilesPlugin.java 21 Nov 2002 03:42:21 -0000 1.11
+++ TilesPlugin.java 26 Nov 2002 02:33:07 -0000 1.12
@@ -145,22 +145,6 @@
* @exception ServletException if this <code>PlugIn</code> cannot
* be successfully initialized
*/
- public void init(ActionServlet servlet, ApplicationConfig config) throws
ServletException {
- init(servlet, (ModuleConfig) config);
- }
-
- /**
- * <p>Receive notification that the specified module is being
- * started up.</p>
- *
- * @param servlet ActionServlet that is managing all the modules
- * in this web application
- * @param config ApplicationConfig for the module with which
- * this plug in is associated
- *
- * @exception ServletException if this <code>PlugIn</code> cannot
- * be successfully initialized
- */
public void init(ActionServlet servlet, ModuleConfig config) throws
ServletException {
// Create factory config object
DefinitionsFactoryConfig factoryConfig = readFactoryConfig(servlet, config);
1.14 +4 -16
jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlugIn.java
Index: ValidatorPlugIn.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlugIn.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ValidatorPlugIn.java 9 Nov 2002 16:30:02 -0000 1.13
+++ ValidatorPlugIn.java 26 Nov 2002 02:33:07 -0000 1.14
@@ -148,18 +148,6 @@
}
/**
- * Initialize and load our resources.
- *
- * @param servlet The ActionServlet for our application
- * @param config The ApplicationConfig for our owning module
- *
- * @exception ServletException if we cannot configure ourselves correctly
- * @deprecated use {@link #init(ActionServlet,ModuleConfig)}
- */
- public void init(ActionServlet servlet, ApplicationConfig config)
- throws ServletException {
- init(servlet,(ModuleConfig)config);
- }
/**
* Initialize and load our resources.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>