Class CompositeConfigAdapter
- java.lang.Object
-
- com.hybris.cockpitng.core.config.impl.adapters.CompositeConfigAdapter
-
- All Implemented Interfaces:
CockpitConfigurationAdapter
public class CompositeConfigAdapter extends java.lang.Object implements CockpitConfigurationAdapter
The class allows to use more than one config adapter for one configuration. It aggregates multiple adapters and apply them sequentially.
-
-
Constructor Summary
Constructors Constructor Description CompositeConfigAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectadaptAfterLoad(ConfigContext context, java.lang.Object object)Adapts given cockpit configuration element after all subsequent configurations are loaded and merged.java.lang.ObjectadaptBeforeStore(ConfigContext context, java.lang.Object object)Adapts given cockpit configuration element before it is stored.java.lang.ClassgetSupportedType()Returns the type of configuration element this adapter supports.voidremoveAdaptersWithIncorrectType()voidsetAdapters(java.util.List<CockpitConfigurationAdapter> adapters)voidsetSupportedType(java.lang.Class supportedType)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.cockpitng.core.config.CockpitConfigurationAdapter
adaptBeforeMerge
-
-
-
-
Method Detail
-
getSupportedType
public java.lang.Class getSupportedType()
Description copied from interface:CockpitConfigurationAdapterReturns the type of configuration element this adapter supports.- Specified by:
getSupportedTypein interfaceCockpitConfigurationAdapter- Returns:
- type of configuration element this adapter supports
-
adaptAfterLoad
public java.lang.Object adaptAfterLoad(ConfigContext context, java.lang.Object object) throws CockpitConfigurationException
Description copied from interface:CockpitConfigurationAdapterAdapts given cockpit configuration element after all subsequent configurations are loaded and merged.- Specified by:
adaptAfterLoadin interfaceCockpitConfigurationAdapter- Parameters:
context- configuration contextobject- configuration element- Returns:
- adapted cockpit configuration element
- Throws:
CockpitConfigurationException- if something went wrong
-
adaptBeforeStore
public java.lang.Object adaptBeforeStore(ConfigContext context, java.lang.Object object) throws CockpitConfigurationException
Description copied from interface:CockpitConfigurationAdapterAdapts given cockpit configuration element before it is stored.- Specified by:
adaptBeforeStorein interfaceCockpitConfigurationAdapter- Parameters:
context- configuration contextobject- configuration element- Returns:
- adapted cockpit configuration element
- Throws:
CockpitConfigurationException- if something went wrong
-
setSupportedType
public void setSupportedType(java.lang.Class supportedType)
-
setAdapters
public void setAdapters(java.util.List<CockpitConfigurationAdapter> adapters)
-
removeAdaptersWithIncorrectType
@PostConstruct public void removeAdaptersWithIncorrectType()
-
-