org.codegist.crest.config
Class OverridingInterfaceConfigFactory
java.lang.Object
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)
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 overrideoverride
- 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 overriderFactoryoverriderFactory
- Config override factory- See Also:
Configs.override(InterfaceConfig, InterfaceConfig)
newConfig
public InterfaceConfig newConfig(Class<?> interfaze,
CRestContext context)
throws ConfigFactoryException
- Specified by:
newConfig
in interface InterfaceConfigFactory
- Parameters:
interfaze
- Interface to build the configuration fromcontext
- 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.