| java.lang.Object org.apache.tapestry.services.TapestryModule
TapestryModule | final public class TapestryModule (Code) | | The root module for Tapestry.
|
Constructor Summary | |
public | TapestryModule(PipelineBuilder pipelineBuilder, PropertyShadowBuilder shadowBuilder, RequestGlobals requestGlobals, ApplicationGlobals applicationGlobals, ChainBuilder chainBuilder, RequestPageCache requestPageCache, PageResponseRenderer pageResponseRenderer, Environment environment, StrategyBuilder strategyBuilder, ComponentInstantiatorSource componentInstantiatorSource, LinkFactory linkFactory, PropertyAccess propertyAccess, ClassFactory componentClassFactory) |
Method Summary | |
public static void | bind(ServiceBinder binder) | public static Alias | build(Log log, String mode, AliasManager overridesManager, Collection<AliasContribution> configuration) | public Context | build(ApplicationGlobals globals) | public ValidationMessagesSource | build(Collection<String> configuration, UpdateListenerHub updateListenerHub, AssetFactory classpathAssetFactory) Builds the source of
Messages containing validation messages. | public PageRenderSupport | build(EnvironmentalShadowBuilder builder) Builds a proxy to the current PageRenderSupport inside this thread's
Environment . | public ComponentClassTransformWorker | build(List<ComponentClassTransformWorker> configuration) Allows the exact steps in the component class transformation process to be defined. | public DataTypeAnalyzer | build(List<DataTypeAnalyzer> configuration) | public InjectionProvider | build(List<InjectionProvider> configuration) A chain of command for providing values for
org.apache.tapestry.annotations.Inject -ed
fields in component classes. | public PageRenderInitializer | build(List<PageRenderCommand> configuration) Controls setup and cleanup of the environment during page rendering (the generation of a
markup stream response for the client web browser). | public ApplicationInitializer | build(Log log, List<ApplicationInitializerFilter> configuration) Initializes the application. | public HttpServletRequestHandler | build(Log log, List<HttpServletRequestFilter> configuration, RequestHandler handler) | public RequestHandler | build(Log log, List<RequestFilter> configuration, Dispatcher masterDispatcher) | public ServletApplicationInitializer | build(Log log, List<ServletApplicationInitializerFilter> configuration, ApplicationInitializer initializer) | public ComponentEventResultProcessor | build(Map<Class, ComponentEventResultProcessor> configuration) | public ObjectRenderer | build(StrategyBuilder strategyBuilder, Map<Class, ObjectRenderer> configuration) | public static ComponentMessagesSource | build(UpdateListenerHub updateListenerHub, AssetFactory contextAssetFactory, String appCatalog) | public ValueEncoderSource | build(Map<Class, ValueEncoderFactory> configuration) | public static AliasManager | buildAliasOverrides(Log log, Collection<AliasContribution> configuration) A companion service to
whose configuration contribution define spot overrides to specific services. | public ComponentActionRequestHandler | buildComponentActionRequestHandler(List<ComponentActionRequestFilter> configuration, Log log, ServiceResources resources) | public ClassFactory | buildComponentClassFactory() Returns a
ClassFactory that can be used to create extra classes around component
classes. | public ComponentClassResolver | buildComponentClassResolver(ServiceResources resources) | public ComponentEventResultProcessor | buildComponentInstanceResultProcessor(Log log) | public DataTypeAnalyzer | buildDefaultDataTypeAnalyzer(ServiceResources resources) The default data type analyzer is the final analyzer consulted and identifies the type
entirely pased on the property type, working against its own configuration (mapping property
type class to data type). | public Dispatcher | buildMasterDispatcher(List<Dispatcher> configuration) Ordered contributions to the MasterDispatcher service allow different URL matching strategies
to occur. | public MetaDataLocator | buildMetaDataLocator(ServiceResources resources) | public PageRenderRequestHandler | buildPageRenderRequestHandler(List<PageRenderRequestFilter> configuration, Log log, ServiceResources resources) | public PropertyConduitSource | buildPropertyConduitSource() | public Request | buildRequest() Builds a shadow of the RequestGlobals.request property. | public Response | buildResponse() Builds a shadow of the RequestGlobals.response property. | public TranslatorDefaultSource | buildTranslatorDefaultSource(ServiceResources resources) | public static void | contributeAlias(Configuration<AliasContribution> configuration, ObjectLocator locator, ClassFactory componentClassFactory, DataTypeAnalyzer dataTypeAnalyzer) A few of the built in services overlap in terms of service interface so we make contributions
to the Alias service to disambiguate. | public void | contributeApplicationStatePersistenceStrategySource(MappedConfiguration<String, ApplicationStatePersistenceStrategy> configuration, Request request) Contributes the default "session" strategy. | public void | contributeAssetSource(MappedConfiguration<String, AssetFactory> configuration, AssetFactory contextAssetFactory, AssetFactory classpathAssetFactory) | public static void | contributeBeanBlockSource(Configuration<BeanBlockContribution> configuration) | public static void | contributeBindingSource(MappedConfiguration<String, BindingFactory> configuration, AssetSource assetSource, BindingFactory propBindingFactory, FieldValidatorSource fieldValidatorSource, TranslatorSource translatorSource) Contributes the factory for serveral built-in binding prefixes ("asset", "literal", prop",
"block", "component" "message", "validate", "translate"). | public static void | contributeClasspathAssetAliasManager(MappedConfiguration<String, String> configuration, String scriptaculousPath) | public static void | contributeComponentClassResolver(Configuration<LibraryMapping> configuration) | public static void | contributeComponentClassTransformWorker(OrderedConfiguration<ComponentClassTransformWorker> configuration, ObjectLocator locator, ObjectProvider objectProvider, InjectionProvider injectionProvider, Environment environment, ComponentClassResolver resolver, RequestPageCache requestPageCache, AssetSource assetSource, SymbolSource symbolSource, BindingSource bindingsource, ApplicationStateManager applicationStateManager) Adds a number of standard component class transform workers:
- Retain -- allows fields to retain their values between requests
- Persist -- allows fields to store their their value persistently between requests
- Parameter -- identifies parameters based on the
org.apache.tapestry.annotations.Parameter annotation
- Component -- identifies embedded components based on the
org.apache.tapestry.annotations.Component annotation
- Mixin -- adds a mixin as part of a component's implementation
- Environment -- allows fields to contain values extracted from the
Environment service
- Inject -- used with the
Inject annotation, when a value is supplied
- InjectResources -- used with the
Inject annotation, when no value is supplied
- InjectPage -- adds code to allow access to other pages via the
InjectPage field
annotation
- InjectBlock -- allows a block from the template to be injected into a field
- SupportsInformalParameters -- checks for the annotation
- Meta -- checks for meta data and adds it to the component model
- ApplicationState -- converts fields that reference application state objects
- UnclaimedField -- identifies unclaimed fields and resets them to null/0/false at the end
of the request
- RenderCommand -- ensures all components also implement
RenderCommand
- SetupRender, BeginRender, etc.
| public void | contributeComponentEventResultProcessor(ComponentEventResultProcessor componentInstanceProcessor, ComponentClassResolver componentClassResolver, MappedConfiguration<Class, ComponentEventResultProcessor> configuration) | public static void | contributeDataTypeAnalyzer(OrderedConfiguration<DataTypeAnalyzer> configuration, DataTypeAnalyzer defaultDataTypeAnalyzer) Adds the
TapestryModule.buildDefaultDataTypeAnalyzer(Map) DefaultDatatTypeAnalyzer to the
configuration, ordered explicitly last. | public static void | contributeDefaultDataTypeAnalyzer(MappedConfiguration<Class, String> configuration) | public static void | contributeFieldValidatorSource(MappedConfiguration<String, Validator> configuration) | public static void | contributeInjectionProvider(OrderedConfiguration<InjectionProvider> configuration, SymbolSource symbolSource, AssetSource assetSource) | public void | contributeMasterDispatcher(OrderedConfiguration<Dispatcher> configuration, ClasspathAssetAliasManager aliasManager, ResourceCache resourceCache, ResourceStreamer streamer, PageRenderRequestHandler pageRenderRequestHandler, ComponentActionRequestHandler componentActionRequestHandler, ComponentClassResolver componentClassResolver, String startPageName) | public static void | contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider> configuration, Alias alias, ObjectProvider assetObjectProvider) | public void | contributeMetaDataLocator(MappedConfiguration<String, String> configuration) | public void | contributeObjectRenderer(MappedConfiguration<Class, ObjectRenderer> configuration, ObjectRenderer locationRenderer, TypeCoercer typeCoercer) Contributes a default object renderer for type Object, plus specialized renderers for
Request and
Location . | public void | contributePageRenderInitializer(OrderedConfiguration<PageRenderCommand> configuration, ThreadLocale threadLocale, Asset stylesheetAsset, Asset fieldErrorIcon, ValidationMessagesSource validationMessagesSource, SymbolSource symbolSource, AssetSource assetSource) | public void | contributePersistentFieldManager(MappedConfiguration<String, PersistentFieldStrategy> configuration, Request request, PersistentFieldStrategy clientStrategy) | public static void | contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration, Context context, RequestExceptionHandler exceptionHandler) Contributes filter "StaticFilesFilter" that identifies requests for static resources and
terminates the pipeline by returning false. | public static void | contributeTranslatorDefaultSource(MappedConfiguration<Class, Translator> configuration) | public static void | contributeTranslatorSource(MappedConfiguration<String, Translator> configuration) | public static void | contributeTypeCoercer(Configuration<CoercionTuple> configuration) | public static void | contributeValidationConstraintGenerator(OrderedConfiguration<ValidationConstraintGenerator> configuration) | public void | contributeValidationMessagesSource(Configuration<String> configuration) | public static void | contributeValueEncoderSource(MappedConfiguration<Class, ValueEncoderFactory> configuration) |
TapestryModule | public TapestryModule(PipelineBuilder pipelineBuilder, PropertyShadowBuilder shadowBuilder, RequestGlobals requestGlobals, ApplicationGlobals applicationGlobals, ChainBuilder chainBuilder, RequestPageCache requestPageCache, PageResponseRenderer pageResponseRenderer, Environment environment, StrategyBuilder strategyBuilder, ComponentInstantiatorSource componentInstantiatorSource, LinkFactory linkFactory, PropertyAccess propertyAccess, ClassFactory componentClassFactory)(Code) | | |
buildAliasOverrides | public static AliasManager buildAliasOverrides(Log log, Collection<AliasContribution> configuration)(Code) | | A companion service to
whose configuration contribution define spot overrides to specific services.
|
buildComponentClassFactory | public ClassFactory buildComponentClassFactory()(Code) | | Returns a
ClassFactory that can be used to create extra classes around component
classes. This ClassFactory will be cleared whenever an underlying component class is
discovered to have changed. Use of this class factory implies that your code will become
aware of this (if necessary) to discard any cached object (alas, this currently involves
dipping into the internals side to register for the correct notifications). Failure to
properly clean up can result in really nasty PermGen space memory leaks.
|
buildDefaultDataTypeAnalyzer | public DataTypeAnalyzer buildDefaultDataTypeAnalyzer(ServiceResources resources)(Code) | | The default data type analyzer is the final analyzer consulted and identifies the type
entirely pased on the property type, working against its own configuration (mapping property
type class to data type).
|
buildMasterDispatcher | public Dispatcher buildMasterDispatcher(List<Dispatcher> configuration)(Code) | | Ordered contributions to the MasterDispatcher service allow different URL matching strategies
to occur.
|
buildRequest | public Request buildRequest()(Code) | | Builds a shadow of the RequestGlobals.request property. Note again that the shadow can be an
ordinary singleton, even though RequestGlobals is perthread.
|
buildResponse | public Response buildResponse()(Code) | | Builds a shadow of the RequestGlobals.response property. Note again that the shadow can be an
ordinary singleton, even though RequestGlobals is perthread.
|
contributeAlias | public static void contributeAlias(Configuration<AliasContribution> configuration, ObjectLocator locator, ClassFactory componentClassFactory, DataTypeAnalyzer dataTypeAnalyzer)(Code) | | A few of the built in services overlap in terms of service interface so we make contributions
to the Alias service to disambiguate. This ensures that a bare parameter (without an
InjectService annotation) will chose the correct value without being further qualified.
-
ComponentEventResultProcessor
- the master ComponentEventResultProcessor service (rather than one of the other services
that exist to handle a specific type of result)
-
ObjectRenderer
- the master ObjectRenderer service (rather than the one of the other services that
renders a specific type of object)
-
ClassFactory
- the ComponentClassFactory (which will be recreated if the component class
loader is recreated, on a change to a component class)
-
DataTypeAnalyzer
- the DefaultDataTypeAnalyzer service
|
contributeBindingSource | public static void contributeBindingSource(MappedConfiguration<String, BindingFactory> configuration, AssetSource assetSource, BindingFactory propBindingFactory, FieldValidatorSource fieldValidatorSource, TranslatorSource translatorSource)(Code) | | Contributes the factory for serveral built-in binding prefixes ("asset", "literal", prop",
"block", "component" "message", "validate", "translate").
|
contributeComponentClassTransformWorker | public static void contributeComponentClassTransformWorker(OrderedConfiguration<ComponentClassTransformWorker> configuration, ObjectLocator locator, ObjectProvider objectProvider, InjectionProvider injectionProvider, Environment environment, ComponentClassResolver resolver, RequestPageCache requestPageCache, AssetSource assetSource, SymbolSource symbolSource, BindingSource bindingsource, ApplicationStateManager applicationStateManager)(Code) | | Adds a number of standard component class transform workers:
- Retain -- allows fields to retain their values between requests
- Persist -- allows fields to store their their value persistently between requests
- Parameter -- identifies parameters based on the
org.apache.tapestry.annotations.Parameter annotation
- Component -- identifies embedded components based on the
org.apache.tapestry.annotations.Component annotation
- Mixin -- adds a mixin as part of a component's implementation
- Environment -- allows fields to contain values extracted from the
Environment service
- Inject -- used with the
Inject annotation, when a value is supplied
- InjectResources -- used with the
Inject annotation, when no value is supplied
- InjectPage -- adds code to allow access to other pages via the
InjectPage field
annotation
- InjectBlock -- allows a block from the template to be injected into a field
- SupportsInformalParameters -- checks for the annotation
- Meta -- checks for meta data and adds it to the component model
- ApplicationState -- converts fields that reference application state objects
- UnclaimedField -- identifies unclaimed fields and resets them to null/0/false at the end
of the request
- RenderCommand -- ensures all components also implement
RenderCommand
- SetupRender, BeginRender, etc. -- correspond to component render phases and annotations
|
contributeComponentEventResultProcessor | public void contributeComponentEventResultProcessor(ComponentEventResultProcessor componentInstanceProcessor, ComponentClassResolver componentClassResolver, MappedConfiguration<Class, ComponentEventResultProcessor> configuration)(Code) | | Contributes handlers for the following types:
- Object
- Failure case, added to provide a more useful exception message
- ActionResponseGenerator
- Returns the ActionResponseGenerator; this sometimes occurs when a component generates
events whose return values are converted to ActionResponseGenerators (this handles that
bubble up case).
- Link
- Wraps the Link to send a redirect
- String
- The name of the page to render the response (after a redirect)
|
contributeDefaultDataTypeAnalyzer | public static void contributeDefaultDataTypeAnalyzer(MappedConfiguration<Class, String> configuration)(Code) | | Maps property types to data type names
- String --> text
- Number --> text
- Enum --> enum
- Boolean --> checkbox
|
contributeFieldValidatorSource | public static void contributeFieldValidatorSource(MappedConfiguration<String, Validator> configuration)(Code) | | Contributes the basic set of validators:
- required
- minlength
- maxlength
- min
- max
- regexp
|
contributeInjectionProvider | public static void contributeInjectionProvider(OrderedConfiguration<InjectionProvider> configuration, SymbolSource symbolSource, AssetSource assetSource)(Code) | | Contributes the elemental providers:
- ComponentResources -- give component access to its resources
- CommonResources -- access to properties of resources (log, messages, etc.)
- Asset -- injection of assets (triggered via
Path annotation), with the path
relative to the component class
|
contributeRequestHandler | public static void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration, Context context, RequestExceptionHandler exceptionHandler)(Code) | | Contributes filter "StaticFilesFilter" that identifies requests for static resources and
terminates the pipeline by returning false. Generally, most filters should be ordered after
this filter.
|
contributeTranslatorDefaultSource | public static void contributeTranslatorDefaultSource(MappedConfiguration<Class, Translator> configuration)(Code) | | Contributes the basic set of default translators:
- Integer
- String
- Long
- Double
|
contributeTranslatorSource | public static void contributeTranslatorSource(MappedConfiguration<String, Translator> configuration)(Code) | | Contributes the basic set of named translators:
- integer
- string
- long
- double
|
contributeValidationConstraintGenerator | public static void contributeValidationConstraintGenerator(OrderedConfiguration<ValidationConstraintGenerator> configuration)(Code) | | Adds built-in constraint generators:
- PrimtiveField -- primitive fields are always required
- ValidateAnnotation -- adds constraints from a
Validate annotation
|
|
|