~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-12-31 00:29:39 UTC
  • mfrom: (14606.5.2 apocaremains-2)
  • Revision ID: launchpad@pqm.canonical.com-20111231002939-55hoazeosq53ftl3
[r=wgrant][no-qa] Remove canonical's ZCML.

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="lp.services.webapp"
14
 
        file="meta-overrides.zcml" />
15
 
    <include package="grokcore.component" file="meta.zcml" />
16
 
    <include package="lp.services.webapp" file="meta.zcml" />
17
 
    <include package="lazr.enum" />
18
 
    <include package="lazr.restful" file="meta.zcml" />
19
 
    <include package="lazr.uri" />
20
 
    <include package="lp" />
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="lp.services.webapp.interfaces.ILaunchpadProtocolError"
50
 
        class="lp.services.webapp.error.ProtocolErrorView"
51
 
        template="../lp/services/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="lp.services.webapp.interfaces.ILaunchpadRoot"
68
 
        name="specs"
69
 
        layer="lp.blueprints.publisher.BlueprintsLayer"
70
 
        />
71
 
    <browser:page
72
 
        name=""
73
 
        for="lp.services.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="lp.services.webapp.interfaces.ILaunchpadRoot"
82
 
        name="+code"
83
 
        layer="lp.code.publisher.CodeLayer"
84
 
        />
85
 
    <browser:page
86
 
        name=""
87
 
        for="lp.services.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="lp.services.webapp.interfaces.ILaunchpadRoot"
96
 
        name="translations"
97
 
        layer="lp.translations.publisher.TranslationsLayer"
98
 
        />
99
 
    <browser:page
100
 
        name=""
101
 
        for="lp.services.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="lp.services.webapp.interfaces.ILaunchpadRoot"
110
 
        name="bugs"
111
 
        layer="lp.bugs.publisher.BugsLayer"
112
 
        />
113
 
    <browser:page
114
 
        name=""
115
 
        for="lp.services.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="lp.services.webapp.interfaces.ILaunchpadRoot"
124
 
        name="questions"
125
 
        layer="lp.answers.publisher.AnswersLayer"
126
 
        />
127
 
    <browser:page
128
 
        name=""
129
 
        for="lp.services.webapp.interfaces.ILaunchpadRoot"
130
 
        class="lp.app.browser.launchpad.LaunchpadImageFolder"
131
 
        permission="zope.Public"
132
 
        layer="lp.answers.publisher.AnswersLayer"
133
 
        />
134
 
 
135
 
</configure>