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

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

public class DefaultBeanDeploymentArchive
extends Object
implements org.jboss.weld.bootstrap.spi.BeanDeploymentArchive

A DefaultBeanDeploymentArchive is a structure that represents a BDA.

Author:
Guillaume Sauthier

Constructor Summary
DefaultBeanDeploymentArchive(String id, org.ow2.util.archive.api.IArchive archive, org.jboss.weld.bootstrap.api.ServiceRegistry registry)
          Constructs a Default BDA.
 
Method Summary
 Collection<Class<?>> getBeanClasses()
          Gets all classes in the bean deployment archive
 Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> getBeanDeploymentArchives()
          Get the bean deployment archives which are accessible to this bean deployment archive and adjacent to it in the deployment archive graph.
 Collection<URL> getBeansXml()
          Get any deployment descriptors in the bean deployment archive.
 Collection<org.jboss.weld.ejb.spi.EjbDescriptor<?>> getEjbs()
          Get all the EJBs in the deployment archive
 String getId()
          Get a string which uniquely identifies the BeanDeploymentArchive within the Deployment.
 org.jboss.weld.bootstrap.api.ServiceRegistry getServices()
          Get the Bean Deployment Archive scoped services
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBeanDeploymentArchive

public DefaultBeanDeploymentArchive(String id,
                                    org.ow2.util.archive.api.IArchive archive,
                                    org.jboss.weld.bootstrap.api.ServiceRegistry registry)
Constructs a Default BDA.

Parameters:
id - BDA identity (unique in the Deployment)
archive - the archive to be analyzed
registry - the parent Deployment registry.
Method Detail

getBeanDeploymentArchives

public Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> getBeanDeploymentArchives()
Get the bean deployment archives which are accessible to this bean deployment archive and adjacent to it in the deployment archive graph.

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.BeanDeploymentArchive
Returns:
the accessible bean deployment archives

getBeanClasses

public Collection<Class<?>> getBeanClasses()
Gets all classes in the bean deployment archive

Specified by:
getBeanClasses in interface org.jboss.weld.bootstrap.spi.BeanDeploymentArchive
Returns:
the classes, empty if no classes are present

getBeansXml

public Collection<URL> getBeansXml()
Get any deployment descriptors in the bean deployment archive.

The container will normally return a single deployment descriptor per bean deployment archive (the physical META-INF/beans.xml or WEB-INF/beans.xml), however it is permitted to return other deployment descriptors defined using other methods.

Specified by:
getBeansXml in interface org.jboss.weld.bootstrap.spi.BeanDeploymentArchive
Returns:
the URLs pointing to the deployment descriptor, or an empty set if none are present

getEjbs

public Collection<org.jboss.weld.ejb.spi.EjbDescriptor<?>> getEjbs()
Get all the EJBs in the deployment archive

Specified by:
getEjbs in interface org.jboss.weld.bootstrap.spi.BeanDeploymentArchive
Returns:
the EJBs, or empty if no EJBs are present or if this is not an EJB archive

getServices

public org.jboss.weld.bootstrap.api.ServiceRegistry getServices()
Get the Bean Deployment Archive scoped services

Specified by:
getServices in interface org.jboss.weld.bootstrap.spi.BeanDeploymentArchive
Returns:

getId

public String getId()
Get a string which uniquely identifies the BeanDeploymentArchive within the Deployment. The identifier must be consistent between multiple occurrences of this deployment.

Specified by:
getId in interface org.jboss.weld.bootstrap.spi.BeanDeploymentArchive
Returns:


Copyright © 2010 OW2 Consortium. All Rights Reserved.