[webbeans-commits] Webbeans SVN: r3580 - ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap and 12 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Aug 21 11:13:14 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-08-21 11:13:13 -0400 (Fri, 21 Aug 2009)
New Revision: 3580

Added:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/Logger.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployment.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletHelper.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/JSFServices.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java
   ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJSFServices.java
   ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockServletServices.java
   ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockJSFServices.java
   ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletServices.java
   ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/bootstrap/
   ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/bootstrap/javax.enterprise.inject.spi.Extension
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/javax.enterprise.inject.spi.Extension
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/javax.enterprise.inject.spi.Extension.DeploymentTest
Log:
Commit missing files

Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/Logger.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/Logger.java	                        (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/Logger.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans;
+
+/**
+ * @author pmuir
+ *
+ */
+public interface Logger {
+   
+   public enum LogMessages {
+      
+      WRONG_PASSWORD
+      
+   }
+   
+   public static class Test {
+      
+      public void test()
+      {
+         Logger logger = new Logger() 
+         {
+
+            public void warn(Enum<?> message)
+            {
+               // No-op, this is a mock
+            }
+            
+         };
+         logger.warn(LogMessages.WRONG_PASSWORD);
+      }
+      
+   }
+   
+   public void warn(Enum<?> message);
+
+}


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

Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployment.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployment.java	                        (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployment.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bootstrap;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.bean.builtin.DefaultValidatorBean;
+import org.jboss.webbeans.bean.builtin.DefaultValidatorFactoryBean;
+import org.jboss.webbeans.bean.builtin.InjectionPointBean;
+import org.jboss.webbeans.bean.builtin.ManagerBean;
+import org.jboss.webbeans.bean.builtin.PrincipalBean;
+import org.jboss.webbeans.bean.builtin.UserTransactionBean;
+import org.jboss.webbeans.bean.builtin.facade.EventBean;
+import org.jboss.webbeans.bean.builtin.facade.InstanceBean;
+import org.jboss.webbeans.bootstrap.api.Environment;
+import org.jboss.webbeans.bootstrap.api.Environments;
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.conversation.ConversationImpl;
+import org.jboss.webbeans.conversation.JavaSEConversationTerminator;
+import org.jboss.webbeans.conversation.NumericConversationIdGenerator;
+import org.jboss.webbeans.conversation.ServletConversationManager;
+import org.jboss.webbeans.ejb.EjbDescriptorCache;
+import org.jboss.webbeans.ejb.spi.EjbServices;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.security.spi.SecurityServices;
+import org.jboss.webbeans.servlet.HttpSessionManager;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
+import org.jboss.webbeans.validation.spi.ValidationServices;
+import org.jboss.webbeans.xml.BeansXmlParser;
+
+/**
+ * @author pmuir
+ *
+ */
+public class BeanDeployment
+{
+
+   private static final Log log = Logging.getLog(BeanDeployment.class);
+   
+   private final BeanDeploymentArchive beanDeploymentArchive;
+   private final BeanManagerImpl beanManager;
+   private final BeanDeployer beanDeployer;
+   
+   public BeanDeployment(BeanDeploymentArchive beanDeploymentArchive, BeanManagerImpl deploymentManager)
+   {
+      this.beanDeploymentArchive = beanDeploymentArchive;
+      this.beanManager = BeanManagerImpl.newManager(CurrentManager.rootManager());
+      EjbDescriptorCache ejbDescriptors = new EjbDescriptorCache();
+      if (deploymentManager.getServices().contains(EjbServices.class))
+      {
+         // Must populate EJB cache first, as we need it to detect whether a
+         // bean is an EJB!
+         ejbDescriptors.addAll(beanDeploymentArchive.getEjbs());
+      }
+      
+      beanDeployer = new BeanDeployer(beanManager, deploymentManager, ejbDescriptors);
+      
+      parseBeansXml();
+   }
+   
+   public BeanManagerImpl getBeanManager()
+   {
+      return beanManager;
+   }
+   
+   public BeanDeployer getBeanDeployer()
+   {
+      return beanDeployer;
+   }
+   
+   public BeanDeploymentArchive getBeanDeploymentArchive()
+   {
+      return beanDeploymentArchive;
+   }
+   
+   
+   private void parseBeansXml()
+   {
+      BeansXmlParser parser = new BeansXmlParser(beanManager.getServices().get(ResourceLoader.class), getBeanDeploymentArchive().getBeansXml());
+      parser.parse();
+      
+      if (parser.getEnabledPolicyClasses() != null)
+      {
+         beanManager.setEnabledPolicyClasses(parser.getEnabledPolicyClasses());
+      }
+      if (parser.getEnabledPolicyStereotypes() != null)
+      {
+         beanManager.setEnabledPolicyStereotypes(parser.getEnabledPolicyStereotypes());
+      }
+      if (parser.getEnabledDecoratorClasses() != null)
+      {
+         beanManager.setEnabledDecoratorClasses(parser.getEnabledDecoratorClasses());
+      }
+      if (parser.getEnabledInterceptorClasses() != null)
+      {
+         beanManager.setEnabledInterceptorClasses(parser.getEnabledInterceptorClasses());
+      }
+      log.debug("Enabled policies for "  + this + ": " + beanManager.getEnabledPolicyClasses() + " " + beanManager.getEnabledPolicyStereotypes());
+      log.debug("Enabled decorator types for "  + beanManager + ": " + beanManager.getEnabledDecoratorClasses());
+      log.debug("Enabled interceptor types for "  + beanManager + ": " + beanManager.getEnabledInterceptorClasses());
+   }
+   
+   public void deployBeans(Environment environment)
+   {
+      beanDeployer.addClasses(beanDeploymentArchive.getBeanClasses());
+      beanDeployer.getEnvironment().addBean(new ManagerBean(beanManager));
+      beanDeployer.getEnvironment().addBean(new InjectionPointBean(beanManager));
+      beanDeployer.getEnvironment().addBean(new EventBean(beanManager));
+      beanDeployer.getEnvironment().addBean(new InstanceBean(beanManager));
+      if (!environment.equals(Environments.SE))
+      {
+         beanDeployer.addClass(ConversationImpl.class);
+         beanDeployer.addClass(ServletConversationManager.class);
+         beanDeployer.addClass(JavaSEConversationTerminator.class);
+         beanDeployer.addClass(NumericConversationIdGenerator.class);
+         beanDeployer.addClass(HttpSessionManager.class);
+      }
+      if (beanManager.getServices().contains(TransactionServices.class))
+      {
+         beanDeployer.getEnvironment().addBean(new UserTransactionBean(beanManager));
+      }
+      if (beanManager.getServices().contains(SecurityServices.class))
+      {
+         beanDeployer.getEnvironment().addBean(new PrincipalBean(beanManager));
+      }
+      if (beanManager.getServices().contains(ValidationServices.class))
+      {
+         beanDeployer.getEnvironment().addBean(new DefaultValidatorBean(beanManager));
+         beanDeployer.getEnvironment().addBean(new DefaultValidatorFactoryBean(beanManager));
+      }
+      beanDeployer.createBeans().deploy();
+   }
+
+}


Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployment.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletHelper.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletHelper.java	                        (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletHelper.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.servlet.api.ServletServices;
+
+/**
+ * @author pmuir
+ *
+ */
+public class ServletHelper
+{
+   
+   public static BeanManagerImpl getModuleBeanManager(ServletContext ctx)
+   {
+      if (ctx == null)
+      {
+         throw new IllegalArgumentException("Must provide the Servlet Context");
+      }
+      BeanDeploymentArchive beanDeploymentArchive = CurrentManager.rootManager().getServices().get(ServletServices.class).getBeanDeploymentArchive(ctx);
+      return CurrentManager.getBeanDeploymentArchives().get(beanDeploymentArchive).getCurrent();
+   }
+
+}


Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletHelper.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bootstrap.spi.helpers;
+
+import java.net.URL;
+import java.util.Collection;
+
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+
+/**
+ * @author pmuir
+ *
+ */
+public abstract class ForwardingBeanDeploymentArchive implements BeanDeploymentArchive
+{
+
+   protected abstract BeanDeploymentArchive delegate();
+   
+   public Collection<Class<?>> getBeanClasses()
+   {
+      return delegate().getBeanClasses();
+   }
+
+   public Collection<BeanDeploymentArchive> getBeanDeploymentArchives()
+   {
+      return delegate().getBeanDeploymentArchives();
+   }
+
+   public Collection<URL> getBeansXml()
+   {
+      return delegate().getBeansXml();
+   }
+
+   public Collection<EjbDescriptor<?>> getEjbs()
+   {
+      return delegate().getEjbs();
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return delegate().hashCode();
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      return delegate().equals(obj);
+   }
+   
+   @Override
+   public String toString()
+   {
+      return delegate().toString();
+   }
+
+}


Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/JSFServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/JSFServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/JSFServices.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.persistence.spi.helpers;
+
+import javax.faces.application.Application;
+
+import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+
+/**
+ * @author pmuir
+ *
+ */
+public interface JSFServices extends Service
+{
+   
+   public BeanDeploymentArchive getBeanDeploymentArchive(Application application);
+
+}


Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/JSFServices.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet.api;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+
+/**
+ * @author pmuir
+ *
+ */
+public interface ServletServices extends Service
+{
+   
+   public BeanDeploymentArchive getBeanDeploymentArchive(ServletContext ctx);
+
+}


Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJSFServices.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJSFServices.java	                        (rev 0)
+++ ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJSFServices.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bootstrap.api.test;
+
+import javax.faces.application.Application;
+
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.persistence.spi.helpers.JSFServices;
+
+/**
+ * @author pmuir
+ *
+ */
+public class MockJSFServices implements JSFServices
+{
+
+   public BeanDeploymentArchive getBeanDeploymentArchive(Application application)
+   {
+      return null;
+   }
+
+}


Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJSFServices.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockServletServices.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockServletServices.java	                        (rev 0)
+++ ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockServletServices.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bootstrap.api.test;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.servlet.api.ServletServices;
+
+/**
+ * @author pmuir
+ *
+ */
+public class MockServletServices implements ServletServices
+{
+
+   public BeanDeploymentArchive getBeanDeploymentArchive(ServletContext ctx)
+   {
+      return null;
+   }
+
+}


Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockServletServices.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockJSFServices.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockJSFServices.java	                        (rev 0)
+++ ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockJSFServices.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.mock;
+
+import javax.faces.application.Application;
+
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.persistence.spi.helpers.JSFServices;
+
+/**
+ * @author pmuir
+ *
+ */
+public class MockJSFServices implements JSFServices
+{
+
+   public BeanDeploymentArchive getBeanDeploymentArchive(Application application)
+   {
+      return null;
+   }
+
+}


Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockJSFServices.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletServices.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletServices.java	                        (rev 0)
+++ ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletServices.java	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.mock;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.servlet.api.ServletServices;
+
+/**
+ * @author pmuir
+ *
+ */
+public class MockServletServices implements ServletServices
+{
+
+   private final BeanDeploymentArchive beanDeploymentArchive;
+   
+   public MockServletServices(BeanDeploymentArchive beanDeploymentArchive)
+   {
+      this.beanDeploymentArchive = beanDeploymentArchive;
+   }
+
+   public BeanDeploymentArchive getBeanDeploymentArchive(ServletContext ctx)
+   {
+      if (ctx instanceof MockServletContext)
+      {
+         return beanDeploymentArchive;
+      }
+      else
+      {
+         return null;
+      }
+   }
+
+}


Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletServices.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/bootstrap/javax.enterprise.inject.spi.Extension
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/bootstrap/javax.enterprise.inject.spi.Extension	                        (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/bootstrap/javax.enterprise.inject.spi.Extension	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1 @@
+org.jboss.webbeans.test.unit.bootstrap.InitializedObserver
\ No newline at end of file

Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/javax.enterprise.inject.spi.Extension
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/javax.enterprise.inject.spi.Extension	                        (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/javax.enterprise.inject.spi.Extension	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1 @@
+org.jboss.jsr299.tck.tests.context.ContextExtensions
\ No newline at end of file

Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension	                        (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1 @@
+org.jboss.jsr299.tck.tests.definition.bean.custom.CatBean
\ No newline at end of file

Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/javax.enterprise.inject.spi.Extension.DeploymentTest
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/javax.enterprise.inject.spi.Extension.DeploymentTest	                        (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/javax.enterprise.inject.spi.Extension.DeploymentTest	2009-08-21 15:13:13 UTC (rev 3580)
@@ -0,0 +1 @@
+org.jboss.jsr299.tck.tests.deployment.lifecycle.ManagerObserver




More information about the weld-commits mailing list