Class NavigationContextController
- java.lang.Object
-
- org.zkoss.zk.ui.event.GenericEventListener
-
- org.zkoss.zk.ui.util.GenericComposer<T>
-
- org.zkoss.zk.ui.util.GenericAutowireComposer<T>
-
- org.zkoss.zk.ui.util.GenericForwardComposer<org.zkoss.zk.ui.Component>
-
- com.hybris.cockpitng.util.ViewAnnotationAwareComposer
-
- com.hybris.cockpitng.util.DefaultWidgetController
-
- de.hybris.platform.adaptivesearchbackoffice.widgets.navigationcontext.NavigationContextController
-
- All Implemented Interfaces:
com.hybris.cockpitng.core.WidgetController
,com.hybris.cockpitng.dnd.WidgetDragAndDropAware
,com.hybris.cockpitng.engine.WidgetInstanceManagerAware
,java.io.Serializable
,org.zkoss.zk.ui.event.EventListener
,org.zkoss.zk.ui.event.SerializableEventListener
,org.zkoss.zk.ui.util.ComponentActivationListener
,org.zkoss.zk.ui.util.ComponentCloneListener
,org.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>
,org.zkoss.zk.ui.util.ComposerExt<org.zkoss.zk.ui.Component>
public class NavigationContextController extends com.hybris.cockpitng.util.DefaultWidgetController
Controller for the navigation context widget.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AsSearchProviderFactory
asSearchProviderFactory
protected static java.lang.String
CATALOG_VERSION_KEY
protected static java.lang.String
CATALOG_VERSION_SELECTOR_ID
protected org.zkoss.zul.Combobox
catalogVersionSelector
protected CatalogVersionService
catalogVersionService
protected static java.lang.String
CATEGORY_IN_SOCKET
protected static java.lang.String
COLLAPSE_STATE_OUT_SOCKET
protected I18NService
i18nService
protected static java.lang.String
INDEX_CONFIGURATION_SELECTOR_ID
protected static java.lang.String
INDEX_TYPE_KEY
protected static java.lang.String
INDEX_TYPE_SELECTOR_ID
protected org.zkoss.zul.Combobox
indexConfigurationSelector
protected org.zkoss.zul.Combobox
indexTypeSelector
protected com.hybris.cockpitng.labels.LabelService
labelService
protected static java.lang.String
NAVIGATION_CONTEXT_KEY
protected static java.lang.String
ON_VALUE_CHANGED
protected static java.lang.String
SEARCH_PROFILE_CREATE_WIZARD_CTX
protected static java.lang.String
SEARCH_PROFILE_SELECTOR_ID
protected com.hybris.cockpitng.components.Editor
searchProfileSelector
protected SessionService
sessionService
-
Constructor Summary
Constructors Constructor Description NavigationContextController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
collapseNavigationContext()
protected int
compareCatalogVersions(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2)
protected int
compareIndexConfigurations(IndexConfigurationModel indexConfiguration1, IndexConfigurationModel indexConfiguration2)
protected int
compareIndexTypes(IndexTypeModel indexType1, IndexTypeModel indexType2)
protected CatalogVersionModel
convertCatalogVersion(CatalogVersionModel source)
protected IndexConfigurationModel
convertIndexConfiguration(AsIndexConfigurationData source)
protected IndexTypeModel
convertIndexType(AsIndexTypeData source)
protected java.lang.Object
createParentObject(NavigationContextData navigationContext)
protected java.util.List<CatalogVersionModel>
findCatalogVersions(java.lang.String indexConfiguration, java.lang.String indexType)
protected java.util.List<IndexConfigurationModel>
findIndexConfigurations()
protected java.util.List<IndexTypeModel>
findIndexTypes(java.lang.String indexConfiguration)
org.zkoss.zul.ListModelList<CatalogVersionModel>
getCatalogVersionsModel()
org.zkoss.zul.ListModelList<IndexConfigurationModel>
getIndexConfigurationsModel()
org.zkoss.zul.ListModelList<IndexTypeModel>
getIndexTypesModel()
NavigationContextData
getNavigationContext()
void
initialize(org.zkoss.zk.ui.Component component)
protected void
initializeSelectors()
protected boolean
isValidCatalogVersion(CatalogVersionModel catalogVersion)
protected boolean
isValidIndexConfiguration(AsIndexConfigurationData indexConfiguration)
protected boolean
isValidIndexType(AsIndexTypeData indexType)
void
onCatalogVersionChanged(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zul.Comboitem,CatalogVersionData> event)
Event handler for catalog version changes.void
onCategoryChanged(CategoryData category)
Event handler for category changes.void
onIndexConfigurationChanged(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zul.Comboitem,java.lang.String> event)
Event handler for index configuration changes.void
onIndexTypeChanged(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zul.Comboitem,java.lang.String> event)
Event handler for index type changes.void
onSearchProfileChanged()
Event handler for search profile changes.protected CatalogVersionModel
resolveCatalogVersion(CatalogVersionData catalogVersion)
protected void
sendNavigationContext(NavigationContextData navigationContext)
void
setNavigationContext(NavigationContextData navigationContext)
protected void
updateCatalogVersions(NavigationContextData navigationContext)
protected void
updateIndexConfigurations(NavigationContextData navigationContext)
protected void
updateIndexTypes(NavigationContextData navigationContext)
protected void
updateSearchProfiles(NavigationContextData navigationContext)
protected void
updateSelectors(NavigationContextData navigationContext)
-
Methods inherited from class com.hybris.cockpitng.util.DefaultWidgetController
doAfterCompose, doBeforeCompose, doBeforeComposeChildren, executeOperation, getDragAndDropStrategy, getLabel, getLabel, getModel, getValue, getWidgetDragAndDropStrategyRepository, getWidgetInstanceManager, getWidgetRoot, getWidgetSettings, getWidgetslot, getWidgetTitle, getWidgetUtils, initDragAndDropAwareness, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, invokeListenerMethod, onSocketInput, preInitialize, sendOutput, sendOutputAfterOperation, sendOutputAfterOperation, sendOutputAfterOperation, setValue, setWidgetInstanceManager, setWidgetTitle
-
Methods inherited from class com.hybris.cockpitng.util.ViewAnnotationAwareComposer
scanEventListeners
-
Methods inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer
alert, didActivate, getPage, willClone, willPassivate
-
-
-
-
Field Detail
-
INDEX_CONFIGURATION_SELECTOR_ID
protected static final java.lang.String INDEX_CONFIGURATION_SELECTOR_ID
- See Also:
- Constant Field Values
-
INDEX_TYPE_SELECTOR_ID
protected static final java.lang.String INDEX_TYPE_SELECTOR_ID
- See Also:
- Constant Field Values
-
CATALOG_VERSION_SELECTOR_ID
protected static final java.lang.String CATALOG_VERSION_SELECTOR_ID
- See Also:
- Constant Field Values
-
SEARCH_PROFILE_SELECTOR_ID
protected static final java.lang.String SEARCH_PROFILE_SELECTOR_ID
- See Also:
- Constant Field Values
-
ON_VALUE_CHANGED
protected static final java.lang.String ON_VALUE_CHANGED
- See Also:
- Constant Field Values
-
CATEGORY_IN_SOCKET
protected static final java.lang.String CATEGORY_IN_SOCKET
- See Also:
- Constant Field Values
-
COLLAPSE_STATE_OUT_SOCKET
protected static final java.lang.String COLLAPSE_STATE_OUT_SOCKET
- See Also:
- Constant Field Values
-
NAVIGATION_CONTEXT_KEY
protected static final java.lang.String NAVIGATION_CONTEXT_KEY
- See Also:
- Constant Field Values
-
INDEX_TYPE_KEY
protected static final java.lang.String INDEX_TYPE_KEY
- See Also:
- Constant Field Values
-
CATALOG_VERSION_KEY
protected static final java.lang.String CATALOG_VERSION_KEY
- See Also:
- Constant Field Values
-
SEARCH_PROFILE_CREATE_WIZARD_CTX
protected static final java.lang.String SEARCH_PROFILE_CREATE_WIZARD_CTX
- See Also:
- Constant Field Values
-
sessionService
protected transient SessionService sessionService
-
i18nService
protected transient I18NService i18nService
-
catalogVersionService
protected transient CatalogVersionService catalogVersionService
-
asSearchProviderFactory
protected transient AsSearchProviderFactory asSearchProviderFactory
-
labelService
protected transient com.hybris.cockpitng.labels.LabelService labelService
-
indexConfigurationSelector
protected org.zkoss.zul.Combobox indexConfigurationSelector
-
indexTypeSelector
protected org.zkoss.zul.Combobox indexTypeSelector
-
catalogVersionSelector
protected org.zkoss.zul.Combobox catalogVersionSelector
-
searchProfileSelector
protected com.hybris.cockpitng.components.Editor searchProfileSelector
-
-
Method Detail
-
getIndexConfigurationsModel
public org.zkoss.zul.ListModelList<IndexConfigurationModel> getIndexConfigurationsModel()
-
getIndexTypesModel
public org.zkoss.zul.ListModelList<IndexTypeModel> getIndexTypesModel()
-
getCatalogVersionsModel
public org.zkoss.zul.ListModelList<CatalogVersionModel> getCatalogVersionsModel()
-
getNavigationContext
public NavigationContextData getNavigationContext()
-
setNavigationContext
public void setNavigationContext(NavigationContextData navigationContext)
-
initialize
public void initialize(org.zkoss.zk.ui.Component component)
- Overrides:
initialize
in classcom.hybris.cockpitng.util.DefaultWidgetController
-
initializeSelectors
protected void initializeSelectors()
-
updateSelectors
protected void updateSelectors(NavigationContextData navigationContext)
-
updateIndexConfigurations
protected void updateIndexConfigurations(NavigationContextData navigationContext)
-
updateIndexTypes
protected void updateIndexTypes(NavigationContextData navigationContext)
-
updateCatalogVersions
protected void updateCatalogVersions(NavigationContextData navigationContext)
-
updateSearchProfiles
protected void updateSearchProfiles(NavigationContextData navigationContext)
-
createParentObject
protected java.lang.Object createParentObject(NavigationContextData navigationContext)
-
sendNavigationContext
protected void sendNavigationContext(NavigationContextData navigationContext)
-
collapseNavigationContext
protected void collapseNavigationContext()
-
onIndexConfigurationChanged
public void onIndexConfigurationChanged(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zul.Comboitem,java.lang.String> event)
Event handler for index configuration changes.- Parameters:
event
- - the event
-
onIndexTypeChanged
public void onIndexTypeChanged(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zul.Comboitem,java.lang.String> event)
Event handler for index type changes.- Parameters:
event
- - the event
-
onCatalogVersionChanged
public void onCatalogVersionChanged(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zul.Comboitem,CatalogVersionData> event)
Event handler for catalog version changes.- Parameters:
event
- - the event
-
onSearchProfileChanged
public void onSearchProfileChanged()
Event handler for search profile changes.
-
onCategoryChanged
public void onCategoryChanged(CategoryData category)
Event handler for category changes.- Parameters:
category
- - the category
-
findIndexConfigurations
protected java.util.List<IndexConfigurationModel> findIndexConfigurations()
-
isValidIndexConfiguration
protected boolean isValidIndexConfiguration(AsIndexConfigurationData indexConfiguration)
-
convertIndexConfiguration
protected IndexConfigurationModel convertIndexConfiguration(AsIndexConfigurationData source)
-
compareIndexConfigurations
protected int compareIndexConfigurations(IndexConfigurationModel indexConfiguration1, IndexConfigurationModel indexConfiguration2)
-
findIndexTypes
protected java.util.List<IndexTypeModel> findIndexTypes(java.lang.String indexConfiguration)
-
isValidIndexType
protected boolean isValidIndexType(AsIndexTypeData indexType)
-
convertIndexType
protected IndexTypeModel convertIndexType(AsIndexTypeData source)
-
compareIndexTypes
protected int compareIndexTypes(IndexTypeModel indexType1, IndexTypeModel indexType2)
-
findCatalogVersions
protected java.util.List<CatalogVersionModel> findCatalogVersions(java.lang.String indexConfiguration, java.lang.String indexType)
-
isValidCatalogVersion
protected boolean isValidCatalogVersion(CatalogVersionModel catalogVersion)
-
convertCatalogVersion
protected CatalogVersionModel convertCatalogVersion(CatalogVersionModel source)
-
compareCatalogVersions
protected int compareCatalogVersions(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2)
-
resolveCatalogVersion
protected CatalogVersionModel resolveCatalogVersion(CatalogVersionData catalogVersion)
-
-