1
2
3
4
5
6
7
8
9
10
11
12
13 from zope.interface import Interface
14 from zope.configuration.fields import GlobalObject
15 from zope.schema import TextLine
16
18 """
19 Registers a name and a javascript viewlet for a DirectRouter subclass.
20 """
21 name = TextLine(
22 title=u"Name",
23 description=u"The name of the requested view.")
24
25 for_ = GlobalObject(
26 title=u"For Interface",
27 description=u"The interface the directive is used for.",
28 required=False)
29
30 class_ = GlobalObject(
31 title=u"Class",
32 description=u"The DirectRouter subclass"
33 )
34
35 namespace = TextLine(
36 title=u"Namespace",
37 description=unicode("The JavaScript namespace under which the"
38 " remote methods should be available"),
39 required=False
40 )
41
42 layer = TextLine(
43 title=u"Layer",
44 description=u"The layer",
45 required=False
46 )
47
48 timeout = TextLine(
49 title=u"Timeout",
50 description=unicode("Override the default timeout (in milliseconds)"
51 " for the calls"),
52 required=False,
53 default=u"30000"
54 )
55
56 permission = TextLine(
57 title=u"Permission",
58 description=unicode("The base permission required to access methods"
59 " on this router. Individual methods can override"
60 " this setting using the require decorator"),
61 required=False,
62 default=u"zope.Public"
63 )
64