Package Products :: Package ZenUtils :: Package extdirect :: Package zope :: Module metadirectives
[hide private]
[frames] | no frames]

Source Code for Module Products.ZenUtils.extdirect.zope.metadirectives

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2009, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 or (at your 
 8  # option) any later version as published by the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13  from zope.interface import Interface 
14  from zope.configuration.fields import GlobalObject 
15  from zope.schema import TextLine 
16   
17 -class IDirectRouter(Interface):
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