~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/configure.zcml

  • Committer: William Grant
  • Date: 2011-12-30 10:01:49 UTC
  • mto: This revision was merged to the branch mainline in revision 14612.
  • Revision ID: william.grant@canonical.com-20111230100149-zcepvmk4q01qzomx
Merge canonical's ZCML into lp.app and lp

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