[webbeans-commits] Webbeans SVN: r858 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl and 2 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Jan 9 09:15:51 EST 2009


Author: pete.muir at jboss.org
Date: 2009-01-09 09:15:51 -0500 (Fri, 09 Jan 2009)
New Revision: 858

Added:
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/ContextsImpl.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/MangersImpl.java
Modified:
   ri/trunk/webbeans-ri/pom.xml
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/BeansImpl.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java
Log:
Update API slightly, implement in RI

Modified: ri/trunk/webbeans-ri/pom.xml
===================================================================
--- ri/trunk/webbeans-ri/pom.xml	2009-01-09 13:17:16 UTC (rev 857)
+++ ri/trunk/webbeans-ri/pom.xml	2009-01-09 14:15:51 UTC (rev 858)
@@ -27,6 +27,12 @@
          <classifier>jdk15</classifier>
       </dependency>
       
+      <dependency>
+         <groupId>org.jboss.webbeans.tck</groupId>
+         <artifactId>webbeans-tck-api</artifactId>
+         <scope>test</scope>
+      </dependency>
+      
       <!-- <dependency>
          <groupId>org.jboss.ejb3</groupId>
          <artifactId>jboss-ejb3-embedded</artifactId>

Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/BeansImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/BeansImpl.java	2009-01-09 13:17:16 UTC (rev 857)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/BeansImpl.java	2009-01-09 14:15:51 UTC (rev 858)
@@ -19,7 +19,7 @@
       return SimpleBean.of(clazz, CurrentManager.rootManager());
    }
 
-   public <T> Bean<T> createProducerMethodBean(Method method, Bean<T> declaringBean)
+   public <T> Bean<T> createProducerMethodBean(Method method, Bean<?> declaringBean)
    {
       if (declaringBean instanceof AbstractClassBean)
       {

Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/ContextsImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/ContextsImpl.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/ContextsImpl.java	2009-01-09 14:15:51 UTC (rev 858)
@@ -0,0 +1,27 @@
+package org.jboss.webbeans.tck.impl;
+
+import org.jboss.webbeans.context.AbstractContext;
+import org.jboss.webbeans.context.RequestContext;
+import org.jboss.webbeans.tck.api.Contexts;
+
+public class ContextsImpl implements Contexts<AbstractContext>
+{
+
+   public RequestContext getRequestContext()
+   {
+      throw new UnsupportedOperationException("Not yet implemented");
+   }
+
+   public void setActive(AbstractContext context)
+   {
+      context.setActive(true);
+   }
+
+   public void setInactive(AbstractContext context)
+   {
+      context.setActive(false);
+   }
+   
+   
+   
+}


Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/ContextsImpl.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/MangersImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/MangersImpl.java	                        (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/MangersImpl.java	2009-01-09 14:15:51 UTC (rev 858)
@@ -0,0 +1,24 @@
+package org.jboss.webbeans.tck.impl;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+
+import javax.webbeans.manager.Manager;
+
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.tck.api.Managers;
+
+public class MangersImpl implements Managers
+{
+
+   public Manager getManager()
+   {
+      return CurrentManager.rootManager();
+   }
+
+   public void setEnabledDeploymentTypes(List<Class<? extends Annotation>> enabledDeploymentTypes)
+   {
+      CurrentManager.rootManager().setEnabledDeploymentTypes(enabledDeploymentTypes);
+   }
+   
+}


Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/tck/impl/MangersImpl.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java	2009-01-09 13:17:16 UTC (rev 857)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java	2009-01-09 14:15:51 UTC (rev 858)
@@ -53,6 +53,6 @@
     *           method
     * @return the producer bean
     */
-   public <T> Bean<T> createProducerMethodBean(Method method, Bean<T> declaringBean);
+   public <T> Bean<T> createProducerMethodBean(Method method, Bean<?> declaringBean);
    
 }

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java	2009-01-09 13:17:16 UTC (rev 857)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java	2009-01-09 14:15:51 UTC (rev 858)
@@ -6,27 +6,29 @@
  * Context related operations
  * 
  * @author Shane Bryzak
+ * @author Pete Muir
+ *
  */
-public interface Contexts
+public interface Contexts<T extends Context>
 {
    /**
     * Sets the specified context as active
     * 
     * @param context The context to set active
     */
-   void setActive(Context context);
+   void setActive(T context);
    
    /**
     * Sets the specified context as inactive
     * 
     * @param context The context to set inactive
     */
-   void setInactive(Context context);
+   void setInactive(T context);
    
    /**
     * Creates a new request context
     * 
     * @return The new request context
     */
-   Context createRequestContext();
+   T getRequestContext();
 }

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java	2009-01-09 13:17:16 UTC (rev 857)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java	2009-01-09 14:15:51 UTC (rev 858)
@@ -22,9 +22,9 @@
    void setEnabledDeploymentTypes(List<Class<? extends Annotation>> enabledDeploymentTypes);
    
    /**
-    * Creates a new Manager instance
+    * Get the Manager instance
     * 
-    * @return The new Manager 
+    * @return the Manager 
     */
-   Manager createManager();
+   Manager getManager();
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java	2009-01-09 13:17:16 UTC (rev 857)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java	2009-01-09 14:15:51 UTC (rev 858)
@@ -24,7 +24,7 @@
    @BeforeMethod
    public final void before()
    {
-      manager = TckUtils.getManagers().createManager();
+      manager = TckUtils.getManagers().getManager();
       //addStandardDeploymentTypesForTests();
    }
    




More information about the weld-commits mailing list