Class AtpFormulaPanelRenderer

java.lang.Object
com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<org.zkoss.zk.ui.Component,T,K>
com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer<com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,Object>
com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer
de.hybris.platform.warehousingbackoffice.renderers.AtpFormulaPanelRenderer
All Implemented Interfaces:
com.hybris.cockpitng.widgets.common.NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,Object>, com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,Object>

public class AtpFormulaPanelRenderer extends com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer
This panel renderer allows displaying AtpFormula variables In order to guarantee proper rendering, you cannot reuse the same instance of this renderer across multiple widgets.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     

    Fields inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer

    ATTR_NOT_SAVED_OBJECT, attributeDescriptionIconRenderer, CURRENT_OBJECT, CURRENT_OBJECT_DOTLESS, DEFAULT_ENCRYPTED_EDITOR, MISSING_RENDERER_ERROR_MSG, SCLASS_CELL_READ_RESTRICTED, SCLASS_CUSTOM_CONTAINER, SCLASS_DESCRIPTION, SCLASS_DESCRIPTION_LABEL, SCLASS_EDITOR, SCLASS_EDITOR_CONTAINER, SCLASS_LABEL, SCLASS_READONLY_EDITOR
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Provides the Set of atpformula's properties
    protected Map<String,String>
     
    protected com.hybris.cockpitng.dataaccess.facades.type.TypeFacade
     
    protected void
    handleOnCheckEvent(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, PropertyDescriptor formulaVarPropertyDescriptor, org.zkoss.zul.Checkbox checkbox)
    Updates the current formula variable to the ATP formula.
    void
    render(org.zkoss.zk.ui.Component component, com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel abstractPanelConfiguration, Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
    Renders the ATP Formula variables.
    protected void
    renderAtpFormulaBuilderHeader(org.zkoss.zul.Vlayout vlayout)
    Renders the Atp Formula Builder Header.
    protected void
    renderAtpFormulaVariableRow(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout, PropertyDescriptor formulaVarPropertyDescriptor)
    Renders the given Atp formula variable
    protected void
    renderAtpFormulaVariables(org.zkoss.zk.ui.HtmlBasedComponent attributeContainer, AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
    Renders the properties of AtpFormulaModel along with +/- option to either add or subtract the corresponding property in the AtpFormulaModel.
    protected void
    renderIndividualFormulaVariables(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout)
    Renders each individual formula variable with the +/- and remove options.
    protected void
    setAfterCancelListener(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
    Adds afterCancelListener, so as to reinitialize with original values when the Refresh button is pressed in the editor area
    void
    setAtpFormulaVar2ArithmeticOperatorMap(Map<String,String> atpFormulaVar2ArithmeticOperatorMap)
     
    void
    setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
     

    Methods inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer

    createAttributeRenderer, createCustomHtmlRenderer

    Methods inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer

    buildEditor, canChangeProperty, createCustom, createEditor, createNotReadableAttributeLabelRenderer, evaluateCustomDefinition, extractParameterName, extractParameterValue, extractPropertiesList, getAttributeDescription, getCockpitLocaleService, getCockpitUserService, getEditAvailabilityProviderFactory, getEditorBuilder, getLabelService, getObjectFacade, getPermissionFacade, getPropertyValueService, getWidgetRenderingUtils, processEditorBeforeComposition, renderNotReadableLabel, resolveAttributeLabel, resolveAttributePath, resolveCustomComponentRenderer, resolveEditorType, resolveLabel, setAttributeDescriptionIconRenderer, setCockpitLocaleService, setCockpitUserService, setEditAvailabilityProviderFactory, setLabelService, setObjectFacade, setPasswordEditorAsDefaultForEncryptedStrings, setPermissionFacade, setPropertyValueService, setWidgetRenderingUtils, validateCustomElement

    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 Details

  • Constructor Details

    • AtpFormulaPanelRenderer

      public AtpFormulaPanelRenderer()
  • Method Details

    • render

      public void render(org.zkoss.zk.ui.Component component, com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel abstractPanelConfiguration, Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Renders the ATP Formula variables.
      Specified by:
      render in interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,Object>
      Overrides:
      render in class com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRenderer
      Parameters:
      component -
      abstractPanelConfiguration -
      object -
      dataType -
      widgetInstanceManager -
    • renderAtpFormulaVariables

      protected void renderAtpFormulaVariables(org.zkoss.zk.ui.HtmlBasedComponent attributeContainer, AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Renders the properties of AtpFormulaModel along with +/- option to either add or subtract the corresponding property in the AtpFormulaModel.
      Parameters:
      attributeContainer -
      atpFormula -
      widgetInstanceManager -
    • renderIndividualFormulaVariables

      protected void renderIndividualFormulaVariables(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout)
      Renders each individual formula variable with the +/- and remove options.
      Parameters:
      atpFormula -
      widgetInstanceManager -
      vlayout -
    • renderAtpFormulaVariableRow

      protected void renderAtpFormulaVariableRow(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout, PropertyDescriptor formulaVarPropertyDescriptor)
      Renders the given Atp formula variable
      Parameters:
      atpFormula - the AtpFormulaModel to be rendered
      widgetInstanceManager - the WidgetInstanceManager
      vlayout - the Vlayout to contain the rendered atpformula variable
      formulaVarPropertyDescriptor - the PropertyDescriptor for the AtpFormula variable being rendered
    • handleOnCheckEvent

      protected void handleOnCheckEvent(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, PropertyDescriptor formulaVarPropertyDescriptor, org.zkoss.zul.Checkbox checkbox)
      Updates the current formula variable to the ATP formula.
      Parameters:
      atpFormula -
      widgetInstanceManager -
      formulaVarPropertyDescriptor -
    • renderAtpFormulaBuilderHeader

      protected void renderAtpFormulaBuilderHeader(org.zkoss.zul.Vlayout vlayout)
      Renders the Atp Formula Builder Header.
      Parameters:
      vlayout -
    • setAfterCancelListener

      protected void setAfterCancelListener(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Adds afterCancelListener, so as to reinitialize with original values when the Refresh button is pressed in the editor area
      Parameters:
      widgetInstanceManager -
    • getAllAtpFormulaVariables

      protected Set<PropertyDescriptor> getAllAtpFormulaVariables(AtpFormulaModel atpFormula)
      Provides the Set of atpformula's properties
      Returns:
      all atpFormulaVariables
    • getTypeFacade

      protected com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade()
    • setTypeFacade

      public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
    • getAtpFormulaVar2ArithmeticOperatorMap

      protected Map<String,String> getAtpFormulaVar2ArithmeticOperatorMap()
    • setAtpFormulaVar2ArithmeticOperatorMap

      public void setAtpFormulaVar2ArithmeticOperatorMap(Map<String,String> atpFormulaVar2ArithmeticOperatorMap)