org.codegist.crest.config
Class OverridingInterfaceConfigFactory

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

public class OverridingInterfaceConfigFactory
extends Object
implements InterfaceConfigFactory

Simple InterfaceConfigFactory that returns a overridden configuration, result of the config creation for a given interface from two InterfaceConfigFactories.

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

Constructor Summary
OverridingInterfaceConfigFactory(InterfaceConfigFactory baseFactory, InterfaceConfig override)
          Build a factory that will override any result from baseFactory with the given config template
OverridingInterfaceConfigFactory(InterfaceConfigFactory baseFactory, InterfaceConfigFactory overriderFactory)
          Build a factory that will override any result from baseFactory with the given config template
 
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

OverridingInterfaceConfigFactory

public OverridingInterfaceConfigFactory(InterfaceConfigFactory baseFactory,
                                        InterfaceConfig override)
Build a factory that will override any result from baseFactory with the given config template

Parameters:
baseFactory - Factory from which results will be overridden by override
override - InterfaceConfig override template.
See Also:
Configs.override(InterfaceConfig, InterfaceConfig)

OverridingInterfaceConfigFactory

public OverridingInterfaceConfigFactory(InterfaceConfigFactory baseFactory,
                                        InterfaceConfigFactory overriderFactory)
Build a factory that will override any result from baseFactory with the given config template

Parameters:
baseFactory - Factory from which results will be overridden by overriderFactory
overriderFactory - Config override factory
See Also:
Configs.override(InterfaceConfig, InterfaceConfig)
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.