Author: knopp
Date: Sun Jul 15 15:31:59 2007
New Revision: 556464

URL: http://svn.apache.org/viewvc?view=rev&rev=556464
Log:
WICKET-759

Modified:
    
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java

Modified: 
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?view=diff&rev=556464&r1=556463&r2=556464
==============================================================================
--- 
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
 (original)
+++ 
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
 Sun Jul 15 15:31:59 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.wicket;
 
+import java.io.Serializable;
 import java.util.Iterator;
 
 import org.apache.wicket.behavior.IBehavior;
@@ -1277,5 +1278,41 @@
         */
        protected void onEndRequest()
        {
+       }
+       
+       /**
+        * MetaDataEntry array.
+        */
+       private MetaDataEntry[] metaData;
+
+       /**
+        * Sets the metadata for this request using the given key. If the 
metadata
+        * object is not of the correct type for the metadata key, an
+        * IllegalArgumentException will be thrown. For information on creating
+        * MetaDataKeys, see [EMAIL PROTECTED] MetaDataKey}.
+        * 
+        * @param key
+        *            The singleton key for the metadata
+        * @param object
+        *            The metadata object
+        * @throws IllegalArgumentException
+        * @see MetaDataKey
+        */
+       public final void setMetaData(final MetaDataKey key, final Serializable 
object)
+       {
+               metaData = key.set(metaData, object);
+       }
+       
+       /**
+        * Gets metadata for this component using the given key.
+        * 
+        * @param key
+        *            The key for the data
+        * @return The metadata or null of no metadata was found for the given 
key
+        * @see MetaDataKey
+        */
+       public final Serializable getMetaData(final MetaDataKey key)
+       {
+               return key.get(metaData);
        }
 }


Reply via email to