1
2
3
4
5
6
7
8
9
10
11
12
13
14 from Globals import DTMLFile
15 from Globals import InitializeClass
16 from AccessControl import ClassSecurityInfo, Permissions
17 from ZenModelRM import ZenModelRM
18 from Products.ZenRelations.RelSchema import *
19 from ZenPackable import ZenPackable
20
21
22 manage_addUserCommand = DTMLFile('dtml/addUserCommand',globals())
23
24
26
27 meta_type = 'UserCommand'
28
29 security = ClassSecurityInfo()
30
31 description = ""
32 command = ''
33
34 _properties = (
35 {'id':'description', 'type':'text', 'mode':'w'},
36 {'id':'command', 'type':'text', 'mode':'w'},
37 )
38
39 _relations = ZenPackable._relations + (
40 ("commandable", ToOne(
41 ToManyCont, 'Products.ZenModel.Commandable', 'userCommands')),
42 )
43
44
45
46 factory_type_information = (
47 {
48 'immediate_view' : 'userCommandDetail',
49 'actions' :
50 (
51 {'id' : 'overview',
52 'name' : 'User Command',
53 'action' : 'userCommandDetail',
54 'permissions' : ( Permissions.view, ),
55 },
56 { 'id' : 'viewHistory',
57 'name' : 'Modifications',
58 'action' : 'viewHistory',
59 'permissions' : ( Permissions.view, ),
60 }
61 )
62 },
63 )
64
65 security.declareProtected('View', 'breadCrumbs')
67 """Return the breadcrumb links for this object
68 [('url','id'), ...]
69 """
70 crumbs = super(UserCommand, self).breadCrumbs(terminator)
71 return crumbs
72
73
74 InitializeClass(UserCommand)
75