org.ow2.jonas.cdi.weld.internal.deployment
Class DefaultDeployment

java.lang.Object
  extended by org.ow2.jonas.cdi.weld.internal.deployment.DefaultDeployment
All Implemented Interfaces:
org.jboss.weld.bootstrap.spi.Deployment

public class DefaultDeployment
extends Object
implements org.jboss.weld.bootstrap.spi.Deployment

A DefaultDeployment is a structure that contains a collection of BDAs.

Author:
Guillaume Sauthier

Constructor Summary
DefaultDeployment()
           
 
Method Summary
 Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> getBeanDeploymentArchives()
          Get the bean deployment archives which are part of this deployment and adjacent to it in the deployment archive graph.
 org.jboss.weld.bootstrap.api.ServiceRegistry getServices()
          Get the services available to this deployment
 org.jboss.weld.bootstrap.spi.BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass)
          Load the BeanDeploymentArchive containing the given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDeployment

public DefaultDeployment()
Method Detail

getBeanDeploymentArchives

public Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> getBeanDeploymentArchives()
Get the bean deployment archives which are part of this deployment and adjacent to it in the deployment archive graph. This should include all Java EE modules such as WARs, EJB jars and RARs.

Cycles in the accessible BeanDeploymentArchive graph are allowed. If a cycle is detected by Weld, it will be automatically removed by Web Beans. This means any implementor of this interface don't need to worry about circularities.

Specified by:
getBeanDeploymentArchives in interface org.jboss.weld.bootstrap.spi.Deployment
Returns:
the accessible bean deployment archives

loadBeanDeploymentArchive

public org.jboss.weld.bootstrap.spi.BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass)
Load the BeanDeploymentArchive containing the given class.

If the deployment archive containing the given class is not currently a bean deployment archive, it must be added to the bean deployment archive graph and returned. If the deployment archive is currently a bean deployment archive it should be returned.

If beanClass is the bean class of an EJB session bean, an EjbDescriptor for the bean must be returned by BeanDeploymentArchive.getEjbs().

Specified by:
loadBeanDeploymentArchive in interface org.jboss.weld.bootstrap.spi.Deployment
Parameters:
beanClass - the bean class to load
Returns:
the BeanDeploymentArchive containing the bean class

getServices

public org.jboss.weld.bootstrap.api.ServiceRegistry getServices()
Get the services available to this deployment

Specified by:
getServices in interface org.jboss.weld.bootstrap.spi.Deployment
Returns:
the services available


Copyright © 2011 OW2 Consortium. All Rights Reserved.