|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.services.TapestryModule
@Marker(value=Core.class) public final class TapestryModule
The root module for Tapestry.
| Constructor Summary | |
|---|---|
TapestryModule(PipelineBuilder pipelineBuilder,
PropertyShadowBuilder shadowBuilder,
RequestGlobals requestGlobals,
ApplicationGlobals applicationGlobals,
ChainBuilder chainBuilder,
RequestPageCache requestPageCache,
Environment environment,
StrategyBuilder strategyBuilder,
ComponentInstantiatorSource componentInstantiatorSource,
PropertyAccess propertyAccess,
ClassFactory componentClassFactory,
UpdateListenerHub updateListenerHub,
PerthreadManager perthreadManager,
ComponentTemplateSource componentTemplateSource,
Request request,
Response response,
ThreadLocale threadLocale,
ActionRenderResponseGenerator actionRenderResponseGenerator)
|
|
| Method Summary | |
|---|---|
static void |
bind(ServiceBinder binder)
|
Context |
build(ApplicationGlobals globals)
|
PageTemplateLocator |
build(AssetFactory contextAssetFactory,
ComponentClassResolver componentClassResolver)
|
ComponentInstantiatorSource |
build(ClassFactory classFactory,
ComponentClassTransformer transformer,
org.slf4j.Logger logger,
InternalRequestGlobals internalRequestGlobals)
|
ValidationMessagesSource |
build(Collection<String> configuration,
UpdateListenerHub updateListenerHub,
AssetFactory classpathAssetFactory)
Builds the source of Messages containing validation messages. |
ComponentClassTransformWorker |
build(List<ComponentClassTransformWorker> configuration)
Allows the exact steps in the component class transformation process to be defined. |
DataTypeAnalyzer |
build(List<DataTypeAnalyzer> configuration)
Analyzes properties to determine the data types, used to contributeBeanBlockSource(org.apache.tapestry.ioc.Configuration) locale display and edit blocks} for properties. |
InjectionProvider |
build(List<InjectionProvider> configuration)
A chain of command for providing values for Inject-ed fields in component classes. |
ApplicationInitializer |
build(org.slf4j.Logger logger,
List<ApplicationInitializerFilter> configuration)
Initializes the application. |
HttpServletRequestHandler |
build(org.slf4j.Logger logger,
List<HttpServletRequestFilter> configuration,
RequestHandler handler)
|
RequestHandler |
build(org.slf4j.Logger logger,
List<RequestFilter> configuration,
Dispatcher masterDispatcher)
|
ServletApplicationInitializer |
build(org.slf4j.Logger logger,
List<ServletApplicationInitializerFilter> configuration,
ApplicationInitializer initializer)
|
static Alias |
build(org.slf4j.Logger logger,
String mode,
AliasManager overridesManager,
Collection<AliasContribution> configuration)
|
ObjectRenderer |
build(Map<Class,ObjectRenderer> configuration)
|
ValueEncoderSource |
build(Map<Class,ValueEncoderFactory> configuration)
|
PagePool |
build(PageLoader pageLoader,
ComponentMessagesSource componentMessagesSource,
ServiceResources resources)
|
RequestPageCache |
build(PagePool pagePool)
|
ResourceCache |
build(ResourceDigestGenerator digestGenerator)
|
ComponentTemplateSource |
build(TemplateParser parser,
PageTemplateLocator locator)
|
static ComponentMessagesSource |
build(UpdateListenerHub updateListenerHub,
AssetFactory contextAssetFactory,
String appCatalog)
|
ActionRenderResponseGenerator |
buildActionRenderResponseGenerator(boolean immediateMode,
ObjectLocator locator)
Chooses one of two implementations, based on the configured mode. |
ComponentEventRequestHandler |
buildAjaxComponentEventRequestHandler(List<ComponentEventRequestFilter> configuration,
org.slf4j.Logger logger,
ServiceResources resources)
Builds the action request handler for Ajax requests, based on AjaxComponentEventRequestHandler. |
ComponentEventResultProcessor |
buildAjaxComponentEventResultProcessor(Map<Class,ComponentEventResultProcessor> configuration)
The component event result processor used for Ajax-oriented component requests. |
static AliasManager |
buildAliasOverrides(org.slf4j.Logger logger,
Collection<AliasContribution> configuration)
A companion service to build(org.slf4j.Logger, String, AliasManager, java.util.Collection) the Alias service} whose configuration contribution define spot overrides to specific services. |
AssetFactory |
buildClasspathAssetFactory(ResourceCache resourceCache,
ClasspathAssetAliasManager aliasManager)
|
PersistentFieldStrategy |
buildClientPersistentFieldStrategy(LinkFactory linkFactory,
ServiceResources resources)
|
ComponentClassCache |
buildComponentClassCache(ClassFactory classFactory)
|
ClassFactory |
buildComponentClassFactory()
Returns a ClassFactory that can be used to create extra classes around component classes. |
ComponentClassResolver |
buildComponentClassResolver(ServiceResources resources)
|
ComponentClassTransformer |
buildComponentClassTransformer(ServiceResources resources)
|
ComponentEventRequestHandler |
buildComponentEventRequestHandler(List<ComponentEventRequestFilter> configuration,
org.slf4j.Logger logger,
ServiceResources resources)
Builds the component action request handler for traditional (non-Ajax) requests. |
ComponentEventResultProcessor |
buildComponentEventResultProcessor(Map<Class,ComponentEventResultProcessor> configuration)
The component event result processor used for normal component requests. |
AssetFactory |
buildContextAssetFactory(ApplicationGlobals globals,
RequestPathOptimizer optimizer)
|
CookieSink |
buildCookieSink()
|
CookieSource |
buildCookieSource()
|
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). |
FormSupport |
buildFormSupport(EnvironmentalShadowBuilder builder)
Builds a proxy to the current FormSupport inside this thread's Environment. |
HttpServletRequest |
buildHttpServletRequest()
Builds a shadow of the RequestGlobals.HTTPServletRequest property. |
MarkupRenderer |
buildMarkupRenderer(PageRenderQueue pageRenderQueue,
org.slf4j.Logger logger,
List<MarkupRendererFilter> configuration)
The MarkupRenderer service is used to render a full page as markup. |
Dispatcher |
buildMasterDispatcher(List<Dispatcher> configuration)
Ordered contributions to the MasterDispatcher service allow different URL matching strategies to occur. |
MetaDataLocator |
buildMetaDataLocator(ServiceResources resources)
|
PageLoader |
buildPageLoader(ServiceResources resources)
|
PageRenderRequestHandler |
buildPageRenderRequestHandler(List<PageRenderRequestFilter> configuration,
org.slf4j.Logger logger,
ServiceResources resources)
|
PageRenderSupport |
buildPageRenderSupport(EnvironmentalShadowBuilder builder)
Builds a proxy to the current PageRenderSupport inside this thread's Environment. |
PartialMarkupRenderer |
buildPartialMarkupRenderer(org.slf4j.Logger logger,
List<PartialMarkupRendererFilter> configuration,
PageRenderQueue renderQueue)
A wrapper around PageRenderQueue used for partial page renders. |
BindingFactory |
buildPropBindingFactory(List<BindingFactory> configuration,
PropertyConduitSource propertyConduitSource)
Builds the PropBindingFactory as a chain of command. |
PropertyConduitSource |
buildPropertyConduitSource()
|
Request |
buildRequest()
Builds a shadow of the RequestGlobals.request property. |
Response |
buildResponse()
Builds a shadow of the RequestGlobals.response property. |
TranslatorSource |
buildTranslatorSource(ServiceResources resources)
|
void |
contributeAjaxComponentEventResultProcessor(MappedConfiguration<Class,ComponentEventResultProcessor> configuration,
ObjectLocator locator)
Contributes handlers for the following types: Object Failure case, added to provide more useful exception message RenderCommand Typically, a Block
Component Renders the component and its body JSONObject The JSONObject is returned as a text/javascript response
StreamResponse The stream response is sent as the actual response
|
void |
contributeApplicationInitializer(OrderedConfiguration<ApplicationInitializerFilter> configuration,
PropertyAccess propertyAccess,
TypeCoercer typeCoercer,
ComponentClassResolver componentClassResolver)
Adds a listener to the ComponentInstantiatorSource that clears the
PropertyAccess and TypeCoercer caches on a class loader invalidation. |
void |
contributeApplicationStatePersistenceStrategySource(MappedConfiguration<String,ApplicationStatePersistenceStrategy> configuration,
Request request)
Contributes the default "session" strategy. |
void |
contributeAssetSource(MappedConfiguration<String,AssetFactory> configuration,
AssetFactory contextAssetFactory,
AssetFactory classpathAssetFactory)
|
static void |
contributeBeanBlockSource(Configuration<BeanBlockContribution> configuration)
|
static void |
contributeBindingSource(MappedConfiguration<String,BindingFactory> configuration,
AssetSource assetSource,
BindingFactory propBindingFactory,
FieldValidatorSource fieldValidatorSource,
TranslatorSource translatorSource,
ObjectLocator locator)
Contributes the factory for serveral built-in binding prefixes ("asset", "block", "component", "literal", prop", "nullfieldstrategy", "message", "validate", "translate", "var"). |
static void |
contributeClasspathAssetAliasManager(MappedConfiguration<String,String> configuration,
String scriptaculousPath,
String datepickerPath)
|
static void |
contributeComponentClassResolver(Configuration<LibraryMapping> configuration)
|
static void |
contributeComponentClassTransformWorker(OrderedConfiguration<ComponentClassTransformWorker> configuration,
ObjectLocator locator,
InjectionProvider injectionProvider,
Environment environment,
ComponentClassResolver resolver,
RequestPageCache requestPageCache,
BindingSource bindingsource)
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 Parameter annotation Component Defines embedded components
based on the 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 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
IncludeStylesheet Supports the IncludeStylesheet
annotation IncludeJavaScriptLibrary Supports the IncludeJavaScriptLibrary
annotation 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. |
void |
contributeComponentEventRequestHandler(OrderedConfiguration<ComponentEventRequestFilter> configuration,
RequestSecurityManager requestSecurityManager,
ComponentEventRequestHandler ajaxHandler,
ObjectLocator locator)
Contributes filters: Ajax Determines if the request is Ajax oriented, and redirects to an alternative handler if so ImmediateRender When immediate action response rendering is enabled, generates the markup response (instead of a page redirect response, which is the normal behavior) Secure Sends a redirect if an non-secure request accesses a secure page |
void |
contributeComponentEventResultProcessor(ComponentEventResultProcessor componentInstanceProcessor,
ComponentClassResolver componentClassResolver,
MappedConfiguration<Class,ComponentEventResultProcessor> configuration)
Contributes handlers for the following types: Object Failure case, added to provide a more useful exception message Link Sends a redirect to the link (which is typically a page
render link) String Sends a page render redirect Class Interpreted as the
class name of a page, sends a page render render redirect (this is more refactoring safe than the page name)
Component A page's root component (though a non-root component will work, but will generate
a warning). |
static void |
contributeDataTypeAnalyzer(OrderedConfiguration<DataTypeAnalyzer> configuration,
DataTypeAnalyzer defaultDataTypeAnalyzer)
Annotation Checks for DataType annotation
Default (ordered last) DefaultDataTypeAnalyzer
service (contributeDefaultDataTypeAnalyzer(org.apache.tapestry.ioc.MappedConfiguration) }) |
static void |
contributeDefaultDataTypeAnalyzer(MappedConfiguration<Class,String> configuration)
Maps property types to data type names: String --> text Number --> number Enum --> enum Boolean --> boolean Date --> date |
static void |
contributeFactoryDefaults(MappedConfiguration<String,String> configuration)
Contributes factory defaults that map be overridden. |
static void |
contributeFieldValidatorSource(MappedConfiguration<String,Validator> configuration)
Contributes the basic set of validators: required minlength maxlength min max regexp |
static void |
contributeHttpServletRequestHandler(OrderedConfiguration<HttpServletRequestFilter> configuration,
HttpServletRequestFilter ignoredPathsFilter)
|
static void |
contributeInjectionProvider(OrderedConfiguration<InjectionProvider> configuration,
MasterObjectProvider masterObjectProvider,
ObjectLocator locator,
SymbolSource symbolSource,
AssetSource assetSource)
Contributes the base set of injection providers: Default based on MasterObjectProvider Block injects fields of type Block 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 Service ordered last, for use when Inject is present
and nothing else works, matches field type against Tapestry IoC services |
void |
contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> configuration,
Asset stylesheetAsset,
Asset fieldErrorIcon,
ValidationMessagesSource validationMessagesSource,
SymbolSource symbolSource,
AssetSource assetSource)
Adds page render filters, each of which provides an Environmental
service. |
void |
contributeMasterDispatcher(OrderedConfiguration<Dispatcher> configuration,
ObjectLocator locator)
The MasterDispatcher is a chain-of-command of individual Dispatchers, each handling (like a servlet) a particular kind of incoming request. |
static void |
contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider> configuration,
Alias alias,
ObjectProvider assetObjectProvider)
Contributes two object providers: Alias Searches by type among contributions to the Alias service Asset Checks for the Path annotation, and
injects an Asset Service Injects based on the Service annotation, if
present |
static void |
contributeNullFieldStrategySource(MappedConfiguration<String,NullFieldStrategy> configuration)
Contributes strategies accessible via the NullFieldStrategySource service. |
void |
contributeObjectRenderer(MappedConfiguration<Class,ObjectRenderer> configuration,
ObjectRenderer locationRenderer,
TypeCoercer typeCoercer,
ObjectLocator locator)
Contributes a default object renderer for type Object, plus specialized renderers for Request, Location, ComponentResources, EventContext, List, and Object[]. |
void |
contributePageRenderRequestHandler(OrderedConfiguration<PageRenderRequestFilter> configuration,
RequestSecurityManager securityManager)
Contributes a single filter, "Secure", which checks for non-secure requests that access secure pages. |
void |
contributePartialMarkupRenderer(OrderedConfiguration<PartialMarkupRendererFilter> configuration,
Asset fieldErrorIcon,
ValidationMessagesSource validationMessagesSource)
Contributes PartialMarkupRendererFilters used when rendering a partial Ajax response. |
void |
contributePersistentFieldManager(MappedConfiguration<String,PersistentFieldStrategy> configuration,
Request request,
PersistentFieldStrategy clientStrategy)
Contributes several strategies: session Values are stored in the Session flash
Values are stored in the Session, until the next request (for the page) client Values are
encoded into URLs (or hidden form fields) |
void |
contributePropBindingFactory(OrderedConfiguration<BindingFactory> configuration)
|
void |
contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration,
Context context,
RequestExceptionHandler exceptionHandler,
long checkInterval,
long updateTimeout,
InternalRequestGlobals requestGlobals,
LocalizationSetter localizationSetter)
Continues a number of filters into the RequestHandler service: StaticFiles Checks to see if the request is for an actual file, if so, returns true to let the servlet container process the request CheckForUpdates Periodically fires events that checks to see if the file system sources for any cached data has changed (see CheckForUpdatesFilter). |
static void |
contributeResourceDigestGenerator(Configuration<String> configuration)
Configures the extensions that will require a digest to be downloaded via the asset dispatcher. |
void |
contributeResourceStreamer(MappedConfiguration<String,String> configuration)
Adds content types for "css" and "js" file extensions. |
static void |
contributeTemplateParser(MappedConfiguration<String,URL> config)
|
static void |
contributeTranslatorSource(MappedConfiguration<String,Translator> configuration)
Contributes the basic set of named translators: string byte integer long float double |
static void |
contributeTypeCoercer(Configuration<CoercionTuple> configuration)
Adds coercions: String to SelectModel String to InsertPosition Map to SelectModel
Collection to GridDataSource null to GridDataSource String
to GridPagerPosition List to SelectModel
ComponentResourcesAware (typically, a component) to ComponentResources String to BlankOption |
static void |
contributeValidationConstraintGenerator(OrderedConfiguration<ValidationConstraintGenerator> configuration)
Adds built-in constraint generators: PrimtiveField -- primitive fields are always required ValidateAnnotation -- adds constraints from a Validate annotation |
void |
contributeValidationMessagesSource(Configuration<String> configuration)
|
static void |
contributeValueEncoderSource(MappedConfiguration<Class,ValueEncoderFactory> configuration,
ObjectLocator locator)
Contributes ValueEncoderFactorys for types: Object String Enum |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TapestryModule(PipelineBuilder pipelineBuilder,
PropertyShadowBuilder shadowBuilder,
RequestGlobals requestGlobals,
ApplicationGlobals applicationGlobals,
ChainBuilder chainBuilder,
RequestPageCache requestPageCache,
Environment environment,
StrategyBuilder strategyBuilder,
ComponentInstantiatorSource componentInstantiatorSource,
PropertyAccess propertyAccess,
@ComponentLayer
ClassFactory componentClassFactory,
UpdateListenerHub updateListenerHub,
PerthreadManager perthreadManager,
ComponentTemplateSource componentTemplateSource,
Request request,
Response response,
ThreadLocale threadLocale,
ActionRenderResponseGenerator actionRenderResponseGenerator)
| Method Detail |
|---|
public static void bind(ServiceBinder binder)
public static Alias build(org.slf4j.Logger logger,
@Inject@Symbol(value="tapestry.alias-mode")
String mode,
@InjectService(value="AliasOverrides")
AliasManager overridesManager,
Collection<AliasContribution> configuration)
public static AliasManager buildAliasOverrides(org.slf4j.Logger logger,
Collection<AliasContribution> configuration)
public static void contributeBindingSource(MappedConfiguration<String,BindingFactory> configuration,
AssetSource assetSource,
@InjectService(value="PropBindingFactory")
BindingFactory propBindingFactory,
FieldValidatorSource fieldValidatorSource,
TranslatorSource translatorSource,
ObjectLocator locator)
public static void contributeClasspathAssetAliasManager(MappedConfiguration<String,String> configuration,
@Symbol(value="tapestry.scriptaculous.path")
String scriptaculousPath,
@Symbol(value="tapestry.datepicker.path")
String datepickerPath)
public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration)
public static void contributeComponentClassTransformWorker(OrderedConfiguration<ComponentClassTransformWorker> configuration,
ObjectLocator locator,
InjectionProvider injectionProvider,
Environment environment,
ComponentClassResolver resolver,
RequestPageCache requestPageCache,
BindingSource bindingsource)
Parameter annotation