Part of stoqlib.lib.component View In Hierarchy
Known subclasses: stoqlib.domain.base.AdaptableORMObject
| Method | __init__ | Undocumented |
| Class Method | getFacetType | Fetches a facet type associated with an interface, or raise |
| Class Method | getFacetTypes | Returns facet classes for this object |
| Class Method | registerFacet | Registers a facet for class cls. |
| Method | addFacet | Adds a facet implementing iface for the current object |
| Method | removeFacet | Removes a facet from the current object |
| Method | getFacets | Gets a list of facets assoicated with the current object. |
| Parameters | iface | interface name for the facet to grab |
| Returns | the facet type for the interface | |
| Returns | a list of facet classes | |
The 'facet' argument is an adapter class which will be registered using its interfaces specified in __implements__ argument.
Notes: the assigned key will have the name of the class cls.
| Parameters | cls | |
| facet | ||
| ifaces | optional list of interfaces to attach |
| Parameters | iface | interface of the facet to add |
| Returns | the facet | |