Package org.zkoss.bind.tracker.impl
Class TrackerImpl
java.lang.Object
org.zkoss.bind.tracker.impl.TrackerImpl
- All Implemented Interfaces:
Serializable,Tracker
Implementation of dependency tracking.
- Since:
- 6.0.0
- Author:
- henrichen
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<Object,Set<TrackerNode>> protected Map<org.zkoss.zk.ui.Component,Map<Object, TrackerNode>> protected TrackerImpl.EqualBeansMapprotected Map<Object,Set<TrackerNode>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBeanMap(TrackerNode node, Object value, Object basePath) voidaddDependsOn(org.zkoss.zk.ui.Component srcComp, String[] srcSeries, Binding srcBinding, org.zkoss.zk.ui.Component dependsOnComp, String[] dependsOnSeries) Add a depends-on tracking between the source property name series and depends-on property name series.voidaddTracking(org.zkoss.zk.ui.Component comp, String[] series, Binding binding) Add a tracking that associate a binding to a dot series under the specifiedComponentvoiddump()voiddumpLess()protected Collection<TrackerNode>getDirectLoadBindings(Object base, String prop) Returns all direct bindings that associated with the specified property.getEqualBeans(Object bean) getKidBaseLoadBindings(Object base, String prop) Returns all bindings that associated with the kid bases of specified property.getLoadBindings(Object base, String prop) Returns all bindings that associated with the specified property.protected TrackerNodegetOrCreateTrackerNode(org.zkoss.zk.ui.Component comp, String[] series) protected TrackerNodegetTrackerNodePerComponentScript(Object comp, Object script) protected Map<org.zkoss.zk.ui.Component,Map<Object, TrackerNode>> protected TrackerImpl.EqualBeansMapprotected TrackerNodenewTrackerNode(Object script) protected voidremoveAllFromBeanMap(Collection<TrackerNode> removed) protected voidremoveAllFromNullMap(Set<TrackerNode> removed) protected voidremoveBeanMap(TrackerNode node) voidremoveTrackings(Set<org.zkoss.zk.ui.Component> comps) Remove all tracking associated with the specifiedComponentset.voidremoveTrackings(org.zkoss.zk.ui.Component comp) Remove all tracking associated with the specifiedComponent.protected static booleantestEqualsBean(Object nodeBean, Object bean) voidTie a property to its corresponding value under the specifiedComponent.
-
Field Details
-
_compMap
-
_nullMap
-
_beanMap
-
_equalBeansMap
-
-
Constructor Details
-
TrackerImpl
public TrackerImpl()
-
-
Method Details
-
initCompMap
-
newEqualBeansMap
-
addTracking
Description copied from interface:TrackerAdd a tracking that associate a binding to a dot series under the specifiedComponent- Specified by:
addTrackingin interfaceTracker- Parameters:
comp- the component with the associated bindingseries- the dot series as an array of property namebinding- the associated binding
-
addDependsOn
public void addDependsOn(org.zkoss.zk.ui.Component srcComp, String[] srcSeries, Binding srcBinding, org.zkoss.zk.ui.Component dependsOnComp, String[] dependsOnSeries) Description copied from interface:TrackerAdd a depends-on tracking between the source property name series and depends-on property name series.- Specified by:
addDependsOnin interfaceTracker- Parameters:
srcComp- the source component with the associated bindingsrcSeries- the dot series as an array of source property name.srcBinding- the associated bindingdependsOnSeries- the dot series as an array of dependsOn property name.
-
getOrCreateTrackerNode
-
newTrackerNode
-
removeTrackings
Description copied from interface:TrackerRemove all tracking associated with the specifiedComponentset.- Specified by:
removeTrackingsin interfaceTracker- Parameters:
comps- the associated component set
-
removeTrackings
public void removeTrackings(org.zkoss.zk.ui.Component comp) Description copied from interface:TrackerRemove all tracking associated with the specifiedComponent.- Specified by:
removeTrackingsin interfaceTracker- Parameters:
comp- the associated component
-
removeAllFromNullMap
-
getLoadBindings
Description copied from interface:TrackerReturns all bindings that associated with the specified property.- Specified by:
getLoadBindingsin interfaceTracker- Parameters:
base- base objectprop- property name- Returns:
- all LoadBindings that associated with the specified property.
-
getDirectLoadBindings
Description copied from interface:TrackerReturns all direct bindings that associated with the specified property.- Specified by:
getDirectLoadBindingsin interfaceTracker- Parameters:
base- base objectprop- property name- Returns:
- all direct LoadBindings that associated with the specified property.
-
getKidBaseLoadBindings
Description copied from interface:TrackerReturns all bindings that associated with the kid bases of specified property.- Specified by:
getKidBaseLoadBindingsin interfaceTracker- Parameters:
base- base objectprop- property name- Returns:
- all bindings that associated with the kid bases of specified property.
-
getAllTrackerNodes
-
getTrackerNodePerComponentScript
-
tieValue
public void tieValue(Object comp, Object base, Object script, Object propName, Object value, Object basePath) Description copied from interface:TrackerTie a property to its corresponding value under the specifiedComponent.- Specified by:
tieValuein interfaceTracker- Parameters:
comp- the associated componentbase- the base object of the propertyscript- the field scriptpropName- the resolved property name from the field scriptvalue- the value of the propertybasePath- the basePath script prior to the script field script (Since 8.0)
-
addBeanMap
-
removeBeanMap
-
removeAllFromBeanMap
-
getEqualBeans
-
testEqualsBean
-
dumpLess
public void dumpLess() -
dump
public void dump()
-