Class InlineEditorValidatableContainer<T>
- java.lang.Object
-
- com.hybris.cockpitng.editor.extendedmultireferenceeditor.validate.AbstractInlineEditorValidatableContainer<T>
-
- com.hybris.cockpitng.editor.extendedmultireferenceeditor.validate.InlineEditorValidatableContainer<T>
-
- All Implemented Interfaces:
ValidatableContainer
public class InlineEditorValidatableContainer<T> extends AbstractInlineEditorValidatableContainer<T>
Controls validation handling for entire inline reference editorDefaultExtendedMultiReferenceEditorNote: This is used in aforementioned editor only when the inline editing activated.
-
-
Field Summary
-
Fields inherited from class com.hybris.cockpitng.editor.extendedmultireferenceeditor.validate.AbstractInlineEditorValidatableContainer
preventBroadcastValidationChange
-
-
Constructor Summary
Constructors Constructor Description InlineEditorValidatableContainer(org.zkoss.zk.ui.Component container, EditorState<T> editorState, java.lang.String rootPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValidationObserver(ValueObserver observer)Registers a new observer for validation results of containervoidaddValidationObserver(java.lang.String key, ValueObserver observer)Registers a new observer for validation results of container for specified path and all its childrenprotected ValidationFocusTransferHandlercreateFocusTransferHandler()TgetCurrentObject(java.lang.String path)Gets a full object that was validated for specified violation pathprotected ObjectValuePathgetRoot()protected ValidationResultgetRootValidationResult()booleanisRootPath(java.lang.String path)Checks whether provided path should be treated as root path.booleanreactOnValidationChange()Checks whether this validatable container is able to process validation result change for root path.booleanreactOnValidationChange(java.lang.String path)Checks whether this validatable container is able to process validation result change for given path.voidremoveValidationObserver(ValueObserver observer)Unregisters a new observer for validation results of container-
Methods inherited from class com.hybris.cockpitng.editor.extendedmultireferenceeditor.validate.AbstractInlineEditorValidatableContainer
getContainer, getCurrentObjectPath, getCurrentValidationResult, getEditorState, getFocusTransfer, getValidationResultPopup, setPreventBroadcastValidationChange, setValidationResultPopup
-
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.components.validation.ValidatableContainer
getCurrentValidationResult
-
-
-
-
Constructor Detail
-
InlineEditorValidatableContainer
public InlineEditorValidatableContainer(org.zkoss.zk.ui.Component container, EditorState<T> editorState, java.lang.String rootPath)
-
-
Method Detail
-
createFocusTransferHandler
protected ValidationFocusTransferHandler createFocusTransferHandler()
- Specified by:
createFocusTransferHandlerin classAbstractInlineEditorValidatableContainer<T>
-
getRootValidationResult
protected ValidationResult getRootValidationResult()
- Specified by:
getRootValidationResultin classAbstractInlineEditorValidatableContainer<T>
-
isRootPath
public boolean isRootPath(java.lang.String path)
Description copied from interface:ValidatableContainerChecks whether provided path should be treated as root path.Any validation path that matches containers restrictions, yet does not specify any particular attribute/qualifier (i.e. points exactly to one of validated objects) should be considered as root path. In general, if a path is validated by container or is a parent of validated path, but does not point any particular attribute, then it is a root path. Empty string should always be considered as root path, cause they are always a kind of parent of validated path.
- Returns:
trueif path is validated by container (or is a parent path of such) and does not point any attribute
-
getCurrentObject
public T getCurrentObject(java.lang.String path)
Description copied from interface:ValidatableContainerGets a full object that was validated for specified violation path- Parameters:
path- path of violation- Returns:
- object that was validated or
nullif no object matches provided path
-
addValidationObserver
public void addValidationObserver(ValueObserver observer)
Description copied from interface:ValidatableContainerRegisters a new observer for validation results of container- Parameters:
observer- observer to be notified
-
addValidationObserver
public void addValidationObserver(java.lang.String key, ValueObserver observer)Description copied from interface:ValidatableContainerRegisters a new observer for validation results of container for specified path and all its children- Parameters:
key- validation path to be observedobserver- observer to be notified
-
removeValidationObserver
public void removeValidationObserver(ValueObserver observer)
Description copied from interface:ValidatableContainerUnregisters a new observer for validation results of container- Parameters:
observer- observer not to be notified
-
reactOnValidationChange
public boolean reactOnValidationChange(java.lang.String path)
Description copied from interface:ValidatableContainerChecks whether this validatable container is able to process validation result change for given path.- Specified by:
reactOnValidationChangein interfaceValidatableContainer- Overrides:
reactOnValidationChangein classAbstractInlineEditorValidatableContainer<T>- Returns:
- true if this validatable container can process validation result change
-
reactOnValidationChange
public boolean reactOnValidationChange()
Description copied from interface:ValidatableContainerChecks whether this validatable container is able to process validation result change for root path.- Returns:
- true if this validatable container can process validation result change
-
getRoot
protected ObjectValuePath getRoot()
-
-