You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jm...@apache.org on 2001/07/12 01:58:55 UTC
cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/intake IntakeTool.java
jmcnally 01/07/11 16:58:55
Modified: src/java/org/apache/turbine/services/intake IntakeTool.java
Log:
added a method to clear out intake. Useful when an action has processed data
and the old intake data is irrelevant or conflicting with the next template.
Revision Changes Path
1.17 +16 -1 jakarta-turbine/src/java/org/apache/turbine/services/intake/IntakeTool.java
Index: IntakeTool.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/IntakeTool.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- IntakeTool.java 2001/07/10 01:04:06 1.16
+++ IntakeTool.java 2001/07/11 23:58:55 1.17
@@ -73,7 +73,7 @@
* A Pull tool to make intake objects available to a template
*
* @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
- * @version $Id: IntakeTool.java,v 1.16 2001/07/10 01:04:06 jvanzyl Exp $
+ * @version $Id: IntakeTool.java,v 1.17 2001/07/11 23:58:55 jmcnally Exp $
*/
public class IntakeTool
implements ApplicationTool, Recyclable
@@ -334,6 +334,21 @@
groups.remove(group.getObjectKey());
group.removeFromRequest();
TurbineIntake.releaseGroup(group);
+ }
+
+ /**
+ * Removes all groups. Primary use is to remove groups that have
+ * been processed by an action and are no longer appropriate
+ * in the view (screen).
+ */
+ public void removeAll()
+ {
+ Object[] allGroups = groups.values().toArray();
+ for (int i=allGroups.length-1; i>=0; i-- )
+ {
+ Group group = (Group)allGroups[i];
+ remove(group);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org