def get_domain(self, did): if did is None: raise ValueError("A DID must be specified") did = str(did).strip() if len(did) == 0: raise ValueError("A DID must be specified") return Serializer.domain_to_json(self.__project.get_domain(did=did))
def get_domains_in_aggregate(self, aid, limit, offset): if aid is None: raise ValueError("A AID must be specified") aid = str(aid).strip() if len(aid) == 0: raise ValueError("A AID must be specified") return [ Serializer.domain_to_json(domain) for domain in self.__project.get_domains_in_aggregate( aid=aid, limit=limit, offset=offset) ]
def remove_domain_in_aggregate(self, aid, did): if aid is None: raise ValueError("A AID must be specified") aid = str(aid).strip() if len(aid) == 0: raise ValueError("A AID must be specified") if did is None: raise ValueError("A AID must be specified") did = str(did).strip() if len(did) == 0: raise ValueError("A DID must be specified") return Serializer.domain_to_json( self.__project.remove_domain_in_aggregate(aid=aid, did=did))
def create_domain_data(self, name, tid): if name is None: raise ValueError("A name must be specified") name = str(name).strip() if len(name) == 0: raise ValueError("A name must be specified") if tid is None: raise ValueError("A TID must be specified") tid = str(tid).strip() if len(tid) == 0: raise ValueError("A TID must be specified") return Serializer.domain_to_json( self.__project.create_domain_data(name=name, tid=tid))
def create_domain_aggregate(self): return Serializer.domain_to_json( self.__project.create_domain_aggregate())
def get_domains(self, limit, offset): return [ Serializer.domain_to_json(domain) for domain in self.__project.get_domains(limit, offset) ]