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