| <?xml version="1.0"?> |
| <!-- |
| Copyright 2004, 2005 The Apache Software Foundation |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <module id="tapestry.parse" version="4.0.0" package="org.apache.tapestry.parse"> |
| |
| Template and specification parsers. |
| |
| <service-point id="SpecificationParser" interface="ISpecificationParser"> |
| |
| The parser for all types of specifications (page, component, library and application). |
| |
| <!-- This one is constructed a little wierdly, to help maintain compatibility with Spindle. --> |
| |
| <invoke-factory model="pooled"> |
| <construct class="SpecificationParser" autowire-services="false"> |
| <error-handler/> |
| <log/> |
| <class-resolver/> |
| <object> instance:org.apache.tapestry.spec.SpecFactory </object> |
| |
| <!-- Can't use infrastructure:valueConverter, because SpecificationParser will be created earlier than |
| tapestry.Infrastructure --> |
| |
| <set-service property="valueConverter" service-id="tapestry.coerce.ValueConverter"/> |
| <set-service property="bindingSource" service-id="tapestry.bindings.BindingSource"/> |
| </construct> |
| </invoke-factory> |
| |
| <interceptor service-id="hivemind.LoggingInterceptor"/> |
| </service-point> |
| |
| <service-point id="SpecificationSource" interface="org.apache.tapestry.engine.ISpecificationSource"> |
| |
| Used to obtain specifications for pages, components and libraries. |
| |
| <invoke-factory> |
| <construct class="org.apache.tapestry.services.impl.SpecificationSourceImpl"> |
| <set-service property="parser" service-id="SpecificationParser"/> |
| <set-object property="specification" value="infrastructure:applicationSpecification"/> |
| <set-object property="assetSource" value="service:tapestry.asset.AssetSource"/> |
| <event-listener service-id="tapestry.ResetEventHub"/> |
| <event-listener service-id="tapestry.describe.ReportStatusHub"/> |
| </construct> |
| </invoke-factory> |
| |
| </service-point> |
| |
| <service-point id="TemplateParser" interface="ITemplateParser"> |
| |
| Parses a template into a series of tokens that are used to construct a component's body. |
| |
| <invoke-factory model="threaded"> |
| <construct class="TemplateParser"> |
| <set-object property="factory" value="instance:TemplateTokenFactory"/> |
| </construct> |
| </invoke-factory> |
| |
| </service-point> |
| |
| <service-point id="TemplateSource" interface="org.apache.tapestry.services.TemplateSource"> |
| |
| A smart cache for localized templates for pages and components. Retrieves a template on |
| first reference, and returns it on subsequent references. |
| |
| <invoke-factory> |
| <construct class="org.apache.tapestry.services.impl.TemplateSourceImpl"> |
| <set-service property="parser" service-id="TemplateParser"/> |
| <set-service property="delegate" service-id="TemplateSourceDelegate"/> |
| <set-object property="contextRoot" value="infrastructure:contextRoot"/> |
| <set-service property="componentSpecificationResolver" service-id="tapestry.page.ComponentSpecificationResolver"/> |
| <set-object property="componentPropertySource" value="infrastructure:componentPropertySource"/> |
| <set-object property="localizer" value="infrastructure:resourceLocalizer"/> |
| <set-service property="componentResourceResolver" service-id="tapestry.page.ComponentResourceResolver" /> |
| <event-listener service-id="tapestry.ResetEventHub"/> |
| <event-listener service-id="tapestry.describe.ReportStatusHub"/> |
| </construct> |
| </invoke-factory> |
| |
| </service-point> |
| |
| <service-point id="TemplateSourceDelegate" interface="org.apache.tapestry.engine.ITemplateSourceDelegate"> |
| |
| Delegate for TemplateSource that knows how to find templates in unusual places. |
| |
| <invoke-factory service-id="tapestry.ExtensionLookupFactory"> |
| <lookup extension-name="org.apache.tapestry.template-source-delegate"/> |
| </invoke-factory> |
| |
| </service-point> |
| |
| <contribution configuration-id="tapestry.Infrastructure"> |
| <property name="templateSource" object="service:TemplateSource"/> |
| <property name="specificationSource" object="service:SpecificationSource"/> |
| </contribution> |
| |
| </module> |