def __init__(self, parentIssue, *entries, **args): PropertiedDictionary.__init__(self) self.__parent=parentIssue self.__loaded=False self.__dirty=False self.__trackStaleness=False self.__extra={} self._addProperty("uuid", "The uuid of the comment", lambda x: x if isinstance(x, UUID) else UUID(x), self.nullUUID) self._addProperty("Alt-id", "The alt-id of the comment", str, "") self._addProperty("short-name", "The short name of the comment", str, "") self._addProperty("In-reply-to", "The uuid of the comment to which this comment replies", lambda x: x if isinstance(x, UUID) else UUID(x), self.nullUUID) self._addProperty("Author", "The author of the comment", unicode, u"") self._addProperty("Date", "When this comment was made", coerce_datetime, self.nullDatetime) self._addProperty("Content-type", "The content type of this comment", self.__coerce_content_type, "text/plain") self._addProperty("body", "The body of this comment", unicode, u"") self._load(*entries, **args)
def __init__(self, parentParser, *entries, **args): PropertiedDictionary.__init__(self) self.__parent=parentParser self.__loaded=False self.__dirty=False self.__trackStaleness=False self.__extra={} self.__comments={} self._addProperty("uuid", "The uuid of the issue", lambda x: x if isinstance(x, UUID) else UUID(x), self.nullUUID) self._addProperty("short-name", "The short name of the issue", str, "") self._addProperty("severity", "The severity of the issue", self.__coerce_severity, "") self._addProperty("status", "The status of the issue", self.__coerce_status, "") self._addProperty("reporter", "The reporter of the issue", unicode, u"") self._addProperty("creator", "The creator of the issue", unicode, u"") self._addProperty("assigned", "The person assigned to the issue", unicode, u"") self._addProperty("time", "When this issue was created", coerce_datetime, self.nullDatetime) self._addProperty("extra-strings", "Additional tags on the issue", str, "") self._addProperty("summary", "Summary of the issue", unicode, u"") self._load(*entries, **args)
def __copy__(self): ret=PropertiedDictionary.__copy__(self) ret.__comments={} return ret
def __delattr__(self, name): if self._isProperty(name) and not self.isLoaded and name is not 'uuid': self.load() return PropertiedDictionary.__delattr__(self, name)
def __setitem__(self, name, value): if self._isProperty(name) and not self.isLoaded and name is not 'uuid': self.load() return PropertiedDictionary.__setitem__(self, name, value)