Class DefaultEnumMultiReferenceEditor<T>
- java.lang.Object
-
- com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
-
- com.hybris.cockpitng.editor.commonreferenceeditor.AbstractReferenceEditor<T,java.util.Collection<T>>
-
- com.hybris.cockpitng.editor.defaultmultireferenceeditor.DefaultMultiReferenceEditor<T>
-
- com.hybris.cockpitng.editor.enummultireferenceeditor.DefaultEnumMultiReferenceEditor<T>
-
- All Implemented Interfaces:
ReferenceEditorLogic<T>,CockpitEditorRenderer<java.util.Collection<T>>,ComponentWidgetAdapterAware
public class DefaultEnumMultiReferenceEditor<T> extends DefaultMultiReferenceEditor<T>
Multi-reference editor for collections of enumerations
-
-
Field Summary
Fields Modifier and Type Field Description protected EnumValueFilterResolverenumValueFilterResolverprotected EnumValueResolverenumValueResolver-
Fields inherited from class com.hybris.cockpitng.editor.defaultmultireferenceeditor.DefaultMultiReferenceEditor
COCKPIT_PROPERTY_MULTI_REFERENCE_EDITOR_RENDER_ON_DEMAND_SIZE, COCKPIT_PROPERTY_SELECTED_ITEMS_MAX_SIZE, cockpitProperties, PARAM_RENDER_ON_DEMAND_SIZE, PARAM_SELECTED_ITEMS_MAX_SIZE, SELECTED_ITEMS_TYPE_COLLECTION, SELECTED_ITEMS_TYPE_LIST, SELECTED_ITEMS_TYPE_SET, selectedItems
-
Fields inherited from class com.hybris.cockpitng.editor.commonreferenceeditor.AbstractReferenceEditor
editorLayout, pageable, pageSize, PARAM_AVAILABLE_VALUES_PROVIDER, PARAM_CREATE_ONLY, PARAM_DISABLE_DISPLAYING_DETAILS, PARAM_DISABLE_REMOVE_REFERENCE, PARAM_LABEL_PROVIDER_BEAN, PARAM_NESTED_CREATION_DISABLED, PARAM_PAGE_SIZE, PARAM_PLACEHOLDER_KEY, PARAM_REDIRECT_REFERENCE_SELECTED_SOCKET_ID, PARAM_REFERENCE_ADVANCED_SEARCH_ENABLED, PARAM_RESTRICT_TO_TYPE, PARAM_WHITELISTED_TYPES, PARENT_OBJECT, renderOnDemandSize, selectedItemsMaxSize, SOCKET_IN_REFERENCE_EDITOR, SOCKET_OUT_REFERENCE_EDITOR, SOCKET_OUT_REFERENCE_SEARCH_CTX, SOCKET_OUT_REFRENCE_SELECTED, TYPE_CODE
-
Fields inherited from interface com.hybris.cockpitng.editors.CockpitEditorRenderer
INITIAL_EDIT_STRING
-
-
Constructor Summary
Constructors Constructor Description DefaultEnumMultiReferenceEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectedObject(T obj)Inform editor that user select new objectbooleanallowNestedObjectCreation()Determines if nested object creation controlls should be rendered.protected java.util.List<T>filterEnumValues(java.util.List<T> values, java.lang.String textQuery)filters values by textQuery and returns a new list containing only matching elementsprotected DataTypegetDataType()protected java.util.List<T>getFilteredEnumValues(java.lang.String textQuery)protected java.util.regex.PatterngetRegexEditorPattern()The pattern should match when the editor may be applied.booleanisDisableDisplayingDetails()booleanisOnlyCreateMode()Determines if choosing existing item is possible.protected voidscrollIntoView(org.zkoss.zk.ui.Component lastItem)protected voidsetEditorLayout(ReferenceEditorLayout<T> editorLayout)voidupdateReferencesListBoxModel(java.lang.String textQuery)Updates search state based on the given text query.-
Methods inherited from class com.hybris.cockpitng.editor.defaultmultireferenceeditor.DefaultMultiReferenceEditor
changeSelectedObject, extractRenderOnDemandSize, extractSelectedItemsMaxSize, getCollectionType, initializeSelectedItemsCollection, isEditable, openReferenceAdvancedSearch, readTypeCode, refreshObjects, removeSelectedObject, render, setCommonEditorParameters, setEditorParameters, setInitialValue
-
Methods inherited from class com.hybris.cockpitng.editor.commonreferenceeditor.AbstractReferenceEditor
createInputSocketEventListener, createNewReference, createNewReference, createReferenceLayout, extractPageSize, findAncestorEditor, getCockpitConfigurationService, getCockpitUserService, getCustomValuesProviderBeanId, getEditorContext, getEditorLayout, getEditorListener, getLabelProvider, getLabelProviderBeanName, getLabelService, getObjectFacade, getPageable, getParentEditor, getParentObject, getPermissionFacade, getPlaceholderKey, getPropertyValueService, getRedirectReferenceSelectedToParentWidget, getReferenceEditorSearchConditionHandler, getReferenceEditorSearchFacade, getReferenceSearchConditions, getReferenceSearchContextMap, getStringRepresentationOfObject, getSuccessNotificationId, getTypeCode, getTypeFacade, isDisableRemoveReference, isReferenceAdvancedSearchEnabled, loadBaseConfiguration, loadBaseConfiguration, loadSimpleSearchConfiguration, preserveFocus, resolveTypeToCreate, restrictTypeCode, setCreateOnly, setEditorContext, setEditorListener, setLabelProviderBeanName, setNestedObjectCreationDisabled, setPageSize, setParentEditor, setParentObject, setReferenceSearchConditions, setRenderOnDemandSize, setSelectedItemsMaxSize, setSuccessNotificationId, setTypeCode, triggerReferenceSelected, updateReferencesListBoxModel
-
Methods inherited from class com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
addSocketInputEventListener, getComponentID, handleSocketInputEvent, initialize, initializeDefaultEventListeners, registerStubInstance, sendOutput, setComponentID, unregisterStubInstance
-
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.editor.commonreferenceeditor.ReferenceEditorLogic
forwardEditorEvent
-
-
-
-
Field Detail
-
enumValueResolver
protected EnumValueResolver enumValueResolver
-
enumValueFilterResolver
protected EnumValueFilterResolver enumValueFilterResolver
-
-
Method Detail
-
updateReferencesListBoxModel
public void updateReferencesListBoxModel(java.lang.String textQuery)
Description copied from class:AbstractReferenceEditorUpdates search state based on the given text query.- Specified by:
updateReferencesListBoxModelin interfaceReferenceEditorLogic<T>- Overrides:
updateReferencesListBoxModelin classAbstractReferenceEditor<T,java.util.Collection<T>>
-
getFilteredEnumValues
protected java.util.List<T> getFilteredEnumValues(java.lang.String textQuery)
- Returns:
- current enumeration's values filtered by textQuery
-
getDataType
protected DataType getDataType()
-
filterEnumValues
protected java.util.List<T> filterEnumValues(java.util.List<T> values, java.lang.String textQuery)
filters values by textQuery and returns a new list containing only matching elements- Returns:
- filtered list of values
-
allowNestedObjectCreation
public boolean allowNestedObjectCreation()
Description copied from interface:ReferenceEditorLogicDetermines if nested object creation controlls should be rendered.- Specified by:
allowNestedObjectCreationin interfaceReferenceEditorLogic<T>- Overrides:
allowNestedObjectCreationin classAbstractReferenceEditor<T,java.util.Collection<T>>- Returns:
-
isDisableDisplayingDetails
public boolean isDisableDisplayingDetails()
- Specified by:
isDisableDisplayingDetailsin interfaceReferenceEditorLogic<T>- Overrides:
isDisableDisplayingDetailsin classAbstractReferenceEditor<T,java.util.Collection<T>>
-
getRegexEditorPattern
protected java.util.regex.Pattern getRegexEditorPattern()
Description copied from class:AbstractReferenceEditorThe pattern should match when the editor may be applied. If the pattern's matcher matches it should guarantee that group(1) on it's matcher returns the type code.- Overrides:
getRegexEditorPatternin classDefaultMultiReferenceEditor<T>- Returns:
- Pattern that identifies the editor
- See Also:
Pattern,Matcher
-
addSelectedObject
public void addSelectedObject(T obj)
Description copied from interface:ReferenceEditorLogicInform editor that user select new object- Specified by:
addSelectedObjectin interfaceReferenceEditorLogic<T>- Overrides:
addSelectedObjectin classDefaultMultiReferenceEditor<T>
-
scrollIntoView
protected void scrollIntoView(org.zkoss.zk.ui.Component lastItem)
-
isOnlyCreateMode
public boolean isOnlyCreateMode()
Description copied from interface:ReferenceEditorLogicDetermines if choosing existing item is possible.- Specified by:
isOnlyCreateModein interfaceReferenceEditorLogic<T>- Overrides:
isOnlyCreateModein classAbstractReferenceEditor<T,java.util.Collection<T>>- Returns:
-
setEditorLayout
protected void setEditorLayout(ReferenceEditorLayout<T> editorLayout)
- Overrides:
setEditorLayoutin classAbstractReferenceEditor<T,java.util.Collection<T>>- Parameters:
editorLayout- the editorLayout to set
-
-