org.codegist.crest.config
Class AnnotationDrivenInterfaceConfigFactory

java.lang.Object
  extended by org.codegist.crest.config.AnnotationDrivenInterfaceConfigFactory
All Implemented Interfaces:
InterfaceConfigFactory

public class AnnotationDrivenInterfaceConfigFactory
extends Object
implements InterfaceConfigFactory

Annotation based config factory of any possible interfaces given to the factory.

The factory will lookup any annotation in package org.codegist.crest.annotate on to the given interface.

- Each config fallback from param to method to interface until one config is found, otherwise defaults to any respective default value (InterfaceConfig, MethodConfig, PropertiesDrivenInterfaceConfigFactory).

Author:
Laurent Gilles (laurent.gilles@codegist.org)
See Also:
InterfaceConfig, org.codegist.crest.annotate

Constructor Summary
AnnotationDrivenInterfaceConfigFactory()
           
 
Method Summary
 InterfaceConfig newConfig(Class<?> interfaze, CRestContext context)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationDrivenInterfaceConfigFactory

public AnnotationDrivenInterfaceConfigFactory()
Method Detail

newConfig

public InterfaceConfig newConfig(Class<?> interfaze,
                                 CRestContext context)
                          throws ConfigFactoryException
Specified by:
newConfig in interface InterfaceConfigFactory
Parameters:
interfaze - Interface to build the configuration from
context - Current CRest context
Returns:
The interface config object.
Throws:
ConfigFactoryException - for any problem occuring during the configuration construction
See Also:
InterfaceConfigFactory


Copyright © 2011. All Rights Reserved.