1
2
3
4
5
6
7
8
9
10
11 __doc__="""SoftwareClass
12
13 SoftwareClass represents a software vendor's product.
14
15 $Id: SoftwareClass.py,v 1.5 2003/03/08 18:34:24 edahl Exp $"""
16
17 __version__ = "$Revision: 1.5 $"[11:-2]
18
19 from Globals import DTMLFile
20 from Globals import InitializeClass
21
22 from Products.ZenRelations.RelSchema import *
23
24 from ProductClass import ProductClass
25
34
35 addSoftwareClass = DTMLFile('dtml/addSoftwareClass',globals())
36
38 """SoftwareClass object"""
39 portal_type = meta_type = 'SoftwareClass'
40
41 build=""
42 version=""
43
44 _properties = ProductClass._properties + (
45 {'id':'version', 'type':'string', 'mode':'w'},
46 {'id':'build', 'type':'string', 'mode':'w'},
47 )
48
49 - def __init__(self, id, title="", prodName=None,
50 productKey=None, partNumber="",description="", isOS=False):
53
55 """Return the type name of this product (Hardware, Software).
56 """
57 if self.isOS:
58 return "Operating System"
59 else:
60 return self.meta_type[:-5]
61
62
63 InitializeClass(SoftwareClass)
64
65
67
68 """OSSoftwareClass object"""
69
70 portal_type = meta_type = 'OSSoftwareClass'
71
72 - def __init__(self, id, title="", prodName=None,
73 productKey=None, partNumber="",description="", isOS=True):
75
76
77 InitializeClass(OSSoftwareClass)
78