Class DefaultComponentsVisitorFactory
- java.lang.Object
-
- com.hybris.cockpitng.widgets.common.dynamicforms.impl.DefaultComponentsVisitorFactory
-
- All Implemented Interfaces:
ComponentsVisitorFactory
public class DefaultComponentsVisitorFactory extends java.lang.Object implements ComponentsVisitorFactory
Factory which createsComponentsVisitor
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSETTING_DYNAMIC_FORMS_COMPONENT_NAME
-
Constructor Summary
Constructors Constructor Description DefaultComponentsVisitorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected booleanareDynamicFormsConfigured(DynamicForms dynamicForms)Checks whether loaded config for dynamic forms has any:DynamicForms.getAttribute(),DynamicForms.getSection(),DynamicForms.getTab()for current typeComponentsVisitorcreateVisitor(java.lang.String typeCode, WidgetInstanceManager wim)Creates new visitor.protected java.lang.StringgetComponentName()protected java.lang.StringgetComponentNameWithFallback(WidgetInstanceManager wim)Gets componentName used to extract dynamic forms configurationContext.component.protected ComponentsVisitorgetComponentsDisablingVisitor()protected ComponentsVisitorgetComponentsVisitor()protected NotificationServicegetNotificationService()protected java.lang.StringgetNotificationSource(WidgetInstanceManager wim)Deprecated, for removal: This API element is subject to removal in a future version.protected DynamicFormsloadDynamicFormsConfiguration(java.lang.String typeCode, java.lang.String componentName, WidgetInstanceManager wim)Loads dynamicForms configuration.voidsetComponentName(java.lang.String componentName)voidsetComponentsDisablingVisitor(ComponentsVisitor componentsDisablingVisitor)voidsetComponentsVisitor(ComponentsVisitor componentsVisitor)voidsetNotificationService(NotificationService notificationService)
-
-
-
Field Detail
-
SETTING_DYNAMIC_FORMS_COMPONENT_NAME
public static final java.lang.String SETTING_DYNAMIC_FORMS_COMPONENT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
createVisitor
public ComponentsVisitor createVisitor(java.lang.String typeCode, WidgetInstanceManager wim)
Description copied from interface:ComponentsVisitorFactoryCreates new visitor.- Specified by:
createVisitorin interfaceComponentsVisitorFactory- Returns:
- new instance of
ComponentsVisitor, if visitor cannot be created returnsComponentsVisitor.NULL
-
getNotificationSource
@Deprecated(since="6.7", forRemoval=true) protected java.lang.String getNotificationSource(WidgetInstanceManager wim)Deprecated, for removal: This API element is subject to removal in a future version.
-
loadDynamicFormsConfiguration
protected DynamicForms loadDynamicFormsConfiguration(java.lang.String typeCode, java.lang.String componentName, WidgetInstanceManager wim)
Loads dynamicForms configuration.- Throws:
CyclicDynamicFormsException- is thrown whenDynamicAttributeinDynamicFormshave cyclic references.
-
areDynamicFormsConfigured
protected boolean areDynamicFormsConfigured(DynamicForms dynamicForms)
Checks whether loaded config for dynamic forms has any:DynamicForms.getAttribute(),DynamicForms.getSection(),DynamicForms.getTab()for current type- Returns:
- true if dynamic forms are configured
-
getComponentNameWithFallback
protected java.lang.String getComponentNameWithFallback(WidgetInstanceManager wim)
Gets componentName used to extract dynamic forms configurationContext.component. By default the value is taken fromcomponentNamebut it can be overridden for a widget with a settingSETTING_DYNAMIC_FORMS_COMPONENT_NAME.- Returns:
- component name
-
getComponentName
protected java.lang.String getComponentName()
-
setComponentName
public void setComponentName(java.lang.String componentName)
-
getComponentsVisitor
protected ComponentsVisitor getComponentsVisitor()
-
setComponentsVisitor
public void setComponentsVisitor(ComponentsVisitor componentsVisitor)
-
getComponentsDisablingVisitor
protected ComponentsVisitor getComponentsDisablingVisitor()
-
setComponentsDisablingVisitor
public void setComponentsDisablingVisitor(ComponentsVisitor componentsDisablingVisitor)
-
getNotificationService
protected NotificationService getNotificationService()
-
setNotificationService
public void setNotificationService(NotificationService notificationService)
-
-