1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
<!-- Copyright 2009, 2010 Canonical Ltd. This software is licensed under the
GNU Affero General Public License version 3 (see the file LICENSE).
-->
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="canonical">
<includeOverrides
package="canonical.launchpad.webapp"
file="meta-overrides.zcml" />
<include package="canonical.launchpad" file="permissions.zcml" />
<include package="canonical.launchpad.webapp" file="meta.zcml" />
<include package="lazr.restful" file="meta.zcml" />
<include package="lp.services" />
<include package="lazr.uri" />
<include package="canonical.librarian" />
<!-- The default Zope 3 configuration of the SimpleComponentTraverser is
that it applies to any object that provides Interface.
This excludes objects that we're using just as instances of classes
without providing any interfaces.
-->
<view
for="*"
type="zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.publisher.interfaces.browser.IBrowserPublisher"
factory="zope.app.publication.traversers.SimpleComponentTraverser"
permission="zope.Public"
/>
<!-- We don't include zope.app.publication (see zopeapp.zcml in the
top level), so we lose the default registration that makes our
private XMLRPC server work. Copy that from Zope into here.
-->
<view
for="zope.interface.Interface"
type="zope.publisher.interfaces.xmlrpc.IXMLRPCRequest"
provides="zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher"
factory="zope.app.publication.traversers.SimpleComponentTraverser"
permission="zope.Public"
/>
<!-- Protocol errors (eg. HTTP 405 or 415 errors) should be published
with a minimalist template. -->
<browser:page
for="canonical.launchpad.webapp.interfaces.ILaunchpadProtocolError"
class="canonical.launchpad.webapp.error.ProtocolErrorView"
template="launchpad/webapp/templates/protocol-error.pt"
name="index.html"
permission="zope.Public"
/>
<!-- The following directives set up root front pages for the different
virtual host layers. The directives come in pairs.
The separate registration for the resources namespace (@@) is needed
because otherwise the lookup for /@@/ will fail because the
layer-specific defaultView directive also registers the
default view name as an unnamed adapter.
-->
-->
<!-- virtual host: blueprints -->
<browser:defaultView
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
name="specs"
layer="lp.blueprints.publisher.BlueprintsLayer"
/>
<browser:page
name=""
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
class="lp.app.browser.launchpad.LaunchpadImageFolder"
permission="zope.Public"
layer="lp.blueprints.publisher.BlueprintsLayer"
/>
<!-- virtual host: code -->
<browser:defaultView
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
name="+code"
layer="lp.code.publisher.CodeLayer"
/>
<browser:page
name=""
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
class="lp.app.browser.launchpad.LaunchpadImageFolder"
permission="zope.Public"
layer="lp.code.publisher.CodeLayer"
/>
<!-- virtual host: translations -->
<browser:defaultView
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
name="translations"
layer="lp.translations.publisher.TranslationsLayer"
/>
<browser:page
name=""
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
class="lp.app.browser.launchpad.LaunchpadImageFolder"
permission="zope.Public"
layer="lp.translations.publisher.TranslationsLayer"
/>
<!-- virtual host: bugs -->
<browser:defaultView
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
name="bugs"
layer="lp.bugs.publisher.BugsLayer"
/>
<browser:page
name=""
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
class="lp.app.browser.launchpad.LaunchpadImageFolder"
permission="zope.Public"
layer="lp.bugs.publisher.BugsLayer"
/>
<!-- virtual host: answers -->
<browser:defaultView
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
name="questions"
layer="lp.answers.publisher.AnswersLayer"
/>
<browser:page
name=""
for="canonical.launchpad.webapp.interfaces.ILaunchpadRoot"
class="lp.app.browser.launchpad.LaunchpadImageFolder"
permission="zope.Public"
layer="lp.answers.publisher.AnswersLayer"
/>
<include package="canonical.launchpad" />
<include package="canonical.lazr" />
</configure>
|