org.apache.webbeans.corespi.se
Class DefaultBDABeansXmlScanner

java.lang.Object
  extended by org.apache.webbeans.corespi.se.DefaultBDABeansXmlScanner
All Implemented Interfaces:
BDABeansXmlScanner

public class DefaultBDABeansXmlScanner
extends Object
implements BDABeansXmlScanner

Tracks contents of each BDA's beans.xml to determine the interceptor, alternative, decorator, or etc that is applicable for a given BDA.


Constructor Summary
DefaultBDABeansXmlScanner()
           
 
Method Summary
 boolean addAlternative(Class<?> alternativeClass, String beansXMLFilePath)
          Stores the beans.xml an Alternative class is defined in
 boolean addDecorator(Class<?> decoratorClass, String beansXMLFilePath)
          Stores the beans.xml a Decorator class is defined in
 boolean addInterceptor(Class<?> interceptorClass, String beansXMLFilePath)
          Stores the beans.xml an Interceptor class is defined in
 boolean addStereoType(Class<? extends Annotation> stereoTypeClass, String beansXMLFilePath)
          Stores the beans.xml a Stereotype class is defined in
 Set<Class<?>> getAlternatives(String beansXMLFilePath)
           
 String getBeansXml(Class<?> class1)
           
 Set<Class<?>> getDecorators(String beansXMLFilePath)
           
 Set<Class<?>> getInterceptors(String beansXMLFilePath)
           
 Set<Class<? extends Annotation>> getStereotypes(String beansXMLFilePath)
           
 void setBeansXml(Class<?> class1, String beansXmlFilePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBDABeansXmlScanner

public DefaultBDABeansXmlScanner()
Method Detail

addInterceptor

public boolean addInterceptor(Class<?> interceptorClass,
                              String beansXMLFilePath)
Stores the beans.xml an Interceptor class is defined in

Specified by:
addInterceptor in interface BDABeansXmlScanner
Returns:
T - Interceptor class successfully stored; F - Interceptor class already exists and was not stored.

getInterceptors

public Set<Class<?>> getInterceptors(String beansXMLFilePath)
Specified by:
getInterceptors in interface BDABeansXmlScanner
Parameters:
beansXMLFilePath -
Returns:
a non-null set of Interceptors defined by the specified beansXMLFilePath

getDecorators

public Set<Class<?>> getDecorators(String beansXMLFilePath)
Specified by:
getDecorators in interface BDABeansXmlScanner
Parameters:
beansXMLFilePath -
Returns:
a non-null set of Decorators defined by the specified beansXMLFilePath

addDecorator

public boolean addDecorator(Class<?> decoratorClass,
                            String beansXMLFilePath)
Stores the beans.xml a Decorator class is defined in

Specified by:
addDecorator in interface BDABeansXmlScanner
Returns:
T - Decorator class successfully stored; F - Decorator class already exists and was not stored.

addAlternative

public boolean addAlternative(Class<?> alternativeClass,
                              String beansXMLFilePath)
Stores the beans.xml an Alternative class is defined in

Specified by:
addAlternative in interface BDABeansXmlScanner
Returns:
T - Alternative class successfully stored; F - Alternative class already exists and was not stored.

addStereoType

public boolean addStereoType(Class<? extends Annotation> stereoTypeClass,
                             String beansXMLFilePath)
Stores the beans.xml a Stereotype class is defined in

Specified by:
addStereoType in interface BDABeansXmlScanner
Returns:
T - Stereotype class successfully stored; F - Stereotype class already exists and was not stored.

getAlternatives

public Set<Class<?>> getAlternatives(String beansXMLFilePath)
Specified by:
getAlternatives in interface BDABeansXmlScanner
Parameters:
beansXMLFilePath -
Returns:
a non-null set of Alternatives defined by the specified beansXMLFilePath

getStereotypes

public Set<Class<? extends Annotation>> getStereotypes(String beansXMLFilePath)
Specified by:
getStereotypes in interface BDABeansXmlScanner
Parameters:
beansXMLFilePath -
Returns:
a non-null set of Stereotypes defined by the specified beansXMLFilePath

getBeansXml

public String getBeansXml(Class<?> class1)
Specified by:
getBeansXml in interface BDABeansXmlScanner
Parameters:
class1 - deployed class
Returns:
A String representing the file path to the beans.xml of the specified class's BDA

setBeansXml

public void setBeansXml(Class<?> class1,
                        String beansXmlFilePath)
Specified by:
setBeansXml in interface BDABeansXmlScanner


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.