org.apache.myfaces.spi
Class AnnotationProviderWrapper

java.lang.Object
  extended by org.apache.myfaces.spi.AnnotationProvider
      extended by org.apache.myfaces.spi.AnnotationProviderWrapper
All Implemented Interfaces:
FacesWrapper<AnnotationProvider>

public abstract class AnnotationProviderWrapper
extends AnnotationProvider
implements FacesWrapper<AnnotationProvider>

Wrapper class that all AnnotationProvider instances should extend. This is used to wrap the default algorithm and add some additional custom processing.

Since:
2.0.3
Author:
Leonardo Uribe

Constructor Summary
AnnotationProviderWrapper()
           
 
Method Summary
 Map<Class<? extends Annotation>,Set<Class<?>>> getAnnotatedClasses(ExternalContext ctx)
          Retrieve a map containing the classes that contains annotations used by jsf implementation at startup.
 Set<URL> getBaseUrls()
          The returned Set<URL> urls are calculated in this way ( see JSF 2.0 spec section 11.4.2 for definitions )
 Set<URL> getBaseUrls(ExternalContext ctx)
          Same as getBaseUrls(), but with the ExternalContext reference.
 
Methods inherited from class org.apache.myfaces.spi.AnnotationProvider
getWrapped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.FacesWrapper
getWrapped
 

Constructor Detail

AnnotationProviderWrapper

public AnnotationProviderWrapper()
Method Detail

getAnnotatedClasses

public Map<Class<? extends Annotation>,Set<Class<?>>> getAnnotatedClasses(ExternalContext ctx)
Description copied from class: AnnotationProvider
Retrieve a map containing the classes that contains annotations used by jsf implementation at startup.

The default implementation must comply with JSF 2.0 spec section 11.5.1 Requirements for scanning of classes for annotations.

This method could call getBaseUrls() to obtain a list of URL that could be used to indicate jar files of annotations in the classpath.

If the element in the WEB-INF/faces-config.xml file contains metadata-complete attribute whose value is "true", this method should not be called.

Specified by:
getAnnotatedClasses in class AnnotationProvider
Parameters:
ctx - The current ExternalContext
Returns:
A map with all classes that could contain annotations.

getBaseUrls

public Set<URL> getBaseUrls()
                     throws IOException
Description copied from class: AnnotationProvider

The returned Set<URL> urls are calculated in this way ( see JSF 2.0 spec section 11.4.2 for definitions )

  1. All resources that match either "META-INF/faces-config.xml" or end with ".facesconfig.xml" directly in the "META-INF" directory (considered applicationConfigurationResources)

Specified by:
getBaseUrls in class AnnotationProvider
Returns:
Throws:
IOException

getBaseUrls

public Set<URL> getBaseUrls(ExternalContext ctx)
                     throws IOException
Description copied from class: AnnotationProvider
Same as getBaseUrls(), but with the ExternalContext reference. By default it calls to getBaseUrls()

Overrides:
getBaseUrls in class AnnotationProvider
Returns:
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.