Class ClassificationAttributesExportRenderer

  • All Implemented Interfaces:
    com.hybris.cockpitng.widgets.common.NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.Component,​com.hybris.cockpitng.config.jaxb.wizard.ViewType,​java.util.Map<java.lang.String,​java.lang.String>>, com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,​com.hybris.cockpitng.config.jaxb.wizard.ViewType,​java.util.Map<java.lang.String,​java.lang.String>>

    public class ClassificationAttributesExportRenderer
    extends AbstractAttributesExportRenderer<ClassAttributeAssignmentModel>
    Renders components that allow to pick a list of classification attributes to be exported to excel for given products.

    Displays a list of available classification attributes of given Products, and a second list of selected attributes. Mandatory attributes are selected by default. Current implementation only allows to select classification attributes of all selected products. Params:

    • "classificationAttributesFormModelKey" - defines where in model attributes form is AttributeChooserForm - required
    • "itemsToExport" - defines spel to get items from model AttributeChooserForm - required
    • "includeAllSupported" - defines if include all should be available
    • "emptyAttributesMessageKey" - defines message key for label displayed in case there are no attributes to select.
    • "retrieveMode" - defines in what way classification classes are retrieved. There are 3 modes:
      • "ITEMS_INTERSECTION" - default value. In this mode displayed classification classes are retrieved from given items and intersected - it means that only common classes are displayed.
      • "ITEMS_UNION" - in this mode displayed classification classes are retrieved from given items - all classification classes from given items are then displayed.
      • "ALL" - in this mode all classification classes from the system are displayed - not only from given items
    Available classification attributes can be filtered by setSupportedAttributesPredicate(Predicate)
    • Field Detail

      • PARAM_ATTRIBUTES_FORM

        public static final java.lang.String PARAM_ATTRIBUTES_FORM
        See Also:
        Constant Field Values
      • PARAM_ITEMS_TO_EXPORT

        public static final java.lang.String PARAM_ITEMS_TO_EXPORT
        See Also:
        Constant Field Values
      • PARAM_EMPTY_ATTRIBUTES_MESSAGE_KEY

        public static final java.lang.String PARAM_EMPTY_ATTRIBUTES_MESSAGE_KEY
        See Also:
        Constant Field Values
      • PARAM_RETRIEVE_MODE

        public static final java.lang.String PARAM_RETRIEVE_MODE
        See Also:
        Constant Field Values
      • RETRIEVE_MODE_ITEMS_INTERSECTION

        public static final java.lang.String RETRIEVE_MODE_ITEMS_INTERSECTION
        See Also:
        Constant Field Values
      • RETRIEVE_MODE_ITEMS_UNION

        public static final java.lang.String RETRIEVE_MODE_ITEMS_UNION
        See Also:
        Constant Field Values
      • RETRIEVE_MODE_ALL

        public static final java.lang.String RETRIEVE_MODE_ALL
        See Also:
        Constant Field Values
    • Constructor Detail

      • ClassificationAttributesExportRenderer

        public ClassificationAttributesExportRenderer()
    • Method Detail

      • render

        public void render​(org.zkoss.zk.ui.Component parent,
                           com.hybris.cockpitng.config.jaxb.wizard.ViewType customView,
                           java.util.Map<java.lang.String,​java.lang.String> params,
                           com.hybris.cockpitng.dataaccess.facades.type.DataType dataType,
                           com.hybris.cockpitng.engine.WidgetInstanceManager wim)
        Specified by:
        render in interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,​com.hybris.cockpitng.config.jaxb.wizard.ViewType,​java.util.Map<java.lang.String,​java.lang.String>>
        Specified by:
        render in class com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer
      • populateAttributesChooserForm

        protected void populateAttributesChooserForm​(com.hybris.backoffice.attributechooser.AttributeChooserForm attributesForm,
                                                     java.util.List<ItemModel> items,
                                                     java.lang.String retrieveMode)
      • getRetrieveMode

        protected java.lang.String getRetrieveMode​(java.util.Map<java.lang.String,​java.lang.String> params)
      • getAttributesForm

        protected com.hybris.backoffice.attributechooser.AttributeChooserForm getAttributesForm​(com.hybris.cockpitng.engine.WidgetInstanceManager wim,
                                                                                                java.util.Map<java.lang.String,​java.lang.String> parameters)
      • getItems

        protected java.util.List<ItemModel> getItems​(com.hybris.cockpitng.engine.WidgetInstanceManager wim,
                                                     java.util.Map<java.lang.String,​java.lang.String> parameters)
      • setSupportedAttributesPredicate

        public void setSupportedAttributesPredicate​(java.util.function.Predicate<ClassAttributeAssignmentModel> supportedAttributePredicate)
      • setExcelClassificationService

        public void setExcelClassificationService​(ExcelClassificationService excelClassificationService)
      • getLabelService

        public com.hybris.cockpitng.labels.LabelService getLabelService()
      • setLabelService

        public void setLabelService​(com.hybris.cockpitng.labels.LabelService labelService)
      • getBlacklistedClassificationPredicate

        public java.util.function.Predicate<ClassificationSystemModel> getBlacklistedClassificationPredicate()
      • setBlacklistedClassificationPredicate

        public void setBlacklistedClassificationPredicate​(java.util.function.Predicate<ClassificationSystemModel> blacklistedClassificationPredicate)