Class TemplateResolverImpl

  • All Implemented Interfaces:
    java.io.Serializable, TemplateResolver
    Direct Known Subclasses:
    TemplateResolverImpl

    public class TemplateResolverImpl
    extends java.lang.Object
    implements TemplateResolver, java.io.Serializable
    The resolver resolves template and handles template changes
    Since:
    6.0.0
    Author:
    dennis
    See Also:
    Serialized Form
    • Constructor Detail

      • TemplateResolverImpl

        public TemplateResolverImpl​(Binder binder,
                                    Component comp,
                                    java.lang.String attr,
                                    java.lang.String templateExpr,
                                    java.util.Map<java.lang.String,​java.lang.Object> templateArgs)
    • Method Detail

      • getBinder

        public Binder getBinder()
      • getComponent

        public Component getComponent()
      • getExpression

        public java.lang.String getExpression()
      • getTemplateArgs

        public java.util.Map<java.lang.String,​java.lang.Object> getTemplateArgs()
      • getAttr

        public java.lang.String getAttr()
      • evaluateTemplate

        protected java.lang.Object evaluateTemplate​(Component eachComp,
                                                    java.lang.Object eachData,
                                                    int index,
                                                    int size)
      • evaluateTemplate

        protected java.lang.Object evaluateTemplate​(Component eachComp,
                                                    java.lang.Object eachData,
                                                    int index,
                                                    int size,
                                                    java.lang.String subType)
      • resolveTemplate

        public Template resolveTemplate​(Component eachComp,
                                        java.lang.Object eachData,
                                        int index,
                                        int size)
      • resolveTemplate

        public Template resolveTemplate​(Component eachComp,
                                        java.lang.Object eachData,
                                        int index,
                                        int size,
                                        java.lang.String subType)
        Description copied from interface: TemplateResolver
        Resolve the template for the component
        Specified by:
        resolveTemplate in interface TemplateResolver
        Parameters:
        eachComp - the template to be resolved of the component
        eachData - the data for resolver
        index - the index of each
        size - the size of data set
        subType - the sub-type of template should be resolved
        Returns:
        the template if exist.
      • addTemplateTracking

        public void addTemplateTracking​(Component eachComp,
                                        java.lang.Object eachData,
                                        int index,
                                        int size)
        Description copied from interface: TemplateResolver
        Add template tracking to component
        Specified by:
        addTemplateTracking in interface TemplateResolver
        Parameters:
        eachComp - the template to be resolved of the component
        eachData - the data for resolver
        index - the index of each
        size - the size of data set
      • getTemplateBinding

        protected Binding getTemplateBinding​(Component eachComp,
                                             java.lang.Object eachData,
                                             int index,
                                             int size)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object