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