blob: 17b52317c4e5d154591702f38a2cf1445c083913 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright 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.portlet.services" version="4.0.0" package="org.apache.tapestry.portlet">
Defines engine services used by Tapestry portlet support.
<configuration-point id="FactoryServices" schema-id="tapestry.services.EngineServices">
Configuration point for the factory default services. Each contributed service
must have a unique name.
</configuration-point>
<contribution configuration-id="FactoryServices">
<service name="home" object="service:Home"/>
<service name="action" object="service:tapestry.services.Action"/>
<service name="direct" object="service:tapestry.services.Direct"/>
<service name="page" object="service:tapestry.services.Page"/>
<service name="reset" object="service:tapestry.services.Reset"/>
<service name="restart" object="service:tapestry.services.Restart"/>
<service name="asset" object="service:PortletAsset"/>
<service name="external" object="service:tapestry.services.External"/>
<service name="exception" object="service:Exception"/>
<!-- Special one used for handling Portal RenderRequests -->
<service name="render" object="service:Render"/>
</contribution>
<service-point id="Exception" interface="org.apache.tapestry.engine.IEngineService">
Renders a pre-generated exception, stored in the session.
<invoke-factory>
<construct class="ExceptionService">
<set-object property="request" value="infrastructure:request"/>
<set-object property="response" value="infrastructure:response"/>
<set-service property="globals" service-id="tapestry.portlet.PortletRequestGlobals"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="PortletAsset" interface="org.apache.tapestry.engine.IEngineService">
Specially wired version of the asset service that routes through the application servlet
(rather than the portlet).
<invoke-factory>
<construct class="org.apache.tapestry.asset.AssetService">
<set-object property="exceptionReporter" value="infrastructure:requestExceptionReporter"/>
<!-- The big change: use the servlet LinkFactory, not the portlet LinkFactory. -->
<set-service property="linkFactory" service-id="tapestry.portlet.PortletAssetLinkFactory"/>
<set-service property="context" service-id="tapestry.globals.WebContext"/>
<set-object property="response" value="service:tapestry.globals.WebResponse"/>
<set-service property="digestSource" service-id="tapestry.asset.ResourceDigestSource"/>
<set-service property="unprotectedMatcher" service-id="tapestry.asset.UnprotectedResourceMatcher" />
<event-listener service-id="tapestry.ResetEventHub"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="PortletRenderer" interface="PortletRenderer">
Service used to render a named page.
<invoke-factory>
<construct class="PortletRendererImpl">
<set-object property="markupWriterSource" value="infrastructure:markupWriterSource"/>
<set-object property="response" value="infrastructure:response"/>
<set-object property="assetFactory" value="infrastructure:assetFactory"/>
<set-object property="applicationId" value="infrastructure:applicationId"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="Render" interface="org.apache.tapestry.engine.IEngineService">
The single service that should be referenced by a Portlet render request.
<invoke-factory>
<construct class="RenderService">
<set-service property="portletRenderer" service-id="PortletRenderer"/>
<set-service property="request" service-id="tapestry.portlet.PortletRequest"/>
<set-service property="pageResolver" service-id="tapestry.portlet.resolver.PortletPageResolver"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="Home" interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct class="PortletHomeService">
<set-object property="responseRenderer" value="infrastructure:responseRenderer"/>
<set-object property="linkFactory" value="infrastructure:linkFactory"/>
<set-service property="requestGlobals" service-id="tapestry.portlet.PortletRequestGlobals"/>
<set-service property="portletRenderer" service-id="PortletRenderer"/>
<set-service property="pageResolver" service-id="tapestry.portlet.resolver.PortletPageResolver"/>
</construct>
</invoke-factory>
</service-point>
<service-point id="ResponseRenderer" interface="org.apache.tapestry.services.ResponseRenderer">
Portal specific implementation of ResponseRender that builds a
Portlet Render URL that references the render engine service.
<invoke-factory>
<construct class="PortletResponseRenderer">
<set-service property="request" service-id="tapestry.portlet.PortletRequest"/>
<set-service property="response" service-id="tapestry.portlet.ActionResponse"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.Infrastructure">
<property name="responseRenderer" mode="portlet" object="service:ResponseRenderer"/>
</contribution>
<contribution configuration-id="hivemind.FactoryDefaults">
<default symbol="org.apache.tapestry.portlet.home-page" value="View"/>
</contribution>
</module>