1 from Components.Converter.Converter import Converter
2 from Components.Element import cached
4 class EventName(Converter, object):
7 EXTENDED_DESCRIPTION = 2
10 def __init__(self, type):
11 Converter.__init__(self, type)
12 if type == "Description":
13 self.type = self.SHORT_DESCRIPTION
14 elif type == "ExtendedDescription":
15 self.type = self.EXTENDED_DESCRIPTION
23 event = self.source.event
27 if self.type == self.NAME:
28 return event.getEventName()
29 elif self.type == self.SHORT_DESCRIPTION:
30 return event.getShortDescription()
31 elif self.type == self.EXTENDED_DESCRIPTION:
32 return event.getExtendedDescription()
33 elif self.type == self.ID:
34 return str(event.getEventId())
36 text = property(getText)