Class DefaultCompareViewSectionRenderer
- java.lang.Object
-
- com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<TableRowsGroup,CONFIG,PartialRendererData<java.util.Collection>>
-
- com.hybris.cockpitng.widgets.compare.renderer.AbstractCompareViewSectionRenderer<Section,Attribute>
-
- com.hybris.cockpitng.widgets.compare.renderer.DefaultCompareViewSectionRenderer
-
- All Implemented Interfaces:
NotifyingWidgetComponentRenderer<TableRowsGroup,Section,PartialRendererData<java.util.Collection>>,WidgetComponentRenderer<TableRowsGroup,Section,PartialRendererData<java.util.Collection>>
public class DefaultCompareViewSectionRenderer extends AbstractCompareViewSectionRenderer<Section,Attribute>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.hybris.cockpitng.widgets.compare.renderer.AbstractCompareViewSectionRenderer
AbstractCompareViewSectionRenderer.ExpandSectionListener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTRIBUTE_LOCALIZED_ATTRIBUTE_EXPAND_STATE_HOLDER-
Fields inherited from class com.hybris.cockpitng.widgets.compare.renderer.AbstractCompareViewSectionRenderer
attributeRenderer, cockpitLocaleService, cockpitUserService, headerRenderer, MARK_EXPAND_TRIGGER, MARK_LOCALIZED_ATTRIBUTE_EXPAND_TRIGGER, widgetRenderingUtils
-
-
Constructor Summary
Constructors Constructor Description DefaultCompareViewSectionRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AttributebuildAttributeWithLocalizedQualifierPath(Attribute attribute, java.util.Locale locale)protected java.util.List<java.util.Locale>getAllLocales()protected WidgetComponentRenderer<TableRow,Attribute,PartialRendererData<java.util.Collection>>getAttributeRenderer(Attribute attributeConfig)protected java.lang.StringgetConfiguredSectionIdentifier(Section configuration)protected java.util.LocalegetCurrentLocale()protected voidhandleLocalizedAttributeExpandStateChangeRequested(boolean newCollapsedState, TableRow row, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)protected voidhandleLocalizedAttributeExpandStateChangeRequested(TableRowsGroup group, TableRow currentLocaleRow, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)protected booleanisAttributeLocalized(java.lang.String qualifier, DataType dataType)protected booleanisCurrentLocale(java.util.Locale locale)protected booleanisNotEqual(ComparisonResult result, CompareAttributeDescriptor attributeDescriptor)Checks if there is any difference for an attributeattributeDescriptor.protected booleanisSectionContentRendered(TableRowsGroup parent, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)protected voidregisterCollapsibleLocalizedGroupListeners(LocalizedAttributeInfo localizedAttributeInfo, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)protected voidrenderLocalizedAttributeGroup(LocalizedAttributeInfo localizedAttributeInfo, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)protected voidrenderLocalizedAttributeLocalization(TableRowsGroup parent, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager, TableRow row, Attribute attribute, java.util.Locale locale)protected voidrenderSection(TableRowsGroup parent, TableRow headerRow, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)protected voidupdateTableRowDifferentMark(TableRowsGroup parent, TableRow tableRow, Attribute attribute, PartialRendererData<java.util.Collection> data)-
Methods inherited from class com.hybris.cockpitng.widgets.compare.renderer.AbstractCompareViewSectionRenderer
getAttributeRenderer, getCockpitLocaleService, getCockpitUserService, getHeaderRenderer, getWidgetRenderingUtils, handleSectionExpandStateChangeRequested, handleSectionExpandStateChangeRequested, isCollapsed, render, renderAttribute, renderSection, renderSectionHeader, sectionHeaderRendered, setAttributeRenderer, setCockpitLocaleService, setCockpitUserService, setCollapsed, setHeaderRenderer, setWidgetRenderingUtils, updateSectionHeaderDifferentMark
-
Methods inherited from class com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer
addRendererListener, fireComponentRendered, fireComponentRendered, fireComponentRendered, removeRendererListener
-
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.widgets.common.WidgetComponentRenderer
render
-
-
-
-
Field Detail
-
ATTRIBUTE_LOCALIZED_ATTRIBUTE_EXPAND_STATE_HOLDER
public static final java.lang.String ATTRIBUTE_LOCALIZED_ATTRIBUTE_EXPAND_STATE_HOLDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConfiguredSectionIdentifier
protected java.lang.String getConfiguredSectionIdentifier(Section configuration)
- Specified by:
getConfiguredSectionIdentifierin classAbstractCompareViewSectionRenderer<Section,Attribute>
-
isSectionContentRendered
protected boolean isSectionContentRendered(TableRowsGroup parent, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)
- Specified by:
isSectionContentRenderedin classAbstractCompareViewSectionRenderer<Section,Attribute>
-
renderSection
protected void renderSection(TableRowsGroup parent, TableRow headerRow, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)
- Specified by:
renderSectionin classAbstractCompareViewSectionRenderer<Section,Attribute>
-
isAttributeLocalized
protected boolean isAttributeLocalized(java.lang.String qualifier, DataType dataType)
-
renderLocalizedAttributeGroup
protected void renderLocalizedAttributeGroup(LocalizedAttributeInfo localizedAttributeInfo, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)
-
registerCollapsibleLocalizedGroupListeners
protected void registerCollapsibleLocalizedGroupListeners(LocalizedAttributeInfo localizedAttributeInfo, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)
-
handleLocalizedAttributeExpandStateChangeRequested
protected void handleLocalizedAttributeExpandStateChangeRequested(TableRowsGroup group, TableRow currentLocaleRow, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)
-
handleLocalizedAttributeExpandStateChangeRequested
protected void handleLocalizedAttributeExpandStateChangeRequested(boolean newCollapsedState, TableRow row, Section configuration, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager)
-
renderLocalizedAttributeLocalization
protected void renderLocalizedAttributeLocalization(TableRowsGroup parent, PartialRendererData<java.util.Collection> data, DataType dataType, WidgetInstanceManager widgetInstanceManager, TableRow row, Attribute attribute, java.util.Locale locale)
-
buildAttributeWithLocalizedQualifierPath
protected Attribute buildAttributeWithLocalizedQualifierPath(Attribute attribute, java.util.Locale locale)
-
getAllLocales
protected java.util.List<java.util.Locale> getAllLocales()
-
getCurrentLocale
protected java.util.Locale getCurrentLocale()
-
isCurrentLocale
protected boolean isCurrentLocale(java.util.Locale locale)
-
updateTableRowDifferentMark
protected void updateTableRowDifferentMark(TableRowsGroup parent, TableRow tableRow, Attribute attribute, PartialRendererData<java.util.Collection> data)
- Specified by:
updateTableRowDifferentMarkin classAbstractCompareViewSectionRenderer<Section,Attribute>
-
isNotEqual
protected boolean isNotEqual(ComparisonResult result, CompareAttributeDescriptor attributeDescriptor)
Checks if there is any difference for an attributeattributeDescriptor.- Parameters:
result- ComparisonResult loaded from engineDefaultItemComparisonFacade.getCompareViewResult(Object, Collection, Collection)attributeDescriptor- object's attribute descriptor- Returns:
- true if compareObject is different than reference object in context of attribute, false otherwise
-
getAttributeRenderer
protected WidgetComponentRenderer<TableRow,Attribute,PartialRendererData<java.util.Collection>> getAttributeRenderer(Attribute attributeConfig)
- Overrides:
getAttributeRendererin classAbstractCompareViewSectionRenderer<Section,Attribute>
-
-