labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r740981 - in /labs/magma/trunk: website-administration-inline/src/main/java/org/apache/magma/website/admin/InterceptWebMethods.aj website-beansview/src/test/java/org/apache/magma/website/beansview/BeanFormProducerTest.java
Date Thu, 05 Feb 2009 02:37:46 GMT
Author: simoneg
Date: Thu Feb  5 02:37:46 2009
New Revision: 740981

URL: http://svn.apache.org/viewvc?rev=740981&view=rev
Log:
LABS-279 : adapted to new website system.

Modified:
    labs/magma/trunk/website-administration-inline/src/main/java/org/apache/magma/website/admin/InterceptWebMethods.aj
    labs/magma/trunk/website-beansview/src/test/java/org/apache/magma/website/beansview/BeanFormProducerTest.java

Modified: labs/magma/trunk/website-administration-inline/src/main/java/org/apache/magma/website/admin/InterceptWebMethods.aj
URL: http://svn.apache.org/viewvc/labs/magma/trunk/website-administration-inline/src/main/java/org/apache/magma/website/admin/InterceptWebMethods.aj?rev=740981&r1=740980&r2=740981&view=diff
==============================================================================
--- labs/magma/trunk/website-administration-inline/src/main/java/org/apache/magma/website/admin/InterceptWebMethods.aj
(original)
+++ labs/magma/trunk/website-administration-inline/src/main/java/org/apache/magma/website/admin/InterceptWebMethods.aj
Thu Feb  5 02:37:46 2009
@@ -58,8 +58,8 @@
 				AdminWebHandler awe = RootWebHandler.getInstance().handleAdministration();
 				ret = new CompoundHtmlProducer((HtmlProducer)ret, awe.hiddenInlineMenu(founds));
 				// TODO remove this, see LABS-257
-				((HtmlProducer)ret).setCreatingHandler((WebHandler)thisJoinPoint.getThis());
-				((HtmlProducer)ret).setCreatingMethod(((MethodSignature)thisJoinPoint.getSignature()).getMethod());
+				//((HtmlProducer)ret).setCreatingHandler((WebHandler)thisJoinPoint.getThis());
+				//((HtmlProducer)ret).setCreatingMethod(((MethodSignature)thisJoinPoint.getSignature()).getMethod());
 				return ret;
 			}
 		}

Modified: labs/magma/trunk/website-beansview/src/test/java/org/apache/magma/website/beansview/BeanFormProducerTest.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/website-beansview/src/test/java/org/apache/magma/website/beansview/BeanFormProducerTest.java?rev=740981&r1=740980&r2=740981&view=diff
==============================================================================
--- labs/magma/trunk/website-beansview/src/test/java/org/apache/magma/website/beansview/BeanFormProducerTest.java
(original)
+++ labs/magma/trunk/website-beansview/src/test/java/org/apache/magma/website/beansview/BeanFormProducerTest.java
Thu Feb  5 02:37:46 2009
@@ -18,29 +18,56 @@
 
 import static org.junit.Assert.assertThat;
 import static org.junit.matchers.StringContains.containsString;
+
+import java.io.ByteArrayOutputStream;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Set;
+
 import org.apache.magma.basics.LocalizableStringWithSubject;
+import org.apache.magma.basics.context.RunningContext;
 import org.apache.magma.beans.MagmaBeanSupport;
 import org.apache.magma.view.tree.FieldNode;
 import org.apache.magma.view.tree.LabelNode;
 import org.apache.magma.view.tree.Node;
 import org.apache.magma.view.tree.SimpleViewFilter;
 import org.apache.magma.view.tree.ViewCustomizer;
-import org.apache.magma.website.beansview.AssertStringStructure;
+import org.apache.magma.website.HtmlProducer;
 import org.apache.magma.website.beansview.stuff.Person;
 import org.apache.magma.website.beansview.stuff.Person2;
 import org.apache.magma.website.beansview.stuff.Person4;
 import org.apache.magma.website.beansview.stuff.Person5;
-
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
+import org.apache.magma.website.context.WebMethodContextElement;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
 import org.junit.Test;
 
 
 public class BeanFormProducerTest {
+	
+	
+	@AfterClass
+	public static void cleanAll() {
+		RunningContext.cleanup();
+	}
+	
+	@Before
+	public void setupContext() throws Exception {
+		Method m = this.getClass().getMethod("doTesting");
+		WebMethodContextElement wce = new WebMethodContextElement(m, new Object[0], null);
+		RunningContext.get().push(wce);
+	}
+	
+	@After
+	public void cleanContext() {
+		RunningContext.get().pop(WebMethodContextElement.class);
+	}
+	
+	public HtmlProducer doTesting() {
+		return null;
+	}	
+	
 	@Test
 	public void simpleTreeFields() throws Exception {
 		Person p = new Person();
@@ -49,7 +76,6 @@
 		p.setEmail("simoneg@apache.org");
 		
 		BeanFormProducer sbp = new BeanFormProducer(p, new ArrayList<LocalizableStringWithSubject>(),
null, "ABC");
-		sbp.setCompletePath("testing");
 		
 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
 		sbp.produce(baos);
@@ -88,7 +114,6 @@
 		ViewCustomizer flt = new SimpleViewFilter("withmother", "+mother", "-mother-mother");
 		
 		BeanFormProducer sbp = new BeanFormProducer(p, new ArrayList<LocalizableStringWithSubject>(),
flt, "ABC");
-		sbp.setCompletePath("testing");
 		
 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
 		sbp.produce(baos);
@@ -154,7 +179,6 @@
 		p.setDescription("bla bla bla");
 		
 		BeanFormProducer sbp = new BeanFormProducer(p, new ArrayList<LocalizableStringWithSubject>(),
null, "ABC");
-		sbp.setCompletePath("testing");
 		
 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
 		sbp.produce(baos);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message