oship-dev team mailing list archive
-
oship-dev team
-
Mailing list archive
-
Message #01621
Terminology Service access
Hello,
In some classes like DvText and TermMapping we need the Terminology Service
to enforce some invariants of the class. I didn't see in the specifications
if there is a standard way to access the Terminology Service. I think each
implementation can choose the best way, right?
So far I'm receiving a Terminology Service instance in the initializer of
the class, like this:
class DvText(...):
def __init__(self, value, ..., terminologyService)
I decided to use the initializer because it's easy to change the Terminology
Service (if necessary) and because it's easy to test, I can create a dummy
Terminology Service to simulate the behaviour I need. But maybe there are
better approaches to do this. What do you think?
Thanks,
Wagner.
Follow ups