Extension of the property / metadata support by complex domain objects.

Registered by Tobias Schlauch

Domain objects should allow to model meta data in a more compact way by using Python objects.
Domain objects should always be inherited from a base class (e.g., DomainObject). The required
properties should be defined on class level. Properties defined in this way are persisted and can be further described by a
documentation string, display name, and a default value. The existing property types (e.g., StringType, NumberType, ...) should be re-used as well.

Here an example:
>>> class Author(DomainObject):
... name = DomainProperty(StringType(), None, "Name", "This is the author name.")
...
... @name.setValidate
... def _validateName(self):
... if self.name is None or len(self.name) == 0:
... raise ValueError("Name should not be empty.")
...
... author = Author()
... author.name = "Pierre"

Blueprint information

Status:
Complete
Approver:
None
Priority:
Essential
Drafter:
None
Direction:
Needs approval
Assignee:
Tobias Schlauch
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 2.2.0
Started by
Tobias Schlauch
Completed by
Tobias Schlauch

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.