blob: 246138beeb0c683eff50b779d7657e9359bc0fe1 [file] [log] [blame]
<?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.globals" version="4.0.0" package="org.apache.tapestry.services">
Contains global information about the application and (inside threaded
services) about the current request. In addition, services based
on this global information are provided.
<service-point id="ApplicationGlobals">
<create-instance class="impl.ApplicationGlobalsImpl"/>
</service-point>
<service-point id="RequestGlobals">
Stores the request and response for the current thread.
<create-instance class="impl.RequestGlobalsImpl" model="threaded"/>
</service-point>
<service-point id="IRequestCycle" interface="org.apache.tapestry.IRequestCycle">
The request cycle for the current request.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="RequestGlobals" property="requestCycle"/>
</invoke-factory>
</service-point>
<service-point id="ResponseBuilder" interface="org.apache.tapestry.services.ResponseBuilder" >
The response builder for the current request.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="RequestGlobals" property="responseBuilder"/>
</invoke-factory>
</service-point>
<service-point id="HttpServletRequest" interface="javax.servlet.http.HttpServletRequest">
Exposes the current thread's HttpServletRequest as a service. The request is actually
stored in the RequestGlobals service.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="RequestGlobals" property="request"/>
</invoke-factory>
</service-point>
<service-point id="WebRequest" interface="org.apache.tapestry.web.WebRequest">
Exposes the current thread's WebRequest as a service. The request is actually
stored in the RequestGlobals service.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="RequestGlobals" property="webRequest"/>
</invoke-factory>
</service-point>
<service-point id="HttpServletResponse" interface="javax.servlet.http.HttpServletResponse">
Exposes the current thread's HttpServletResponse as a service. The response is actually
stored in the RequestGlobals service.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="RequestGlobals" property="response"/>
</invoke-factory>
</service-point>
<service-point id="WebResponse" interface="org.apache.tapestry.web.WebResponse">
Exposes the current thread's WebResponse as a service. The response is actually
stored in the RequestGlobals service.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="RequestGlobals" property="webResponse"/>
</invoke-factory>
</service-point>
<service-point id="WebContext" interface="org.apache.tapestry.web.WebContext">
Exposes the global WebContext (a wrapper around the Servlet or Portlet context)
as a service.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="ApplicationGlobals" property="webContext"/>
</invoke-factory>
</service-point>
<service-point id="ServletContext" interface="javax.servlet.ServletContext">
Exposes the global ServletContext s a service.
<invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
<construct service-id="ApplicationGlobals" property="servletContext"/>
</invoke-factory>
</service-point>
<service-point id="SetupServletApplicationGlobals" interface="ApplicationInitializer">
Contributed into the tapestry.init.ApplicationInitializers configuration point
to install the servlet-specific framework services and configurations into the
tapestry.globals.ApplicationGlobals service.
<invoke-factory>
<construct class="impl.SetupServletApplicationGlobals">
<set-service property="globals" service-id="ApplicationGlobals"/>
<set-configuration property="factoryServices" configuration-id="tapestry.services.FactoryServices"/>
<set-service property="infrastructure" service-id="tapestry.Infrastructure"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.init.ApplicationInitializers">
<command id="SetupServletApplicationGlobals" object="service:SetupServletApplicationGlobals"
after="tapestry.init.ApplicationSpecificationInitializer"/>
</contribution>
<contribution configuration-id="tapestry.Infrastructure">
<property name="applicationSpecification" object="service-property:ApplicationGlobals:specification"/>
<property name="request" object="service:WebRequest"/>
<property name="response" object="service:WebResponse"/>
<property name="applicationId" object="service-property:ApplicationGlobals:activatorName"/>
<property name="context" object="service:WebContext"/>
<property name="requestCycle" object="service:IRequestCycle"/>
<property name="responseBuilder" object="service:ResponseBuilder" />
</contribution>
</module>