Class ConfigurableFlowValidatable
- java.lang.Object
-
- com.hybris.cockpitng.components.validation.AbstractValidatableContainer
-
- com.hybris.cockpitng.widgets.configurableflow.validation.ConfigurableFlowValidatable
-
- All Implemented Interfaces:
ValidatableContainer
public class ConfigurableFlowValidatable extends AbstractValidatableContainer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.hybris.cockpitng.components.validation.AbstractValidatableContainer
AbstractValidatableContainer.ValueObserverProxy
-
-
Field Summary
-
Fields inherited from class com.hybris.cockpitng.components.validation.AbstractValidatableContainer
preventBroadcastValidationChange
-
-
Constructor Summary
Constructors Constructor Description ConfigurableFlowValidatable(ConfigurableFlowController controller, org.zkoss.zk.ui.Component parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ValidationFocusTransferHandlercreateFocusTransferHandler()org.zkoss.zk.ui.ComponentgetContainer()Container componentjava.lang.ObjectgetCurrentObject(java.lang.String fullPathQualifier)Gets a full object that was validated for specified violation pathjava.lang.StringgetCurrentObjectPath(java.lang.String path)Alters provided path (that comes from violation) so that is relative to current objectjava.lang.StringgetCurrentPrefix(java.lang.String fullPathQualifier)ValidationResultgetCurrentValidationResult(java.lang.String path)Gets validation results of container related to provided path (relative to container).booleanisRootPath(java.lang.String path)Checks whether provided path should be treated as root path.booleanreactOnValidationChange(java.lang.String path)Checks whether this validatable container is able to process validation result change for given path.-
Methods inherited from class com.hybris.cockpitng.components.validation.AbstractValidatableContainer
addValidationObserver, addValidationObserver, getFocusTransfer, getRootPath, removeValidationObserver, setPreventBroadcastValidationChange
-
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, reactOnValidationChange
-
-
-
-
Constructor Detail
-
ConfigurableFlowValidatable
public ConfigurableFlowValidatable(ConfigurableFlowController controller, org.zkoss.zk.ui.Component parent)
-
-
Method Detail
-
getContainer
public org.zkoss.zk.ui.Component getContainer()
Description copied from interface:ValidatableContainerContainer component- Returns:
- component containing fields
-
getCurrentObject
public java.lang.Object getCurrentObject(java.lang.String fullPathQualifier)
Description copied from interface:ValidatableContainerGets a full object that was validated for specified violation path- Parameters:
fullPathQualifier- path of violation- Returns:
- object that was validated or
nullif no object matches provided path
-
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
-
getCurrentPrefix
public java.lang.String getCurrentPrefix(java.lang.String fullPathQualifier)
-
getCurrentObjectPath
public java.lang.String getCurrentObjectPath(java.lang.String path)
Description copied from interface:ValidatableContainerAlters provided path (that comes from violation) so that is relative to current object- Parameters:
path- violation path- Returns:
- path relative to validated object, empty string if path points directly to validated object or
nullif path does not match any validated objects
-
createFocusTransferHandler
protected ValidationFocusTransferHandler createFocusTransferHandler()
- Specified by:
createFocusTransferHandlerin classAbstractValidatableContainer
-
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 classAbstractValidatableContainer- Returns:
- true if this validatable container can process validation result change
-
getCurrentValidationResult
public ValidationResult getCurrentValidationResult(java.lang.String path)
Description copied from interface:ValidatableContainerGets validation results of container related to provided path (relative to container).Returned container may be editable and notify listeners about changes. If a returned container is a wrapper of other container, then any changes made to the wrapper should be propagated to wrapped one and all listeners should be notified. It is not sure that changes made to wrapped one will be propagated to the wrapper. Also notifications of wrapped container may not be transferred to listeners of a wrapper.
- Returns:
- validation results found or
ValidationResult.EMPTYif no violations found for specified path
-
-