org.apache.tapestry5.ioc.services
Class TapestryIOCModule

java.lang.Object
  extended by org.apache.tapestry5.ioc.services.TapestryIOCModule

@Marker(value=Builtin.class)
public final class TapestryIOCModule
extends Object

Defines the base set of services for the Tapestry IOC container.


Constructor Summary
TapestryIOCModule()
           
 
Method Summary
static void bind(ServiceBinder binder)
           
static ServiceLifecycleSource build(Map<String,ServiceLifecycle> configuration)
          Provides access to additional service lifecycles.
static void contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider> configuration, ObjectLocator locator)
          Contributes "DefaultProvider", ordered last, that delegates to ObjectLocator.getService(Class).
 void contributeServiceLifecycleSource(MappedConfiguration<String,ServiceLifecycle> configuration, ObjectLocator locator)
          Contributes the "perthread" scope.
static void contributeSymbolSource(OrderedConfiguration<SymbolProvider> configuration, SymbolProvider applicationDefaults, SymbolProvider factoryDefaults)
           
static void contributeTypeCoercer(Configuration<CoercionTuple> configuration)
          Contributes a set of standard type coercions to the TypeCoercer service: Object to String String to Double String to BigDecimal BigDecimal to Double Double to BigDecimal String to BigInteger BigInteger to Long String to Long Long to Byte Long to Short Long to Integer Double to Long Double to Float Float to Double Long to Double String to Boolean ("false" is always false, other non-blank strings are true) Long to Boolean (true if long value is non zero) Null to Boolean (always false) Collection to Boolean (false if empty) Object[] to List primitive[] to List Object to List (by wrapping as a singleton list) String to File String to TimeInterval TimeInterval to Long
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TapestryIOCModule

public TapestryIOCModule()
Method Detail

bind

public static void bind(ServiceBinder binder)

build

public static ServiceLifecycleSource build(Map<String,ServiceLifecycle> configuration)
Provides access to additional service lifecycles. One lifecycles is built in ("singleton") but additional ones are accessed via this service (and its mapped configuration). Only proxiable services (those with explicit service interfaces) can be managed in terms of a lifecycle.


contributeServiceLifecycleSource

public void contributeServiceLifecycleSource(MappedConfiguration<String,ServiceLifecycle> configuration,
                                             ObjectLocator locator)
Contributes the "perthread" scope.


contributeMasterObjectProvider

public static void contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider> configuration,
                                                  ObjectLocator locator)
Contributes "DefaultProvider", ordered last, that delegates to ObjectLocator.getService(Class).

Contributes "Value", which injects values (not services) triggered by the Value annotation.


contributeTypeCoercer

public static void contributeTypeCoercer(Configuration<CoercionTuple> configuration)
Contributes a set of standard type coercions to the TypeCoercer service:


contributeSymbolSource

public static void contributeSymbolSource(OrderedConfiguration<SymbolProvider> configuration,
                                          @ApplicationDefaults
                                          SymbolProvider applicationDefaults,
                                          @FactoryDefaults
                                          SymbolProvider factoryDefaults)


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