Class PositionedConfigurationAdapter<CONFIG,POSITIONED extends Positioned>
- java.lang.Object
-
- com.hybris.cockpitng.core.config.impl.jaxb.adapters.PositionedConfigurationAdapter<CONFIG,POSITIONED>
-
- All Implemented Interfaces:
CockpitConfigurationAdapter<CONFIG>
- Direct Known Subclasses:
ActionsConfigurationAdapter
public class PositionedConfigurationAdapter<CONFIG,POSITIONED extends Positioned> extends java.lang.Object implements CockpitConfigurationAdapter<CONFIG>
A configuration adapter that sort a list ofPositionedelements available as specified property of configuration
-
-
Constructor Summary
Constructors Constructor Description PositionedConfigurationAdapter(PositionedSort<POSITIONED> positionedSort, java.lang.Class<CONFIG> supportedType)PositionedConfigurationAdapter(PositionedSort<POSITIONED> positionedSort, java.lang.Class<CONFIG> supportedType, java.lang.String property)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CONFIGadaptAfterLoad(ConfigContext context, CONFIG config)Adapts given cockpit configuration element after all subsequent configurations are loaded and merged.CONFIGadaptBeforeMerge(ConfigContext context, CONFIG config)Adapts given cockpit configuration element just after it is loaded and before it is merged to other subsequent configurations.CONFIGadaptBeforeStore(ConfigContext context, CONFIG config)Adapts given cockpit configuration element before it is stored.protected java.util.List<POSITIONED>getListPropertyValue(java.lang.Object propertyValue)protected java.util.List<POSITIONED>getPositionedList(ConfigContext context, CONFIG config)protected PositionedSort<POSITIONED>getPositionedSort()protected java.lang.StringgetProperty()java.lang.Class<CONFIG>getSupportedType()Returns the type of configuration element this adapter supports.
-
-
-
Constructor Detail
-
PositionedConfigurationAdapter
public PositionedConfigurationAdapter(PositionedSort<POSITIONED> positionedSort, java.lang.Class<CONFIG> supportedType)
-
PositionedConfigurationAdapter
public PositionedConfigurationAdapter(PositionedSort<POSITIONED> positionedSort, java.lang.Class<CONFIG> supportedType, java.lang.String property)
-
-
Method Detail
-
getSupportedType
public java.lang.Class<CONFIG> getSupportedType()
Description copied from interface:CockpitConfigurationAdapterReturns the type of configuration element this adapter supports.- Specified by:
getSupportedTypein interfaceCockpitConfigurationAdapter<CONFIG>- Returns:
- type of configuration element this adapter supports
-
getProperty
protected java.lang.String getProperty()
-
getPositionedSort
protected PositionedSort<POSITIONED> getPositionedSort()
-
adaptBeforeMerge
public CONFIG adaptBeforeMerge(ConfigContext context, CONFIG config) throws CockpitConfigurationException
Description copied from interface:CockpitConfigurationAdapterAdapts given cockpit configuration element just after it is loaded and before it is merged to other subsequent configurations.- Specified by:
adaptBeforeMergein interfaceCockpitConfigurationAdapter<CONFIG>- Parameters:
context- configuration contextconfig- configuration element- Returns:
- adapted cockpit configuration element
- Throws:
CockpitConfigurationException- if something went wrong
-
adaptAfterLoad
public CONFIG adaptAfterLoad(ConfigContext context, CONFIG config) throws CockpitConfigurationException
Description copied from interface:CockpitConfigurationAdapterAdapts given cockpit configuration element after all subsequent configurations are loaded and merged.- Specified by:
adaptAfterLoadin interfaceCockpitConfigurationAdapter<CONFIG>- Parameters:
context- configuration contextconfig- configuration element- Returns:
- adapted cockpit configuration element
- Throws:
CockpitConfigurationException- if something went wrong
-
getPositionedList
protected java.util.List<POSITIONED> getPositionedList(ConfigContext context, CONFIG config)
-
getListPropertyValue
protected java.util.List<POSITIONED> getListPropertyValue(java.lang.Object propertyValue)
-
adaptBeforeStore
public CONFIG adaptBeforeStore(ConfigContext context, CONFIG config) throws CockpitConfigurationException
Description copied from interface:CockpitConfigurationAdapterAdapts given cockpit configuration element before it is stored.- Specified by:
adaptBeforeStorein interfaceCockpitConfigurationAdapter<CONFIG>- Parameters:
context- configuration contextconfig- configuration element- Returns:
- adapted cockpit configuration element
- Throws:
CockpitConfigurationException- if something went wrong
-
-