Class DefaultCompareViewConfigAdapter
- java.lang.Object
-
- com.hybris.cockpitng.widgets.compare.adapter.DefaultCompareViewConfigAdapter
-
- All Implemented Interfaces:
CockpitConfigurationAdapter<CompareView>
public class DefaultCompareViewConfigAdapter extends java.lang.Object implements CockpitConfigurationAdapter<CompareView>
-
-
Constructor Summary
Constructors Constructor Description DefaultCompareViewConfigAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompareViewadaptAfterLoad(ConfigContext context, CompareView compareView)Adapts given cockpit configuration element after all subsequent configurations are loaded and merged.CompareViewadaptBeforeMerge(ConfigContext context, CompareView compareView)Adapts given cockpit configuration element just after it is loaded and before it is merged to other subsequent configurations.CompareViewadaptBeforeStore(ConfigContext context, CompareView compareView)Adapts given cockpit configuration element before it is stored.protected voidaddSectionsToCompareViewConfig(EditorArea editorAreaConfiguration, CompareView compareView)protected SectionconstructSectionFromEssentials(Essentials essentials)protected SectionconstructSectionFromTab(AbstractTab tab)protected DefaultConfigContextcopyConfigContext(ConfigContext context, java.lang.String newComponent)protected CompareViewcreateCompareViewFromEditorArea(EditorArea editorArea)protected CompareViewcreateCompareViewFromGridView(GridView gridView)protected <P extends Positioned>
PositionedSort<P>getPositionedSort()java.lang.Class<CompareView>getSupportedType()Returns the type of configuration element this adapter supports.protected booleanisEditorAreaConfigurationContextProvided(CompareView compareView)protected java.util.Optional<EditorArea>loadEditorAreaConfiguration(ConfigContext context, CompareView compareView)protected java.util.Optional<GridView>loadGridViewConfiguration(ConfigContext context, CompareView compareView)voidsetCockpitConfigurationService(CockpitConfigurationService cockpitConfigurationService)voidsetEssentialsToSectionConverter(CompareViewConverter<Essentials,Section> essentialsToSectionConverter)voidsetGridViewToHeaderConverter(CompareViewConverter<GridView,Header> gridViewToHeaderConverter)voidsetMergeUtils(MergeUtils mergeUtils)voidsetPositionedSort(PositionedSort<Positioned> positionedSort)voidsetTabToSectionConverter(CompareViewConverter<AbstractTab,Section> tabToSectionConverter)protected booleanshouldLoadSpecifiedEditorAreaConfiguration(CompareView compareView)
-
-
-
Method Detail
-
getSupportedType
public java.lang.Class<CompareView> getSupportedType()
Description copied from interface:CockpitConfigurationAdapterReturns the type of configuration element this adapter supports.- Specified by:
getSupportedTypein interfaceCockpitConfigurationAdapter<CompareView>- Returns:
- type of configuration element this adapter supports
-
adaptBeforeStore
public CompareView adaptBeforeStore(ConfigContext context, CompareView compareView)
Description copied from interface:CockpitConfigurationAdapterAdapts given cockpit configuration element before it is stored.- Specified by:
adaptBeforeStorein interfaceCockpitConfigurationAdapter<CompareView>- Parameters:
context- configuration contextcompareView- configuration element- Returns:
- adapted cockpit configuration element
-
adaptAfterLoad
public CompareView adaptAfterLoad(ConfigContext context, CompareView compareView)
Description copied from interface:CockpitConfigurationAdapterAdapts given cockpit configuration element after all subsequent configurations are loaded and merged.- Specified by:
adaptAfterLoadin interfaceCockpitConfigurationAdapter<CompareView>- Parameters:
context- configuration contextcompareView- configuration element- Returns:
- adapted cockpit configuration element
-
adaptBeforeMerge
public CompareView adaptBeforeMerge(ConfigContext context, CompareView compareView) 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<CompareView>- Parameters:
context- configuration contextcompareView- configuration element- Returns:
- adapted cockpit configuration element
- Throws:
CockpitConfigurationException- if something went wrong
-
isEditorAreaConfigurationContextProvided
protected boolean isEditorAreaConfigurationContextProvided(CompareView compareView)
-
shouldLoadSpecifiedEditorAreaConfiguration
protected boolean shouldLoadSpecifiedEditorAreaConfiguration(CompareView compareView)
-
copyConfigContext
protected DefaultConfigContext copyConfigContext(ConfigContext context, java.lang.String newComponent)
-
loadEditorAreaConfiguration
protected java.util.Optional<EditorArea> loadEditorAreaConfiguration(ConfigContext context, CompareView compareView) throws CockpitConfigurationException
- Throws:
CockpitConfigurationException
-
loadGridViewConfiguration
protected java.util.Optional<GridView> loadGridViewConfiguration(ConfigContext context, CompareView compareView) throws CockpitConfigurationException
- Throws:
CockpitConfigurationException
-
createCompareViewFromGridView
protected CompareView createCompareViewFromGridView(GridView gridView)
-
createCompareViewFromEditorArea
protected CompareView createCompareViewFromEditorArea(EditorArea editorArea)
-
addSectionsToCompareViewConfig
protected void addSectionsToCompareViewConfig(EditorArea editorAreaConfiguration, CompareView compareView)
-
constructSectionFromTab
protected Section constructSectionFromTab(AbstractTab tab)
-
constructSectionFromEssentials
protected Section constructSectionFromEssentials(Essentials essentials)
-
getPositionedSort
protected <P extends Positioned> PositionedSort<P> getPositionedSort()
-
setPositionedSort
public void setPositionedSort(PositionedSort<Positioned> positionedSort)
-
setCockpitConfigurationService
public void setCockpitConfigurationService(CockpitConfigurationService cockpitConfigurationService)
-
setMergeUtils
public void setMergeUtils(MergeUtils mergeUtils)
-
setTabToSectionConverter
public void setTabToSectionConverter(CompareViewConverter<AbstractTab,Section> tabToSectionConverter)
-
setEssentialsToSectionConverter
public void setEssentialsToSectionConverter(CompareViewConverter<Essentials,Section> essentialsToSectionConverter)
-
setGridViewToHeaderConverter
public void setGridViewToHeaderConverter(CompareViewConverter<GridView,Header> gridViewToHeaderConverter)
-
-