org.apache.tapestry.services.impl
Class BindingSourceImpl

java.lang.Object
  extended by org.apache.tapestry.services.impl.BindingSourceImpl
All Implemented Interfaces:
BindingSource

public class BindingSourceImpl
extends Object
implements BindingSource

Implementation of the BindingSource service.

Since:
4.0
Author:
Howard Lewis Ship

Constructor Summary
BindingSourceImpl()
           
 
Method Summary
 IBinding createBinding(IComponent component, IParameterSpecification parameter, String description, String reference, String defaultBindingType, org.apache.hivemind.Location location)
          Just like BindingSource.createBinding(org.apache.tapestry.IComponent, String, String, String, org.apache.hivemind.Location) - except this version takes an additional parameter of type IParameterSpecification for those bindings that have a matching parameter.
 IBinding createBinding(IComponent component, String description, String reference, String defaultBindingType, org.apache.hivemind.Location location)
          Creates a new binding.
 void initializeService()
           
 void setContributions(List contributions)
           
 void setPropertyContributions(Map properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingSourceImpl

public BindingSourceImpl()
Method Detail

initializeService

public void initializeService()

createBinding

public IBinding createBinding(IComponent component,
                              String description,
                              String reference,
                              String defaultBindingType,
                              org.apache.hivemind.Location location)
Description copied from interface: BindingSource
Creates a new binding. The locator is used to identify the type of binding to create as well as configure the binding instance. The locator is either a literal value (resulting in a literal binding) or consists of prefix and a path, i.e., ognl:myProperty.

When a prefix exists and is identified, it is used to select the correct BindingFactory, and the remainder of the path (i.e., myProperty) is passed to the factory. An unrecognized prefix is treated as a literal value (it is often "javascript:" or "http:", etc.).

Specified by:
createBinding in interface BindingSource
Parameters:
component - The component for which the binding is created; the component is used as a kind of context for certain types of bindings (for example, the root object when evaluating OGNL expressions).
description - description for the new binding
reference - The binding reference used to create the binding, possibly including a prefix to define the type. If the reference does not include a prefix, then the defaultBindingType is used as the prefix
defaultBindingType - Binding type to use when no prefix is provided in the reference or doesn't match a known binding factory.
location - Location used to report errors in the binding.
Returns:
A binding instance.

createBinding

public IBinding createBinding(IComponent component,
                              IParameterSpecification parameter,
                              String description,
                              String reference,
                              String defaultBindingType,
                              org.apache.hivemind.Location location)
Description copied from interface: BindingSource
Just like BindingSource.createBinding(org.apache.tapestry.IComponent, String, String, String, org.apache.hivemind.Location) - except this version takes an additional parameter of type IParameterSpecification for those bindings that have a matching parameter.

Specified by:
createBinding in interface BindingSource
Parameters:
component - The component for which the binding is created; the component is used as a kind of context for certain types of bindings (for example, the root object when evaluating OGNL expressions).
parameter - Optional argument of the parameter this binding is being bound for - may be null.
description - description for the new binding
reference - The binding reference used to create the binding, possibly including a prefix to define the type. If the reference does not include a prefix, then the defaultBindingType is used as the prefix
defaultBindingType - Binding type to use when no prefix is provided in the reference or doesn't match a known binding factory.
location - Location used to report errors in the binding.
Returns:
A binding instance.

setContributions

public void setContributions(List contributions)

setPropertyContributions

public void setPropertyContributions(Map properties)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.