The extend.ticket package provides five mixins that decompose ObjTicket's
delegate-based sub-systems into composable classes. Each mixin is a plain
class (no ObjData inheritance) that relies on the host class providing
self.get_queries(), self.escape_sql(), self.sql_execute(), etc.
| Mixin | Domain | YAML | Key Methods |
|---|---|---|---|
ObjTicketSlaMixin |
SLA deadlines | ObjTicketSlaMixin.yaml |
get_response_deadline(), get_resolution_deadline(), get_escalation_contact() |
ObjTicketTaskMixin |
Task lifecycle | ObjTicketTaskMixin.yaml |
task_create(), task_get_tasks(), task_complete(), task_start(), task_cancel() |
ObjTicketCommentMixin |
Comments | ObjTicketCommentMixin.yaml |
comment_create(), comment_get_comments(), comment_delete() |
ObjTicketLinkMixin |
Ticket links | ObjTicketLinkMixin.yaml |
link_create(), link_get_links(), link_get_blocked_by(), link_remove() |
ObjTicketTemplateMixin |
Templates | ObjTicketTemplateMixin.yaml |
template_create(), template_get_templates(), template_create_from_template() |
All mixin methods are prefixed with the domain name to avoid collisions
with ObjTicket's own create(), read(), update(), add_task(),
get_tasks(), get_comments(), and get_links():
sla_create(), sla_read(), sla_update()task_create(), task_read(), task_update(), task_get_tasks()comment_create(), comment_read(), comment_get_comments(), comment_delete()link_create(), link_get_links(), link_get_blocked_by(), link_remove()template_create(), template_read(), template_add_task(), template_get_templates(), template_get_tasks()Methods without collision risk retain unprefixed names:
get_response_deadline(), get_resolution_deadline(),
get_escalation_contact(), get_escalation_deadline(),
check_response_compliance(), check_resolution_compliance(),
get_sla_by_package(), get_pending_task_count(),
get_completed_task_count().
Each mixin has a companion .yaml file in the same directory. ObjData's
MRO-based load_queries() method walks the class hierarchy and discovers
these YAML files automatically via _yaml_candidates_for_class().
ObjTicket provides thin proxy objects for legacy delegate-style access:
self.sla = _SlaProxy(self)
self.task_mgr = _TaskProxy(self)
self.comment_mgr = _CommentProxy(self)
self.link_mgr = _LinkProxy(self)
self.template_mgr = _TemplateProxy(self)
Each proxy routes legacy method names (create, read, get_tasks,
get_comments, get_links, add_task, etc.) to their prefixed
equivalents on the host ObjTicket instance.
| Old (delegate) | New (mixin) |
|---|---|
self.sla.get_response_deadline(p, pr, t) |
self.get_response_deadline(p, pr, t) |
self.sla.get_escalation_contact(p, pr) |
self.get_escalation_contact(p, pr) |
self.task_mgr.create(guid, name, ...) |
self.task_create(guid, name, ...) |
self.task_mgr.get_tasks(guid) |
self.task_get_tasks(guid) |
self.comment_mgr.create(guid, text, ...) |
self.comment_create(guid, text, ...) |
self.comment_mgr.get_comments(guid, inc) |
self.comment_get_comments(guid, inc) |
self.comment_mgr.delete_comment(guid) |
self.comment_delete(guid) |
self.link_mgr.create(src, tgt, lt, by) |
self.link_create(src, tgt, lt, by) |
self.link_mgr.get_links(guid) |
self.link_get_links(guid) |
self.link_mgr.get_blocked_by(guid) |
self.link_get_blocked_by(guid) |
self.link_mgr.remove_link(guid) |
self.link_remove(guid) |
self.template_mgr.create(...) |
self.template_create(...) |
self.template_mgr.get_templates(pkg) |
self.template_get_templates(pkg) |
self.template_mgr.get_template_tasks(guid) |
self.template_get_tasks(guid) |
self.template_mgr.create_from_template(...) |
self.template_create_from_template(...) |
The standalone delegate classes (ObjTicketSla, ObjTicketTask, etc.)
still exist in factory.core/ and remain functional but are deprecated.