示例#1
0
    def parent_organisations(self):
        '''The organisations this RTC belongs to.'''
        class ParentOrg:
            def __init__(self, sdo_id, org_id):
                self.sdo_id = sdo_id
                self.org_id = org_id

        with self._mutex:
            if not self._parent_orgs:
                for sdo in self._obj.get_organizations():
                    if not sdo:
                        continue
                    owner = sdo.get_owner()
                    if owner:
                        sdo_id = owner._narrow(SDOPackage.SDO).get_sdo_id()
                    else:
                        sdo_id = ''
                    org_id = sdo.get_organization_id()
                    self._parent_orgs.append(ParentOrg(sdo_id, org_id))
        return self._parent_orgs
示例#2
0
    def parent_organisations(self):
        '''The organisations this RTC belongs to.'''
        class ParentOrg:
            def __init__(self, sdo_id, org_id):
                self.sdo_id = sdo_id
                self.org_id = org_id

        with self._mutex:
            if not self._parent_orgs:
                for sdo in self._obj.get_organizations():
                    if not sdo:
                        continue
                    owner = sdo.get_owner()
                    if owner:
                        sdo_id = owner._narrow(SDOPackage.SDO).get_sdo_id()
                    else:
                        sdo_id = ''
                    org_id = sdo.get_organization_id()
                    self._parent_orgs.append(ParentOrg(sdo_id, org_id))
        return self._parent_orgs
示例#3
0
 def parent_org_ids(self):
     """The organisation IDs of the compositions this RTC belongs to."""
     return [sdo.get_organization_id() for sdo in self._obj.get_organizations() if sdo]
示例#4
0
 def org_ids(self):
     """The organisation IDs of this composition."""
     return [sdo.get_organization_id() for sdo in self._obj.get_owned_organizations()]
示例#5
0
 def org_ids(self):
     '''The organisation IDs of this composition.'''
     return [sdo.get_organization_id() for sdo in \
             self._obj.get_owned_organizations()]
示例#6
0
 def parent_org_ids(self):
     '''The organisation IDs of the compositions this RTC belongs to.'''
     return [sdo.get_organization_id() for sdo in \
             self._obj.get_organizations() if sdo]
示例#7
0
 def org_ids(self):
     '''The organisation IDs of this composition.'''
     return [sdo.get_organization_id() for sdo in \
             self._obj.get_owned_organizations()]