~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/configure.zcml

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-25 08:55:37 UTC
  • mfrom: (13287.1.8 bug-800652)
  • Revision ID: launchpad@pqm.canonical.com-20110625085537-moikyoo2pe98zs7r
[r=jcsackett, julian-edwards][bug=800634,
        800652] Enable and display overrides on sync package uploads.

Show diffs side-by-side

added added

removed removed

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