Clover coverage report - Code Coverage for tapestry release 4.0-rc-2
Coverage timestamp: Sat Dec 17 2005 09:39:46 PST
file stats: LOC: 795   Methods: 27
NCLOC: 412   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
PageLoader.java 89.1% 96.4% 100% 95.4%
coverage coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.pageload;
 16   
 17    import java.util.ArrayList;
 18    import java.util.Iterator;
 19    import java.util.List;
 20    import java.util.Locale;
 21   
 22    import org.apache.commons.logging.Log;
 23    import org.apache.hivemind.ApplicationRuntimeException;
 24    import org.apache.hivemind.ClassResolver;
 25    import org.apache.hivemind.HiveMind;
 26    import org.apache.hivemind.Location;
 27    import org.apache.hivemind.Resource;
 28    import org.apache.hivemind.service.ThreadLocale;
 29    import org.apache.hivemind.util.ContextResource;
 30    import org.apache.tapestry.AbstractComponent;
 31    import org.apache.tapestry.BaseComponent;
 32    import org.apache.tapestry.IAsset;
 33    import org.apache.tapestry.IBinding;
 34    import org.apache.tapestry.IComponent;
 35    import org.apache.tapestry.IEngine;
 36    import org.apache.tapestry.INamespace;
 37    import org.apache.tapestry.IPage;
 38    import org.apache.tapestry.IRequestCycle;
 39    import org.apache.tapestry.ITemplateComponent;
 40    import org.apache.tapestry.TapestryConstants;
 41    import org.apache.tapestry.asset.AssetSource;
 42    import org.apache.tapestry.binding.BindingConstants;
 43    import org.apache.tapestry.binding.BindingSource;
 44    import org.apache.tapestry.binding.ExpressionBinding;
 45    import org.apache.tapestry.coerce.ValueConverter;
 46    import org.apache.tapestry.engine.IPageLoader;
 47    import org.apache.tapestry.event.ChangeObserver;
 48    import org.apache.tapestry.resolver.ComponentSpecificationResolver;
 49    import org.apache.tapestry.services.ComponentConstructor;
 50    import org.apache.tapestry.services.ComponentConstructorFactory;
 51    import org.apache.tapestry.services.ComponentPropertySource;
 52    import org.apache.tapestry.services.ComponentTemplateLoader;
 53    import org.apache.tapestry.spec.BindingType;
 54    import org.apache.tapestry.spec.ContainedComponent;
 55    import org.apache.tapestry.spec.IAssetSpecification;
 56    import org.apache.tapestry.spec.IBindingSpecification;
 57    import org.apache.tapestry.spec.IComponentSpecification;
 58    import org.apache.tapestry.spec.IContainedComponent;
 59    import org.apache.tapestry.spec.IParameterSpecification;
 60    import org.apache.tapestry.web.WebContextResource;
 61   
 62    /**
 63    * Implementation of tapestry.page.PageLoader. Runs the process of building the component hierarchy
 64    * for an entire page.
 65    * <p>
 66    * This implementation is not threadsafe, therefore the pooled service model must be used.
 67    *
 68    * @author Howard Lewis Ship
 69    */
 70   
 71    public class PageLoader implements IPageLoader
 72    {
 73    private Log _log;
 74   
 75    /** @since 4.0 */
 76   
 77    private ComponentSpecificationResolver _componentResolver;
 78   
 79    /** @since 4.0 */
 80   
 81    private BindingSource _bindingSource;
 82   
 83    /** @since 4.0 */
 84   
 85    private ComponentTemplateLoader _componentTemplateLoader;
 86   
 87    private List _inheritedBindingQueue = new ArrayList();
 88   
 89    /** @since 4.0 */
 90    private IComponentVisitor _establishDefaultParameterValuesVisitor;
 91   
 92    private ComponentTreeWalker _establishDefaultParameterValuesWalker;
 93   
 94    private ComponentTreeWalker _verifyRequiredParametersWalker;
 95   
 96    /** @since 4.0 */
 97   
 98    private ComponentConstructorFactory _componentConstructorFactory;
 99   
 100    /** @since 4.0 */
 101   
 102    private ValueConverter _valueConverter;
 103   
 104    /** @since 4.0 */
 105   
 106    private AssetSource _assetSource;
 107   
 108    /**
 109    * Used to find the correct Java component class for a page.
 110    *
 111    * @since 4.0
 112    */
 113   
 114    private ComponentClassProvider _pageClassProvider;
 115   
 116    /**
 117    * Used to find the correct Java component class for a component (a similar process to resolving
 118    * a page, but with slightly differen steps and defaults).
 119    *
 120    * @since 4.0
 121    */
 122   
 123    private ComponentClassProvider _componentClassProvider;
 124   
 125    /**
 126    * Used to resolve meta-data properties related to a component.
 127    *
 128    * @since 4.0
 129    */
 130   
 131    private ComponentPropertySource _componentPropertySource;
 132   
 133    /**
 134    * Tracks the current locale into which pages are loaded.
 135    *
 136    * @since 4.0
 137    */
 138   
 139    private ThreadLocale _threadLocale;
 140   
 141    /**
 142    * The locale of the application, which is also the locale of the page being loaded.
 143    */
 144   
 145    private Locale _locale;
 146   
 147    /**
 148    * Number of components instantiated, excluding the page itself.
 149    */
 150   
 151    private int _count;
 152   
 153    /**
 154    * The recursion depth. A page with no components is zero. A component on a page is one.
 155    */
 156   
 157    private int _depth;
 158   
 159    /**
 160    * The maximum depth reached while building the page.
 161    */
 162   
 163    private int _maxDepth;
 164   
 165    /** @since 4.0 */
 166   
 167    private ClassResolver _classResolver;
 168   
 169  39 public void initializeService()
 170    {
 171   
 172    // Create the mechanisms for walking the component tree when it is
 173    // complete
 174  39 IComponentVisitor verifyRequiredParametersVisitor = new VerifyRequiredParametersVisitor();
 175   
 176  39 _verifyRequiredParametersWalker = new ComponentTreeWalker(new IComponentVisitor[]
 177    { verifyRequiredParametersVisitor });
 178   
 179  39 _establishDefaultParameterValuesWalker = new ComponentTreeWalker(new IComponentVisitor[]
 180    { _establishDefaultParameterValuesVisitor });
 181    }
 182   
 183    /**
 184    * Binds properties of the component as defined by the container's specification.
 185    * <p>
 186    * This implementation is very simple, we will need a lot more sanity checking and eror checking
 187    * in the final version.
 188    *
 189    * @param container
 190    * The containing component. For a dynamic binding ({@link ExpressionBinding}) the
 191    * property name is evaluated with the container as the root.
 192    * @param component
 193    * The contained component being bound.
 194    * @param spec
 195    * The specification of the contained component.
 196    * @param contained
 197    * The contained component specification (from the container's
 198    * {@link IComponentSpecification}).
 199    */
 200   
 201  331 void bind(IComponent container, IComponent component, IContainedComponent contained,
 202    String defaultBindingPrefix)
 203    {
 204  331 IComponentSpecification spec = component.getSpecification();
 205  331 boolean formalOnly = !spec.getAllowInformalParameters();
 206   
 207  331 if (contained.getInheritInformalParameters())
 208    {
 209  3 if (formalOnly)
 210  1 throw new ApplicationRuntimeException(PageloadMessages
 211    .inheritInformalInvalidComponentFormalOnly(component), component, contained
 212    .getLocation(), null);
 213   
 214  2 IComponentSpecification containerSpec = container.getSpecification();
 215   
 216  2 if (!containerSpec.getAllowInformalParameters())
 217  1 throw new ApplicationRuntimeException(PageloadMessages
 218    .inheritInformalInvalidContainerFormalOnly(container, component),
 219    component, contained.getLocation(), null);
 220   
 221  1 IQueuedInheritedBinding queued = new QueuedInheritInformalBindings(component);
 222  1 _inheritedBindingQueue.add(queued);
 223    }
 224   
 225  329 Iterator i = contained.getBindingNames().iterator();
 226   
 227  329 while (i.hasNext())
 228    {
 229  434 String name = (String) i.next();
 230   
 231  434 IParameterSpecification pspec = spec.getParameter(name);
 232   
 233  434 boolean isFormal = pspec != null;
 234   
 235  434 String parameterName = isFormal ? pspec.getParameterName() : name;
 236   
 237  434 IBindingSpecification bspec = contained.getBinding(name);
 238   
 239    // If not allowing informal parameters, check that each binding
 240    // matches
 241    // a formal parameter.
 242   
 243  434 if (formalOnly && !isFormal)
 244  0 throw new ApplicationRuntimeException(PageloadMessages.formalParametersOnly(
 245    component,
 246    name), component, bspec.getLocation(), null);
 247   
 248    // If an informal parameter that conflicts with a reserved name,
 249    // then skip it.
 250   
 251  434 if (!isFormal && spec.isReservedParameterName(name))
 252  0 continue;
 253   
 254  434 if (isFormal)
 255    {
 256  416 if (!name.equals(parameterName))
 257    {
 258  1 _log.warn(PageloadMessages.usedParameterAlias(
 259    contained,
 260    name,
 261    parameterName,
 262    bspec.getLocation()));
 263    }
 264  415 else if (pspec.isDeprecated())
 265  1 _log.warn(PageloadMessages.deprecatedParameter(
 266    name,
 267    bspec.getLocation(),
 268    contained.getType()));
 269    }
 270   
 271    // The type determines how to interpret the value:
 272    // As a simple static String
 273    // As a nested property name (relative to the component)
 274    // As the name of a binding inherited from the containing component.
 275    // As the name of a public field
 276    // As a script for a listener
 277   
 278  434 BindingType type = bspec.getType();
 279   
 280    // For inherited bindings, defer until later. This gives components
 281    // a chance to setup bindings from static values and expressions in
 282    // the template. The order of operations is tricky, template bindings
 283    // come later. Note that this is a hold over from the Tapestry 3.0 DTD
 284    // and will some day no longer be supported.
 285   
 286  434 if (type == BindingType.INHERITED)
 287    {
 288  1 QueuedInheritedBinding queued = new QueuedInheritedBinding(component, bspec
 289    .getValue(), parameterName);
 290  1 _inheritedBindingQueue.add(queued);
 291  1 continue;
 292    }
 293   
 294  433 String description = PageloadMessages.parameterName(name);
 295   
 296  433 IBinding binding = convert(container, description, defaultBindingPrefix, bspec);
 297   
 298  433 addBindingToComponent(component, parameterName, binding);
 299    }
 300    }
 301   
 302    /**
 303    * Adds a binding to the component, checking to see if there's a name conflict (an existing
 304    * binding for the same parameter ... possibly because parameter names can be aliased).
 305    *
 306    * @param component
 307    * to which the binding should be added
 308    * @param parameterName
 309    * the name of the parameter to bind, which should be a true name, not an alias
 310    * @param binding
 311    * the binding to add
 312    * @throws ApplicationRuntimeException
 313    * if a binding already exists
 314    * @since 4.0
 315    */
 316   
 317  434 static void addBindingToComponent(IComponent component, String parameterName, IBinding binding)
 318    {
 319  434 IBinding existing = component.getBinding(parameterName);
 320   
 321  434 if (existing != null)
 322  1 throw new ApplicationRuntimeException(PageloadMessages.duplicateParameter(
 323    parameterName,
 324    existing), component, binding.getLocation(), null);
 325   
 326  433 component.setBinding(parameterName, binding);
 327    }
 328   
 329  433 private IBinding convert(IComponent container, String description, String defaultBindingType,
 330    IBindingSpecification spec)
 331    {
 332  433 Location location = spec.getLocation();
 333  433 String bindingReference = spec.getValue();
 334   
 335  433 return _bindingSource.createBinding(
 336    container,
 337    description,
 338    bindingReference,
 339    defaultBindingType,
 340    location);
 341    }
 342   
 343    /**
 344    * Sets up a component. This involves:
 345    * <ul>
 346    * <li>Instantiating any contained components.
 347    * <li>Add the contained components to the container.
 348    * <li>Setting up bindings between container and containees.
 349    * <li>Construct the containees recursively.
 350    * <li>Invoking
 351    * {@link IComponent#finishLoad(IRequestCycle, IPageLoader, IComponentSpecification)}
 352    * </ul>
 353    *
 354    * @param cycle
 355    * the request cycle for which the page is being (initially) constructed
 356    * @param page
 357    * The page on which the container exists.
 358    * @param container
 359    * The component to be set up.
 360    * @param containerSpec
 361    * The specification for the container.
 362    * @param the
 363    * namespace of the container
 364    */
 365   
 366  1004 private void constructComponent(IRequestCycle cycle, IPage page, IComponent container,
 367    IComponentSpecification containerSpec, INamespace namespace)
 368    {
 369  1004 _depth++;
 370  1004 if (_depth > _maxDepth)
 371  288 _maxDepth = _depth;
 372   
 373  1004 String defaultBindingPrefix = _componentPropertySource.getComponentProperty(
 374    container,
 375    TapestryConstants.DEFAULT_BINDING_PREFIX_NAME);
 376   
 377  1004 List ids = new ArrayList(containerSpec.getComponentIds());
 378  1004 int count = ids.size();
 379   
 380  1004 try
 381    {
 382  1004 for (int i = 0; i < count; i++)
 383    {
 384  329 String id = (String) ids.get(i);
 385   
 386    // Get the sub-component specification from the
 387    // container's specification.
 388   
 389  329 IContainedComponent contained = containerSpec.getComponent(id);
 390   
 391  329 String type = contained.getType();
 392  329 Location location = contained.getLocation();
 393   
 394  329 _componentResolver.resolve(cycle, namespace, type, location);
 395   
 396  329 IComponentSpecification componentSpecification = _componentResolver
 397    .getSpecification();
 398  329 INamespace componentNamespace = _componentResolver.getNamespace();
 399   
 400    // Instantiate the contained component.
 401   
 402  329 IComponent component = instantiateComponent(
 403    page,
 404    container,
 405    id,
 406    componentSpecification,
 407    _componentResolver.getType(),
 408    componentNamespace,
 409    contained);
 410   
 411    // Add it, by name, to the container.
 412   
 413  329 container.addComponent(component);
 414   
 415    // Set up any bindings in the IContainedComponent specification
 416   
 417  329 bind(container, component, contained, defaultBindingPrefix);
 418   
 419    // Now construct the component recusively; it gets its chance
 420    // to create its subcomponents and set their bindings.
 421   
 422  327 constructComponent(
 423    cycle,
 424    page,
 425    component,
 426    componentSpecification,
 427    componentNamespace);
 428    }
 429   
 430  1002 addAssets(container, containerSpec);
 431   
 432    // Finish the load of the component; most components (which
 433    // subclass BaseComponent) load their templates here.
 434    // Properties with initial values will be set here (or the
 435    // initial value will be recorded for later use in pageDetach().
 436    // That may cause yet more components to be created, and more
 437    // bindings to be set, so we defer some checking until
 438    // later.
 439   
 440  1002 container.finishLoad(cycle, this, containerSpec);
 441   
 442    // Have the component switch over to its active state.
 443   
 444  995 container.enterActiveState();
 445    }
 446    catch (ApplicationRuntimeException ex)
 447    {
 448  9 throw ex;
 449    }
 450    catch (RuntimeException ex)
 451    {
 452  0 throw new ApplicationRuntimeException(PageloadMessages.unableToInstantiateComponent(
 453    container,
 454    ex), container, null, ex);
 455    }
 456   
 457  995 _depth--;
 458    }
 459   
 460    /**
 461    * Invoked to create an implicit component (one which is defined in the containing component's
 462    * template, rather that in the containing component's specification).
 463    *
 464    * @see org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl
 465    * @since 3.0
 466    */
 467   
 468  558 public IComponent createImplicitComponent(IRequestCycle cycle, IComponent container,
 469    String componentId, String componentType, Location location)
 470    {
 471  558 IPage page = container.getPage();
 472   
 473  558 _componentResolver.resolve(cycle, container.getNamespace(), componentType, location);
 474   
 475  558 INamespace componentNamespace = _componentResolver.getNamespace();
 476  558 IComponentSpecification spec = _componentResolver.getSpecification();
 477   
 478  558 IContainedComponent contained = new ContainedComponent();
 479  558 contained.setLocation(location);
 480  558 contained.setType(componentType);
 481   
 482  558 IComponent result = instantiateComponent(
 483    page,
 484    container,
 485    componentId,
 486    spec,
 487    _componentResolver.getType(),
 488    componentNamespace,
 489    contained);
 490   
 491  557 container.addComponent(result);
 492   
 493    // Recusively build the component.
 494   
 495  557 constructComponent(cycle, page, result, spec, componentNamespace);
 496   
 497  555 return result;
 498    }
 499   
 500    /**
 501    * Instantiates a component from its specification. We instantiate the component object, then
 502    * set its specification, page, container and id.
 503    *
 504    * @see AbstractComponent
 505    */
 506   
 507  887 private IComponent instantiateComponent(IPage page, IComponent container, String id,
 508    IComponentSpecification spec, String type, INamespace namespace,
 509    IContainedComponent containedComponent)
 510    {
 511  887 ComponentClassProviderContext context = new ComponentClassProviderContext(type, spec,
 512    namespace);
 513  887 String className = _componentClassProvider.provideComponentClassName(context);
 514   
 515    // String className = spec.getComponentClassName();
 516   
 517  887 if (HiveMind.isBlank(className))
 518  0 className = BaseComponent.class.getName();
 519    else
 520    {
 521  887 Class componentClass = _classResolver.findClass(className);
 522   
 523  887 if (!IComponent.class.isAssignableFrom(componentClass))
 524  1 throw new ApplicationRuntimeException(PageloadMessages
 525    .classNotComponent(componentClass), container, spec.getLocation(), null);
 526   
 527  886 if (IPage.class.isAssignableFrom(componentClass))
 528  0 throw new ApplicationRuntimeException(PageloadMessages.pageNotAllowed(id),
 529    container, spec.getLocation(), null);
 530    }
 531   
 532  886 ComponentConstructor cc = _componentConstructorFactory.getComponentConstructor(
 533    spec,
 534    className);
 535   
 536  886 IComponent result = (IComponent) cc.newInstance();
 537   
 538  886 result.setNamespace(namespace);
 539  886 result.setPage(page);
 540  886 result.setContainer(container);
 541  886 result.setId(id);
 542  886 result.setContainedComponent(containedComponent);
 543  886 result.setLocation(containedComponent.getLocation());
 544   
 545  886 _count++;
 546   
 547  886 return result;
 548    }
 549   
 550    /**
 551    * Instantitates a page from its specification.
 552    *
 553    * @param name
 554    * the unqualified, simple, name for the page
 555    * @param namespace
 556    * the namespace containing the page's specification
 557    * @param spec
 558    * the page's specification We instantiate the page object, then set its
 559    * specification, names and locale.
 560    * @see IEngine
 561    * @see ChangeObserver
 562    */
 563   
 564  122 private IPage instantiatePage(String name, INamespace namespace, IComponentSpecification spec)
 565    {
 566  122 Location location = spec.getLocation();
 567  122 ComponentClassProviderContext context = new ComponentClassProviderContext(name, spec,
 568    namespace);
 569  122 String className = _pageClassProvider.provideComponentClassName(context);
 570   
 571  122 Class pageClass = _classResolver.findClass(className);
 572   
 573  121 if (!IPage.class.isAssignableFrom(pageClass))
 574  1 throw new ApplicationRuntimeException(PageloadMessages.classNotPage(pageClass),
 575    location, null);
 576   
 577  120 String pageName = namespace.constructQualifiedName(name);
 578   
 579  120 ComponentConstructor cc = _componentConstructorFactory.getComponentConstructor(
 580    spec,
 581    className);
 582   
 583  120 IPage result = (IPage) cc.newInstance();
 584   
 585  120 result.setNamespace(namespace);
 586  120 result.setPageName(pageName);
 587  120 result.setPage(result);
 588  120 result.setLocale(_locale);
 589  120 result.setLocation(location);
 590   
 591  120 return result;
 592    }
 593   
 594  122 public IPage loadPage(String name, INamespace namespace, IRequestCycle cycle,
 595    IComponentSpecification specification)
 596    {
 597  122 IPage page = null;
 598   
 599  122 _count = 0;
 600  122 _depth = 0;
 601  122 _maxDepth = 0;
 602   
 603  122 _locale = _threadLocale.getLocale();
 604   
 605  122 try
 606    {
 607  122 page = instantiatePage(name, namespace, specification);
 608   
 609    // The page is now attached to the engine and request cycle; some code
 610    // inside the page's finishLoad() method may require this. TAPESTRY-763
 611   
 612  120 page.attach(cycle.getEngine(), cycle);
 613   
 614  120 constructComponent(cycle, page, page, specification, namespace);
 615   
 616    // Walk through the complete component tree to set up the default
 617    // parameter values.
 618  113 _establishDefaultParameterValuesWalker.walkComponentTree(page);
 619   
 620  113 establishInheritedBindings();
 621   
 622    // Walk through the complete component tree to ensure that required
 623    // parameters are bound
 624  113 _verifyRequiredParametersWalker.walkComponentTree(page);
 625    }
 626    finally
 627    {
 628  122 _locale = null;
 629  122 _inheritedBindingQueue.clear();
 630    }
 631   
 632  113 if (_log.isDebugEnabled())
 633  0 _log.debug("Loaded page " + page + " with " + _count + " components (maximum depth "
 634    + _maxDepth + ")");
 635   
 636  113 return page;
 637    }
 638   
 639    /** @since 4.0 */
 640   
 641  196 public void loadTemplateForComponent(IRequestCycle cycle, ITemplateComponent component)
 642    {
 643  196 _componentTemplateLoader.loadTemplate(cycle, component);
 644    }
 645   
 646  113 private void establishInheritedBindings()
 647    {
 648  113 _log.debug("Establishing inherited bindings");
 649   
 650  113 int count = _inheritedBindingQueue.size();
 651   
 652  113 for (int i = 0; i < count; i++)
 653    {
 654  2 IQueuedInheritedBinding queued = (IQueuedInheritedBinding) _inheritedBindingQueue
 655    .get(i);
 656   
 657  2 queued.connect();
 658    }
 659    }
 660   
 661  1002 private void addAssets(IComponent component, IComponentSpecification specification)
 662    {
 663  1002 List names = specification.getAssetNames();
 664   
 665  1002 if (names.isEmpty())
 666  953 return;
 667   
 668  49 Iterator i = names.iterator();
 669   
 670  49 while (i.hasNext())
 671    {
 672  53 String name = (String) i.next();
 673   
 674  53 IAssetSpecification assetSpec = specification.getAsset(name);
 675   
 676  53 IAsset asset = convertAsset(assetSpec);
 677   
 678  53 component.addAsset(name, asset);
 679    }
 680    }
 681   
 682    /**
 683    * Builds an instance of {@link IAsset} from the specification.
 684    */
 685   
 686  53 private IAsset convertAsset(IAssetSpecification spec)
 687    {
 688    // AssetType type = spec.getType();
 689  53 String path = spec.getPath();
 690  53 Location location = spec.getLocation();
 691   
 692  53 Resource specResource = location.getResource();
 693   
 694    // And ugly, ugly kludge. For page and component specifications in the
 695    // context (typically, somewhere under WEB-INF), we evaluate them
 696    // relative the web application root.
 697   
 698  53 if (isContextResource(specResource))
 699  1 specResource = specResource.getRelativeResource("/");
 700   
 701  53 return _assetSource.findAsset(specResource, path, _locale, location);
 702    }
 703   
 704  53 private boolean isContextResource(Resource resource)
 705    {
 706  53 return (resource instanceof WebContextResource) || (resource instanceof ContextResource);
 707    }
 708   
 709    /** @since 4.0 */
 710   
 711  41 public void setLog(Log log)
 712    {
 713  41 _log = log;
 714    }
 715   
 716    /** @since 4.0 */
 717   
 718  39 public void setComponentResolver(ComponentSpecificationResolver resolver)
 719    {
 720  39 _componentResolver = resolver;
 721    }
 722   
 723    /** @since 4.0 */
 724   
 725  41 public void setBindingSource(BindingSource bindingSource)
 726    {
 727  41 _bindingSource = bindingSource;
 728    }
 729   
 730    /**
 731    * @since 4.0
 732    */
 733  39 public void setComponentTemplateLoader(ComponentTemplateLoader componentTemplateLoader)
 734    {
 735  39 _componentTemplateLoader = componentTemplateLoader;
 736    }
 737   
 738    /** @since 4.0 */
 739  39 public void setEstablishDefaultParameterValuesVisitor(
 740    IComponentVisitor establishDefaultParameterValuesVisitor)
 741    {
 742  39 _establishDefaultParameterValuesVisitor = establishDefaultParameterValuesVisitor;
 743    }
 744   
 745    /** @since 4.0 */
 746  39 public void setComponentConstructorFactory(
 747    ComponentConstructorFactory componentConstructorFactory)
 748    {
 749  39 _componentConstructorFactory = componentConstructorFactory;
 750    }
 751   
 752    /** @since 4.0 */
 753  39 public void setValueConverter(ValueConverter valueConverter)
 754    {
 755  39 _valueConverter = valueConverter;
 756    }
 757   
 758    /** @since 4.0 */
 759  39 public void setAssetSource(AssetSource assetSource)
 760    {
 761  39 _assetSource = assetSource;
 762    }
 763   
 764    /** @since 4.0 */
 765  39 public void setPageClassProvider(ComponentClassProvider pageClassProvider)
 766    {
 767  39 _pageClassProvider = pageClassProvider;
 768    }
 769   
 770    /** @since 4.0 */
 771  39 public void setClassResolver(ClassResolver classResolver)
 772    {
 773  39 _classResolver = classResolver;
 774    }
 775   
 776    /**
 777    * @since 4.0
 778    */
 779  39 public void setComponentClassProvider(ComponentClassProvider componentClassProvider)
 780    {
 781  39 _componentClassProvider = componentClassProvider;
 782    }
 783   
 784    /** @since 4.0 */
 785  39 public void setThreadLocale(ThreadLocale threadLocale)
 786    {
 787  39 _threadLocale = threadLocale;
 788    }
 789   
 790    /** @since 4.0 */
 791  39 public void setComponentPropertySource(ComponentPropertySource componentPropertySource)
 792    {
 793  39 _componentPropertySource = componentPropertySource;
 794    }
 795    }