Class TrackerImpl

java.lang.Object
org.zkoss.bind.tracker.impl.TrackerImpl
All Implemented Interfaces:
Serializable, Tracker

public class TrackerImpl extends Object implements Tracker, Serializable
Implementation of dependency tracking.
Since:
6.0.0
Author:
henrichen
See Also:
  • Field Details

  • Constructor Details

    • TrackerImpl

      public TrackerImpl()
  • Method Details

    • initCompMap

      protected Map<org.zkoss.zk.ui.Component,Map<Object,TrackerNode>> initCompMap()
    • newEqualBeansMap

      protected TrackerImpl.EqualBeansMap newEqualBeansMap()
    • addTracking

      public void addTracking(org.zkoss.zk.ui.Component comp, String[] series, Binding binding)
      Description copied from interface: Tracker
      Add a tracking that associate a binding to a dot series under the specified Component
      Specified by:
      addTracking in interface Tracker
      Parameters:
      comp - the component with the associated binding
      series - the dot series as an array of property name
      binding - 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: Tracker
      Add a depends-on tracking between the source property name series and depends-on property name series.
      Specified by:
      addDependsOn in interface Tracker
      Parameters:
      srcComp - the source component with the associated binding
      srcSeries - the dot series as an array of source property name.
      srcBinding - the associated binding
      dependsOnSeries - the dot series as an array of dependsOn property name.
    • getOrCreateTrackerNode

      protected TrackerNode getOrCreateTrackerNode(org.zkoss.zk.ui.Component comp, String[] series)
    • newTrackerNode

      protected TrackerNode newTrackerNode(Object script)
    • removeTrackings

      public void removeTrackings(Set<org.zkoss.zk.ui.Component> comps)
      Description copied from interface: Tracker
      Remove all tracking associated with the specified Component set.
      Specified by:
      removeTrackings in interface Tracker
      Parameters:
      comps - the associated component set
    • removeTrackings

      public void removeTrackings(org.zkoss.zk.ui.Component comp)
      Description copied from interface: Tracker
      Remove all tracking associated with the specified Component.
      Specified by:
      removeTrackings in interface Tracker
      Parameters:
      comp - the associated component
    • removeAllFromNullMap

      protected void removeAllFromNullMap(Set<TrackerNode> removed)
    • getLoadBindings

      public Set<LoadBinding> getLoadBindings(Object base, String prop)
      Description copied from interface: Tracker
      Returns all bindings that associated with the specified property.
      Specified by:
      getLoadBindings in interface Tracker
      Parameters:
      base - base object
      prop - property name
      Returns:
      all LoadBindings that associated with the specified property.
    • getDirectLoadBindings

      public Set<LoadBinding> getDirectLoadBindings(Object base, String prop)
      Description copied from interface: Tracker
      Returns all direct bindings that associated with the specified property.
      Specified by:
      getDirectLoadBindings in interface Tracker
      Parameters:
      base - base object
      prop - property name
      Returns:
      all direct LoadBindings that associated with the specified property.
    • getKidBaseLoadBindings

      public Set<LoadBinding> getKidBaseLoadBindings(Object base, String prop)
      Description copied from interface: Tracker
      Returns all bindings that associated with the kid bases of specified property.
      Specified by:
      getKidBaseLoadBindings in interface Tracker
      Parameters:
      base - base object
      prop - property name
      Returns:
      all bindings that associated with the kid bases of specified property.
    • getAllTrackerNodes

      protected Collection<TrackerNode> getAllTrackerNodes()
    • getTrackerNodePerComponentScript

      protected TrackerNode getTrackerNodePerComponentScript(Object comp, Object script)
    • tieValue

      public void tieValue(Object comp, Object base, Object script, Object propName, Object value, Object basePath)
      Description copied from interface: Tracker
      Tie a property to its corresponding value under the specified Component.
      Specified by:
      tieValue in interface Tracker
      Parameters:
      comp - the associated component
      base - the base object of the property
      script - the field script
      propName - the resolved property name from the field script
      value - the value of the property
      basePath - the basePath script prior to the script field script (Since 8.0)
    • addBeanMap

      protected void addBeanMap(TrackerNode node, Object value, Object basePath)
    • removeBeanMap

      protected void removeBeanMap(TrackerNode node)
    • removeAllFromBeanMap

      protected void removeAllFromBeanMap(Collection<TrackerNode> removed)
    • getEqualBeans

      public Set<Object> getEqualBeans(Object bean)
    • testEqualsBean

      protected static boolean testEqualsBean(Object nodeBean, Object bean)
    • dumpLess

      public void dumpLess()
    • dump

      public void dump()