Class AbstractEditorAreaComponentRenderer<T,K>
- java.lang.Object
-
- com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<org.zkoss.zk.ui.Component,T,K>
-
- com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer<T,K>
-
- All Implemented Interfaces:
NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.Component,T,K>,WidgetComponentRenderer<org.zkoss.zk.ui.Component,T,K>
- Direct Known Subclasses:
AbstractEditorAreaPanelRenderer,AbstractEditorAreaSectionRenderer,AbstractEditorAreaTabRenderer,DefaultEditorAreaPanelRenderer,DefaultEditorAreaRenderer,DefaultEditorAreaTabRenderer
public abstract class AbstractEditorAreaComponentRenderer<T,K> extends AbstractWidgetComponentRenderer<org.zkoss.zk.ui.Component,T,K>
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringATTR_NOT_SAVED_OBJECTprotected AttributeDescriptionIconRendererattributeDescriptionIconRendererprotected static java.lang.StringCURRENT_OBJECTprotected static java.lang.StringCURRENT_OBJECT_DOTLESSprotected static java.lang.StringDEFAULT_ENCRYPTED_EDITORprotected static java.lang.StringMISSING_RENDERER_ERROR_MSGprotected static java.lang.StringSCLASS_CELL_READ_RESTRICTEDprotected static java.lang.StringSCLASS_CUSTOM_CONTAINERprotected static java.lang.StringSCLASS_DESCRIPTIONprotected static java.lang.StringSCLASS_DESCRIPTION_LABELstatic java.lang.StringSCLASS_EDITORprotected static java.lang.StringSCLASS_EDITOR_CONTAINERprotected static java.lang.StringSCLASS_LABELstatic java.lang.StringSCLASS_READONLY_EDITOR
-
Constructor Summary
Constructors Constructor Description AbstractEditorAreaComponentRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EditorbuildEditor(EditorBuilder editorBuilder, WidgetInstanceManager widgetInstanceManager)protected booleancanChangeProperty(DataAttribute attribute, java.lang.Object instance)protected org.zkoss.zul.HtmlcreateCustom(DataType genericType, CustomElement customElement, java.lang.Object object)protected EditorcreateEditor(DataType genericType, WidgetInstanceManager widgetInstanceManager, Attribute attribute, java.lang.Object object)protected WidgetComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,Attribute,java.lang.String>createNotReadableAttributeLabelRenderer()protected java.lang.StringevaluateCustomDefinition(DataType genericType, java.lang.String definition, java.lang.Object object)protected java.lang.StringextractParameterName(Parameter parameter)protected java.lang.ObjectextractParameterValue(Parameter parameter)protected java.util.List<java.lang.String>extractPropertiesList(java.lang.String value)Extract properties separated by comma ',' from valueprotected java.lang.StringgetAttributeDescription(DataType genericType, Attribute attribute)protected CockpitLocaleServicegetCockpitLocaleService()protected CockpitUserServicegetCockpitUserService()protected EditAvailabilityProviderFactorygetEditAvailabilityProviderFactory()protected EditorBuildergetEditorBuilder(WidgetInstanceManager widgetInstanceManager)protected LabelServicegetLabelService()ObjectFacadegetObjectFacade()protected PermissionFacadegetPermissionFacade()protected PropertyValueServicegetPropertyValueService()WidgetRenderingUtilsgetWidgetRenderingUtils()protected voidprocessEditorBeforeComposition(Editor editor, DataType genericType, WidgetInstanceManager widgetInstanceManager, Attribute attribute, java.lang.Object object)protected org.zkoss.zk.ui.HtmlBasedComponentrenderNotReadableLabel(org.zkoss.zk.ui.HtmlBasedComponent attributeContainer, Attribute attribute, DataType dataType, java.lang.String labelValue)protected java.lang.StringresolveAttributeLabel(Attribute attribute, DataType genericType)If label key for attribute -Attribute.getLabel()- is not blank, method returns localized value for the label key.protected java.lang.StringresolveAttributePath(java.lang.String attributeQualifier, java.lang.String typeCode)protected <C> WidgetComponentRenderer<org.zkoss.zk.ui.Component,C,java.lang.Object>resolveCustomComponentRenderer(java.lang.String springId, java.lang.String className, java.lang.Class<C> clazz)Returns instance ofWidgetComponentRendererbased on the beanID or class name.protected java.lang.StringresolveEditorType(DataAttribute genericAttribute)protected java.lang.StringresolveLabel(java.lang.String labelKey)Returns localized label by key, or a "[labelKey]" if localized label was nor registered.voidsetAttributeDescriptionIconRenderer(AttributeDescriptionIconRenderer attributeDescriptionIconRenderer)voidsetCockpitLocaleService(CockpitLocaleService cockpitLocaleService)voidsetCockpitUserService(CockpitUserService cockpitUserService)voidsetEditAvailabilityProviderFactory(EditAvailabilityProviderFactory editAvailabilityProviderFactory)voidsetLabelService(LabelService labelService)voidsetObjectFacade(ObjectFacade objectFacade)protected voidsetPasswordEditorAsDefaultForEncryptedStrings(Attribute attribute, DataAttribute genericAttribute)voidsetPermissionFacade(PermissionFacade permissionFacade)voidsetPropertyValueService(PropertyValueService propertyValueService)voidsetWidgetRenderingUtils(WidgetRenderingUtils widgetRenderingUtils)protected voidvalidateCustomElement(java.lang.Class<?> componentClass, java.lang.String springId, java.lang.String clazz)Validates if the custom element (panel, tab or section) has either class or spring-bean configured.-
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, render
-
-
-
-
Field Detail
-
SCLASS_READONLY_EDITOR
public static final java.lang.String SCLASS_READONLY_EDITOR
- See Also:
- Constant Field Values
-
SCLASS_EDITOR
public static final java.lang.String SCLASS_EDITOR
- See Also:
- Constant Field Values
-
SCLASS_DESCRIPTION
protected static final java.lang.String SCLASS_DESCRIPTION
- See Also:
- Constant Field Values
-
SCLASS_DESCRIPTION_LABEL
protected static final java.lang.String SCLASS_DESCRIPTION_LABEL
- See Also:
- Constant Field Values
-
SCLASS_CELL_READ_RESTRICTED
protected static final java.lang.String SCLASS_CELL_READ_RESTRICTED
- See Also:
- Constant Field Values
-
CURRENT_OBJECT_DOTLESS
protected static final java.lang.String CURRENT_OBJECT_DOTLESS
- See Also:
- Constant Field Values
-
CURRENT_OBJECT
protected static final java.lang.String CURRENT_OBJECT
-
SCLASS_EDITOR_CONTAINER
protected static final java.lang.String SCLASS_EDITOR_CONTAINER
- See Also:
- Constant Field Values
-
SCLASS_CUSTOM_CONTAINER
protected static final java.lang.String SCLASS_CUSTOM_CONTAINER
- See Also:
- Constant Field Values
-
SCLASS_LABEL
protected static final java.lang.String SCLASS_LABEL
- See Also:
- Constant Field Values
-
ATTR_NOT_SAVED_OBJECT
protected static final java.lang.String ATTR_NOT_SAVED_OBJECT
- See Also:
- Constant Field Values
-
MISSING_RENDERER_ERROR_MSG
protected static final java.lang.String MISSING_RENDERER_ERROR_MSG
- See Also:
- Constant Field Values
-
DEFAULT_ENCRYPTED_EDITOR
protected static final java.lang.String DEFAULT_ENCRYPTED_EDITOR
- See Also:
- Constant Field Values
-
attributeDescriptionIconRenderer
protected AttributeDescriptionIconRenderer attributeDescriptionIconRenderer
-
-
Method Detail
-
resolveAttributeLabel
protected java.lang.String resolveAttributeLabel(Attribute attribute, DataType genericType)
If label key for attribute -Attribute.getLabel()- is not blank, method returns localized value for the label key. If label is an empty string, method returns an empty label. Otherwise it delegates to labelService.- Returns:
- the label
-
resolveAttributePath
protected java.lang.String resolveAttributePath(java.lang.String attributeQualifier, java.lang.String typeCode)
-
canChangeProperty
protected boolean canChangeProperty(DataAttribute attribute, java.lang.Object instance)
-
createCustom
protected org.zkoss.zul.Html createCustom(DataType genericType, CustomElement customElement, java.lang.Object object)
-
evaluateCustomDefinition
protected java.lang.String evaluateCustomDefinition(DataType genericType, java.lang.String definition, java.lang.Object object)
-
createEditor
protected Editor createEditor(DataType genericType, WidgetInstanceManager widgetInstanceManager, Attribute attribute, java.lang.Object object)
-
getEditorBuilder
protected EditorBuilder getEditorBuilder(WidgetInstanceManager widgetInstanceManager)
-
setPasswordEditorAsDefaultForEncryptedStrings
protected void setPasswordEditorAsDefaultForEncryptedStrings(Attribute attribute, DataAttribute genericAttribute)
-
processEditorBeforeComposition
protected void processEditorBeforeComposition(Editor editor, DataType genericType, WidgetInstanceManager widgetInstanceManager, Attribute attribute, java.lang.Object object)
-
extractParameterName
protected java.lang.String extractParameterName(Parameter parameter)
-
extractParameterValue
protected java.lang.Object extractParameterValue(Parameter parameter)
-
buildEditor
protected Editor buildEditor(EditorBuilder editorBuilder, WidgetInstanceManager widgetInstanceManager)
-
extractPropertiesList
protected java.util.List<java.lang.String> extractPropertiesList(java.lang.String value)
Extract properties separated by comma ',' from value- Parameters:
value- - list of properties separated by comma ','- Returns:
- list of extracted properties, empty list if no properites found
-
resolveEditorType
protected java.lang.String resolveEditorType(DataAttribute genericAttribute)
- Parameters:
genericAttribute- an attribute for which the editor type must be determined- Returns:
- resolved editor type
-
validateCustomElement
protected void validateCustomElement(java.lang.Class<?> componentClass, java.lang.String springId, java.lang.String clazz)Validates if the custom element (panel, tab or section) has either class or spring-bean configured.
-
resolveCustomComponentRenderer
protected <C> WidgetComponentRenderer<org.zkoss.zk.ui.Component,C,java.lang.Object> resolveCustomComponentRenderer(java.lang.String springId, java.lang.String className, java.lang.Class<C> clazz)
Returns instance ofWidgetComponentRendererbased on the beanID or class name.
-
createNotReadableAttributeLabelRenderer
protected WidgetComponentRenderer<org.zkoss.zk.ui.HtmlBasedComponent,Attribute,java.lang.String> createNotReadableAttributeLabelRenderer()
-
renderNotReadableLabel
protected org.zkoss.zk.ui.HtmlBasedComponent renderNotReadableLabel(org.zkoss.zk.ui.HtmlBasedComponent attributeContainer, Attribute attribute, DataType dataType, java.lang.String labelValue)
-
resolveLabel
protected java.lang.String resolveLabel(java.lang.String labelKey)
Returns localized label by key, or a "[labelKey]" if localized label was nor registered.
-
getAttributeDescription
protected java.lang.String getAttributeDescription(DataType genericType, Attribute attribute)
-
getPropertyValueService
protected PropertyValueService getPropertyValueService()
- Returns:
- the propertyValueService
-
setPropertyValueService
public void setPropertyValueService(PropertyValueService propertyValueService)
-
getCockpitUserService
protected CockpitUserService getCockpitUserService()
- Returns:
- the cockpitUserService
-
setCockpitUserService
public void setCockpitUserService(CockpitUserService cockpitUserService)
-
getCockpitLocaleService
protected CockpitLocaleService getCockpitLocaleService()
- Returns:
- the cockpitLocaleService
-
setCockpitLocaleService
public void setCockpitLocaleService(CockpitLocaleService cockpitLocaleService)
-
getLabelService
protected LabelService getLabelService()
- Returns:
- the labelService
-
setLabelService
public void setLabelService(LabelService labelService)
-
getPermissionFacade
protected PermissionFacade getPermissionFacade()
-
setPermissionFacade
public void setPermissionFacade(PermissionFacade permissionFacade)
-
getObjectFacade
public ObjectFacade getObjectFacade()
-
setObjectFacade
public void setObjectFacade(ObjectFacade objectFacade)
-
setAttributeDescriptionIconRenderer
public void setAttributeDescriptionIconRenderer(AttributeDescriptionIconRenderer attributeDescriptionIconRenderer)
-
getWidgetRenderingUtils
public WidgetRenderingUtils getWidgetRenderingUtils()
-
setWidgetRenderingUtils
public void setWidgetRenderingUtils(WidgetRenderingUtils widgetRenderingUtils)
-
getEditAvailabilityProviderFactory
protected EditAvailabilityProviderFactory getEditAvailabilityProviderFactory()
-
setEditAvailabilityProviderFactory
public void setEditAvailabilityProviderFactory(EditAvailabilityProviderFactory editAvailabilityProviderFactory)
-
-