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,java.lang.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,java.lang.Object>,com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,java.lang.Object>
public class AtpFormulaPanelRenderer extends com.hybris.cockpitng.widgets.editorarea.renderer.impl.DefaultEditorAreaPanelRendererThis 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 java.lang.StringADD_VARIABLE_IN_ATPFORMULAprotected static java.lang.StringATPFORMULA_BUILDER_HEADER_ACTIONSprotected static java.lang.StringATPFORMULA_BUILDER_HEADER_VARIABLESprotected static java.lang.StringATPFORMULA_TABLE_CLASSprotected static java.lang.StringAVAILABILITYprotected static java.lang.StringMINUS_OPERATORprotected static java.lang.StringPLUS_OPERATORprotected static java.lang.StringSUB_VARIABLE_IN_ATPFORMULA-
Fields inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer
ATTR_NOT_SAVED_OBJECT, attributeDescriptionIconRenderer, CURRENT_OBJECT, CURRENT_OBJECT_DOTLESS, 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 AtpFormulaPanelRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Set<java.beans.PropertyDescriptor>getAllAtpFormulaVariables(AtpFormulaModel atpFormula)Provides the Set of atpformula's propertiesprotected java.util.Map<java.lang.String,java.lang.String>getAtpFormulaVar2ArithmeticOperatorMap()protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadegetObjectFacade()protected com.hybris.cockpitng.dataaccess.facades.type.TypeFacadegetTypeFacade()protected voidhandleOnCheckEvent(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, java.beans.PropertyDescriptor formulaVarPropertyDescriptor, org.zkoss.zul.Checkbox checkbox)Updates the current formula variable to the ATP formula.voidrender(org.zkoss.zk.ui.Component component, com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel abstractPanelConfiguration, java.lang.Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)Renders the ATP Formula variables.protected voidrenderAtpFormulaBuilderHeader(org.zkoss.zul.Vlayout vlayout)Renders the Atp Formula Builder Header.protected voidrenderAtpFormulaVariableRow(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout, java.beans.PropertyDescriptor formulaVarPropertyDescriptor)Renders the given Atp formula variableprotected voidrenderAtpFormulaVariables(org.zkoss.zk.ui.HtmlBasedComponent attributeContainer, AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)Renders the properties ofAtpFormulaModelalong with +/- option to either add or subtract the corresponding property in theAtpFormulaModel.protected voidrenderIndividualFormulaVariables(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, org.zkoss.zul.Vlayout vlayout)Renders each individual formula variable with the +/- and remove options.protected voidsetAfterCancelListener(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)Adds afterCancelListener, so as to reinitialize with original values when the Refresh button is pressed in the editor areavoidsetAtpFormulaVar2ArithmeticOperatorMap(java.util.Map<java.lang.String,java.lang.String> atpFormulaVar2ArithmeticOperatorMap)voidsetObjectFacade(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)voidsetTypeFacade(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, getPermissionFacade, getPropertyValueService, getWidgetRenderingUtils, processEditorBeforeComposition, renderNotReadableLabel, resolveAttributeLabel, resolveAttributePath, resolveCustomComponentRenderer, resolveEditorType, resolveLabel, setAttributeDescriptionIconRenderer, setCockpitLocaleService, setCockpitUserService, setEditAvailabilityProviderFactory, setLabelService, setPermissionFacade, setPropertyValueService, setWidgetRenderingUtils, validateCustomElement
-
Methods inherited from class com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer
addRendererListener, fireComponentRendered, fireComponentRendered, fireComponentRendered, removeRendererListener
-
-
-
-
Field Detail
-
ADD_VARIABLE_IN_ATPFORMULA
protected static final java.lang.String ADD_VARIABLE_IN_ATPFORMULA
- See Also:
- Constant Field Values
-
SUB_VARIABLE_IN_ATPFORMULA
protected static final java.lang.String SUB_VARIABLE_IN_ATPFORMULA
- See Also:
- Constant Field Values
-
ATPFORMULA_BUILDER_HEADER_ACTIONS
protected static final java.lang.String ATPFORMULA_BUILDER_HEADER_ACTIONS
- See Also:
- Constant Field Values
-
ATPFORMULA_BUILDER_HEADER_VARIABLES
protected static final java.lang.String ATPFORMULA_BUILDER_HEADER_VARIABLES
- See Also:
- Constant Field Values
-
ATPFORMULA_TABLE_CLASS
protected static final java.lang.String ATPFORMULA_TABLE_CLASS
- See Also:
- Constant Field Values
-
AVAILABILITY
protected static final java.lang.String AVAILABILITY
- See Also:
- Constant Field Values
-
PLUS_OPERATOR
protected static final java.lang.String PLUS_OPERATOR
- See Also:
- Constant Field Values
-
MINUS_OPERATOR
protected static final java.lang.String MINUS_OPERATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public void render(org.zkoss.zk.ui.Component component, com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel abstractPanelConfiguration, java.lang.Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)Renders the ATP Formula variables.- Specified by:
renderin interfacecom.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,java.lang.Object>- Overrides:
renderin classcom.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 ofAtpFormulaModelalong with +/- option to either add or subtract the corresponding property in theAtpFormulaModel.- 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, java.beans.PropertyDescriptor formulaVarPropertyDescriptor)
Renders the given Atp formula variable- Parameters:
atpFormula- theAtpFormulaModelto be renderedwidgetInstanceManager- theWidgetInstanceManagervlayout- theVlayoutto contain the rendered atpformula variableformulaVarPropertyDescriptor- thePropertyDescriptorfor the AtpFormula variable being rendered
-
handleOnCheckEvent
protected void handleOnCheckEvent(AtpFormulaModel atpFormula, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, java.beans.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 java.util.Set<java.beans.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)
-
getObjectFacade
protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade getObjectFacade()
-
setObjectFacade
public void setObjectFacade(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)
-
getAtpFormulaVar2ArithmeticOperatorMap
protected java.util.Map<java.lang.String,java.lang.String> getAtpFormulaVar2ArithmeticOperatorMap()
-
setAtpFormulaVar2ArithmeticOperatorMap
public void setAtpFormulaVar2ArithmeticOperatorMap(java.util.Map<java.lang.String,java.lang.String> atpFormulaVar2ArithmeticOperatorMap)
-
-