org.ow2.jonas.cdi.weld
Interface IWeldService

All Known Implementing Classes:
DefaultWeldService

public interface IWeldService

A IWeldService is some kind of utility service that takes care of Weld related operations.

Author:
Guillaume Sauthier

Method Summary
 void connectBeanDeploymentArchives(Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> childs, Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> parents)
          Connects all the BDA in the first Collection to each BDA in the second Collection.
 boolean isCdiEnabled(org.ow2.util.archive.api.IArchive archive)
          Detect if the given IArchive contains a beans.xml.
 org.jboss.weld.bootstrap.api.Bootstrap startWeldContainer(org.jboss.weld.bootstrap.spi.Deployment deployment)
          Starts a Weld container from a given Weld Deployment.
 

Method Detail

isCdiEnabled

boolean isCdiEnabled(org.ow2.util.archive.api.IArchive archive)
Detect if the given IArchive contains a beans.xml. Checked location includes:

Parameters:
archive - explored archive
Returns:
true if the given archive is CDI enabled, false otherwise.

connectBeanDeploymentArchives

void connectBeanDeploymentArchives(Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> childs,
                                   Collection<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> parents)
Connects all the BDA in the first Collection to each BDA in the second Collection. That makes beans from the second Collection (aka parent) accessible from the beans defined in the first Collection (childs).

Parameters:
childs - Collection of BDAs
parents - Collection of BDAs that will be accessibles from childs

startWeldContainer

org.jboss.weld.bootstrap.api.Bootstrap startWeldContainer(org.jboss.weld.bootstrap.spi.Deployment deployment)
Starts a Weld container from a given Weld Deployment.

Parameters:
deployment - Weld deployment interface
Returns:
a started Weld Bootstrap


Copyright © 2011 OW2 Consortium. All Rights Reserved.